diff --git a/go.mod b/go.mod
index 75a345ab3..a3d68ee1e 100644
--- a/go.mod
+++ b/go.mod
@@ -11,7 +11,10 @@ require (
github.com/VictoriaMetrics/fasthttp v1.1.0
github.com/VictoriaMetrics/metrics v1.22.2
github.com/VictoriaMetrics/metricsql v0.45.0
- github.com/aws/aws-sdk-go v1.44.105
+ github.com/aws/aws-sdk-go-v2 v1.16.16
+ github.com/aws/aws-sdk-go-v2/config v1.17.7
+ github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.7.1
+ github.com/aws/aws-sdk-go-v2/service/s3 v1.19.0
github.com/cespare/xxhash/v2 v2.1.2
github.com/cheggaaa/pb/v3 v3.1.0
github.com/golang/snappy v0.0.4
@@ -37,6 +40,19 @@ require (
cloud.google.com/go/compute v1.10.0 // indirect
cloud.google.com/go/iam v0.4.0 // indirect
github.com/VividCortex/ewma v1.2.0 // indirect
+ github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.0.0 // indirect
+ github.com/aws/aws-sdk-go-v2/credentials v1.12.20 // indirect
+ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.17 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.23 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.17 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/ini v1.3.24 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.5.0 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.17 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.9.0 // indirect
+ github.com/aws/aws-sdk-go-v2/service/sso v1.11.23 // indirect
+ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.5 // indirect
+ github.com/aws/aws-sdk-go-v2/service/sts v1.16.19 // indirect
+ github.com/aws/smithy-go v1.13.3 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/fatih/color v1.13.0 // indirect
diff --git a/go.sum b/go.sum
index d937cc3bc..6272c3c08 100644
--- a/go.sum
+++ b/go.sum
@@ -149,9 +149,52 @@ github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQ
github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48=
github.com/aws/aws-sdk-go v1.35.31/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
-github.com/aws/aws-sdk-go v1.44.105 h1:UUwoD1PRKIj3ltrDUYTDQj5fOTK3XsnqolLpRTMmSEM=
-github.com/aws/aws-sdk-go v1.44.105/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/aws/aws-sdk-go-v2 v1.11.0/go.mod h1:SQfA+m2ltnu1cA0soUkj4dRSsmITiVQUJvBIZjzfPyQ=
+github.com/aws/aws-sdk-go-v2 v1.16.16 h1:M1fj4FE2lB4NzRb9Y0xdWsn2P0+2UHVxwKyOa4YJNjk=
+github.com/aws/aws-sdk-go-v2 v1.16.16/go.mod h1:SwiyXi/1zTUZ6KIAmLK5V5ll8SiURNUYOqTerZPaF9k=
+github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.0.0 h1:yVUAwvJC/0WNPbyl0nA3j1L6CW1CN8wBubCRqtG7JLI=
+github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.0.0/go.mod h1:Xn6sxgRuIDflLRJFj5Ev7UxABIkNbccFPV/p8itDReM=
+github.com/aws/aws-sdk-go-v2/config v1.10.1/go.mod h1:auIv5pIIn3jIBHNRcVQcsczn6Pfa6Dyv80Fai0ueoJU=
+github.com/aws/aws-sdk-go-v2/config v1.17.7 h1:odVM52tFHhpqZBKNjVW5h+Zt1tKHbhdTQRb+0WHrNtw=
+github.com/aws/aws-sdk-go-v2/config v1.17.7/go.mod h1:dN2gja/QXxFF15hQreyrqYhLBaQo1d9ZKe/v/uplQoI=
+github.com/aws/aws-sdk-go-v2/credentials v1.6.1/go.mod h1:QyvQk1IYTqBWSi1T6UgT/W8DMxBVa5pVuLFSRLLhGf8=
+github.com/aws/aws-sdk-go-v2/credentials v1.12.20 h1:9+ZhlDY7N9dPnUmf7CDfW9In4sW5Ff3bh7oy4DzS1IE=
+github.com/aws/aws-sdk-go-v2/credentials v1.12.20/go.mod h1:UKY5HyIux08bbNA7Blv4PcXQ8cTkGh7ghHMFklaviR4=
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.8.0/go.mod h1:5E1J3/TTYy6z909QNR0QnXGBpfESYGDqd3O0zqONghU=
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.17 h1:r08j4sbZu/RVi+BNxkBJwPMUYY3P8mgSDuKkZ/ZN1lE=
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.17/go.mod h1:yIkQcCDYNsZfXpd5UX2Cy+sWA1jPgIhGTw9cOBzfVnQ=
+github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.7.1 h1:p9Dys1g2YdaqMalnp6AwCA+tpMMdJNGw5YYKP/u3sUk=
+github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.7.1/go.mod h1:wN/mvkow08GauDwJ70jnzJ1e+hE+Q3Q7TwpYLXOe9oI=
+github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.0/go.mod h1:NO3Q5ZTTQtO2xIg2+xTXYDiT7knSejfeDm7WGDaOo0U=
+github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.23 h1:s4g/wnzMf+qepSNgTvaQQHNxyMLKSawNhKCPNy++2xY=
+github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.23/go.mod h1:2DFxAQ9pfIRy0imBCJv+vZ2X6RKxves6fbnEuSry6b4=
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.0.0/go.mod h1:anlUzBoEWglcUxUQwZA7HQOEVEnQALVZsizAapB2hq8=
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.17 h1:/K482T5A3623WJgWT8w1yRAFK4RzGzEl7y39yhtn9eA=
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.17/go.mod h1:pRwaTYCJemADaqCbUAxltMoHKata7hmB5PjEXeu0kfg=
+github.com/aws/aws-sdk-go-v2/internal/ini v1.3.0/go.mod h1:6oXGy4GLpypD3uCh8wcqztigGgmhLToMfjavgh+VySg=
+github.com/aws/aws-sdk-go-v2/internal/ini v1.3.24 h1:wj5Rwc05hvUSvKuOF29IYb9QrCLjU+rHAy/x/o0DK2c=
+github.com/aws/aws-sdk-go-v2/internal/ini v1.3.24/go.mod h1:jULHjqqjDlbyTa7pfM7WICATnOv+iOhjletM3N0Xbu8=
+github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.5.0 h1:lPLbw4Gn59uoKqvOfSnkJr54XWk5Ak1NK20ZEiSWb3U=
+github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.5.0/go.mod h1:80NaCIH9YU3rzTTs/J/ECATjXuRqzo/wB6ukO6MZ0XY=
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.5.0/go.mod h1:Mq6AEc+oEjCUlBuLiK5YwW4shSOAKCQ3tXN0sQeYoBA=
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.17 h1:Jrd/oMh0PKQc6+BowB+pLEwLIgaQF29eYbe7E1Av9Ug=
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.17/go.mod h1:4nYOrY41Lrbk2170/BGkcJKBhws9Pfn8MG3aGqjjeFI=
+github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.9.0 h1:0BOlTqnNnrEO04oYKzDxMMe68t107pmIotn18HtVonY=
+github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.9.0/go.mod h1:xKCZ4YFSF2s4Hnb/J0TLeOsKuGzICzcElaOKNGrVnx4=
+github.com/aws/aws-sdk-go-v2/service/s3 v1.19.0 h1:5mRAms4TjSTOGYsqKYte5kHr1PzpMJSyLThjF3J+hw0=
+github.com/aws/aws-sdk-go-v2/service/s3 v1.19.0/go.mod h1:Gwz3aVctJe6mUY9T//bcALArPUaFmNAy2rTB9qN4No8=
+github.com/aws/aws-sdk-go-v2/service/sso v1.6.0/go.mod h1:Q/l0ON1annSU+mc0JybDy1Gy6dnJxIcWjphO6qJPzvM=
+github.com/aws/aws-sdk-go-v2/service/sso v1.11.23 h1:pwvCchFUEnlceKIgPUouBJwK81aCkQ8UDMORfeFtW10=
+github.com/aws/aws-sdk-go-v2/service/sso v1.11.23/go.mod h1:/w0eg9IhFGjGyyncHIQrXtU8wvNsTJOP0R6PPj0wf80=
+github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.5 h1:GUnZ62TevLqIoDyHeiWj2P7EqaosgakBKVvWriIdLQY=
+github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.5/go.mod h1:csZuQY65DAdFBt1oIjO5hhBR49kQqop4+lcuCjf2arA=
+github.com/aws/aws-sdk-go-v2/service/sts v1.10.0/go.mod h1:jLKCFqS+1T4i7HDqCP9GM4Uk75YW1cS0o82LdxpMyOE=
+github.com/aws/aws-sdk-go-v2/service/sts v1.16.19 h1:9pPi0PsFNAGILFfPCk8Y0iyEBGc6lu6OQ97U7hmdesg=
+github.com/aws/aws-sdk-go-v2/service/sts v1.16.19/go.mod h1:h4J3oPZQbxLhzGnk+j9dfYHi5qIOVJ5kczZd658/ydM=
+github.com/aws/smithy-go v1.9.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
+github.com/aws/smithy-go v1.13.3 h1:l7LYxGuzK6/K+NzJ2mC+VvLUbae0sL3bXU//04MkmnA=
+github.com/aws/smithy-go v1.13.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
diff --git a/lib/backup/s3remote/s3.go b/lib/backup/s3remote/s3.go
index 2557cea80..dcc51d5e8 100644
--- a/lib/backup/s3remote/s3.go
+++ b/lib/backup/s3remote/s3.go
@@ -8,14 +8,15 @@ import (
"io"
"strings"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/config"
+ "github.com/aws/aws-sdk-go-v2/feature/s3/manager"
+ "github.com/aws/aws-sdk-go-v2/service/s3"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+
"github.com/VictoriaMetrics/VictoriaMetrics/lib/backup/common"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/backup/fscommon"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/s3"
- "github.com/aws/aws-sdk-go/service/s3/s3manager"
)
// FS represents filesystem for backups in S3.
@@ -43,8 +44,8 @@ type FS struct {
// The name of S3 config profile to use.
ProfileName string
- s3 *s3.S3
- uploader *s3manager.Uploader
+ s3 *s3.Client
+ uploader *manager.Uploader
}
// Init initializes fs.
@@ -60,46 +61,46 @@ func (fs *FS) Init() error {
if !strings.HasSuffix(fs.Dir, "/") {
fs.Dir += "/"
}
- opts := session.Options{
- SharedConfigState: session.SharedConfigEnable,
- Profile: fs.ProfileName,
+ configOpts := []func(*config.LoadOptions) error{
+ config.WithSharedConfigProfile(fs.ProfileName),
}
+
if len(fs.CredsFilePath) > 0 {
- opts.SharedConfigFiles = []string{
+ configOpts = append(configOpts, config.WithSharedConfigFiles([]string{
fs.ConfigFilePath,
fs.CredsFilePath,
- }
+ }))
}
- sess, err := session.NewSessionWithOptions(opts)
+
+ cfg, err := config.LoadDefaultConfig(context.TODO(),
+ configOpts...,
+ )
if err != nil {
- return fmt.Errorf("cannot create S3 session: %w", err)
+ return fmt.Errorf("cannot load S3 config: %w", err)
+ }
+ var outerErr error
+ fs.s3 = s3.NewFromConfig(cfg, func(o *s3.Options) {
+ if len(fs.CustomEndpoint) > 0 {
+ logger.Infof("Using provided custom S3 endpoint: %q", fs.CustomEndpoint)
+ o.UsePathStyle = fs.S3ForcePathStyle
+ o.EndpointResolver = s3.EndpointResolverFromURL(fs.CustomEndpoint)
+ } else {
+ region, err := manager.GetBucketRegion(context.Background(), s3.NewFromConfig(cfg), fs.Bucket)
+ if err != nil {
+ outerErr = fmt.Errorf("cannot determine region for bucket %q: %w", fs.Bucket, err)
+ return
+ }
+
+ o.Region = region
+ logger.Infof("bucket %q is stored at region %q; switching to this region", fs.Bucket, region)
+ }
+ })
+
+ if outerErr != nil {
+ return outerErr
}
- if len(fs.CustomEndpoint) > 0 {
- // Use provided custom endpoint for S3
- logger.Infof("Using provided custom S3 endpoint: %q", fs.CustomEndpoint)
- // hack for https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1449
- if sess.Config.Region == nil || *sess.Config.Region == "" {
- logger.Infof("Region is not defined for custom S3 endpoint, using `us-east-1` as default")
- sess.Config.WithRegion("us-east-1")
- }
- sess.Config.WithEndpoint(fs.CustomEndpoint)
-
- // Disable prefixing endpoint with bucket name
- sess.Config.WithS3ForcePathStyle(fs.S3ForcePathStyle)
- } else {
- // Determine bucket region.
- ctx := context.Background()
- region, err := s3manager.GetBucketRegion(ctx, sess, fs.Bucket, "us-west-2")
- if err != nil {
- return fmt.Errorf("cannot determine region for bucket %q: %w", fs.Bucket, err)
- }
- sess.Config.WithRegion(region)
- logger.Infof("bucket %q is stored at region %q; switching to this region", fs.Bucket, region)
- }
-
- fs.s3 = s3.New(sess)
- fs.uploader = s3manager.NewUploader(sess, func(u *s3manager.Uploader) {
+ fs.uploader = manager.NewUploader(fs.s3, func(u *manager.Uploader) {
// We manage upload concurrency by ourselves.
u.Concurrency = 1
})
@@ -120,18 +121,24 @@ func (fs *FS) String() string {
// ListParts returns all the parts for fs.
func (fs *FS) ListParts() ([]common.Part, error) {
dir := fs.Dir
- input := &s3.ListObjectsV2Input{
+
+ var parts []common.Part
+
+ paginator := s3.NewListObjectsV2Paginator(fs.s3, &s3.ListObjectsV2Input{
Bucket: aws.String(fs.Bucket),
Prefix: aws.String(dir),
- }
- var errOuter error
- var parts []common.Part
- err := fs.s3.ListObjectsV2Pages(input, func(page *s3.ListObjectsV2Output, lastPage bool) bool {
+ })
+
+ for paginator.HasMorePages() {
+ page, err := paginator.NextPage(context.TODO())
+ if err != nil {
+ return nil, fmt.Errorf("unexpected pagination error: %w", err)
+ }
+
for _, o := range page.Contents {
file := *o.Key
if !strings.HasPrefix(file, dir) {
- errOuter = fmt.Errorf("unexpected prefix for s3 key %q; want %q", file, dir)
- return false
+ return nil, fmt.Errorf("unexpected prefix for s3 key %q; want %q", file, dir)
}
if fscommon.IgnorePath(file) {
continue
@@ -141,17 +148,13 @@ func (fs *FS) ListParts() ([]common.Part, error) {
logger.Infof("skipping unknown object %q", file)
continue
}
- p.ActualSize = uint64(*o.Size)
+
+ p.ActualSize = uint64(o.Size)
parts = append(parts, p)
}
- return !lastPage
- })
- if errOuter != nil && err == nil {
- err = errOuter
- }
- if err != nil {
- return nil, fmt.Errorf("error when listing s3 objects inside dir %q: %w", dir, err)
+
}
+
return parts, nil
}
@@ -162,7 +165,7 @@ func (fs *FS) DeletePart(p common.Part) error {
Bucket: aws.String(fs.Bucket),
Key: aws.String(path),
}
- _, err := fs.s3.DeleteObject(input)
+ _, err := fs.s3.DeleteObject(context.Background(), input)
if err != nil {
return fmt.Errorf("cannot delete %q at %s (remote path %q): %w", p.Path, fs, path, err)
}
@@ -190,7 +193,7 @@ func (fs *FS) CopyPart(srcFS common.OriginFS, p common.Part) error {
CopySource: aws.String(copySource),
Key: aws.String(dstPath),
}
- _, err := fs.s3.CopyObject(input)
+ _, err := fs.s3.CopyObject(context.Background(), input)
if err != nil {
return fmt.Errorf("cannot copy %q from %s to %s (copySource %q): %w", p.Path, src, fs, copySource, err)
}
@@ -204,7 +207,7 @@ func (fs *FS) DownloadPart(p common.Part, w io.Writer) error {
Bucket: aws.String(fs.Bucket),
Key: aws.String(path),
}
- o, err := fs.s3.GetObject(input)
+ o, err := fs.s3.GetObject(context.Background(), input)
if err != nil {
return fmt.Errorf("cannot open %q at %s (remote path %q): %w", p.Path, fs, path, err)
}
@@ -228,12 +231,12 @@ func (fs *FS) UploadPart(p common.Part, r io.Reader) error {
sr := &statReader{
r: r,
}
- input := &s3manager.UploadInput{
+ input := &s3.PutObjectInput{
Bucket: aws.String(fs.Bucket),
Key: aws.String(path),
Body: sr,
}
- _, err := fs.uploader.Upload(input)
+ _, err := fs.uploader.Upload(context.Background(), input)
if err != nil {
return fmt.Errorf("cannot upoad data to %q at %s (remote path %q): %w", p.Path, fs, path, err)
}
@@ -265,7 +268,7 @@ func (fs *FS) DeleteFile(filePath string) error {
Bucket: aws.String(fs.Bucket),
Key: aws.String(path),
}
- if _, err := fs.s3.DeleteObject(input); err != nil {
+ if _, err := fs.s3.DeleteObject(context.Background(), input); err != nil {
return fmt.Errorf("cannot delete %q at %s (remote path %q): %w", filePath, fs, path, err)
}
return nil
@@ -279,12 +282,12 @@ func (fs *FS) CreateFile(filePath string, data []byte) error {
sr := &statReader{
r: bytes.NewReader(data),
}
- input := &s3manager.UploadInput{
+ input := &s3.PutObjectInput{
Bucket: aws.String(fs.Bucket),
Key: aws.String(path),
Body: sr,
}
- _, err := fs.uploader.Upload(input)
+ _, err := fs.uploader.Upload(context.Background(), input)
if err != nil {
return fmt.Errorf("cannot upoad data to %q at %s (remote path %q): %w", filePath, fs, path, err)
}
@@ -302,10 +305,9 @@ func (fs *FS) HasFile(filePath string) (bool, error) {
Bucket: aws.String(fs.Bucket),
Key: aws.String(path),
}
- o, err := fs.s3.GetObject(input)
+ o, err := fs.s3.GetObject(context.Background(), input)
if err != nil {
- var ae awserr.Error
- if errors.As(err, &ae) && ae.Code() == s3.ErrCodeNoSuchKey {
+ if errors.Is(err, &types.NoSuchKey{}) {
return false, nil
}
return false, fmt.Errorf("cannot open %q at %s (remote path %q): %w", filePath, fs, path, err)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/.gitignore b/vendor/github.com/aws/aws-sdk-go-v2/.gitignore
new file mode 100644
index 000000000..e736820b3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/.gitignore
@@ -0,0 +1,12 @@
+dist
+/doc
+/doc-staging
+.yardoc
+Gemfile.lock
+/internal/awstesting/integration/smoke/**/importmarker__.go
+/internal/awstesting/integration/smoke/_test/
+/vendor
+/private/model/cli/gen-api/gen-api
+.gradle/
+build/
+.idea/
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/.golangci.toml b/vendor/github.com/aws/aws-sdk-go-v2/.golangci.toml
new file mode 100644
index 000000000..8792d0ca6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/.golangci.toml
@@ -0,0 +1,27 @@
+[run]
+concurrency = 4
+timeout = "1m"
+issues-exit-code = 0
+modules-download-mode = "readonly"
+allow-parallel-runners = true
+skip-dirs = ["internal/repotools"]
+skip-dirs-use-default = true
+skip-files = ["service/transcribestreaming/eventstream_test.go"]
+[output]
+format = "github-actions"
+
+[linters-settings.cyclop]
+skip-tests = false
+
+[linters-settings.errcheck]
+check-blank = true
+
+[linters]
+disable-all = true
+enable = ["errcheck"]
+fast = false
+
+[issues]
+exclude-use-default = false
+
+# Refer config definitions at https://golangci-lint.run/usage/configuration/#config-file
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/.travis.yml b/vendor/github.com/aws/aws-sdk-go-v2/.travis.yml
new file mode 100644
index 000000000..4b498a7a2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/.travis.yml
@@ -0,0 +1,31 @@
+language: go
+sudo: true
+dist: bionic
+
+branches:
+ only:
+ - main
+
+os:
+ - linux
+ - osx
+ # Travis doesn't work with windows and Go tip
+ #- windows
+
+go:
+ - tip
+
+matrix:
+ allow_failures:
+ - go: tip
+
+before_install:
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install make; fi
+ - (cd /tmp/; go get golang.org/x/lint/golint)
+
+env:
+ - EACHMODULE_CONCURRENCY=4
+
+script:
+ - make ci-test-no-generate;
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md
new file mode 100644
index 000000000..78de90a37
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md
@@ -0,0 +1,5715 @@
+# Release (2022-09-20)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.16.16
+ * **Documentation**: added clafirfication on the Credential object to show usage of loadDefaultConfig to load credentials
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.58.0](service/ec2/CHANGELOG.md#v1580-2022-09-20)
+ * **Feature**: This release adds support for blocked paths to Amazon VPC Reachability Analyzer.
+
+# Release (2022-09-19)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.18.0](service/cloudtrail/CHANGELOG.md#v1180-2022-09-19)
+ * **Feature**: This release includes support for importing existing trails into CloudTrail Lake.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.57.0](service/ec2/CHANGELOG.md#v1570-2022-09-19)
+ * **Feature**: This release adds CapacityAllocations field to DescribeCapacityReservations
+* `github.com/aws/aws-sdk-go-v2/service/mediaconnect`: [v1.17.0](service/mediaconnect/CHANGELOG.md#v1170-2022-09-19)
+ * **Feature**: This change allows the customer to use the SRT Caller protocol as part of their flows
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.26.0](service/rds/CHANGELOG.md#v1260-2022-09-19)
+ * **Feature**: This release adds support for Amazon RDS Proxy with SQL Server compatibility.
+
+# Release (2022-09-16)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/codestarnotifications`: [v1.13.0](service/codestarnotifications/CHANGELOG.md#v1130-2022-09-16)
+ * **Feature**: This release adds tag based access control for the UntagResource API.
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.18.21](service/ecs/CHANGELOG.md#v11821-2022-09-16)
+ * **Documentation**: This release supports new task definition sizes.
+
+# Release (2022-09-15)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.17.0](service/dynamodb/CHANGELOG.md#v1170-2022-09-15)
+ * **Feature**: Increased DynamoDB transaction limit from 25 to 100.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.56.0](service/ec2/CHANGELOG.md#v1560-2022-09-15)
+ * **Feature**: This feature allows customers to create tags for vpc-endpoint-connections and vpc-endpoint-service-permissions.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.43.0](service/sagemaker/CHANGELOG.md#v1430-2022-09-15)
+ * **Feature**: Amazon SageMaker Automatic Model Tuning now supports specifying Hyperband strategy for tuning jobs, which uses a multi-fidelity based tuning strategy to stop underperforming hyperparameter configurations early.
+
+# Release (2022-09-14)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/feature/rds/auth`: [v1.2.0](feature/rds/auth/CHANGELOG.md#v120-2022-09-14)
+ * **Feature**: Updated `BuildAuthToken` to validate the provided endpoint contains a port.
+* `github.com/aws/aws-sdk-go-v2/internal/v4a`: [v1.0.13](internal/v4a/CHANGELOG.md#v1013-2022-09-14)
+ * **Bug Fix**: Fixes an issues where an error from an underlying SigV4 credential provider would not be surfaced from the SigV4a credential provider. Contribution by [sakthipriyan-aqfer](https://github.com/sakthipriyan-aqfer).
+* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.18.0](service/acmpca/CHANGELOG.md#v1180-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder`: [v1.7.0](service/amplifyuibuilder/CHANGELOG.md#v170-2022-09-14)
+ * **Feature**: Amplify Studio UIBuilder is introducing forms functionality. Forms can be configured from Data Store models, JSON, or from scratch. These forms can then be generated in your project and used like any other React components.
+* `github.com/aws/aws-sdk-go-v2/service/appconfig`: [v1.14.0](service/appconfig/CHANGELOG.md#v1140-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.17.0](service/appflow/CHANGELOG.md#v1170-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.16.0](service/appmesh/CHANGELOG.md#v1160-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.17.0](service/cloudtrail/CHANGELOG.md#v1170-2022-09-14)
+ * **Feature**: This release adds CloudTrail getChannel and listChannels APIs to allow customer to view the ServiceLinkedChannel configurations.
+* `github.com/aws/aws-sdk-go-v2/service/codestar`: [v1.12.0](service/codestar/CHANGELOG.md#v1120-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/codestarnotifications`: [v1.12.0](service/codestarnotifications/CHANGELOG.md#v1120-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentity`: [v1.14.0](service/cognitoidentity/CHANGELOG.md#v1140-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.20.0](service/cognitoidentityprovider/CHANGELOG.md#v1200-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.26.0](service/configservice/CHANGELOG.md#v1260-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.30.0](service/connect/CHANGELOG.md#v1300-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/connectparticipant`: [v1.12.0](service/connectparticipant/CHANGELOG.md#v1120-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/costexplorer`: [v1.20.0](service/costexplorer/CHANGELOG.md#v1200-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.19.0](service/customerprofiles/CHANGELOG.md#v1190-2022-09-14)
+ * **Feature**: Added isUnstructured in response for Customer Profiles Integration APIs
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/dataexchange`: [v1.16.0](service/dataexchange/CHANGELOG.md#v1160-2022-09-14)
+ * **Feature**: Documentation updates for AWS Data Exchange.
+* `github.com/aws/aws-sdk-go-v2/service/drs`: [v1.8.0](service/drs/CHANGELOG.md#v180-2022-09-14)
+ * **Feature**: Fixed the data type of lagDuration that is returned in Describe Source Server API
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.55.0](service/ec2/CHANGELOG.md#v1550-2022-09-14)
+ * **Feature**: Documentation updates for Amazon EC2.
+ * **Feature**: This release adds support to send VPC Flow Logs to kinesis-data-firehose as new destination type
+ * **Feature**: This update introduces API operations to manage and create local gateway route tables, CoIP pools, and VIF group associations.
+ * **Feature**: Two new features for local gateway route tables: support for static routes targeting Elastic Network Interfaces and direct VPC routing.
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.22.0](service/eks/CHANGELOG.md#v1220-2022-09-14)
+ * **Feature**: Adding support for local Amazon EKS clusters on Outposts
+ * **Feature**: Adds support for EKS Addons ResolveConflicts "preserve" flag. Also adds new update failed status for EKS Addons.
+* `github.com/aws/aws-sdk-go-v2/service/emrcontainers`: [v1.14.0](service/emrcontainers/CHANGELOG.md#v1140-2022-09-14)
+ * **Feature**: EMR on EKS now allows running Spark SQL using the newly introduced Spark SQL Job Driver in the Start Job Run API
+* `github.com/aws/aws-sdk-go-v2/service/emrserverless`: [v1.2.0](service/emrserverless/CHANGELOG.md#v120-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/evidently`: [v1.9.0](service/evidently/CHANGELOG.md#v190-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+ * **Feature**: This release adds support for the client-side evaluation - powered by AWS AppConfig feature.
+* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.13.0](service/finspacedata/CHANGELOG.md#v1130-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/fis`: [v1.13.0](service/fis/CHANGELOG.md#v1130-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.24.12](service/fsx/CHANGELOG.md#v12412-2022-09-14)
+ * **Documentation**: Documentation update for Amazon FSx.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.31.0](service/glue/CHANGELOG.md#v1310-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.18.0](service/greengrassv2/CHANGELOG.md#v1180-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.15.3](service/identitystore/CHANGELOG.md#v1153-2022-09-14)
+ * **Documentation**: Documentation updates for the Identity Store CLI Reference.
+* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.20.0](service/imagebuilder/CHANGELOG.md#v1200-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/inspector2`: [v1.8.0](service/inspector2/CHANGELOG.md#v180-2022-09-14)
+ * **Feature**: This release adds new fields like fixAvailable, fixedInVersion and remediation to the finding model. The requirement to have vulnerablePackages in the finding model has also been removed. The documentation has been updated to reflect these changes.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.29.0](service/iot/CHANGELOG.md#v1290-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/iotanalytics`: [v1.13.0](service/iotanalytics/CHANGELOG.md#v1130-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/iotsecuretunneling`: [v1.14.0](service/iotsecuretunneling/CHANGELOG.md#v1140-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.25.0](service/iotsitewise/CHANGELOG.md#v1250-2022-09-14)
+ * **Feature**: Allow specifying units in Asset Properties
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.34.0](service/kendra/CHANGELOG.md#v1340-2022-09-14)
+ * **Feature**: This release enables our customer to choose the option of Sharepoint 2019 for the on-premise Sharepoint connector.
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.24.0](service/lexmodelsv2/CHANGELOG.md#v1240-2022-09-14)
+ * **Feature**: This release is for supporting Composite Slot Type feature in AWS Lex V2. Composite Slot Type will help developer to logically group coherent slots and maintain their inter-relationships in runtime conversation.
+* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.15.0](service/lexruntimev2/CHANGELOG.md#v1150-2022-09-14)
+ * **Feature**: This release is for supporting Composite Slot Type feature in AWS Lex V2. Composite Slot Type will help developer to logically group coherent slots and maintain their inter-relationships in runtime conversation.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.18.0](service/lookoutmetrics/CHANGELOG.md#v1180-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+ * **Feature**: Release dimension value filtering feature to allow customers to define dimension filters for including only a subset of their dataset to be used by LookoutMetrics.
+* `github.com/aws/aws-sdk-go-v2/service/m2`: [v1.1.0](service/m2/CHANGELOG.md#v110-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.23.0](service/medialive/CHANGELOG.md#v1230-2022-09-14)
+ * **Feature**: This change exposes API settings which allow Dolby Atmos and Dolby Vision to be used when running a channel using Elemental Media Live
+* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.19.0](service/networkfirewall/CHANGELOG.md#v1190-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/pi`: [v1.15.0](service/pi/CHANGELOG.md#v1150-2022-09-14)
+ * **Feature**: Increases the maximum values of two RDS Performance Insights APIs. The maximum value of the Limit parameter of DimensionGroup is 25. The MaxResult maximum is now 25 for the following APIs: DescribeDimensionKeys, GetResourceMetrics, ListAvailableResourceDimensions, and ListAvailableResourceMetrics.
+* `github.com/aws/aws-sdk-go-v2/service/pricing`: [v1.17.0](service/pricing/CHANGELOG.md#v1170-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.25.0](service/quicksight/CHANGELOG.md#v1250-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.26.9](service/redshift/CHANGELOG.md#v1269-2022-09-14)
+ * **Documentation**: This release updates documentation for AQUA features and other description updates.
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.22.0](service/route53/CHANGELOG.md#v1220-2022-09-14)
+ * **Feature**: Amazon Route 53 now supports the Middle East (UAE) Region (me-central-1) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region.
+* `github.com/aws/aws-sdk-go-v2/service/route53recoverycluster`: [v1.10.0](service/route53recoverycluster/CHANGELOG.md#v1100-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.22.0](service/s3control/CHANGELOG.md#v1220-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.42.0](service/sagemaker/CHANGELOG.md#v1420-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+ * **Feature**: SageMaker Hosting now allows customization on ML instance storage volume size, model data download timeout and inference container startup ping health check timeout for each ProductionVariant in CreateEndpointConfig API.
+ * **Feature**: This release adds HyperParameterTuningJob type in Search API.
+ * **Feature**: This release adds Mode to AutoMLJobConfig.
+* `github.com/aws/aws-sdk-go-v2/service/sagemakera2iruntime`: [v1.14.0](service/sagemakera2iruntime/CHANGELOG.md#v1140-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.16.0](service/secretsmanager/CHANGELOG.md#v1160-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry`: [v1.14.0](service/servicecatalogappregistry/CHANGELOG.md#v1140-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/sfn`: [v1.14.0](service/sfn/CHANGELOG.md#v1140-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.18.0](service/sns/CHANGELOG.md#v1180-2022-09-14)
+ * **Feature**: Amazon SNS introduces the Data Protection Policy APIs, which enable customers to attach a data protection policy to an SNS topic. This allows topic owners to enable the new message data protection feature to audit and block sensitive data that is exchanged through their topics.
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.28.0](service/ssm/CHANGELOG.md#v1280-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+ * **Feature**: This release adds support for Systems Manager State Manager Association tagging.
+* `github.com/aws/aws-sdk-go-v2/service/timestreamwrite`: [v1.14.0](service/timestreamwrite/CHANGELOG.md#v1140-2022-09-14)
+ * **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API.
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.22.0](service/transfer/CHANGELOG.md#v1220-2022-09-14)
+ * **Feature**: This release introduces the ability to have multiple server host keys for any of your Transfer Family servers that use the SFTP protocol.
+
+# Release (2022-09-02.2)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.15.2](service/identitystore/CHANGELOG.md#v1152-2022-09-022)
+ * **Bug Fix**: Reverts a change to the identitystore module so that MaxResults members of ListGroupMemberShips, ListGroupMembershipsForMembers, ListGroups, and ListUsers are correctly generated as pointer types instead of value types
+
+# Release (2022-09-02)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.19.0](service/cognitoidentityprovider/CHANGELOG.md#v1190-2022-09-02)
+ * **Feature**: This release adds a new "AuthSessionValidity" field to the UserPoolClient in Cognito. Application admins can configure this value for their users' authentication duration, which is currently fixed at 3 minutes, up to 15 minutes. Setting this field will also apply to the SMS MFA authentication flow.
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.29.0](service/connect/CHANGELOG.md#v1290-2022-09-02)
+ * **Feature**: This release adds search APIs for Routing Profiles and Queues, which can be used to search for those resources within a Connect Instance.
+* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.19.0](service/mediapackage/CHANGELOG.md#v1190-2022-09-02)
+ * **Feature**: Added support for AES_CTR encryption to CMAF origin endpoints
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.41.0](service/sagemaker/CHANGELOG.md#v1410-2022-09-02)
+ * **Feature**: This release enables administrators to attribute user activity and API calls from Studio notebooks, Data Wrangler and Canvas to specific users even when users share the same execution IAM role. ExecutionRoleIdentityConfig at Sagemaker domain level enables this feature.
+
+# Release (2022-09-01)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/codegurureviewer`: [v1.16.11](service/codegurureviewer/CHANGELOG.md#v11611-2022-09-01)
+ * **Documentation**: Documentation updates to fix formatting issues in CLI and SDK documentation.
+* `github.com/aws/aws-sdk-go-v2/service/controltower`: [v1.0.0](service/controltower/CHANGELOG.md#v100-2022-09-01)
+ * **Release**: New AWS service client module
+ * **Feature**: This release contains the first SDK for AWS Control Tower. It introduces a new set of APIs: EnableControl, DisableControl, GetControlOperation, and ListEnabledControls.
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.21.10](service/route53/CHANGELOG.md#v12110-2022-09-01)
+ * **Documentation**: Documentation updates for Amazon Route 53.
+
+# Release (2022-08-31)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.20.2](service/cloudfront/CHANGELOG.md#v1202-2022-08-31)
+ * **Documentation**: Update API documentation for CloudFront origin access control (OAC)
+* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.15.0](service/identitystore/CHANGELOG.md#v1150-2022-08-31)
+ * **Feature**: Expand IdentityStore API to support Create, Read, Update, Delete and Get operations for User, Group and GroupMembership resources.
+* `github.com/aws/aws-sdk-go-v2/service/iotthingsgraph`: [v1.13.0](service/iotthingsgraph/CHANGELOG.md#v1130-2022-08-31)
+ * **Feature**: This release deprecates all APIs of the ThingsGraph service
+* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.18.0](service/ivs/CHANGELOG.md#v1180-2022-08-31)
+ * **Feature**: IVS Merge Fragmented Streams. This release adds support for recordingReconnectWindow field in IVS recordingConfigurations. For more information see https://docs.aws.amazon.com/ivs/latest/APIReference/Welcome.html
+* `github.com/aws/aws-sdk-go-v2/service/rdsdata`: [v1.12.12](service/rdsdata/CHANGELOG.md#v11212-2022-08-31)
+ * **Documentation**: Documentation updates for RDS Data API
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.40.0](service/sagemaker/CHANGELOG.md#v1400-2022-08-31)
+ * **Feature**: SageMaker Inference Recommender now accepts Inference Recommender fields: Domain, Task, Framework, SamplePayloadUrl, SupportedContentTypes, SupportedInstanceTypes, directly in our CreateInferenceRecommendationsJob API through ContainerConfig
+
+# Release (2022-08-30)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.17.0](service/greengrassv2/CHANGELOG.md#v1170-2022-08-30)
+ * **Feature**: Adds topologyFilter to ListInstalledComponentsRequest which allows filtration of components by ROOT or ALL (including root and dependency components). Adds lastStatusChangeTimestamp to ListInstalledComponents response to show the last time a component changed state on a device.
+* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.14.15](service/identitystore/CHANGELOG.md#v11415-2022-08-30)
+ * **Documentation**: Documentation updates for the Identity Store CLI Reference.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutequipment`: [v1.15.0](service/lookoutequipment/CHANGELOG.md#v1150-2022-08-30)
+ * **Feature**: This release adds new apis for providing labels.
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.23.0](service/macie2/CHANGELOG.md#v1230-2022-08-30)
+ * **Feature**: This release of the Amazon Macie API adds support for using allow lists to define specific text and text patterns to ignore when inspecting data sources for sensitive data.
+* `github.com/aws/aws-sdk-go-v2/service/sso`: [v1.11.19](service/sso/CHANGELOG.md#v11119-2022-08-30)
+ * **Documentation**: Documentation updates for the AWS IAM Identity Center Portal CLI Reference.
+* `github.com/aws/aws-sdk-go-v2/service/ssoadmin`: [v1.15.7](service/ssoadmin/CHANGELOG.md#v1157-2022-08-30)
+ * **Documentation**: Documentation updates for the AWS IAM Identity Center CLI Reference.
+
+# Release (2022-08-29)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.24.9](service/fsx/CHANGELOG.md#v1249-2022-08-29)
+ * **Documentation**: Documentation updates for Amazon FSx for NetApp ONTAP.
+* `github.com/aws/aws-sdk-go-v2/service/voiceid`: [v1.11.0](service/voiceid/CHANGELOG.md#v1110-2022-08-29)
+ * **Feature**: Amazon Connect Voice ID now detects voice spoofing. When a prospective fraudster tries to spoof caller audio using audio playback or synthesized speech, Voice ID will return a risk score and outcome to indicate the how likely it is that the voice is spoofed.
+
+# Release (2022-08-26)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.18.0](service/mediapackage/CHANGELOG.md#v1180-2022-08-26)
+ * **Feature**: This release adds Ads AdTriggers and AdsOnDeliveryRestrictions to describe calls for CMAF endpoints on MediaPackage.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.25.1](service/rds/CHANGELOG.md#v1251-2022-08-26)
+ * **Documentation**: Removes support for RDS Custom from DBInstanceClass in ModifyDBInstance
+
+# Release (2022-08-25)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.18.13](service/elasticloadbalancingv2/CHANGELOG.md#v11813-2022-08-25)
+ * **Documentation**: Documentation updates for ELBv2. Gateway Load Balancer now supports Configurable Flow Stickiness, enabling you to configure the hashing used to maintain stickiness of flows to a specific target appliance.
+* `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.15.0](service/gamelift/CHANGELOG.md#v1150-2022-08-25)
+ * **Feature**: This release adds support for eight EC2 local zones as fleet locations; Atlanta, Chicago, Dallas, Denver, Houston, Kansas City (us-east-1-mci-1a), Los Angeles, and Phoenix. It also adds support for C5d, C6a, C6i, and R5d EC2 instance families.
+* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.22.0](service/iotwireless/CHANGELOG.md#v1220-2022-08-25)
+ * **Feature**: This release includes a new feature for the customers to enable the LoRa gateways to send out beacons for Class B devices and an option to select one or more gateways for Class C devices when sending the LoRaWAN downlink messages.
+* `github.com/aws/aws-sdk-go-v2/service/ivschat`: [v1.0.13](service/ivschat/CHANGELOG.md#v1013-2022-08-25)
+ * **Documentation**: Documentation change for IVS Chat API Reference. Doc-only update to add a paragraph on ARNs to the Welcome section.
+* `github.com/aws/aws-sdk-go-v2/service/panorama`: [v1.8.0](service/panorama/CHANGELOG.md#v180-2022-08-25)
+ * **Feature**: Support sorting and filtering in ListDevices API, and add more fields to device listings and single device detail
+* `github.com/aws/aws-sdk-go-v2/service/ssooidc`: [v1.13.0](service/ssooidc/CHANGELOG.md#v1130-2022-08-25)
+ * **Feature**: Updated required request parameters on IAM Identity Center's OIDC CreateToken action.
+
+# Release (2022-08-24)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.20.0](service/cloudfront/CHANGELOG.md#v1200-2022-08-24)
+ * **Feature**: Adds support for CloudFront origin access control (OAC), making it possible to restrict public access to S3 bucket origins in all AWS Regions, those with SSE-KMS, and more.
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.25.0](service/configservice/CHANGELOG.md#v1250-2022-08-24)
+ * **Feature**: AWS Config now supports ConformancePackTemplate documents in SSM Docs for the deployment and update of conformance packs.
+* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.18.14](service/iam/CHANGELOG.md#v11814-2022-08-24)
+ * **Documentation**: Documentation updates for AWS Identity and Access Management (IAM).
+* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.17.1](service/ivs/CHANGELOG.md#v1171-2022-08-24)
+ * **Documentation**: Documentation Change for IVS API Reference - Doc-only update to type field description for CreateChannel and UpdateChannel actions and for Channel data type. Also added Amazon Resource Names (ARNs) paragraph to Welcome section.
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.24.0](service/quicksight/CHANGELOG.md#v1240-2022-08-24)
+ * **Feature**: Added a new optional property DashboardVisual under ExperienceConfiguration parameter of GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser API operations. This supports embedding of specific visuals in QuickSight dashboards.
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.21.5](service/transfer/CHANGELOG.md#v1215-2022-08-24)
+ * **Documentation**: Documentation updates for AWS Transfer Family
+
+# Release (2022-08-23)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.25.0](service/rds/CHANGELOG.md#v1250-2022-08-23)
+ * **Feature**: RDS for Oracle supports Oracle Data Guard switchover and read replica backups.
+* `github.com/aws/aws-sdk-go-v2/service/ssoadmin`: [v1.15.5](service/ssoadmin/CHANGELOG.md#v1155-2022-08-23)
+ * **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
+
+# Release (2022-08-22)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.19.5](service/docdb/CHANGELOG.md#v1195-2022-08-22)
+ * **Documentation**: Update document for volume clone
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.54.0](service/ec2/CHANGELOG.md#v1540-2022-08-22)
+ * **Feature**: R6a instances are powered by 3rd generation AMD EPYC (Milan) processors delivering all-core turbo frequency of 3.6 GHz. C6id, M6id, and R6id instances are powered by 3rd generation Intel Xeon Scalable processor (Ice Lake) delivering all-core turbo frequency of 3.5 GHz.
+* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.23.0](service/forecast/CHANGELOG.md#v1230-2022-08-22)
+ * **Feature**: releasing What-If Analysis APIs and update ARN regex pattern to be more strict in accordance with security recommendation
+* `github.com/aws/aws-sdk-go-v2/service/forecastquery`: [v1.12.0](service/forecastquery/CHANGELOG.md#v1120-2022-08-22)
+ * **Feature**: releasing What-If Analysis APIs
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.24.0](service/iotsitewise/CHANGELOG.md#v1240-2022-08-22)
+ * **Feature**: Enable non-unique asset names under different hierarchies
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.23.0](service/lexmodelsv2/CHANGELOG.md#v1230-2022-08-22)
+ * **Feature**: This release introduces a new feature to stop a running BotRecommendation Job for Automated Chatbot Designer.
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.23.0](service/securityhub/CHANGELOG.md#v1230-2022-08-22)
+ * **Feature**: Added new resource details objects to ASFF, including resources for AwsBackupBackupVault, AwsBackupBackupPlan and AwsBackupRecoveryPoint. Added FixAvailable, FixedInVersion and Remediation to Vulnerability.
+* `github.com/aws/aws-sdk-go-v2/service/supportapp`: [v1.0.0](service/supportapp/CHANGELOG.md#v100-2022-08-22)
+ * **Release**: New AWS service client module
+ * **Feature**: This is the initial SDK release for the AWS Support App in Slack.
+
+# Release (2022-08-19)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.28.0](service/connect/CHANGELOG.md#v1280-2022-08-19)
+ * **Feature**: This release adds SearchSecurityProfiles API which can be used to search for Security Profile resources within a Connect Instance.
+* `github.com/aws/aws-sdk-go-v2/service/ivschat`: [v1.0.12](service/ivschat/CHANGELOG.md#v1012-2022-08-19)
+ * **Documentation**: Documentation Change for IVS Chat API Reference - Doc-only update to change text/description for tags field.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.33.0](service/kendra/CHANGELOG.md#v1330-2022-08-19)
+ * **Feature**: This release adds support for a new authentication type - Personal Access Token (PAT) for confluence server.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.17.0](service/lookoutmetrics/CHANGELOG.md#v1170-2022-08-19)
+ * **Feature**: This release is to make GetDataQualityMetrics API publicly available.
+
+# Release (2022-08-18)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines`: [v1.1.0](service/chimesdkmediapipelines/CHANGELOG.md#v110-2022-08-18)
+ * **Feature**: The Amazon Chime SDK now supports live streaming of real-time video from the Amazon Chime SDK sessions to streaming platforms such as Amazon IVS and Amazon Elemental MediaLive. We have also added support for concatenation to create a single media capture file.
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.21.0](service/cloudwatch/CHANGELOG.md#v1210-2022-08-18)
+ * **Feature**: Add support for managed Contributor Insights Rules
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.18.4](service/cognitoidentityprovider/CHANGELOG.md#v1184-2022-08-18)
+ * **Documentation**: This change is being made simply to fix the public documentation based on the models. We have included the PasswordChange and ResendCode events, along with the Pass, Fail and InProgress status. We have removed the Success and Failure status which are never returned by our APIs.
+* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.16.0](service/dynamodb/CHANGELOG.md#v1160-2022-08-18)
+ * **Feature**: This release adds support for importing data from S3 into a new DynamoDB table
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.53.0](service/ec2/CHANGELOG.md#v1530-2022-08-18)
+ * **Feature**: This release adds support for VPN log options , a new feature allowing S2S VPN connections to send IKE activity logs to CloudWatch Logs
+* `github.com/aws/aws-sdk-go-v2/service/networkmanager`: [v1.15.0](service/networkmanager/CHANGELOG.md#v1150-2022-08-18)
+ * **Feature**: Add TransitGatewayPeeringAttachmentId property to TransitGatewayPeering Model
+
+# Release (2022-08-17)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.15.0](service/appmesh/CHANGELOG.md#v1150-2022-08-17)
+ * **Feature**: AWS App Mesh release to support Multiple Listener and Access Log Format feature
+* `github.com/aws/aws-sdk-go-v2/service/connectcampaigns`: [v1.1.0](service/connectcampaigns/CHANGELOG.md#v110-2022-08-17)
+ * **Feature**: Updated exceptions for Amazon Connect Outbound Campaign api's.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.32.0](service/kendra/CHANGELOG.md#v1320-2022-08-17)
+ * **Feature**: This release adds Zendesk connector (which allows you to specify Zendesk SAAS platform as data source), Proxy Support for Sharepoint and Confluence Server (which allows you to specify the proxy configuration if proxy is required to connect to your Sharepoint/Confluence Server as data source).
+* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.17.0](service/lakeformation/CHANGELOG.md#v1170-2022-08-17)
+ * **Feature**: This release adds a new API support "AssumeDecoratedRoleWithSAML" and also release updates the corresponding documentation.
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.24.0](service/lambda/CHANGELOG.md#v1240-2022-08-17)
+ * **Feature**: Added support for customization of Consumer Group ID for MSK and Kafka Event Source Mappings.
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.22.0](service/lexmodelsv2/CHANGELOG.md#v1220-2022-08-17)
+ * **Feature**: This release introduces support for enhanced conversation design with the ability to define custom conversation flows with conditional branching and new bot responses.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.24.0](service/rds/CHANGELOG.md#v1240-2022-08-17)
+ * **Feature**: Adds support for Internet Protocol Version 6 (IPv6) for RDS Aurora database clusters.
+* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.15.18](service/secretsmanager/CHANGELOG.md#v11518-2022-08-17)
+ * **Documentation**: Documentation updates for Secrets Manager.
+
+# Release (2022-08-16)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.20.0](service/rekognition/CHANGELOG.md#v1200-2022-08-16)
+ * **Feature**: This release adds APIs which support copying an Amazon Rekognition Custom Labels model and managing project policies across AWS account.
+* `github.com/aws/aws-sdk-go-v2/service/servicecatalog`: [v1.14.12](service/servicecatalog/CHANGELOG.md#v11412-2022-08-16)
+ * **Documentation**: Documentation updates for Service Catalog
+
+# Release (2022-08-15)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.19.0](service/cloudfront/CHANGELOG.md#v1190-2022-08-15)
+ * **Feature**: Adds Http 3 support to distributions
+* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.14.13](service/identitystore/CHANGELOG.md#v11413-2022-08-15)
+ * **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
+* `github.com/aws/aws-sdk-go-v2/service/sso`: [v1.11.17](service/sso/CHANGELOG.md#v11117-2022-08-15)
+ * **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
+* `github.com/aws/aws-sdk-go-v2/service/wisdom`: [v1.9.0](service/wisdom/CHANGELOG.md#v190-2022-08-15)
+ * **Feature**: This release introduces a new API PutFeedback that allows submitting feedback to Wisdom on content relevance.
+
+# Release (2022-08-14)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/config`: [v1.17.0](config/CHANGELOG.md#v1170-2022-08-14)
+ * **Feature**: Add alternative mechanism for determning the users `$HOME` or `%USERPROFILE%` location when the environment variables are not present.
+* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.15.0](service/amp/CHANGELOG.md#v1150-2022-08-14)
+ * **Feature**: This release adds log APIs that allow customers to manage logging for their Amazon Managed Service for Prometheus workspaces.
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.11.0](service/chimesdkmessaging/CHANGELOG.md#v1110-2022-08-14)
+ * **Feature**: The Amazon Chime SDK now supports channels with up to one million participants with elastic channels.
+* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.17.0](service/ivs/CHANGELOG.md#v1170-2022-08-14)
+ * **Feature**: Updates various list api MaxResults ranges
+* `github.com/aws/aws-sdk-go-v2/service/personalizeruntime`: [v1.12.0](service/personalizeruntime/CHANGELOG.md#v1120-2022-08-14)
+ * **Feature**: This release provides support for promotions in AWS Personalize runtime.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.23.6](service/rds/CHANGELOG.md#v1236-2022-08-14)
+ * **Documentation**: Adds support for RDS Custom to DBInstanceClass in ModifyDBInstance
+
+# Release (2022-08-11)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/backupstorage`: [v1.0.0](service/backupstorage/CHANGELOG.md#v100-2022-08-11)
+ * **Release**: New AWS service client module
+ * **Feature**: This is the first public release of AWS Backup Storage. We are exposing some previously-internal APIs for use by external services. These APIs are not meant to be used directly by customers.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.30.0](service/glue/CHANGELOG.md#v1300-2022-08-11)
+ * **Feature**: Add support for Python 3.9 AWS Glue Python Shell jobs
+* `github.com/aws/aws-sdk-go-v2/service/privatenetworks`: [v1.0.0](service/privatenetworks/CHANGELOG.md#v100-2022-08-11)
+ * **Release**: New AWS service client module
+ * **Feature**: This is the initial SDK release for AWS Private 5G. AWS Private 5G is a managed service that makes it easy to deploy, operate, and scale your own private mobile network at your on-premises location.
+
+# Release (2022-08-10)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/config`: [v1.16.0](config/CHANGELOG.md#v1160-2022-08-10)
+ * **Feature**: Adds support for the following settings in the `~/.aws/credentials` file: `sso_account_id`, `sso_region`, `sso_role_name`, `sso_start_url`, and `ca_bundle`.
+* `github.com/aws/aws-sdk-go-v2/service/dlm`: [v1.12.0](service/dlm/CHANGELOG.md#v1120-2022-08-10)
+ * **Feature**: This release adds support for excluding specific data (non-boot) volumes from multi-volume snapshot sets created by snapshot lifecycle policies
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.52.0](service/ec2/CHANGELOG.md#v1520-2022-08-10)
+ * **Feature**: This release adds support for excluding specific data (non-root) volumes from multi-volume snapshot sets created from instances.
+
+# Release (2022-08-09)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.20.0](service/cloudwatch/CHANGELOG.md#v1200-2022-08-09)
+ * **Feature**: Various quota increases related to dimensions and custom metrics
+* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.18.0](service/location/CHANGELOG.md#v1180-2022-08-09)
+ * **Feature**: Amazon Location Service now allows circular geofences in BatchPutGeofence, PutGeofence, and GetGeofence APIs.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.39.0](service/sagemaker/CHANGELOG.md#v1390-2022-08-09)
+ * **Feature**: Amazon SageMaker Automatic Model Tuning now supports specifying multiple alternate EC2 instance types to make tuning jobs more robust when the preferred instance type is not available due to insufficient capacity.
+* `github.com/aws/aws-sdk-go-v2/service/sagemakera2iruntime`: [v1.13.0](service/sagemakera2iruntime/CHANGELOG.md#v1130-2022-08-09)
+ * **Feature**: Fix bug with parsing ISO-8601 CreationTime in Java SDK in DescribeHumanLoop
+
+# Release (2022-08-08)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.16.9
+ * **Bug Fix**: aws/signer/v4: Fixes a panic in SDK's handling of endpoint URLs with ports by correcting how URL path is parsed from opaque URLs. Fixes [#1294](https://github.com/aws/aws-sdk-go-v2/issues/1294).
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.29.0](service/glue/CHANGELOG.md#v1290-2022-08-08)
+ * **Feature**: Add an option to run non-urgent or non-time sensitive Glue Jobs on spare capacity
+* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.14.10](service/identitystore/CHANGELOG.md#v11410-2022-08-08)
+ * **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
+* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.21.0](service/iotwireless/CHANGELOG.md#v1210-2022-08-08)
+ * **Feature**: AWS IoT Wireless release support for sidewalk data reliability.
+* `github.com/aws/aws-sdk-go-v2/service/pinpoint`: [v1.17.0](service/pinpoint/CHANGELOG.md#v1170-2022-08-08)
+ * **Feature**: Adds support for Advance Quiet Time in Journeys. Adds RefreshOnSegmentUpdate and WaitForQuietTime to JourneyResponse.
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.23.2](service/quicksight/CHANGELOG.md#v1232-2022-08-08)
+ * **Documentation**: A series of documentation updates to the QuickSight API reference.
+* `github.com/aws/aws-sdk-go-v2/service/sso`: [v1.11.14](service/sso/CHANGELOG.md#v11114-2022-08-08)
+ * **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
+* `github.com/aws/aws-sdk-go-v2/service/ssoadmin`: [v1.15.2](service/ssoadmin/CHANGELOG.md#v1152-2022-08-08)
+ * **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
+* `github.com/aws/aws-sdk-go-v2/service/ssooidc`: [v1.12.12](service/ssooidc/CHANGELOG.md#v11212-2022-08-08)
+ * **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
+
+# Release (2022-08-04)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.13.0](service/chimesdkmeetings/CHANGELOG.md#v1130-2022-08-04)
+ * **Feature**: Adds support for Tags on Amazon Chime SDK WebRTC sessions
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.24.0](service/configservice/CHANGELOG.md#v1240-2022-08-04)
+ * **Feature**: Add resourceType enums for Athena, GlobalAccelerator, Detective and EC2 types
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.21.3](service/databasemigrationservice/CHANGELOG.md#v1213-2022-08-04)
+ * **Documentation**: Documentation updates for Database Migration Service (DMS).
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.28.0](service/iot/CHANGELOG.md#v1280-2022-08-04)
+ * **Feature**: The release is to support attach a provisioning template to CACert for JITP function, Customer now doesn't have to hardcode a roleArn and templateBody during register a CACert to enable JITP.
+
+# Release (2022-08-03)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.18.0](service/cognitoidentityprovider/CHANGELOG.md#v1180-2022-08-03)
+ * **Feature**: Add a new exception type, ForbiddenException, that is returned when request is not allowed
+* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.22.0](service/wafv2/CHANGELOG.md#v1220-2022-08-03)
+ * **Feature**: You can now associate an AWS WAF web ACL with an Amazon Cognito user pool.
+
+# Release (2022-08-02)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/licensemanagerusersubscriptions`: [v1.0.0](service/licensemanagerusersubscriptions/CHANGELOG.md#v100-2022-08-02)
+ * **Release**: New AWS service client module
+ * **Feature**: This release supports user based subscription for Microsoft Visual Studio Professional and Enterprise on EC2.
+* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.21.0](service/personalize/CHANGELOG.md#v1210-2022-08-02)
+ * **Feature**: This release adds support for incremental bulk ingestion for the Personalize CreateDatasetImportJob API.
+
+# Release (2022-08-01)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.23.1](service/configservice/CHANGELOG.md#v1231-2022-08-01)
+ * **Documentation**: Documentation update for PutConfigRule and PutOrganizationConfigRule
+* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.22.0](service/workspaces/CHANGELOG.md#v1220-2022-08-01)
+ * **Feature**: This release introduces ModifySamlProperties, a new API that allows control of SAML properties associated with a WorkSpaces directory. The DescribeWorkspaceDirectories API will now additionally return SAML properties in its responses.
+
+# Release (2022-07-29)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.51.0](service/ec2/CHANGELOG.md#v1510-2022-07-29)
+ * **Feature**: Documentation updates for Amazon EC2.
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.24.4](service/fsx/CHANGELOG.md#v1244-2022-07-29)
+ * **Documentation**: Documentation updates for Amazon FSx
+* `github.com/aws/aws-sdk-go-v2/service/shield`: [v1.17.0](service/shield/CHANGELOG.md#v1170-2022-07-29)
+ * **Feature**: AWS Shield Advanced now supports filtering for ListProtections and ListProtectionGroups.
+
+# Release (2022-07-28)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.50.1](service/ec2/CHANGELOG.md#v1501-2022-07-28)
+ * **Documentation**: Documentation updates for VM Import/Export.
+* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.16.0](service/elasticsearchservice/CHANGELOG.md#v1160-2022-07-28)
+ * **Feature**: This release adds support for gp3 EBS (Elastic Block Store) storage.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutvision`: [v1.14.0](service/lookoutvision/CHANGELOG.md#v1140-2022-07-28)
+ * **Feature**: This release introduces support for image segmentation models and updates CPU accelerator options for models hosted on edge devices.
+* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.10.0](service/opensearch/CHANGELOG.md#v1100-2022-07-28)
+ * **Feature**: This release adds support for gp3 EBS (Elastic Block Store) storage.
+
+# Release (2022-07-27)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.20.0](service/auditmanager/CHANGELOG.md#v1200-2022-07-27)
+ * **Feature**: This release adds an exceeded quota exception to several APIs. We added a ServiceQuotaExceededException for the following operations: CreateAssessment, CreateControl, CreateAssessmentFramework, and UpdateAssessmentStatus.
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.21.0](service/chime/CHANGELOG.md#v1210-2022-07-27)
+ * **Feature**: Chime VoiceConnector will now support ValidateE911Address which will allow customers to prevalidate their addresses included in their SIP invites for emergency calling
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.23.0](service/configservice/CHANGELOG.md#v1230-2022-07-27)
+ * **Feature**: This release adds ListConformancePackComplianceScores API to support the new compliance score feature, which provides a percentage of the number of compliant rule-resource combinations in a conformance pack compared to the number of total possible rule-resource combinations in the conformance pack.
+* `github.com/aws/aws-sdk-go-v2/service/globalaccelerator`: [v1.14.0](service/globalaccelerator/CHANGELOG.md#v1140-2022-07-27)
+ * **Feature**: Global Accelerator now supports dual-stack accelerators, enabling support for IPv4 and IPv6 traffic.
+* `github.com/aws/aws-sdk-go-v2/service/marketplacecatalog`: [v1.13.0](service/marketplacecatalog/CHANGELOG.md#v1130-2022-07-27)
+ * **Feature**: The SDK for the StartChangeSet API will now automatically set and use an idempotency token in the ClientRequestToken request parameter if the customer does not provide it.
+* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.17.0](service/polly/CHANGELOG.md#v1170-2022-07-27)
+ * **Feature**: Amazon Polly adds new English and Hindi voice - Kajal. Kajal is available as Neural voice only.
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.27.5](service/ssm/CHANGELOG.md#v1275-2022-07-27)
+ * **Documentation**: Adding doc updates for OpsCenter support in Service Setting actions.
+* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.21.0](service/workspaces/CHANGELOG.md#v1210-2022-07-27)
+ * **Feature**: Added CreateWorkspaceImage API to create a new WorkSpace image from an existing WorkSpace.
+
+# Release (2022-07-26)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.15.0](service/appsync/CHANGELOG.md#v1150-2022-07-26)
+ * **Feature**: Adds support for a new API to evaluate mapping templates with mock data, allowing you to remotely unit test your AppSync resolvers and functions.
+* `github.com/aws/aws-sdk-go-v2/service/detective`: [v1.16.0](service/detective/CHANGELOG.md#v1160-2022-07-26)
+ * **Feature**: Added the ability to get data source package information for the behavior graph. Graph administrators can now start (or stop) optional datasources on the behavior graph.
+* `github.com/aws/aws-sdk-go-v2/service/guardduty`: [v1.15.0](service/guardduty/CHANGELOG.md#v1150-2022-07-26)
+ * **Feature**: Amazon GuardDuty introduces a new Malware Protection feature that triggers malware scan on selected EC2 instance resources, after the service detects a potentially malicious activity.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutvision`: [v1.13.0](service/lookoutvision/CHANGELOG.md#v1130-2022-07-26)
+ * **Feature**: This release introduces support for the automatic scaling of inference units used by Amazon Lookout for Vision models.
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.22.0](service/macie2/CHANGELOG.md#v1220-2022-07-26)
+ * **Feature**: This release adds support for retrieving (revealing) sample occurrences of sensitive data that Amazon Macie detects and reports in findings.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.23.1](service/rds/CHANGELOG.md#v1231-2022-07-26)
+ * **Documentation**: Adds support for using RDS Proxies with RDS for MariaDB databases.
+* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.19.0](service/rekognition/CHANGELOG.md#v1190-2022-07-26)
+ * **Feature**: This release introduces support for the automatic scaling of inference units used by Amazon Rekognition Custom Labels models.
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.22.3](service/securityhub/CHANGELOG.md#v1223-2022-07-26)
+ * **Documentation**: Documentation updates for AWS Security Hub
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.21.0](service/transfer/CHANGELOG.md#v1210-2022-07-26)
+ * **Feature**: AWS Transfer Family now supports Applicability Statement 2 (AS2), a network protocol used for the secure and reliable transfer of critical Business-to-Business (B2B) data over the public internet using HTTP/HTTPS as the transport mechanism.
+
+# Release (2022-07-25)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.23.6](service/autoscaling/CHANGELOG.md#v1236-2022-07-25)
+ * **Documentation**: Documentation update for Amazon EC2 Auto Scaling.
+
+# Release (2022-07-22)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/account`: [v1.7.0](service/account/CHANGELOG.md#v170-2022-07-22)
+ * **Feature**: This release enables customers to manage the primary contact information for their AWS accounts. For more information, see https://docs.aws.amazon.com/accounts/latest/reference/API_Operations.html
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.50.0](service/ec2/CHANGELOG.md#v1500-2022-07-22)
+ * **Feature**: Added support for EC2 M1 Mac instances. For more information, please visit aws.amazon.com/mac.
+* `github.com/aws/aws-sdk-go-v2/service/iotdeviceadvisor`: [v1.15.0](service/iotdeviceadvisor/CHANGELOG.md#v1150-2022-07-22)
+ * **Feature**: Added new service feature (Early access only) - Long Duration Test, where customers can test the IoT device to observe how it behaves when the device is in operation for longer period.
+* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.22.0](service/medialive/CHANGELOG.md#v1220-2022-07-22)
+ * **Feature**: Link devices now support remote rebooting. Link devices now support maintenance windows. Maintenance windows allow a Link device to install software updates without stopping the MediaLive channel. The channel will experience a brief loss of input from the device while updates are installed.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.23.0](service/rds/CHANGELOG.md#v1230-2022-07-22)
+ * **Feature**: This release adds the "ModifyActivityStream" API with support for audit policy state locking and unlocking.
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.21.0](service/transcribe/CHANGELOG.md#v1210-2022-07-22)
+ * **Feature**: Remove unsupported language codes for StartTranscriptionJob and update VocabularyFileUri for UpdateMedicalVocabulary
+
+# Release (2022-07-21)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.18.0](service/athena/CHANGELOG.md#v1180-2022-07-21)
+ * **Feature**: This feature allows customers to retrieve runtime statistics for completed queries
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.19.0](service/cloudwatch/CHANGELOG.md#v1190-2022-07-21)
+ * **Feature**: Adding support for the suppression of Composite Alarm actions
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.21.1](service/databasemigrationservice/CHANGELOG.md#v1211-2022-07-21)
+ * **Documentation**: Documentation updates for Database Migration Service (DMS).
+* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.19.0](service/docdb/CHANGELOG.md#v1190-2022-07-21)
+ * **Feature**: Enable copy-on-write restore type
+* `github.com/aws/aws-sdk-go-v2/service/ec2instanceconnect`: [v1.14.0](service/ec2instanceconnect/CHANGELOG.md#v1140-2022-07-21)
+ * **Feature**: This release includes a new exception type "EC2InstanceUnavailableException" for SendSSHPublicKey and SendSerialConsoleSSHPublicKey APIs.
+* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.20.0](service/frauddetector/CHANGELOG.md#v1200-2022-07-21)
+ * **Feature**: The release introduces Account Takeover Insights (ATI) model. The ATI model detects fraud relating to account takeover. This release also adds support for new variable types: ARE_CREDENTIALS_VALID and SESSION_ID and adds new structures to Model Version APIs.
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.23.0](service/iotsitewise/CHANGELOG.md#v1230-2022-07-21)
+ * **Feature**: Added asynchronous API to ingest bulk historical and current data into IoT SiteWise.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.31.0](service/kendra/CHANGELOG.md#v1310-2022-07-21)
+ * **Feature**: Amazon Kendra now provides Oauth2 support for SharePoint Online. For more information, see https://docs.aws.amazon.com/kendra/latest/dg/data-source-sharepoint.html
+* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.18.0](service/networkfirewall/CHANGELOG.md#v1180-2022-07-21)
+ * **Feature**: Network Firewall now supports referencing dynamic IP sets from stateful rule groups, for IP sets stored in Amazon VPC prefix lists.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.22.1](service/rds/CHANGELOG.md#v1221-2022-07-21)
+ * **Documentation**: Adds support for creating an RDS Proxy for an RDS for MariaDB database.
+
+# Release (2022-07-20)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.17.11](service/acmpca/CHANGELOG.md#v11711-2022-07-20)
+ * **Documentation**: AWS Certificate Manager (ACM) Private Certificate Authority (PCA) documentation updates
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.27.0](service/iot/CHANGELOG.md#v1270-2022-07-20)
+ * **Feature**: GA release the ability to enable/disable IoT Fleet Indexing for Device Defender and Named Shadow information, and search them through IoT Fleet Indexing APIs. This includes Named Shadow Selection as a part of the UpdateIndexingConfiguration API.
+
+# Release (2022-07-19)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.18.0](service/devopsguru/CHANGELOG.md#v1180-2022-07-19)
+ * **Feature**: Added new APIs for log anomaly detection feature.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.28.1](service/glue/CHANGELOG.md#v1281-2022-07-19)
+ * **Documentation**: Documentation updates for AWS Glue Job Timeout and Autoscaling
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.38.0](service/sagemaker/CHANGELOG.md#v1380-2022-07-19)
+ * **Feature**: Fixed an issue with cross account QueryLineage
+* `github.com/aws/aws-sdk-go-v2/service/sagemakeredge`: [v1.12.0](service/sagemakeredge/CHANGELOG.md#v1120-2022-07-19)
+ * **Feature**: Amazon SageMaker Edge Manager provides lightweight model deployment feature to deploy machine learning models on requested devices.
+* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.20.0](service/workspaces/CHANGELOG.md#v1200-2022-07-19)
+ * **Feature**: Increased the character limit of the login message from 850 to 2000 characters.
+
+# Release (2022-07-18)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/applicationdiscoveryservice`: [v1.14.0](service/applicationdiscoveryservice/CHANGELOG.md#v1140-2022-07-18)
+ * **Feature**: Add AWS Agentless Collector details to the GetDiscoverySummary API response
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.49.1](service/ec2/CHANGELOG.md#v1491-2022-07-18)
+ * **Documentation**: Documentation updates for Amazon EC2.
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.22.0](service/elasticache/CHANGELOG.md#v1220-2022-07-18)
+ * **Feature**: Adding AutoMinorVersionUpgrade in the DescribeReplicationGroups API
+* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.18.0](service/kms/CHANGELOG.md#v1180-2022-07-18)
+ * **Feature**: Added support for the SM2 KeySpec in China Partition Regions
+* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.17.0](service/mediapackage/CHANGELOG.md#v1170-2022-07-18)
+ * **Feature**: This release adds "IncludeIframeOnlyStream" for Dash endpoints and increases the number of supported video and audio encryption presets for Speke v2
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.37.0](service/sagemaker/CHANGELOG.md#v1370-2022-07-18)
+ * **Feature**: Amazon SageMaker Edge Manager provides lightweight model deployment feature to deploy machine learning models on requested devices.
+* `github.com/aws/aws-sdk-go-v2/service/ssoadmin`: [v1.15.0](service/ssoadmin/CHANGELOG.md#v1150-2022-07-18)
+ * **Feature**: AWS SSO now supports attaching customer managed policies and a permissions boundary to your permission sets. This release adds new API operations to manage and view the customer managed policies and the permissions boundary for a given permission set.
+
+# Release (2022-07-15)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.18.3](service/datasync/CHANGELOG.md#v1183-2022-07-15)
+ * **Documentation**: Documentation updates for AWS DataSync regarding configuring Amazon FSx for ONTAP location security groups and SMB user permissions.
+* `github.com/aws/aws-sdk-go-v2/service/drs`: [v1.7.0](service/drs/CHANGELOG.md#v170-2022-07-15)
+ * **Feature**: Changed existing APIs to allow choosing a dynamic volume type for replicating volumes, to reduce costs for customers.
+* `github.com/aws/aws-sdk-go-v2/service/evidently`: [v1.8.0](service/evidently/CHANGELOG.md#v180-2022-07-15)
+ * **Feature**: This release adds support for the new segmentation feature.
+* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.21.0](service/wafv2/CHANGELOG.md#v1210-2022-07-15)
+ * **Feature**: This SDK release provide customers ability to add sensitivity level for WAF SQLI Match Statements.
+
+# Release (2022-07-14)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.17.0](service/athena/CHANGELOG.md#v1170-2022-07-14)
+ * **Feature**: This release updates data types that contain either QueryExecutionId, NamedQueryId or ExpectedBucketOwner. Ids must be between 1 and 128 characters and contain only non-whitespace characters. ExpectedBucketOwner must be 12-digit string.
+* `github.com/aws/aws-sdk-go-v2/service/codeartifact`: [v1.13.0](service/codeartifact/CHANGELOG.md#v1130-2022-07-14)
+ * **Feature**: This release introduces Package Origin Controls, a mechanism used to counteract Dependency Confusion attacks. Adds two new APIs, PutPackageOriginConfiguration and DescribePackage, and updates the ListPackage, DescribePackageVersion and ListPackageVersion APIs in support of the feature.
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.22.0](service/configservice/CHANGELOG.md#v1220-2022-07-14)
+ * **Feature**: Update ResourceType enum with values for Route53Resolver, Batch, DMS, Workspaces, Stepfunctions, SageMaker, ElasticLoadBalancingV2, MSK types
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.49.0](service/ec2/CHANGELOG.md#v1490-2022-07-14)
+ * **Feature**: This release adds flow logs for Transit Gateway to allow customers to gain deeper visibility and insights into network traffic through their Transit Gateways.
+* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.18.0](service/fms/CHANGELOG.md#v1180-2022-07-14)
+ * **Feature**: Adds support for strict ordering in stateful rule groups in Network Firewall policies.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.28.0](service/glue/CHANGELOG.md#v1280-2022-07-14)
+ * **Feature**: This release adds an additional worker type for Glue Streaming jobs.
+* `github.com/aws/aws-sdk-go-v2/service/inspector2`: [v1.7.0](service/inspector2/CHANGELOG.md#v170-2022-07-14)
+ * **Feature**: This release adds support for Inspector V2 scan configurations through the get and update configuration APIs. Currently this allows configuring ECR automated re-scan duration to lifetime or 180 days or 30 days.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.30.0](service/kendra/CHANGELOG.md#v1300-2022-07-14)
+ * **Feature**: This release adds AccessControlConfigurations which allow you to redefine your document level access control without the need for content re-indexing.
+* `github.com/aws/aws-sdk-go-v2/service/nimble`: [v1.13.0](service/nimble/CHANGELOG.md#v1130-2022-07-14)
+ * **Feature**: Amazon Nimble Studio adds support for IAM-based access to AWS resources for Nimble Studio components and custom studio components. Studio Component scripts use these roles on Nimble Studio workstation to mount filesystems, access S3 buckets, or other configured resources in the Studio's AWS account
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.22.0](service/outposts/CHANGELOG.md#v1220-2022-07-14)
+ * **Feature**: This release adds the ShipmentInformation and AssetInformationList fields to the GetOrder API response.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.36.0](service/sagemaker/CHANGELOG.md#v1360-2022-07-14)
+ * **Feature**: This release adds support for G5, P4d, and C6i instance types in Amazon SageMaker Inference and increases the number of hyperparameters that can be searched from 20 to 30 in Amazon SageMaker Automatic Model Tuning
+
+# Release (2022-07-13)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/appconfig`: [v1.13.0](service/appconfig/CHANGELOG.md#v1130-2022-07-13)
+ * **Feature**: Adding Create, Get, Update, Delete, and List APIs for new two new resources: Extensions and ExtensionAssociations.
+
+# Release (2022-07-12)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/networkmanager`: [v1.14.0](service/networkmanager/CHANGELOG.md#v1140-2022-07-12)
+ * **Feature**: This release adds general availability API support for AWS Cloud WAN.
+
+# Release (2022-07-11)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.48.0](service/ec2/CHANGELOG.md#v1480-2022-07-11)
+ * **Feature**: Build, manage, and monitor a unified global network that connects resources running across your cloud and on-premises environments using the AWS Cloud WAN APIs.
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.26.0](service/redshift/CHANGELOG.md#v1260-2022-07-11)
+ * **Feature**: This release adds a new --snapshot-arn field for describe-cluster-snapshots, describe-node-configuration-options, restore-from-cluster-snapshot, authorize-snapshot-acsess, and revoke-snapshot-acsess APIs. It allows customers to give a Redshift snapshot ARN or a Redshift Serverless ARN as input.
+* `github.com/aws/aws-sdk-go-v2/service/redshiftserverless`: [v1.2.2](service/redshiftserverless/CHANGELOG.md#v122-2022-07-11)
+ * **Documentation**: Removed prerelease language for GA launch.
+
+# Release (2022-07-08)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.17.0](service/backup/CHANGELOG.md#v1170-2022-07-08)
+ * **Feature**: This release adds support for authentication using IAM user identity instead of passed IAM role, identified by excluding the IamRoleArn field in the StartRestoreJob API. This feature applies to only resource clients with a destructive restore nature (e.g. SAP HANA).
+
+# Release (2022-07-07)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.12.0](service/chimesdkmeetings/CHANGELOG.md#v1120-2022-07-07)
+ * **Feature**: Adds support for AppKeys and TenantIds in Amazon Chime SDK WebRTC sessions
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.21.0](service/databasemigrationservice/CHANGELOG.md#v1210-2022-07-07)
+ * **Feature**: New api to migrate event subscriptions to event bridge rules
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.26.0](service/iot/CHANGELOG.md#v1260-2022-07-07)
+ * **Feature**: This release adds support to register a CA certificate without having to provide a verification certificate. This also allows multiple AWS accounts to register the same CA in the same region.
+* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.20.0](service/iotwireless/CHANGELOG.md#v1200-2022-07-07)
+ * **Feature**: Adds 5 APIs: PutPositionConfiguration, GetPositionConfiguration, ListPositionConfigurations, UpdatePosition, GetPosition for the new Positioning Service feature which enables customers to configure solvers to calculate position of LoRaWAN devices, or specify position of LoRaWAN devices & gateways.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.35.0](service/sagemaker/CHANGELOG.md#v1350-2022-07-07)
+ * **Feature**: Heterogeneous clusters: the ability to launch training jobs with multiple instance types. This enables running component of the training job on the instance type that is most suitable for it. e.g. doing data processing and augmentation on CPU instances and neural network training on GPU instances
+
+# Release (2022-07-06)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.22.0](service/cloudformation/CHANGELOG.md#v1220-2022-07-06)
+ * **Feature**: My AWS Service (placeholder) - Add a new feature Account-level Targeting for StackSet operation
+* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.16.0](service/synthetics/CHANGELOG.md#v1160-2022-07-06)
+ * **Feature**: This release introduces Group feature, which enables users to group cross-region canaries.
+
+# Release (2022-07-05)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.21.5](service/configservice/CHANGELOG.md#v1215-2022-07-05)
+ * **Documentation**: Updating documentation service limits
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.21.0](service/lexmodelsv2/CHANGELOG.md#v1210-2022-07-05)
+ * **Feature**: This release introduces additional optional parameters "messageSelectionStrategy" to PromptSpecification, which enables the users to configure the bot to play messages in orderly manner.
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.23.0](service/quicksight/CHANGELOG.md#v1230-2022-07-05)
+ * **Feature**: This release allows customers to programmatically create QuickSight accounts with Enterprise and Enterprise + Q editions. It also releases allowlisting domains for embedding QuickSight dashboards at runtime through the embedding APIs.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.22.0](service/rds/CHANGELOG.md#v1220-2022-07-05)
+ * **Feature**: Adds waiters support for DBCluster.
+* `github.com/aws/aws-sdk-go-v2/service/rolesanywhere`: [v1.0.0](service/rolesanywhere/CHANGELOG.md#v100-2022-07-05)
+ * **Release**: New AWS service client module
+ * **Feature**: IAM Roles Anywhere allows your workloads such as servers, containers, and applications to obtain temporary AWS credentials and use the same IAM roles and policies that you have configured for your AWS workloads to access AWS resources.
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.19.0](service/sqs/CHANGELOG.md#v1190-2022-07-05)
+ * **Feature**: Adds support for the SQS client to automatically validate message checksums for SendMessage, SendMessageBatch, and ReceiveMessage. A DisableMessageChecksumValidation parameter has been added to the Options struct for SQS package. Setting this to true will disable the checksum validation. This can be set when creating a client, or per operation call.
+* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.15.0](service/ssmincidents/CHANGELOG.md#v1150-2022-07-05)
+ * **Feature**: Adds support for tagging incident-record on creation by providing incident tags in the template within a response-plan.
+
+# Release (2022-07-01)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.20.0](service/databasemigrationservice/CHANGELOG.md#v1200-2022-07-01)
+ * **Feature**: Added new features for AWS DMS version 3.4.7 that includes new endpoint settings for S3, OpenSearch, Postgres, SQLServer and Oracle.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.21.5](service/rds/CHANGELOG.md#v1215-2022-07-01)
+ * **Documentation**: Adds support for additional retention periods to Performance Insights.
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.27.0](service/s3/CHANGELOG.md#v1270-2022-07-01)
+ * **Feature**: Add presign support for HeadBucket, DeleteObject, and DeleteBucket. Fixes [#1076](https://github.com/aws/aws-sdk-go-v2/issues/1076).
+
+# Release (2022-06-30)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.16.0](service/athena/CHANGELOG.md#v1160-2022-06-30)
+ * **Feature**: This feature introduces the API support for Athena's parameterized query and BatchGetPreparedStatement API.
+* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.18.0](service/customerprofiles/CHANGELOG.md#v1180-2022-06-30)
+ * **Feature**: This release adds the optional MinAllowedConfidenceScoreForMerging parameter to the CreateDomain, UpdateDomain, and GetAutoMergingPreview APIs in Customer Profiles. This parameter is used as a threshold to influence the profile auto-merging step of the Identity Resolution process.
+* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.20.0](service/emr/CHANGELOG.md#v1200-2022-06-30)
+ * **Feature**: This release adds support for the ExecutionRoleArn parameter in the AddJobFlowSteps and DescribeStep APIs. Customers can use ExecutionRoleArn to specify the IAM role used for each job they submit using the AddJobFlowSteps API.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.27.0](service/glue/CHANGELOG.md#v1270-2022-06-30)
+ * **Feature**: This release adds tag as an input of CreateDatabase
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.29.0](service/kendra/CHANGELOG.md#v1290-2022-06-30)
+ * **Feature**: Amazon Kendra now provides a data source connector for alfresco
+* `github.com/aws/aws-sdk-go-v2/service/mwaa`: [v1.13.0](service/mwaa/CHANGELOG.md#v1130-2022-06-30)
+ * **Feature**: Documentation updates for Amazon Managed Workflows for Apache Airflow.
+* `github.com/aws/aws-sdk-go-v2/service/pricing`: [v1.16.0](service/pricing/CHANGELOG.md#v1160-2022-06-30)
+ * **Feature**: Documentation update for GetProducts Response.
+* `github.com/aws/aws-sdk-go-v2/service/wellarchitected`: [v1.16.0](service/wellarchitected/CHANGELOG.md#v1160-2022-06-30)
+ * **Feature**: Added support for UpdateGlobalSettings API. Added status filter to ListWorkloadShares and ListLensShares.
+* `github.com/aws/aws-sdk-go-v2/service/workmail`: [v1.16.0](service/workmail/CHANGELOG.md#v1160-2022-06-30)
+ * **Feature**: This release adds support for managing user availability configurations in Amazon WorkMail.
+
+# Release (2022-06-29)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.16.6
+ * **Bug Fix**: Fix aws/signer/v4 to not double sign Content-Length header. Fixes [#1728](https://github.com/aws/aws-sdk-go-v2/issues/1728). Thanks to @matelang for creating the issue and PR.
+* `github.com/aws/aws-sdk-go-v2/service/appstream`: [v1.17.0](service/appstream/CHANGELOG.md#v1170-2022-06-29)
+ * **Feature**: Includes support for StreamingExperienceSettings in CreateStack and UpdateStack APIs
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.18.7](service/elasticloadbalancingv2/CHANGELOG.md#v1187-2022-06-29)
+ * **Documentation**: This release adds two attributes for ALB. One, helps to preserve the host header and the other helps to modify, preserve, or remove the X-Forwarded-For header in the HTTP request.
+* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.19.0](service/emr/CHANGELOG.md#v1190-2022-06-29)
+ * **Feature**: This release introduces additional optional parameter "Throughput" to VolumeSpecification to enable user to configure throughput for gp3 ebs volumes.
+* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.21.0](service/medialive/CHANGELOG.md#v1210-2022-06-29)
+ * **Feature**: This release adds support for automatic renewal of MediaLive reservations at the end of each reservation term. Automatic renewal is optional. This release also adds support for labelling accessibility-focused audio and caption tracks in HLS outputs.
+* `github.com/aws/aws-sdk-go-v2/service/redshiftserverless`: [v1.2.0](service/redshiftserverless/CHANGELOG.md#v120-2022-06-29)
+ * **Feature**: Add new API operations for Amazon Redshift Serverless, a new way of using Amazon Redshift without needing to manually manage provisioned clusters. The new operations let you interact with Redshift Serverless resources, such as create snapshots, list VPC endpoints, delete resource policies, and more.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.34.0](service/sagemaker/CHANGELOG.md#v1340-2022-06-29)
+ * **Feature**: This release adds: UpdateFeatureGroup, UpdateFeatureMetadata, DescribeFeatureMetadata APIs; FeatureMetadata type in Search API; LastModifiedTime, LastUpdateStatus, OnlineStoreTotalSizeBytes in DescribeFeatureGroup API.
+* `github.com/aws/aws-sdk-go-v2/service/translate`: [v1.14.0](service/translate/CHANGELOG.md#v1140-2022-06-29)
+ * **Feature**: Added ListLanguages API which can be used to list the languages supported by Translate.
+
+# Release (2022-06-28)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.18.0](service/datasync/CHANGELOG.md#v1180-2022-06-28)
+ * **Feature**: AWS DataSync now supports Amazon FSx for NetApp ONTAP locations.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.47.0](service/ec2/CHANGELOG.md#v1470-2022-06-28)
+ * **Feature**: This release adds a new spread placement group to EC2 Placement Groups: host level spread, which spread instances between physical hosts, available to Outpost customers only. CreatePlacementGroup and DescribePlacementGroups APIs were updated with a new parameter: SpreadLevel to support this feature.
+* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.12.0](service/finspacedata/CHANGELOG.md#v1120-2022-06-28)
+ * **Feature**: Release new API GetExternalDataViewAccessDetails
+* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.16.0](service/polly/CHANGELOG.md#v1160-2022-06-28)
+ * **Feature**: Add 4 new neural voices - Pedro (es-US), Liam (fr-CA), Daniel (de-DE) and Arthur (en-GB).
+
+# Release (2022-06-24.2)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/emrcontainers`: [v1.13.7](service/emrcontainers/CHANGELOG.md#v1137-2022-06-242)
+ * **Bug Fix**: Fixes bug with incorrect modeled timestamp format
+
+# Release (2022-06-23)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/lookoutequipment`: [v1.14.0](service/lookoutequipment/CHANGELOG.md#v1140-2022-06-23)
+ * **Feature**: This release adds visualizations to the scheduled inference results. Users will be able to see interference results, including diagnostic results from their running inference schedulers.
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.25.1](service/mediaconvert/CHANGELOG.md#v1251-2022-06-23)
+ * **Documentation**: AWS Elemental MediaConvert SDK has released support for automatic DolbyVision metadata generation when converting HDR10 to DolbyVision.
+* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.15.0](service/mgn/CHANGELOG.md#v1150-2022-06-23)
+ * **Feature**: New and modified APIs for the Post-Migration Framework
+* `github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces`: [v1.6.0](service/migrationhubrefactorspaces/CHANGELOG.md#v160-2022-06-23)
+ * **Feature**: This release adds the new API UpdateRoute that allows route to be updated to ACTIVE/INACTIVE state. In addition, CreateRoute API will now allow users to create route in ACTIVE/INACTIVE state.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.33.0](service/sagemaker/CHANGELOG.md#v1330-2022-06-23)
+ * **Feature**: SageMaker Ground Truth now supports Virtual Private Cloud. Customers can launch labeling jobs and access to their private workforce in VPC mode.
+
+# Release (2022-06-22)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/apigateway`: [v1.15.8](service/apigateway/CHANGELOG.md#v1158-2022-06-22)
+ * **Documentation**: Documentation updates for Amazon API Gateway
+* `github.com/aws/aws-sdk-go-v2/service/pricing`: [v1.15.0](service/pricing/CHANGELOG.md#v1150-2022-06-22)
+ * **Feature**: This release introduces 1 update to the GetProducts API. The serviceCode attribute is now required when you use the GetProductsRequest.
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.20.0](service/transfer/CHANGELOG.md#v1200-2022-06-22)
+ * **Feature**: Until today, the service supported only RSA host keys and user keys. Now with this launch, Transfer Family has expanded the support for ECDSA and ED25519 host keys and user keys, enabling customers to support a broader set of clients by choosing RSA, ECDSA, and ED25519 host and user keys.
+
+# Release (2022-06-21)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.46.0](service/ec2/CHANGELOG.md#v1460-2022-06-21)
+ * **Feature**: This release adds support for Private IP VPNs, a new feature allowing S2S VPN connections to use private ip addresses as the tunnel outside ip address over Direct Connect as transport.
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.18.9](service/ecs/CHANGELOG.md#v1189-2022-06-21)
+ * **Documentation**: Amazon ECS UpdateService now supports the following parameters: PlacementStrategies, PlacementConstraints and CapacityProviderStrategy.
+* `github.com/aws/aws-sdk-go-v2/service/wellarchitected`: [v1.15.0](service/wellarchitected/CHANGELOG.md#v1150-2022-06-21)
+ * **Feature**: Adds support for lens tagging, Adds support for multiple helpful-resource urls and multiple improvement-plan urls.
+
+# Release (2022-06-20)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/directoryservice`: [v1.14.0](service/directoryservice/CHANGELOG.md#v1140-2022-06-20)
+ * **Feature**: This release adds support for describing and updating AWS Managed Microsoft AD settings
+* `github.com/aws/aws-sdk-go-v2/service/kafka`: [v1.17.7](service/kafka/CHANGELOG.md#v1177-2022-06-20)
+ * **Documentation**: Documentation updates to use Az Id during cluster creation.
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.21.0](service/outposts/CHANGELOG.md#v1210-2022-06-20)
+ * **Feature**: This release adds the AssetLocation structure to the ListAssets response. AssetLocation includes the RackElevation for an Asset.
+
+# Release (2022-06-17)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.27.0](service/connect/CHANGELOG.md#v1270-2022-06-17)
+ * **Feature**: This release updates these APIs: UpdateInstanceAttribute, DescribeInstanceAttribute and ListInstanceAttributes. You can use it to programmatically enable/disable High volume outbound communications using attribute type HIGH_VOLUME_OUTBOUND on the specified Amazon Connect instance.
+* `github.com/aws/aws-sdk-go-v2/service/connectcampaigns`: [v1.0.0](service/connectcampaigns/CHANGELOG.md#v100-2022-06-17)
+ * **Release**: New AWS service client module
+ * **Feature**: Added Amazon Connect high volume outbound communications SDK.
+* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.15.7](service/dynamodb/CHANGELOG.md#v1157-2022-06-17)
+ * **Documentation**: Doc only update for DynamoDB service
+* `github.com/aws/aws-sdk-go-v2/service/dynamodbstreams`: [v1.13.7](service/dynamodbstreams/CHANGELOG.md#v1137-2022-06-17)
+ * **Documentation**: Doc only update for DynamoDB service
+
+# Release (2022-06-16)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/redshiftdata`: [v1.16.0](service/redshiftdata/CHANGELOG.md#v1160-2022-06-16)
+ * **Feature**: This release adds a new --workgroup-name field to operations that connect to an endpoint. Customers can now execute queries against their serverless workgroups.
+* `github.com/aws/aws-sdk-go-v2/service/redshiftserverless`: [v1.1.0](service/redshiftserverless/CHANGELOG.md#v110-2022-06-16)
+ * **Feature**: Add new API operations for Amazon Redshift Serverless, a new way of using Amazon Redshift without needing to manually manage provisioned clusters. The new operations let you interact with Redshift Serverless resources, such as create snapshots, list VPC endpoints, delete resource policies, and more.
+* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.15.11](service/secretsmanager/CHANGELOG.md#v11511-2022-06-16)
+ * **Documentation**: Documentation updates for Secrets Manager
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.22.0](service/securityhub/CHANGELOG.md#v1220-2022-06-16)
+ * **Feature**: Added Threats field for security findings. Added new resource details for ECS Container, ECS Task, RDS SecurityGroup, Kinesis Stream, EC2 TransitGateway, EFS AccessPoint, CloudFormation Stack, CloudWatch Alarm, VPC Peering Connection and WAF Rules
+
+# Release (2022-06-15)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.11.0](service/finspacedata/CHANGELOG.md#v1110-2022-06-15)
+ * **Feature**: This release adds a new set of APIs, GetPermissionGroup, DisassociateUserFromPermissionGroup, AssociateUserToPermissionGroup, ListPermissionGroupsByUser, ListUsersByPermissionGroup.
+* `github.com/aws/aws-sdk-go-v2/service/guardduty`: [v1.14.0](service/guardduty/CHANGELOG.md#v1140-2022-06-15)
+ * **Feature**: Adds finding fields available from GuardDuty Console. Adds FreeTrial related operations. Deprecates the use of various APIs related to Master Accounts and Replace them with Administrator Accounts.
+* `github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry`: [v1.13.0](service/servicecatalogappregistry/CHANGELOG.md#v1130-2022-06-15)
+ * **Feature**: This release adds a new API ListAttributeGroupsForApplication that returns associated attribute groups of an application. In addition, the UpdateApplication and UpdateAttributeGroup APIs will not allow users to update the 'Name' attribute.
+* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.19.0](service/workspaces/CHANGELOG.md#v1190-2022-06-15)
+ * **Feature**: Added new field "reason" to OperationNotSupportedException. Receiving this exception in the DeregisterWorkspaceDirectory API will now return a reason giving more context on the failure.
+
+# Release (2022-06-14)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/budgets`: [v1.13.0](service/budgets/CHANGELOG.md#v1130-2022-06-14)
+ * **Feature**: Add a budgets ThrottlingException. Update the CostFilters value pattern.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.16.0](service/lookoutmetrics/CHANGELOG.md#v1160-2022-06-14)
+ * **Feature**: Adding filters to Alert and adding new UpdateAlert API.
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.25.0](service/mediaconvert/CHANGELOG.md#v1250-2022-06-14)
+ * **Feature**: AWS Elemental MediaConvert SDK has added support for rules that constrain Automatic-ABR rendition selection when generating ABR package ladders.
+
+# Release (2022-06-13)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.20.0](service/outposts/CHANGELOG.md#v1200-2022-06-13)
+ * **Feature**: This release adds API operations AWS uses to install Outpost servers.
+
+# Release (2022-06-10)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.19.7](service/frauddetector/CHANGELOG.md#v1197-2022-06-10)
+ * **Documentation**: Documentation updates for Amazon Fraud Detector (AWSHawksNest)
+
+# Release (2022-06-09)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.11.0](service/chimesdkmeetings/CHANGELOG.md#v1110-2022-06-09)
+ * **Feature**: Adds support for live transcription in AWS GovCloud (US) Regions.
+
+# Release (2022-06-08)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.19.0](service/databasemigrationservice/CHANGELOG.md#v1190-2022-06-08)
+ * **Feature**: This release adds DMS Fleet Advisor APIs and exposes functionality for DMS Fleet Advisor. It adds functionality to create and modify fleet advisor instances, and to collect and analyze information about the local data infrastructure.
+* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.18.7](service/iam/CHANGELOG.md#v1187-2022-06-08)
+ * **Documentation**: Documentation updates for AWS Identity and Access Management (IAM).
+* `github.com/aws/aws-sdk-go-v2/service/m2`: [v1.0.0](service/m2/CHANGELOG.md#v100-2022-06-08)
+ * **Release**: New AWS service client module
+ * **Feature**: AWS Mainframe Modernization service is a managed mainframe service and set of tools for planning, migrating, modernizing, and running mainframe workloads on AWS
+* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.17.0](service/neptune/CHANGELOG.md#v1170-2022-06-08)
+ * **Feature**: This release adds support for Neptune to be configured as a global database, with a primary DB cluster in one region, and up to five secondary DB clusters in other regions.
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.25.0](service/redshift/CHANGELOG.md#v1250-2022-06-08)
+ * **Feature**: Adds new API GetClusterCredentialsWithIAM to return temporary credentials.
+* `github.com/aws/aws-sdk-go-v2/service/redshiftserverless`: [v1.0.0](service/redshiftserverless/CHANGELOG.md#v100-2022-06-08)
+ * **Release**: New AWS service client module
+ * **Feature**: Add new API operations for Amazon Redshift Serverless, a new way of using Amazon Redshift without needing to manually manage provisioned clusters. The new operations let you interact with Redshift Serverless resources, such as create snapshots, list VPC endpoints, delete resource policies, and more.
+
+# Release (2022-06-07)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.19.0](service/auditmanager/CHANGELOG.md#v1190-2022-06-07)
+ * **Feature**: This release introduces 2 updates to the Audit Manager API. The roleType and roleArn attributes are now required when you use the CreateAssessment or UpdateAssessment operation. We also added a throttling exception to the RegisterAccount API operation.
+* `github.com/aws/aws-sdk-go-v2/service/costexplorer`: [v1.19.0](service/costexplorer/CHANGELOG.md#v1190-2022-06-07)
+ * **Feature**: Added two new APIs to support cost allocation tags operations: ListCostAllocationTags, UpdateCostAllocationTagsStatus.
+
+# Release (2022-06-06)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.10.0](service/chimesdkmessaging/CHANGELOG.md#v1100-2022-06-06)
+ * **Feature**: This release adds support for searching channels by members via the SearchChannels API, removes required restrictions for Name and Mode in UpdateChannel API and enhances CreateChannel API by exposing member and moderator list as well as channel id as optional parameters.
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.26.0](service/connect/CHANGELOG.md#v1260-2022-06-06)
+ * **Feature**: This release adds a new API, GetCurrentUserData, which returns real-time details about users' current activity.
+
+# Release (2022-06-02)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.16.0](service/applicationinsights/CHANGELOG.md#v1160-2022-06-02)
+ * **Feature**: Provide Account Level onboarding support through CFN/CLI
+* `github.com/aws/aws-sdk-go-v2/service/codeartifact`: [v1.12.6](service/codeartifact/CHANGELOG.md#v1126-2022-06-02)
+ * **Documentation**: Documentation updates for CodeArtifact
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.25.0](service/connect/CHANGELOG.md#v1250-2022-06-02)
+ * **Feature**: This release adds the following features: 1) New APIs to manage (create, list, update) task template resources, 2) Updates to startTaskContact API to support task templates, and 3) new TransferContact API to programmatically transfer in-progress tasks via a contact flow.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.28.0](service/kendra/CHANGELOG.md#v1280-2022-06-02)
+ * **Feature**: Amazon Kendra now provides a data source connector for GitHub. For more information, see https://docs.aws.amazon.com/kendra/latest/dg/data-source-github.html
+* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.14.0](service/proton/CHANGELOG.md#v1140-2022-06-02)
+ * **Feature**: Add new "Components" API to enable users to Create, Delete and Update AWS Proton components.
+* `github.com/aws/aws-sdk-go-v2/service/voiceid`: [v1.10.0](service/voiceid/CHANGELOG.md#v1100-2022-06-02)
+ * **Feature**: Added a new attribute ServerSideEncryptionUpdateDetails to Domain and DomainSummary.
+
+# Release (2022-06-01)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/backupgateway`: [v1.6.0](service/backupgateway/CHANGELOG.md#v160-2022-06-01)
+ * **Feature**: Adds GetGateway and UpdateGatewaySoftwareNow API and adds hypervisor name to UpdateHypervisor API
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.10.0](service/chimesdkmeetings/CHANGELOG.md#v1100-2022-06-01)
+ * **Feature**: Adds support for centrally controlling each participant's ability to send and receive audio, video and screen share within a WebRTC session. Attendee capabilities can be specified when the attendee is created and updated during the session with the new BatchUpdateAttendeeCapabilitiesExcept API.
+* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.22.0](service/forecast/CHANGELOG.md#v1220-2022-06-01)
+ * **Feature**: Added Format field to Import and Export APIs in Amazon Forecast. Added TimeSeriesSelector to Create Forecast API.
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.21.0](service/route53/CHANGELOG.md#v1210-2022-06-01)
+ * **Feature**: Add new APIs to support Route 53 IP Based Routing
+
+# Release (2022-05-31)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.17.0](service/cognitoidentityprovider/CHANGELOG.md#v1170-2022-05-31)
+ * **Feature**: Amazon Cognito now supports IP Address propagation for all unauthenticated APIs (e.g. SignUp, ForgotPassword).
+* `github.com/aws/aws-sdk-go-v2/service/drs`: [v1.6.0](service/drs/CHANGELOG.md#v160-2022-05-31)
+ * **Feature**: Changed existing APIs and added new APIs to accommodate using multiple AWS accounts with AWS Elastic Disaster Recovery.
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.22.0](service/iotsitewise/CHANGELOG.md#v1220-2022-05-31)
+ * **Feature**: This release adds the following new optional field to the IoT SiteWise asset resource: assetDescription.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.15.0](service/lookoutmetrics/CHANGELOG.md#v1150-2022-05-31)
+ * **Feature**: Adding backtest mode to detectors using the Cloudwatch data source.
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.20.0](service/transcribe/CHANGELOG.md#v1200-2022-05-31)
+ * **Feature**: Amazon Transcribe now supports automatic language identification for multi-lingual audio in batch mode.
+
+# Release (2022-05-27)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.16.0](service/appflow/CHANGELOG.md#v1160-2022-05-27)
+ * **Feature**: Adding the following features/changes: Parquet output that preserves typing from the source connector, Failed executions threshold before deactivation for scheduled flows, increasing max size of access and refresh token from 2048 to 4096
+* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.17.0](service/datasync/CHANGELOG.md#v1170-2022-05-27)
+ * **Feature**: AWS DataSync now supports TLS encryption in transit, file system policies and access points for EFS locations.
+* `github.com/aws/aws-sdk-go-v2/service/emrserverless`: [v1.1.0](service/emrserverless/CHANGELOG.md#v110-2022-05-27)
+ * **Feature**: This release adds support for Amazon EMR Serverless, a serverless runtime environment that simplifies running analytics applications using the latest open source frameworks such as Apache Spark and Apache Hive.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.32.0](service/sagemaker/CHANGELOG.md#v1320-2022-05-27)
+ * **Feature**: Amazon SageMaker Notebook Instances now allows configuration of Instance Metadata Service version and Amazon SageMaker Studio now supports G5 instance types.
+
+# Release (2022-05-26)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.45.0](service/ec2/CHANGELOG.md#v1450-2022-05-26)
+ * **Feature**: C7g instances, powered by the latest generation AWS Graviton3 processors, provide the best price performance in Amazon EC2 for compute-intensive workloads.
+* `github.com/aws/aws-sdk-go-v2/service/emrserverless`: [v1.0.0](service/emrserverless/CHANGELOG.md#v100-2022-05-26)
+ * **Release**: New AWS service client module
+ * **Feature**: This release adds support for Amazon EMR Serverless, a serverless runtime environment that simplifies running analytics applications using the latest open source frameworks such as Apache Spark and Apache Hive.
+* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.21.0](service/forecast/CHANGELOG.md#v1210-2022-05-26)
+ * **Feature**: Introduced a new field in Auto Predictor as Time Alignment Boundary. It helps in aligning the timestamps generated during Forecast exports
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.22.0](service/lightsail/CHANGELOG.md#v1220-2022-05-26)
+ * **Feature**: Amazon Lightsail now supports the ability to configure a Lightsail Container Service to pull images from Amazon ECR private repositories in your account.
+
+# Release (2022-05-25)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/apigateway`: [v1.15.6](service/apigateway/CHANGELOG.md#v1156-2022-05-25)
+ * **Documentation**: Documentation updates for Amazon API Gateway
+* `github.com/aws/aws-sdk-go-v2/service/apprunner`: [v1.12.3](service/apprunner/CHANGELOG.md#v1123-2022-05-25)
+ * **Documentation**: Documentation-only update added for CodeConfiguration.
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.21.0](service/cloudformation/CHANGELOG.md#v1210-2022-05-25)
+ * **Feature**: Add a new parameter statusReason to DescribeStackSetOperation output for additional details
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.24.0](service/fsx/CHANGELOG.md#v1240-2022-05-25)
+ * **Feature**: This release adds root squash support to FSx for Lustre to restrict root level access from clients by mapping root users to a less-privileged user/group with limited permissions.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.14.0](service/lookoutmetrics/CHANGELOG.md#v1140-2022-05-25)
+ * **Feature**: Adding AthenaSourceConfig for MetricSet APIs to support Athena as a data source.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.31.0](service/sagemaker/CHANGELOG.md#v1310-2022-05-25)
+ * **Feature**: Amazon SageMaker Autopilot adds support for manually selecting features from the input dataset using the CreateAutoMLJob API.
+* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.15.9](service/secretsmanager/CHANGELOG.md#v1159-2022-05-25)
+ * **Documentation**: Documentation updates for Secrets Manager
+* `github.com/aws/aws-sdk-go-v2/service/voiceid`: [v1.9.0](service/voiceid/CHANGELOG.md#v190-2022-05-25)
+ * **Feature**: VoiceID will now automatically expire Speakers if they haven't been accessed for Enrollment, Re-enrollment or Successful Auth for three years. The Speaker APIs now return a "LastAccessedAt" time for Speakers, and the EvaluateSession API returns "SPEAKER_EXPIRED" Auth Decision for EXPIRED Speakers.
+
+# Release (2022-05-24)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.16.0](service/cognitoidentityprovider/CHANGELOG.md#v1160-2022-05-24)
+ * **Feature**: Amazon Cognito now supports requiring attribute verification (ex. email and phone number) before update.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.44.0](service/ec2/CHANGELOG.md#v1440-2022-05-24)
+ * **Feature**: Stop Protection feature enables customers to protect their instances from accidental stop actions.
+* `github.com/aws/aws-sdk-go-v2/service/ivschat`: [v1.0.4](service/ivschat/CHANGELOG.md#v104-2022-05-24)
+ * **Documentation**: Doc-only update. For MessageReviewHandler structure, added timeout period in the description of the fallbackResult field
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.24.0](service/mediaconvert/CHANGELOG.md#v1240-2022-05-24)
+ * **Feature**: AWS Elemental MediaConvert SDK has added support for rules that constrain Automatic-ABR rendition selection when generating ABR package ladders.
+* `github.com/aws/aws-sdk-go-v2/service/networkmanager`: [v1.13.0](service/networkmanager/CHANGELOG.md#v1130-2022-05-24)
+ * **Feature**: This release adds Multi Account API support for a TGW Global Network, to enable and disable AWSServiceAccess with AwsOrganizations for Network Manager service and dependency CloudFormation StackSets service.
+
+# Release (2022-05-23)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.21.0](service/elasticache/CHANGELOG.md#v1210-2022-05-23)
+ * **Feature**: Added support for encryption in transit for Memcached clusters. Customers can now launch Memcached cluster with encryption in transit enabled when using Memcached version 1.6.12 or later.
+* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.20.0](service/forecast/CHANGELOG.md#v1200-2022-05-23)
+ * **Feature**: New APIs for Monitor that help you understand how your predictors perform over time.
+* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.20.0](service/personalize/CHANGELOG.md#v1200-2022-05-23)
+ * **Feature**: Adding modelMetrics as part of DescribeRecommender API response for Personalize.
+
+# Release (2022-05-20)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.15.7](service/cloudwatchlogs/CHANGELOG.md#v1157-2022-05-20)
+ * **Documentation**: Doc-only update to publish the new valid values for log retention
+* `github.com/aws/aws-sdk-go-v2/service/comprehend`: [v1.18.0](service/comprehend/CHANGELOG.md#v1180-2022-05-20)
+ * **Feature**: Comprehend releases 14 new entity types for DetectPiiEntities and ContainsPiiEntities APIs.
+
+# Release (2022-05-19)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/gamesparks`: [v1.1.0](service/gamesparks/CHANGELOG.md#v110-2022-05-19)
+ * **Feature**: This release adds an optional DeploymentResult field in the responses of GetStageDeploymentIntegrationTests and ListStageDeploymentIntegrationTests APIs.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.13.0](service/lookoutmetrics/CHANGELOG.md#v1130-2022-05-19)
+ * **Feature**: In this release we added SnsFormat to SNSConfiguration to support human readable alert.
+
+# Release (2022-05-18)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.14.0](service/appmesh/CHANGELOG.md#v1140-2022-05-18)
+ * **Feature**: This release updates the existing Create and Update APIs for meshes and virtual nodes by adding a new IP preference field. This new IP preference field can be used to control the IP versions being used with the mesh and allows for IPv6 support within App Mesh.
+* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.18.3](service/batch/CHANGELOG.md#v1183-2022-05-18)
+ * **Documentation**: Documentation updates for AWS Batch.
+* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.16.0](service/greengrassv2/CHANGELOG.md#v1160-2022-05-18)
+ * **Feature**: This release adds the new DeleteDeployment API operation that you can use to delete deployment resources. This release also adds support for discontinued AWS-provided components, so AWS can communicate when a component has any issues that you should consider before you deploy it.
+* `github.com/aws/aws-sdk-go-v2/service/ioteventsdata`: [v1.12.0](service/ioteventsdata/CHANGELOG.md#v1120-2022-05-18)
+ * **Feature**: Introducing new API for deleting detectors: BatchDeleteDetector.
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.22.0](service/quicksight/CHANGELOG.md#v1220-2022-05-18)
+ * **Feature**: API UpdatePublicSharingSettings enables IAM admins to enable/disable account level setting for public access of dashboards. When enabled, owners/co-owners for dashboards can enable public access on their dashboards. These dashboards can only be accessed through share link or embedding.
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.19.0](service/transfer/CHANGELOG.md#v1190-2022-05-18)
+ * **Feature**: AWS Transfer Family now supports SetStat server configuration option, which provides the ability to ignore SetStat command issued by file transfer clients, enabling customers to upload files without any errors.
+
+# Release (2022-05-17)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/internal/ini`: [v1.3.12](internal/ini/CHANGELOG.md#v1312-2022-05-17)
+ * **Bug Fix**: Removes the fuzz testing files from the module, as they are invalid and not used.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.25.0](service/glue/CHANGELOG.md#v1250-2022-05-17)
+ * **Feature**: This release adds a new optional parameter called codeGenNodeConfiguration to CRUD job APIs that allows users to manage visual jobs via APIs. The updated CreateJob and UpdateJob will create jobs that can be viewed in Glue Studio as a visual graph. GetJob can be used to get codeGenNodeConfiguration.
+* `github.com/aws/aws-sdk-go-v2/service/iotsecuretunneling`: [v1.13.1](service/iotsecuretunneling/CHANGELOG.md#v1131-2022-05-17)
+ * **Bug Fix**: Fixes iotsecuretunneling and mobile API clients to use the correct name for signing requests, Fixes [#1686](https://github.com/aws/aws-sdk-go-v2/issues/1686).
+* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.17.2](service/kms/CHANGELOG.md#v1172-2022-05-17)
+ * **Documentation**: Add HMAC best practice tip, annual rotation of AWS managed keys.
+* `github.com/aws/aws-sdk-go-v2/service/mobile`: [v1.11.5](service/mobile/CHANGELOG.md#v1115-2022-05-17)
+ * **Bug Fix**: Fixes iotsecuretunneling and mobile API clients to use the correct name for signing requests, Fixes [#1686](https://github.com/aws/aws-sdk-go-v2/issues/1686).
+
+# Release (2022-05-16)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/applicationdiscoveryservice`: [v1.13.0](service/applicationdiscoveryservice/CHANGELOG.md#v1130-2022-05-16)
+ * **Feature**: Add Migration Evaluator Collector details to the GetDiscoverySummary API response
+* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.18.0](service/cloudfront/CHANGELOG.md#v1180-2022-05-16)
+ * **Feature**: Introduced a new error (TooLongCSPInResponseHeadersPolicy) that is returned when the value of the Content-Security-Policy header in a response headers policy exceeds the maximum allowed length.
+* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.18.1](service/rekognition/CHANGELOG.md#v1181-2022-05-16)
+ * **Documentation**: Documentation updates for Amazon Rekognition.
+* `github.com/aws/aws-sdk-go-v2/service/resiliencehub`: [v1.6.0](service/resiliencehub/CHANGELOG.md#v160-2022-05-16)
+ * **Feature**: In this release, we are introducing support for Amazon Elastic Container Service, Amazon Route 53, AWS Elastic Disaster Recovery, AWS Backup in addition to the existing supported Services. This release also supports Terraform file input from S3 and scheduling daily assessments
+* `github.com/aws/aws-sdk-go-v2/service/servicecatalog`: [v1.14.2](service/servicecatalog/CHANGELOG.md#v1142-2022-05-16)
+ * **Documentation**: Updated the descriptions for the ListAcceptedPortfolioShares API description and the PortfolioShareType parameters.
+* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.16.5](service/sts/CHANGELOG.md#v1165-2022-05-16)
+ * **Documentation**: Documentation updates for AWS Security Token Service.
+* `github.com/aws/aws-sdk-go-v2/service/workspacesweb`: [v1.6.0](service/workspacesweb/CHANGELOG.md#v160-2022-05-16)
+ * **Feature**: Amazon WorkSpaces Web now supports Administrator timeout control
+
+# Release (2022-05-13)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/grafana`: [v1.9.0](service/grafana/CHANGELOG.md#v190-2022-05-13)
+ * **Feature**: This release adds APIs for creating and deleting API keys in an Amazon Managed Grafana workspace.
+
+# Release (2022-05-12)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.43.0](service/ec2/CHANGELOG.md#v1430-2022-05-12)
+ * **Feature**: This release introduces a target type Gateway Load Balancer Endpoint for mirrored traffic. Customers can now specify GatewayLoadBalancerEndpoint option during the creation of a traffic mirror target.
+* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.10.5](service/finspacedata/CHANGELOG.md#v1105-2022-05-12)
+ * **Documentation**: We've now deprecated CreateSnapshot permission for creating a data view, instead use CreateDataView permission.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.25.1](service/iot/CHANGELOG.md#v1251-2022-05-12)
+ * **Documentation**: Documentation update for China region ListMetricValues for IoT
+* `github.com/aws/aws-sdk-go-v2/service/ivschat`: [v1.0.2](service/ivschat/CHANGELOG.md#v102-2022-05-12)
+ * **Documentation**: Documentation-only updates for IVS Chat API Reference.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.27.0](service/kendra/CHANGELOG.md#v1270-2022-05-12)
+ * **Feature**: Amazon Kendra now provides a data source connector for Jira. For more information, see https://docs.aws.amazon.com/kendra/latest/dg/data-source-jira.html
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.23.0](service/lambda/CHANGELOG.md#v1230-2022-05-12)
+ * **Feature**: Lambda releases NodeJs 16 managed runtime to be available in all commercial regions.
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.21.0](service/lightsail/CHANGELOG.md#v1210-2022-05-12)
+ * **Feature**: This release adds support to include inactive database bundles in the response of the GetRelationalDatabaseBundles request.
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.19.1](service/outposts/CHANGELOG.md#v1191-2022-05-12)
+ * **Documentation**: Documentation updates for AWS Outposts.
+* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.14.0](service/ssmincidents/CHANGELOG.md#v1140-2022-05-12)
+ * **Feature**: Adding support for dynamic SSM Runbook parameter values. Updating validation pattern for engagements. Adding ConflictException to UpdateReplicationSet API contract.
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.18.6](service/transfer/CHANGELOG.md#v1186-2022-05-12)
+ * **Documentation**: AWS Transfer Family now accepts ECDSA keys for server host keys
+
+# Release (2022-05-11)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.42.0](service/ec2/CHANGELOG.md#v1420-2022-05-11)
+ * **Feature**: This release updates AWS PrivateLink APIs to support IPv6 for PrivateLink Services and Endpoints of type 'Interface'.
+* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.15.7](service/secretsmanager/CHANGELOG.md#v1157-2022-05-11)
+ * **Documentation**: Doc only update for Secrets Manager that fixes several customer-reported issues.
+
+# Release (2022-05-10)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.17.5](service/computeoptimizer/CHANGELOG.md#v1175-2022-05-10)
+ * **Documentation**: Documentation updates for Compute Optimizer
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.41.0](service/ec2/CHANGELOG.md#v1410-2022-05-10)
+ * **Feature**: Added support for using NitroTPM and UEFI Secure Boot on EC2 instances.
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.21.0](service/eks/CHANGELOG.md#v1210-2022-05-10)
+ * **Feature**: Adds BOTTLEROCKET_ARM_64_NVIDIA and BOTTLEROCKET_x86_64_NVIDIA AMI types to EKS managed nodegroups
+* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.18.0](service/emr/CHANGELOG.md#v1180-2022-05-10)
+ * **Feature**: This release updates the Amazon EMR ModifyInstanceGroups API to support "MERGE" type cluster reconfiguration. Also, added the ability to specify a particular Amazon Linux release for all nodes in a cluster launch request.
+* `github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces`: [v1.5.5](service/migrationhubrefactorspaces/CHANGELOG.md#v155-2022-05-10)
+ * **Documentation**: AWS Migration Hub Refactor Spaces documentation only update to fix a formatting issue.
+
+# Release (2022-05-09)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/config`: [v1.15.5](config/CHANGELOG.md#v1155-2022-05-09)
+ * **Bug Fix**: Fixes a bug in LoadDefaultConfig to correctly assign ConfigSources so all config resolvers have access to the config sources. This fixes the feature/ec2/imds client not having configuration applied via config.LoadOptions such as EC2IMDSClientEnableState. PR [#1682](https://github.com/aws/aws-sdk-go-v2/pull/1682)
+* `github.com/aws/aws-sdk-go-v2/service/cloudcontrol`: [v1.10.0](service/cloudcontrol/CHANGELOG.md#v1100-2022-05-09)
+ * **Feature**: SDK release for Cloud Control API to include paginators for Python SDK.
+* `github.com/aws/aws-sdk-go-v2/service/evidently`: [v1.7.0](service/evidently/CHANGELOG.md#v170-2022-05-09)
+ * **Feature**: Add detail message inside GetExperimentResults API response to indicate experiment result availability
+* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.13.5](service/ssmcontacts/CHANGELOG.md#v1135-2022-05-09)
+ * **Documentation**: Fixed an error in the DescribeEngagement example for AWS Incident Manager.
+
+# Release (2022-05-06)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.40.0](service/ec2/CHANGELOG.md#v1400-2022-05-06)
+ * **Feature**: Add new state values for IPAMs, IPAM Scopes, and IPAM Pools.
+* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.17.0](service/location/CHANGELOG.md#v1170-2022-05-06)
+ * **Feature**: Amazon Location Service now includes a MaxResults parameter for ListGeofences requests.
+* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.16.0](service/mediapackage/CHANGELOG.md#v1160-2022-05-06)
+ * **Feature**: This release adds Dvb Dash 2014 as an available profile option for Dash Origin Endpoints.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.21.1](service/rds/CHANGELOG.md#v1211-2022-05-06)
+ * **Documentation**: Various documentation improvements.
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.24.0](service/redshift/CHANGELOG.md#v1240-2022-05-06)
+ * **Feature**: Introduces new field 'LoadSampleData' in CreateCluster operation. Customers can now specify 'LoadSampleData' option during creation of a cluster, which results in loading of sample data in the cluster that is created.
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.21.1](service/securityhub/CHANGELOG.md#v1211-2022-05-06)
+ * **Documentation**: Documentation updates for Security Hub API reference
+
+# Release (2022-05-05)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.16.0](service/datasync/CHANGELOG.md#v1160-2022-05-05)
+ * **Feature**: AWS DataSync now supports a new ObjectTags Task API option that can be used to control whether Object Tags are transferred.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.39.0](service/ec2/CHANGELOG.md#v1390-2022-05-05)
+ * **Feature**: Amazon EC2 I4i instances are powered by 3rd generation Intel Xeon Scalable processors and feature up to 30 TB of local AWS Nitro SSD storage
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.25.0](service/iot/CHANGELOG.md#v1250-2022-05-05)
+ * **Feature**: AWS IoT Jobs now allows you to create up to 100,000 active continuous and snapshot jobs by using concurrency control.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.26.0](service/kendra/CHANGELOG.md#v1260-2022-05-05)
+ * **Feature**: AWS Kendra now supports hierarchical facets for a query. For more information, see https://docs.aws.amazon.com/kendra/latest/dg/filtering.html
+
+# Release (2022-05-04)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.16.0](service/backup/CHANGELOG.md#v1160-2022-05-04)
+ * **Feature**: Adds support to 2 new filters about job complete time for 3 list jobs APIs in AWS Backup
+* `github.com/aws/aws-sdk-go-v2/service/iotsecuretunneling`: [v1.13.0](service/iotsecuretunneling/CHANGELOG.md#v1130-2022-05-04)
+ * **Feature**: This release introduces a new API RotateTunnelAccessToken that allow revoking the existing tokens and generate new tokens
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.20.1](service/lightsail/CHANGELOG.md#v1201-2022-05-04)
+ * **Documentation**: Documentation updates for Lightsail
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.27.0](service/ssm/CHANGELOG.md#v1270-2022-05-04)
+ * **Feature**: This release adds the TargetMaps parameter in SSM State Manager API.
+
+# Release (2022-05-03)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.38.0](service/ec2/CHANGELOG.md#v1380-2022-05-03)
+ * **Feature**: Adds support for allocating Dedicated Hosts on AWS Outposts. The AllocateHosts API now accepts an OutpostArn request parameter, and the DescribeHosts API now includes an OutpostArn response parameter.
+* `github.com/aws/aws-sdk-go-v2/service/kinesisvideo`: [v1.12.0](service/kinesisvideo/CHANGELOG.md#v1120-2022-05-03)
+ * **Feature**: Add support for multiple image feature related APIs for configuring image generation and notification of a video stream. Add "GET_IMAGES" to the list of supported API names for the GetDataEndpoint API.
+* `github.com/aws/aws-sdk-go-v2/service/kinesisvideoarchivedmedia`: [v1.13.0](service/kinesisvideoarchivedmedia/CHANGELOG.md#v1130-2022-05-03)
+ * **Feature**: Add support for GetImages API for retrieving images from a video stream
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.26.8](service/s3/CHANGELOG.md#v1268-2022-05-03)
+ * **Documentation**: Documentation only update for doc bug fixes for the S3 API docs.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.30.0](service/sagemaker/CHANGELOG.md#v1300-2022-05-03)
+ * **Feature**: SageMaker Autopilot adds new metrics for all candidate models generated by Autopilot experiments; RStudio on SageMaker now allows users to bring your own development environment in a custom image.
+
+# Release (2022-05-02)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/organizations`: [v1.16.0](service/organizations/CHANGELOG.md#v1160-2022-05-02)
+ * **Feature**: This release adds the INVALID_PAYMENT_INSTRUMENT as a fail reason and an error message.
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.19.0](service/outposts/CHANGELOG.md#v1190-2022-05-02)
+ * **Feature**: This release adds a new API called ListAssets to the Outposts SDK, which lists the hardware assets in an Outpost.
+* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.15.0](service/synthetics/CHANGELOG.md#v1150-2022-05-02)
+ * **Feature**: CloudWatch Synthetics has introduced a new feature to provide customers with an option to delete the underlying resources that Synthetics canary creates when the user chooses to delete the canary.
+
+# Release (2022-04-29)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/codegurureviewer`: [v1.16.0](service/codegurureviewer/CHANGELOG.md#v1160-2022-04-29)
+ * **Feature**: Amazon CodeGuru Reviewer now supports suppressing recommendations from being generated on specific files and directories.
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.23.0](service/mediaconvert/CHANGELOG.md#v1230-2022-04-29)
+ * **Feature**: AWS Elemental MediaConvert SDK nows supports creation of Dolby Vision profile 8.1, the ability to generate black frames of video, and introduces audio-only DASH and CMAF support.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.21.0](service/rds/CHANGELOG.md#v1210-2022-04-29)
+ * **Feature**: Feature - Adds support for Internet Protocol Version 6 (IPv6) on RDS database instances.
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.26.0](service/ssm/CHANGELOG.md#v1260-2022-04-29)
+ * **Feature**: Update the StartChangeRequestExecution, adding TargetMaps to the Runbook parameter
+* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.20.0](service/wafv2/CHANGELOG.md#v1200-2022-04-29)
+ * **Feature**: You can now inspect all request headers and all cookies. You can now specify how to handle oversize body contents in your rules that inspect the body.
+
+# Release (2022-04-28)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.18.5](service/auditmanager/CHANGELOG.md#v1185-2022-04-28)
+ * **Documentation**: This release adds documentation updates for Audit Manager. We provided examples of how to use the Custom_ prefix for the keywordValue attribute. We also provided more details about the DeleteAssessmentReport operation.
+* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.16.0](service/braket/CHANGELOG.md#v1160-2022-04-28)
+ * **Feature**: This release enables Braket Hybrid Jobs with Embedded Simulators to have multiple instances.
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.24.0](service/connect/CHANGELOG.md#v1240-2022-04-28)
+ * **Feature**: This release introduces an API for changing the current agent status of a user in Connect.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.37.0](service/ec2/CHANGELOG.md#v1370-2022-04-28)
+ * **Feature**: This release adds support to query the public key and creation date of EC2 Key Pairs. Additionally, the format (pem or ppk) of a key pair can be specified when creating a new key pair.
+* `github.com/aws/aws-sdk-go-v2/service/guardduty`: [v1.13.5](service/guardduty/CHANGELOG.md#v1135-2022-04-28)
+ * **Documentation**: Documentation update for API description.
+* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.17.0](service/networkfirewall/CHANGELOG.md#v1170-2022-04-28)
+ * **Feature**: AWS Network Firewall adds support for stateful threat signature AWS managed rule groups.
+
+# Release (2022-04-27)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/amplify`: [v1.11.5](service/amplify/CHANGELOG.md#v1115-2022-04-27)
+ * **Documentation**: Documentation only update to support the Amplify GitHub App feature launch
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines`: [v1.0.0](service/chimesdkmediapipelines/CHANGELOG.md#v100-2022-04-27)
+ * **Release**: New AWS service client module
+ * **Feature**: For Amazon Chime SDK meetings, the Amazon Chime Media Pipelines SDK allows builders to capture audio, video, and content share streams. You can also capture meeting events, live transcripts, and data messages. The pipelines save the artifacts to an Amazon S3 bucket that you designate.
+* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.16.0](service/cloudtrail/CHANGELOG.md#v1160-2022-04-27)
+ * **Feature**: Increases the retention period maximum to 2557 days. Deprecates unused fields of the ListEventDataStores API response. Updates documentation.
+* `github.com/aws/aws-sdk-go-v2/service/internal/checksum`: [v1.1.5](service/internal/checksum/CHANGELOG.md#v115-2022-04-27)
+ * **Bug Fix**: Fixes a bug that could cause the SigV4 payload hash to be incorrectly encoded, leading to signing errors.
+* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.19.0](service/iotwireless/CHANGELOG.md#v1190-2022-04-27)
+ * **Feature**: Add list support for event configurations, allow to get and update event configurations by resource type, support LoRaWAN events; Make NetworkAnalyzerConfiguration as a resource, add List, Create, Delete API support; Add FCntStart attribute support for ABP WirelessDevice.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutequipment`: [v1.13.0](service/lookoutequipment/CHANGELOG.md#v1130-2022-04-27)
+ * **Feature**: This release adds the following new features: 1) Introduces an option for automatic schema creation 2) Now allows for Ingestion of data containing most common errors and allows automatic data cleaning 3) Introduces new API ListSensorStatistics that gives further information about the ingested data
+* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.18.0](service/rekognition/CHANGELOG.md#v1180-2022-04-27)
+ * **Feature**: This release adds support to configure stream-processor resources for label detections on streaming-videos. UpateStreamProcessor API is also launched with this release, which could be used to update an existing stream-processor.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.29.0](service/sagemaker/CHANGELOG.md#v1290-2022-04-27)
+ * **Feature**: Amazon SageMaker Autopilot adds support for custom validation dataset and validation ratio through the CreateAutoMLJob and DescribeAutoMLJob APIs.
+
+# Release (2022-04-26)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.17.0](service/cloudfront/CHANGELOG.md#v1170-2022-04-26)
+ * **Feature**: CloudFront now supports the Server-Timing header in HTTP responses sent from CloudFront. You can use this header to view metrics that help you gain insights about the behavior and performance of CloudFront. To use this header, enable it in a response headers policy.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.24.2](service/glue/CHANGELOG.md#v1242-2022-04-26)
+ * **Documentation**: This release adds documentation for the APIs to create, read, delete, list, and batch read of AWS Glue custom patterns, and for Lake Formation configuration settings in the AWS Glue crawler.
+* `github.com/aws/aws-sdk-go-v2/service/ivschat`: [v1.0.0](service/ivschat/CHANGELOG.md#v100-2022-04-26)
+ * **Release**: New AWS service client module
+ * **Feature**: Adds new APIs for IVS Chat, a feature for building interactive chat experiences alongside an IVS broadcast.
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.20.0](service/lightsail/CHANGELOG.md#v1200-2022-04-26)
+ * **Feature**: This release adds support for Lightsail load balancer HTTP to HTTPS redirect and TLS policy configuration.
+* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.16.0](service/networkfirewall/CHANGELOG.md#v1160-2022-04-26)
+ * **Feature**: AWS Network Firewall now enables customers to use a customer managed AWS KMS key for the encryption of their firewall resources.
+* `github.com/aws/aws-sdk-go-v2/service/pricing`: [v1.14.5](service/pricing/CHANGELOG.md#v1145-2022-04-26)
+ * **Documentation**: Documentation updates for Price List API
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.28.0](service/sagemaker/CHANGELOG.md#v1280-2022-04-26)
+ * **Feature**: SageMaker Inference Recommender now accepts customer KMS key ID for encryption of endpoints and compilation outputs created during inference recommendation.
+
+# Release (2022-04-25)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.16.3
+ * **Dependency Update**: Update SDK's internal copy of golang.org/x/sync/singleflight to address issue with test failing due to timeing issues
+* `github.com/aws/aws-sdk-go-v2/credentials`: [v1.12.0](credentials/CHANGELOG.md#v1120-2022-04-25)
+ * **Feature**: Adds Duration and Policy options that can be used when creating stscreds.WebIdentityRoleProvider credentials provider.
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.23.0](service/connect/CHANGELOG.md#v1230-2022-04-25)
+ * **Feature**: This release adds SearchUsers API which can be used to search for users with a Connect Instance
+* `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.14.4](service/gamelift/CHANGELOG.md#v1144-2022-04-25)
+ * **Documentation**: Documentation updates for Amazon GameLift.
+* `github.com/aws/aws-sdk-go-v2/service/mq`: [v1.13.0](service/mq/CHANGELOG.md#v1130-2022-04-25)
+ * **Feature**: This release adds the CRITICAL_ACTION_REQUIRED broker state and the ActionRequired API property. CRITICAL_ACTION_REQUIRED informs you when your broker is degraded. ActionRequired provides you with a code which you can use to find instructions in the Developer Guide on how to resolve the issue.
+* `github.com/aws/aws-sdk-go-v2/service/rdsdata`: [v1.12.0](service/rdsdata/CHANGELOG.md#v1120-2022-04-25)
+ * **Feature**: Support to receive SQL query results in the form of a simplified JSON string. This enables developers using the new JSON string format to more easily convert it to an object using popular JSON string parsing libraries.
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.21.0](service/securityhub/CHANGELOG.md#v1210-2022-04-25)
+ * **Feature**: Security Hub now lets you opt-out of auto-enabling the defaults standards (CIS and FSBP) in accounts that are auto-enabled with Security Hub via Security Hub's integration with AWS Organizations.
+
+# Release (2022-04-22)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.9.0](service/chimesdkmeetings/CHANGELOG.md#v190-2022-04-22)
+ * **Feature**: Include additional exceptions types.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.36.0](service/ec2/CHANGELOG.md#v1360-2022-04-22)
+ * **Feature**: Adds support for waiters that automatically poll for a deleted NAT Gateway until it reaches the deleted state.
+
+# Release (2022-04-21)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.20.5](service/elasticache/CHANGELOG.md#v1205-2022-04-21)
+ * **Documentation**: Doc only update for ElastiCache
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.24.0](service/glue/CHANGELOG.md#v1240-2022-04-21)
+ * **Feature**: This release adds APIs to create, read, delete, list, and batch read of Glue custom entity types
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.21.0](service/iotsitewise/CHANGELOG.md#v1210-2022-04-21)
+ * **Feature**: This release adds 3 new batch data query APIs : BatchGetAssetPropertyValue, BatchGetAssetPropertyValueHistory and BatchGetAssetPropertyAggregates
+* `github.com/aws/aws-sdk-go-v2/service/iottwinmaker`: [v1.7.0](service/iottwinmaker/CHANGELOG.md#v170-2022-04-21)
+ * **Feature**: General availability (GA) for AWS IoT TwinMaker. For more information, see https://docs.aws.amazon.com/iot-twinmaker/latest/apireference/Welcome.html
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.12.0](service/lookoutmetrics/CHANGELOG.md#v1120-2022-04-21)
+ * **Feature**: Added DetectMetricSetConfig API for detecting configuration required for creating metric set from provided S3 data source.
+* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.17.0](service/mediatailor/CHANGELOG.md#v1170-2022-04-21)
+ * **Feature**: This release introduces tiered channels and adds support for live sources. Customers using a STANDARD channel can now create programs using live sources.
+* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.15.5](service/secretsmanager/CHANGELOG.md#v1155-2022-04-21)
+ * **Documentation**: Documentation updates for Secrets Manager
+* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.17.0](service/storagegateway/CHANGELOG.md#v1170-2022-04-21)
+ * **Feature**: This release adds support for minimum of 5 character length virtual tape barcodes.
+* `github.com/aws/aws-sdk-go-v2/service/wisdom`: [v1.8.0](service/wisdom/CHANGELOG.md#v180-2022-04-21)
+ * **Feature**: This release updates the GetRecommendations API to include a trigger event list for classifying and grouping recommendations.
+
+# Release (2022-04-20)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.22.0](service/connect/CHANGELOG.md#v1220-2022-04-20)
+ * **Feature**: This release adds APIs to search, claim, release, list, update, and describe phone numbers. You can also use them to associate and disassociate contact flows to phone numbers.
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.21.0](service/macie2/CHANGELOG.md#v1210-2022-04-20)
+ * **Feature**: Sensitive data findings in Amazon Macie now indicate how Macie found the sensitive data that produced a finding (originType).
+* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.14.0](service/mgn/CHANGELOG.md#v1140-2022-04-20)
+ * **Feature**: Removed required annotation from input fields in Describe operations requests. Added quotaValue to ServiceQuotaExceededException
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.20.0](service/rds/CHANGELOG.md#v1200-2022-04-20)
+ * **Feature**: Added a new cluster-level attribute to set the capacity range for Aurora Serverless v2 instances.
+
+# Release (2022-04-19)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.23.0](service/autoscaling/CHANGELOG.md#v1230-2022-04-19)
+ * **Feature**: EC2 Auto Scaling now adds default instance warm-up times for all scaling activities, health check replacements, and other replacement events in the Auto Scaling instance lifecycle.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.25.0](service/kendra/CHANGELOG.md#v1250-2022-04-19)
+ * **Feature**: Amazon Kendra now provides a data source connector for Quip. For more information, see https://docs.aws.amazon.com/kendra/latest/dg/data-source-quip.html
+* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.17.0](service/kms/CHANGELOG.md#v1170-2022-04-19)
+ * **Feature**: Adds support for KMS keys and APIs that generate and verify HMAC codes
+* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.19.0](service/personalize/CHANGELOG.md#v1190-2022-04-19)
+ * **Feature**: Adding StartRecommender and StopRecommender APIs for Personalize.
+* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.15.0](service/polly/CHANGELOG.md#v1150-2022-04-19)
+ * **Feature**: Amazon Polly adds new Austrian German voice - Hannah. Hannah is available as Neural voice only.
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.23.0](service/redshift/CHANGELOG.md#v1230-2022-04-19)
+ * **Feature**: Introduces new fields for LogDestinationType and LogExports on EnableLogging requests and Enable/Disable/DescribeLogging responses. Customers can now select CloudWatch Logs as a destination for their Audit Logs.
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.25.0](service/ssm/CHANGELOG.md#v1250-2022-04-19)
+ * **Feature**: Added offset support for specifying the number of days to wait after the date and time specified by a CRON expression when creating SSM association.
+* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.15.0](service/textract/CHANGELOG.md#v1150-2022-04-19)
+ * **Feature**: This release adds support for specifying and extracting information from documents using the Queries feature within Analyze Document API
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.18.4](service/transfer/CHANGELOG.md#v1184-2022-04-19)
+ * **Documentation**: This release contains corrected HomeDirectoryMappings examples for several API functions: CreateAccess, UpdateAccess, CreateUser, and UpdateUser,.
+* `github.com/aws/aws-sdk-go-v2/service/worklink`: [v1.12.0](service/worklink/CHANGELOG.md#v1120-2022-04-19)
+ * **Feature**: Amazon WorkLink is no longer supported. This will be removed in a future version of the SDK.
+
+# Release (2022-04-15)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue`: [v1.9.0](feature/dynamodb/attributevalue/CHANGELOG.md#v190-2022-04-15)
+ * **Feature**: Support has been added for specifying a custom time format when encoding and decoding DynamoDB AttributeValues. Use `EncoderOptions.EncodeTime` to specify a custom time encoding function, and use `DecoderOptions.DecodeTime` for specifying how to handle the corresponding AttributeValues using the format. Thank you [Pablo Lopez](https://github.com/plopezlpz) for this contribution.
+* `github.com/aws/aws-sdk-go-v2/feature/dynamodbstreams/attributevalue`: [v1.9.0](feature/dynamodbstreams/attributevalue/CHANGELOG.md#v190-2022-04-15)
+ * **Feature**: Support has been added for specifying a custom time format when encoding and decoding DynamoDB AttributeValues. Use `EncoderOptions.EncodeTime` to specify a custom time encoding function, and use `DecoderOptions.DecodeTime` for specifying how to handle the corresponding AttributeValues using the format. Thank you [Pablo Lopez](https://github.com/plopezlpz) for this contribution.
+* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.15.0](service/athena/CHANGELOG.md#v1150-2022-04-15)
+ * **Feature**: This release adds subfields, ErrorMessage, Retryable, to the AthenaError response object in the GetQueryExecution API when a query fails.
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.19.0](service/lightsail/CHANGELOG.md#v1190-2022-04-15)
+ * **Feature**: This release adds support to describe the synchronization status of the account-level block public access feature for your Amazon Lightsail buckets.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.19.0](service/rds/CHANGELOG.md#v1190-2022-04-15)
+ * **Feature**: Removes Amazon RDS on VMware with the deletion of APIs related to Custom Availability Zones and Media installation
+
+# Release (2022-04-14)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.15.0](service/appflow/CHANGELOG.md#v1150-2022-04-14)
+ * **Feature**: Enables users to pass custom token URL parameters for Oauth2 authentication during create connector profile
+* `github.com/aws/aws-sdk-go-v2/service/appstream`: [v1.16.0](service/appstream/CHANGELOG.md#v1160-2022-04-14)
+ * **Feature**: Includes updates for create and update fleet APIs to manage the session scripts locations for Elastic fleets.
+* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.18.0](service/batch/CHANGELOG.md#v1180-2022-04-14)
+ * **Feature**: Enables configuration updates for compute environments with BEST_FIT_PROGRESSIVE and SPOT_CAPACITY_OPTIMIZED allocation strategies.
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.18.1](service/cloudwatch/CHANGELOG.md#v1181-2022-04-14)
+ * **Documentation**: Updates documentation for additional statistics in CloudWatch Metric Streams.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.35.1](service/ec2/CHANGELOG.md#v1351-2022-04-14)
+ * **Documentation**: Documentation updates for Amazon EC2.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.23.0](service/glue/CHANGELOG.md#v1230-2022-04-14)
+ * **Feature**: Auto Scaling for Glue version 3.0 and later jobs to dynamically scale compute resources. This SDK change provides customers with the auto-scaled DPU usage
+
+# Release (2022-04-13)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.18.0](service/cloudwatch/CHANGELOG.md#v1180-2022-04-13)
+ * **Feature**: Adds support for additional statistics in CloudWatch Metric Streams.
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.23.0](service/fsx/CHANGELOG.md#v1230-2022-04-13)
+ * **Feature**: This release adds support for deploying FSx for ONTAP file systems in a single Availability Zone.
+
+# Release (2022-04-12)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.17.0](service/devopsguru/CHANGELOG.md#v1170-2022-04-12)
+ * **Feature**: This release adds new APIs DeleteInsight to deletes the insight along with the associated anomalies, events and recommendations.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.35.0](service/ec2/CHANGELOG.md#v1350-2022-04-12)
+ * **Feature**: X2idn and X2iedn instances are powered by 3rd generation Intel Xeon Scalable processors with an all-core turbo frequency up to 3.5 GHzAmazon EC2. C6a instances are powered by 3rd generation AMD EPYC processors.
+* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.17.0](service/efs/CHANGELOG.md#v1170-2022-04-12)
+ * **Feature**: Amazon EFS adds support for a ThrottlingException when using the CreateAccessPoint API if the account is nearing the AccessPoint limit(120).
+* `github.com/aws/aws-sdk-go-v2/service/iottwinmaker`: [v1.6.0](service/iottwinmaker/CHANGELOG.md#v160-2022-04-12)
+ * **Feature**: This release adds the following new features: 1) ListEntities API now supports search using ExternalId. 2) BatchPutPropertyValue and GetPropertyValueHistory API now allows users to represent time in sub-second level precisions.
+* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.15.4](service/kinesis/CHANGELOG.md#v1154-2022-04-12)
+ * **Bug Fix**: Fixes an issue that caused the unexported constructor function names for EventStream types to be swapped for the event reader and writer respectivly.
+* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.14.4](service/lexruntimev2/CHANGELOG.md#v1144-2022-04-12)
+ * **Bug Fix**: Fixes an issue that caused the unexported constructor function names for EventStream types to be swapped for the event reader and writer respectivly.
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.26.5](service/s3/CHANGELOG.md#v1265-2022-04-12)
+ * **Bug Fix**: Fixes an issue that caused the unexported constructor function names for EventStream types to be swapped for the event reader and writer respectivly.
+* `github.com/aws/aws-sdk-go-v2/service/transcribestreaming`: [v1.6.4](service/transcribestreaming/CHANGELOG.md#v164-2022-04-12)
+ * **Bug Fix**: Fixes an issue that caused the unexported constructor function names for EventStream types to be swapped for the event reader and writer respectivly.
+
+# Release (2022-04-11)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder`: [v1.6.0](service/amplifyuibuilder/CHANGELOG.md#v160-2022-04-11)
+ * **Feature**: In this release, we have added the ability to bind events to component level actions.
+* `github.com/aws/aws-sdk-go-v2/service/apprunner`: [v1.12.0](service/apprunner/CHANGELOG.md#v1120-2022-04-11)
+ * **Feature**: This release adds tracing for App Runner services with X-Ray using AWS Distro for OpenTelemetry. New APIs: CreateObservabilityConfiguration, DescribeObservabilityConfiguration, ListObservabilityConfigurations, and DeleteObservabilityConfiguration. Updated APIs: CreateService and UpdateService.
+* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.18.0](service/workspaces/CHANGELOG.md#v1180-2022-04-11)
+ * **Feature**: Added API support that allows customers to create GPU-enabled WorkSpaces using EC2 G4dn instances.
+
+# Release (2022-04-08)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.22.0](service/mediaconvert/CHANGELOG.md#v1220-2022-04-08)
+ * **Feature**: AWS Elemental MediaConvert SDK has added support for the pass-through of WebVTT styling to WebVTT outputs, pass-through of KLV metadata to supported formats, and improved filter support for processing 444/RGB content.
+* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.17.0](service/mediapackagevod/CHANGELOG.md#v1170-2022-04-08)
+ * **Feature**: This release adds ScteMarkersSource as an available field for Dash Packaging Configurations. When set to MANIFEST, MediaPackage will source the SCTE-35 markers from the manifest. When set to SEGMENTS, MediaPackage will source the SCTE-35 markers from the segments.
+* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.19.0](service/wafv2/CHANGELOG.md#v1190-2022-04-08)
+ * **Feature**: Add a new CurrentDefaultVersion field to ListAvailableManagedRuleGroupVersions API response; add a new VersioningSupported boolean to each ManagedRuleGroup returned from ListAvailableManagedRuleGroups API response.
+
+# Release (2022-04-07)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/internal/v4a`: [v1.0.0](internal/v4a/CHANGELOG.md#v100-2022-04-07)
+ * **Release**: New internal v4a signing module location.
+* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.18.0](service/docdb/CHANGELOG.md#v1180-2022-04-07)
+ * **Feature**: Added support to enable/disable performance insights when creating or modifying db instances
+* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.16.0](service/eventbridge/CHANGELOG.md#v1160-2022-04-07)
+ * **Feature**: Adds new EventBridge Endpoint resources for disaster recovery, multi-region failover, and cross-region replication capabilities to help you build resilient event-driven applications.
+* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.18.0](service/personalize/CHANGELOG.md#v1180-2022-04-07)
+ * **Feature**: This release provides tagging support in AWS Personalize.
+* `github.com/aws/aws-sdk-go-v2/service/pi`: [v1.14.4](service/pi/CHANGELOG.md#v1144-2022-04-07)
+ * **Documentation**: Adds support for DocumentDB to the Performance Insights API.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.27.0](service/sagemaker/CHANGELOG.md#v1270-2022-04-07)
+ * **Feature**: Amazon Sagemaker Notebook Instances now supports G5 instance types
+
+# Release (2022-04-06)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.21.0](service/configservice/CHANGELOG.md#v1210-2022-04-06)
+ * **Feature**: Add resourceType enums for AWS::EMR::SecurityConfiguration and AWS::SageMaker::CodeRepository
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.24.0](service/kendra/CHANGELOG.md#v1240-2022-04-06)
+ * **Feature**: Amazon Kendra now provides a data source connector for Box. For more information, see https://docs.aws.amazon.com/kendra/latest/dg/data-source-box.html
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.22.0](service/lambda/CHANGELOG.md#v1220-2022-04-06)
+ * **Feature**: This release adds new APIs for creating and managing Lambda Function URLs and adds a new FunctionUrlAuthType parameter to the AddPermission API. Customers can use Function URLs to create built-in HTTPS endpoints on their functions.
+* `github.com/aws/aws-sdk-go-v2/service/panorama`: [v1.7.0](service/panorama/CHANGELOG.md#v170-2022-04-06)
+ * **Feature**: Added Brand field to device listings.
+
+# Release (2022-04-05)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.15.0](service/datasync/CHANGELOG.md#v1150-2022-04-05)
+ * **Feature**: AWS DataSync now supports Amazon FSx for OpenZFS locations.
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.22.0](service/fsx/CHANGELOG.md#v1220-2022-04-05)
+ * **Feature**: Provide customers more visibility into file system status by adding new "Misconfigured Unavailable" status for Amazon FSx for Windows File Server.
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.21.4](service/s3control/CHANGELOG.md#v1214-2022-04-05)
+ * **Documentation**: Documentation-only update for doc bug fixes for the S3 Control API docs.
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.20.0](service/securityhub/CHANGELOG.md#v1200-2022-04-05)
+ * **Feature**: Added additional ASFF details for RdsSecurityGroup AutoScalingGroup, ElbLoadBalancer, CodeBuildProject and RedshiftCluster.
+
+# Release (2022-04-04)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.24.0](service/iot/CHANGELOG.md#v1240-2022-04-04)
+ * **Feature**: AWS IoT - AWS IoT Device Defender adds support to list metric datapoints collected for IoT devices through the ListMetricValues API
+* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.13.0](service/proton/CHANGELOG.md#v1130-2022-04-04)
+ * **Feature**: SDK release to support tagging for AWS Proton Repository resource
+* `github.com/aws/aws-sdk-go-v2/service/servicecatalog`: [v1.14.0](service/servicecatalog/CHANGELOG.md#v1140-2022-04-04)
+ * **Feature**: This release adds ProvisioningArtifictOutputKeys to DescribeProvisioningParameters to reference the outputs of a Provisioned Product and deprecates ProvisioningArtifactOutputs.
+* `github.com/aws/aws-sdk-go-v2/service/sms`: [v1.12.4](service/sms/CHANGELOG.md#v1124-2022-04-04)
+ * **Documentation**: Revised product update notice for SMS console deprecation.
+
+# Release (2022-04-01)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.21.0](service/connect/CHANGELOG.md#v1210-2022-04-01)
+ * **Feature**: This release updates these APIs: UpdateInstanceAttribute, DescribeInstanceAttribute and ListInstanceAttributes. You can use it to programmatically enable/disable multi-party conferencing using attribute type MULTI_PARTY_CONFERENCING on the specified Amazon Connect instance.
+
+# Release (2022-03-31)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue`: [v1.8.4](feature/dynamodb/attributevalue/CHANGELOG.md#v184-2022-03-31)
+ * **Documentation**: Fixes documentation typos in Number type's helper methods
+* `github.com/aws/aws-sdk-go-v2/feature/dynamodbstreams/attributevalue`: [v1.8.4](feature/dynamodbstreams/attributevalue/CHANGELOG.md#v184-2022-03-31)
+ * **Documentation**: Fixes documentation typos in Number type's helper methods
+* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.18.3](service/auditmanager/CHANGELOG.md#v1183-2022-03-31)
+ * **Documentation**: This release adds documentation updates for Audit Manager. The updates provide data deletion guidance when a customer deregisters Audit Manager or deregisters a delegated administrator.
+* `github.com/aws/aws-sdk-go-v2/service/cloudcontrol`: [v1.9.0](service/cloudcontrol/CHANGELOG.md#v190-2022-03-31)
+ * **Feature**: SDK release for Cloud Control API in Amazon Web Services China (Beijing) Region, operated by Sinnet, and Amazon Web Services China (Ningxia) Region, operated by NWCD
+* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.20.0](service/databrew/CHANGELOG.md#v1200-2022-03-31)
+ * **Feature**: This AWS Glue Databrew release adds feature to support ORC as an input format.
+* `github.com/aws/aws-sdk-go-v2/service/grafana`: [v1.8.0](service/grafana/CHANGELOG.md#v180-2022-03-31)
+ * **Feature**: This release adds tagging support to the Managed Grafana service. New APIs: TagResource, UntagResource and ListTagsForResource. Updates: add optional field tags to support tagging while calling CreateWorkspace.
+* `github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoicev2`: [v1.0.0](service/pinpointsmsvoicev2/CHANGELOG.md#v100-2022-03-31)
+ * **Release**: New AWS service client module
+ * **Feature**: Amazon Pinpoint now offers a version 2.0 suite of SMS and voice APIs, providing increased control over sending and configuration. This release is a new SDK for sending SMS and voice messages called PinpointSMSVoiceV2.
+* `github.com/aws/aws-sdk-go-v2/service/route53recoverycluster`: [v1.9.0](service/route53recoverycluster/CHANGELOG.md#v190-2022-03-31)
+ * **Feature**: This release adds a new API "ListRoutingControls" to list routing control states using the highly reliable Route 53 ARC data plane endpoints.
+* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.17.0](service/workspaces/CHANGELOG.md#v1170-2022-03-31)
+ * **Feature**: Added APIs that allow you to customize the logo, login message, and help links in the WorkSpaces client login page. To learn more, visit https://docs.aws.amazon.com/workspaces/latest/adminguide/customize-branding.html
+
+# Release (2022-03-30)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.34.0](service/ec2/CHANGELOG.md#v1340-2022-03-30)
+ * **Feature**: This release simplifies the auto-recovery configuration process enabling customers to set the recovery behavior to disabled or default
+* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.17.0](service/fms/CHANGELOG.md#v1170-2022-03-30)
+ * **Feature**: AWS Firewall Manager now supports the configuration of third-party policies that can use either the centralized or distributed deployment models.
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.21.0](service/fsx/CHANGELOG.md#v1210-2022-03-30)
+ * **Feature**: This release adds support for modifying throughput capacity for FSx for ONTAP file systems.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.23.3](service/iot/CHANGELOG.md#v1233-2022-03-30)
+ * **Documentation**: Doc only update for IoT that fixes customer-reported issues.
+* `github.com/aws/aws-sdk-go-v2/service/iotdataplane`: [v1.12.0](service/iotdataplane/CHANGELOG.md#v1120-2022-03-30)
+ * **Feature**: Update the default AWS IoT Core Data Plane endpoint from VeriSign signed to ATS signed. If you have firewalls with strict egress rules, configure the rules to grant you access to data-ats.iot.[region].amazonaws.com or data-ats.iot.[region].amazonaws.com.cn.
+
+# Release (2022-03-29)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/organizations`: [v1.15.0](service/organizations/CHANGELOG.md#v1150-2022-03-29)
+ * **Feature**: This release provides the new CloseAccount API that enables principals in the management account to close any member account within an organization.
+
+# Release (2022-03-28)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.17.3](service/acmpca/CHANGELOG.md#v1173-2022-03-28)
+ * **Documentation**: Updating service name entities
+* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.20.0](service/medialive/CHANGELOG.md#v1200-2022-03-28)
+ * **Feature**: This release adds support for selecting a maintenance window.
+
+# Release (2022-03-25)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.17.0](service/batch/CHANGELOG.md#v1170-2022-03-25)
+ * **Feature**: Bug Fix: Fixed a bug where shapes were marked as unboxed and were not serialized and sent over the wire, causing an API error from the service.
+ * This is a breaking change, and has been accepted due to the API operation not being usable due to the members modeled as unboxed (aka value) types. The update changes the members to boxed (aka pointer) types so that the zero value of the members can be handled correctly by the SDK and service. Your application will fail to compile with the updated module. To workaround this you'll need to update your application to use pointer types for the members impacted.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.33.0](service/ec2/CHANGELOG.md#v1330-2022-03-25)
+ * **Feature**: This is release adds support for Amazon VPC Reachability Analyzer to analyze path through a Transit Gateway.
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.24.0](service/ssm/CHANGELOG.md#v1240-2022-03-25)
+ * **Feature**: This Patch Manager release supports creating, updating, and deleting Patch Baselines for Rocky Linux OS.
+
+# Release (2022-03-24)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.20.0](service/configservice/CHANGELOG.md#v1200-2022-03-24)
+ * **Feature**: Added new APIs GetCustomRulePolicy and GetOrganizationCustomRulePolicy, and updated existing APIs PutConfigRule, DescribeConfigRule, DescribeConfigRuleEvaluationStatus, PutOrganizationConfigRule, DescribeConfigRule to support a new feature for building AWS Config rules with AWS CloudFormation Guard
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.21.0](service/lambda/CHANGELOG.md#v1210-2022-03-24)
+ * **Feature**: Adds support for increased ephemeral storage (/tmp) up to 10GB for Lambda functions. Customers can now provision up to 10 GB of ephemeral storage per function instance, a 20x increase over the previous limit of 512 MB.
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.19.0](service/transcribe/CHANGELOG.md#v1190-2022-03-24)
+ * **Feature**: This release adds an additional parameter for subtitling with Amazon Transcribe batch jobs: outputStartIndex.
+
+# Release (2022-03-23)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.16.0
+ * **Feature**: Update CredentialsCache to make use of two new optional CredentialsProvider interfaces to give the cache, per provider, behavior how the cache handles credentials that fail to refresh, and adjusting expires time. See [aws.CredentialsCache](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#CredentialsCache) for more details.
+ * **Feature**: Update `ec2rolecreds` package's `Provider` to implememnt support for CredentialsCache new optional caching strategy interfaces, HandleFailRefreshCredentialsCacheStrategy and AdjustExpiresByCredentialsCacheStrategy.
+* `github.com/aws/aws-sdk-go-v2/credentials`: [v1.11.0](credentials/CHANGELOG.md#v1110-2022-03-23)
+ * **Feature**: Update `ec2rolecreds` package's `Provider` to implememnt support for CredentialsCache new optional caching strategy interfaces, HandleFailRefreshCredentialsCacheStrategy and AdjustExpiresByCredentialsCacheStrategy.
+* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.18.0](service/auditmanager/CHANGELOG.md#v1180-2022-03-23)
+ * **Feature**: This release updates 1 API parameter, the SnsArn attribute. The character length and regex pattern for the SnsArn attribute have been updated, which enables you to deselect an SNS topic when using the UpdateSettings operation.
+* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.15.0](service/ebs/CHANGELOG.md#v1150-2022-03-23)
+ * **Feature**: Increased the maximum supported value for the Timeout parameter of the StartSnapshot API from 60 minutes to 4320 minutes. Changed the HTTP error code for ConflictException from 503 to 409.
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.20.2](service/elasticache/CHANGELOG.md#v1202-2022-03-23)
+ * **Documentation**: Doc only update for ElastiCache
+* `github.com/aws/aws-sdk-go-v2/service/gamesparks`: [v1.0.0](service/gamesparks/CHANGELOG.md#v100-2022-03-23)
+ * **Release**: New AWS service client module
+ * **Feature**: Released the preview of Amazon GameSparks, a fully managed AWS service that provides a multi-service backend for game developers.
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.22.0](service/redshift/CHANGELOG.md#v1220-2022-03-23)
+ * **Feature**: This release adds a new [--encrypted | --no-encrypted] field in restore-from-cluster-snapshot API. Customers can now restore an unencrypted snapshot to a cluster encrypted with AWS Managed Key or their own KMS key.
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.23.0](service/ssm/CHANGELOG.md#v1230-2022-03-23)
+ * **Feature**: Update AddTagsToResource, ListTagsForResource, and RemoveTagsFromResource APIs to reflect the support for tagging Automation resources. Includes other minor documentation updates.
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.18.1](service/transfer/CHANGELOG.md#v1181-2022-03-23)
+ * **Documentation**: Documentation updates for AWS Transfer Family to describe how to remove an associated workflow from a server.
+
+# Release (2022-03-22)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/costexplorer`: [v1.18.0](service/costexplorer/CHANGELOG.md#v1180-2022-03-22)
+ * **Feature**: Added three new APIs to support tagging and resource-level authorization on Cost Explorer resources: TagResource, UntagResource, ListTagsForResource. Added optional parameters to CreateCostCategoryDefinition, CreateAnomalySubscription and CreateAnomalyMonitor APIs to support Tag On Create.
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.18.2](service/ecs/CHANGELOG.md#v1182-2022-03-22)
+ * **Documentation**: Documentation only update to address tickets
+* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.16.0](service/lakeformation/CHANGELOG.md#v1160-2022-03-22)
+ * **Feature**: The release fixes the incorrect permissions called out in the documentation - DESCRIBE_TAG, ASSOCIATE_TAG, DELETE_TAG, ALTER_TAG. This trebuchet release fixes the corresponding SDK and documentation.
+* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.16.0](service/location/CHANGELOG.md#v1160-2022-03-22)
+ * **Feature**: Amazon Location Service now includes a MaxResults parameter for GetDevicePositionHistory requests.
+* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.14.0](service/polly/CHANGELOG.md#v1140-2022-03-22)
+ * **Feature**: Amazon Polly adds new Catalan voice - Arlet. Arlet is available as Neural voice only.
+
+# Release (2022-03-21)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.8.0](service/chimesdkmeetings/CHANGELOG.md#v180-2022-03-21)
+ * **Feature**: Add support for media replication to link multiple WebRTC media sessions together to reach larger and global audiences. Participants connected to a replica session can be granted access to join the primary session and can switch sessions with their existing WebRTC connection
+* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.17.0](service/ecr/CHANGELOG.md#v1170-2022-03-21)
+ * **Feature**: This release includes a fix in the DescribeImageScanFindings paginated output.
+* `github.com/aws/aws-sdk-go-v2/service/mediaconnect`: [v1.16.0](service/mediaconnect/CHANGELOG.md#v1160-2022-03-21)
+ * **Feature**: This release adds support for selecting a maintenance window.
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.21.0](service/quicksight/CHANGELOG.md#v1210-2022-03-21)
+ * **Feature**: AWS QuickSight Service Features - Expand public API support for group management.
+* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.16.1](service/ram/CHANGELOG.md#v1161-2022-03-21)
+ * **Documentation**: Document improvements to the RAM API operations and parameter descriptions.
+
+# Release (2022-03-18)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.22.0](service/glue/CHANGELOG.md#v1220-2022-03-18)
+ * **Feature**: Added 9 new APIs for AWS Glue Interactive Sessions: ListSessions, StopSession, CreateSession, GetSession, DeleteSession, RunStatement, GetStatement, ListStatements, CancelStatement
+
+# Release (2022-03-16)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.17.0](service/acmpca/CHANGELOG.md#v1170-2022-03-16)
+ * **Feature**: AWS Certificate Manager (ACM) Private Certificate Authority (CA) now supports customizable certificate subject names and extensions.
+* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.13.0](service/amplifybackend/CHANGELOG.md#v1130-2022-03-16)
+ * **Feature**: Adding the ability to customize Cognito verification messages for email and SMS in CreateBackendAuth and UpdateBackendAuth. Adding deprecation documentation for ForgotPassword in CreateBackendAuth and UpdateBackendAuth
+* `github.com/aws/aws-sdk-go-v2/service/billingconductor`: [v1.0.0](service/billingconductor/CHANGELOG.md#v100-2022-03-16)
+ * **Release**: New AWS service client module
+ * **Feature**: This is the initial SDK release for AWS Billing Conductor. The AWS Billing Conductor is a customizable billing service, allowing you to customize your billing data to match your desired business structure.
+* `github.com/aws/aws-sdk-go-v2/service/s3outposts`: [v1.13.0](service/s3outposts/CHANGELOG.md#v1130-2022-03-16)
+ * **Feature**: S3 on Outposts is releasing a new API, ListSharedEndpoints, that lists all endpoints associated with S3 on Outpost, that has been shared by Resource Access Manager (RAM).
+* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.13.0](service/ssmincidents/CHANGELOG.md#v1130-2022-03-16)
+ * **Feature**: Removed incorrect validation pattern for IncidentRecordSource.invokedBy
+
+# Release (2022-03-15)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.15.0](service/cognitoidentityprovider/CHANGELOG.md#v1150-2022-03-15)
+ * **Feature**: Updated EmailConfigurationType and SmsConfigurationType to reflect that you can now choose Amazon SES and Amazon SNS resources in the same Region.
+* `github.com/aws/aws-sdk-go-v2/service/dataexchange`: [v1.15.0](service/dataexchange/CHANGELOG.md#v1150-2022-03-15)
+ * **Feature**: This feature enables data providers to use the RevokeRevision operation to revoke subscriber access to a given revision. Subscribers are unable to interact with assets within a revoked revision.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.32.0](service/ec2/CHANGELOG.md#v1320-2022-03-15)
+ * **Feature**: Adds the Cascade parameter to the DeleteIpam API. Customers can use this parameter to automatically delete their IPAM, including non-default scopes, pools, cidrs, and allocations. There mustn't be any pools provisioned in the default public scope to use this parameter.
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.18.1](service/ecs/CHANGELOG.md#v1181-2022-03-15)
+ * **Documentation**: Documentation only update to address tickets
+* `github.com/aws/aws-sdk-go-v2/service/keyspaces`: [v1.0.2](service/keyspaces/CHANGELOG.md#v102-2022-03-15)
+ * **Documentation**: Fixing formatting issues in CLI and SDK documentation
+* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.15.1](service/location/CHANGELOG.md#v1151-2022-03-15)
+ * **Documentation**: New HERE style "VectorHereExplore" and "VectorHereExploreTruck".
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.18.1](service/rds/CHANGELOG.md#v1181-2022-03-15)
+ * **Documentation**: Various documentation improvements
+* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.17.0](service/robomaker/CHANGELOG.md#v1170-2022-03-15)
+ * **Feature**: This release deprecates ROS, Ubuntu and Gazbeo from RoboMaker Simulation Service Software Suites in favor of user-supplied containers and Relaxed Software Suites.
+
+# Release (2022-03-14)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.19.0](service/configservice/CHANGELOG.md#v1190-2022-03-14)
+ * **Feature**: Add resourceType enums for AWS::ECR::PublicRepository and AWS::EC2::LaunchTemplate
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.20.1](service/elasticache/CHANGELOG.md#v1201-2022-03-14)
+ * **Documentation**: Doc only update for ElastiCache
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.23.0](service/kendra/CHANGELOG.md#v1230-2022-03-14)
+ * **Feature**: Amazon Kendra now provides a data source connector for Slack. For more information, see https://docs.aws.amazon.com/kendra/latest/dg/data-source-slack.html
+* `github.com/aws/aws-sdk-go-v2/service/timestreamquery`: [v1.14.0](service/timestreamquery/CHANGELOG.md#v1140-2022-03-14)
+ * **Feature**: Amazon Timestream Scheduled Queries now support Timestamp datatype in a multi-measure record.
+
+# Release (2022-03-11)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.20.0](service/chime/CHANGELOG.md#v1200-2022-03-11)
+ * **Feature**: Chime VoiceConnector Logging APIs will now support MediaMetricLogs. Also CreateMeetingDialOut now returns AccessDeniedException.
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.20.0](service/connect/CHANGELOG.md#v1200-2022-03-11)
+ * **Feature**: This release adds support for enabling Rich Messaging when starting a new chat session via the StartChatContact API. Rich Messaging enables the following formatting options: bold, italics, hyperlinks, bulleted lists, and numbered lists.
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.20.0](service/lambda/CHANGELOG.md#v1200-2022-03-11)
+ * **Feature**: Adds PrincipalOrgID support to AddPermission API. Customers can use it to manage permissions to lambda functions at AWS Organizations level.
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.18.0](service/outposts/CHANGELOG.md#v1180-2022-03-11)
+ * **Feature**: This release adds address filters for listSites
+* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.15.1](service/secretsmanager/CHANGELOG.md#v1151-2022-03-11)
+ * **Documentation**: Documentation updates for Secrets Manager.
+* `github.com/aws/aws-sdk-go-v2/service/transcribestreaming`: [v1.6.0](service/transcribestreaming/CHANGELOG.md#v160-2022-03-11)
+ * **Feature**: Amazon Transcribe StartTranscription API now supports additional parameters for Language Identification feature: customVocabularies and customFilterVocabularies
+
+# Release (2022-03-10)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.20.0](service/lexmodelsv2/CHANGELOG.md#v1200-2022-03-10)
+ * **Feature**: This release makes slotTypeId an optional parameter in CreateSlot and UpdateSlot APIs in Amazon Lex V2 for model building. Customers can create and update slots without specifying a slot type id.
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.18.0](service/transcribe/CHANGELOG.md#v1180-2022-03-10)
+ * **Feature**: Documentation fix for API `StartMedicalTranscriptionJobRequest`, now showing min sample rate as 16khz
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.18.0](service/transfer/CHANGELOG.md#v1180-2022-03-10)
+ * **Feature**: Adding more descriptive error types for managed workflows
+
+# Release (2022-03-09)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/comprehend`: [v1.17.0](service/comprehend/CHANGELOG.md#v1170-2022-03-09)
+ * **Feature**: Amazon Comprehend now supports extracting the sentiment associated with entities such as brands, products and services from text documents.
+
+# Release (2022-03-08.3)
+
+* No change notes available for this release.
+
+# Release (2022-03-08.2)
+
+* No change notes available for this release.
+
+# Release (2022-03-08)
+
+## General Highlights
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/amplify`: [v1.11.0](service/amplify/CHANGELOG.md#v1110-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder`: [v1.5.0](service/amplifyuibuilder/CHANGELOG.md#v150-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.14.0](service/appflow/CHANGELOG.md#v1140-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/apprunner`: [v1.11.0](service/apprunner/CHANGELOG.md#v1110-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.14.0](service/athena/CHANGELOG.md#v1140-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.15.0](service/braket/CHANGELOG.md#v1150-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.7.0](service/chimesdkmeetings/CHANGELOG.md#v170-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.15.0](service/cloudtrail/CHANGELOG.md#v1150-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.19.0](service/connect/CHANGELOG.md#v1190-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.16.0](service/devopsguru/CHANGELOG.md#v1160-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.31.0](service/ec2/CHANGELOG.md#v1310-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.16.0](service/ecr/CHANGELOG.md#v1160-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.18.0](service/ecs/CHANGELOG.md#v1180-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.20.0](service/elasticache/CHANGELOG.md#v1200-2022-03-08)
+ * **Documentation**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.10.0](service/finspacedata/CHANGELOG.md#v1100-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/fis`: [v1.12.0](service/fis/CHANGELOG.md#v1120-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.20.0](service/fsx/CHANGELOG.md#v1200-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.14.0](service/gamelift/CHANGELOG.md#v1140-2022-03-08)
+ * **Documentation**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.15.0](service/greengrassv2/CHANGELOG.md#v1150-2022-03-08)
+ * **Documentation**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/internal/checksum`: [v1.1.0](service/internal/checksum/CHANGELOG.md#v110-2022-03-08)
+ * **Feature**: Updates the SDK's checksum validation logic to require opt-in to output response payload validation. The SDK was always preforming output response payload checksum validation, not respecting the output validation model option. Fixes [#1606](https://github.com/aws/aws-sdk-go-v2/issues/1606)
+* `github.com/aws/aws-sdk-go-v2/service/kafkaconnect`: [v1.8.0](service/kafkaconnect/CHANGELOG.md#v180-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.22.0](service/kendra/CHANGELOG.md#v1220-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/keyspaces`: [v1.0.0](service/keyspaces/CHANGELOG.md#v100-2022-03-08)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/macie`: [v1.14.0](service/macie/CHANGELOG.md#v1140-2022-03-08)
+ * **Documentation**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.15.0](service/mediapackage/CHANGELOG.md#v1150-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.13.0](service/mgn/CHANGELOG.md#v1130-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces`: [v1.5.0](service/migrationhubrefactorspaces/CHANGELOG.md#v150-2022-03-08)
+ * **Documentation**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/mq`: [v1.12.0](service/mq/CHANGELOG.md#v1120-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/panorama`: [v1.6.0](service/panorama/CHANGELOG.md#v160-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.18.0](service/rds/CHANGELOG.md#v1180-2022-03-08)
+ * **Documentation**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/route53recoverycluster`: [v1.8.0](service/route53recoverycluster/CHANGELOG.md#v180-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry`: [v1.12.0](service/servicecatalogappregistry/CHANGELOG.md#v1120-2022-03-08)
+ * **Documentation**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.18.0](service/sqs/CHANGELOG.md#v1180-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.16.0](service/sts/CHANGELOG.md#v1160-2022-03-08)
+ * **Documentation**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.14.0](service/synthetics/CHANGELOG.md#v1140-2022-03-08)
+ * **Documentation**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/timestreamquery`: [v1.13.0](service/timestreamquery/CHANGELOG.md#v1130-2022-03-08)
+ * **Documentation**: Updated service client model to latest release.
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.17.0](service/transfer/CHANGELOG.md#v1170-2022-03-08)
+ * **Feature**: Updated service client model to latest release.
+
+# Release (2022-02-24.2)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.21.0](service/autoscaling/CHANGELOG.md#v1210-2022-02-242)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.18.0](service/databrew/CHANGELOG.md#v1180-2022-02-242)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.15.0](service/fms/CHANGELOG.md#v1150-2022-02-242)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.17.0](service/lightsail/CHANGELOG.md#v1170-2022-02-242)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.19.0](service/route53/CHANGELOG.md#v1190-2022-02-242)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.20.0](service/s3control/CHANGELOG.md#v1200-2022-02-242)
+ * **Feature**: API client updated
+
+# Release (2022-02-24)
+
+## General Highlights
+* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Bug Fix**: Fixes the AWS Sigv4 signer to trim header value's whitespace when computing the canonical headers block of the string to sign.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.14.0
+ * **Feature**: Add new AdaptiveMode retryer to aws/retry package. This new retryer uses dynamic token bucketing with client ratelimiting when throttle responses are received.
+ * **Feature**: Adds new interface aws.RetryerV2, replacing aws.Retryer and deprecating the GetInitialToken method in favor of GetAttemptToken so Context can be provided. The SDK will use aws.RetryerV2 internally. Wrapping aws.Retryers as aws.RetryerV2 automatically.
+* `github.com/aws/aws-sdk-go-v2/config`: [v1.14.0](config/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: Adds support for loading RetryMaxAttempts and RetryMod from the environment and shared configuration files. These parameters drive how the SDK's API client will initialize its default retryer, if custome retryer has not been specified. See [config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config) module and [aws.Config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Config) for more information about and how to use these new options.
+ * **Feature**: Adds support for the `ca_bundle` parameter in shared config and credentials files. The usage of the file is the same as environment variable, `AWS_CA_BUNDLE`, but sourced from shared config. Fixes [#1589](https://github.com/aws/aws-sdk-go-v2/issues/1589)
+* `github.com/aws/aws-sdk-go-v2/credentials`: [v1.9.0](credentials/CHANGELOG.md#v190-2022-02-24)
+ * **Feature**: Adds support for `SourceIdentity` to `stscreds.AssumeRoleProvider` [#1588](https://github.com/aws/aws-sdk-go-v2/pull/1588). Fixes [#1575](https://github.com/aws/aws-sdk-go-v2/issues/1575)
+* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue`: [v1.7.0](feature/dynamodb/attributevalue/CHANGELOG.md#v170-2022-02-24)
+ * **Feature**: Fixes [#645](https://github.com/aws/aws-sdk-go-v2/issues/645), [#411](https://github.com/aws/aws-sdk-go-v2/issues/411) by adding support for (un)marshaling AttributeValue maps to Go maps key types of string, number, bool, and types implementing encoding.Text(un)Marshaler interface
+ * **Bug Fix**: Fixes [#1569](https://github.com/aws/aws-sdk-go-v2/issues/1569) inconsistent serialization of Go struct field names
+* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression`: [v1.4.0](feature/dynamodb/expression/CHANGELOG.md#v140-2022-02-24)
+ * **Feature**: Add support for expression names with dots via new NameBuilder function NameNoDotSplit, related to [aws/aws-sdk-go#2570](https://github.com/aws/aws-sdk-go/issues/2570)
+* `github.com/aws/aws-sdk-go-v2/feature/dynamodbstreams/attributevalue`: [v1.7.0](feature/dynamodbstreams/attributevalue/CHANGELOG.md#v170-2022-02-24)
+ * **Feature**: Fixes [#645](https://github.com/aws/aws-sdk-go-v2/issues/645), [#411](https://github.com/aws/aws-sdk-go-v2/issues/411) by adding support for (un)marshaling AttributeValue maps to Go maps key types of string, number, bool, and types implementing encoding.Text(un)Marshaler interface
+ * **Bug Fix**: Fixes [#1569](https://github.com/aws/aws-sdk-go-v2/issues/1569) inconsistent serialization of Go struct field names
+* `github.com/aws/aws-sdk-go-v2/service/accessanalyzer`: [v1.14.0](service/accessanalyzer/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/account`: [v1.5.0](service/account/CHANGELOG.md#v150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/acm`: [v1.13.0](service/acm/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.15.0](service/acmpca/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/alexaforbusiness`: [v1.13.0](service/alexaforbusiness/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.13.0](service/amp/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/amplify`: [v1.10.0](service/amplify/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.11.0](service/amplifybackend/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder`: [v1.4.0](service/amplifyuibuilder/CHANGELOG.md#v140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/apigateway`: [v1.14.0](service/apigateway/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/apigatewaymanagementapi`: [v1.9.0](service/apigatewaymanagementapi/CHANGELOG.md#v190-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/apigatewayv2`: [v1.11.0](service/apigatewayv2/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appconfig`: [v1.11.0](service/appconfig/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appconfigdata`: [v1.3.0](service/appconfigdata/CHANGELOG.md#v130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.13.0](service/appflow/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appintegrations`: [v1.12.0](service/appintegrations/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/applicationautoscaling`: [v1.14.0](service/applicationautoscaling/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/applicationcostprofiler`: [v1.8.0](service/applicationcostprofiler/CHANGELOG.md#v180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/applicationdiscoveryservice`: [v1.11.0](service/applicationdiscoveryservice/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.14.0](service/applicationinsights/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.12.0](service/appmesh/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/apprunner`: [v1.10.0](service/apprunner/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appstream`: [v1.14.0](service/appstream/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.13.0](service/appsync/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.13.0](service/athena/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.16.0](service/auditmanager/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.20.0](service/autoscaling/CHANGELOG.md#v1200-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/autoscalingplans`: [v1.11.0](service/autoscalingplans/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.14.0](service/backup/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/backupgateway`: [v1.4.0](service/backupgateway/CHANGELOG.md#v140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.15.0](service/batch/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.14.0](service/braket/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/budgets`: [v1.11.0](service/budgets/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.18.0](service/chime/CHANGELOG.md#v1180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkidentity`: [v1.8.0](service/chimesdkidentity/CHANGELOG.md#v180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.6.0](service/chimesdkmeetings/CHANGELOG.md#v160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.8.0](service/chimesdkmessaging/CHANGELOG.md#v180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloud9`: [v1.15.0](service/cloud9/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudcontrol`: [v1.7.0](service/cloudcontrol/CHANGELOG.md#v170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/clouddirectory`: [v1.11.0](service/clouddirectory/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.19.0](service/cloudformation/CHANGELOG.md#v1190-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.15.0](service/cloudfront/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudhsm`: [v1.11.0](service/cloudhsm/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudhsmv2`: [v1.12.0](service/cloudhsmv2/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudsearch`: [v1.12.0](service/cloudsearch/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudsearchdomain`: [v1.10.0](service/cloudsearchdomain/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.14.0](service/cloudtrail/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.16.0](service/cloudwatch/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatchevents`: [v1.13.0](service/cloudwatchevents/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.14.0](service/cloudwatchlogs/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codeartifact`: [v1.11.0](service/codeartifact/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.18.0](service/codebuild/CHANGELOG.md#v1180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codecommit`: [v1.12.0](service/codecommit/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codedeploy`: [v1.13.0](service/codedeploy/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codeguruprofiler`: [v1.11.0](service/codeguruprofiler/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codegurureviewer`: [v1.14.0](service/codegurureviewer/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codepipeline`: [v1.12.0](service/codepipeline/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codestar`: [v1.10.0](service/codestar/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codestarconnections`: [v1.12.0](service/codestarconnections/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codestarnotifications`: [v1.10.0](service/codestarnotifications/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentity`: [v1.12.0](service/cognitoidentity/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.13.0](service/cognitoidentityprovider/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cognitosync`: [v1.10.0](service/cognitosync/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/comprehend`: [v1.15.0](service/comprehend/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/comprehendmedical`: [v1.12.0](service/comprehendmedical/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.16.0](service/computeoptimizer/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.17.0](service/configservice/CHANGELOG.md#v1170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.18.0](service/connect/CHANGELOG.md#v1180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/connectcontactlens`: [v1.11.0](service/connectcontactlens/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/connectparticipant`: [v1.10.0](service/connectparticipant/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/costandusagereportservice`: [v1.12.0](service/costandusagereportservice/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/costexplorer`: [v1.16.0](service/costexplorer/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.16.0](service/customerprofiles/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.17.0](service/databasemigrationservice/CHANGELOG.md#v1170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.17.0](service/databrew/CHANGELOG.md#v1170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/dataexchange`: [v1.13.0](service/dataexchange/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/datapipeline`: [v1.12.0](service/datapipeline/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.13.0](service/datasync/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/dax`: [v1.10.0](service/dax/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/detective`: [v1.14.0](service/detective/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/devicefarm`: [v1.12.0](service/devicefarm/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.15.0](service/devopsguru/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.16.0](service/directconnect/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/directoryservice`: [v1.12.0](service/directoryservice/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/dlm`: [v1.10.0](service/dlm/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.16.0](service/docdb/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/drs`: [v1.4.0](service/drs/CHANGELOG.md#v140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.14.0](service/dynamodb/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/dynamodbstreams`: [v1.12.0](service/dynamodbstreams/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.13.0](service/ebs/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.30.0](service/ec2/CHANGELOG.md#v1300-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2instanceconnect`: [v1.12.0](service/ec2instanceconnect/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.15.0](service/ecr/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ecrpublic`: [v1.12.0](service/ecrpublic/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.17.0](service/ecs/CHANGELOG.md#v1170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.15.0](service/efs/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.19.0](service/eks/CHANGELOG.md#v1190-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.19.0](service/elasticache/CHANGELOG.md#v1190-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk`: [v1.13.0](service/elasticbeanstalk/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticinference`: [v1.10.0](service/elasticinference/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing`: [v1.13.0](service/elasticloadbalancing/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.17.0](service/elasticloadbalancingv2/CHANGELOG.md#v1170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.14.0](service/elasticsearchservice/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elastictranscoder`: [v1.12.0](service/elastictranscoder/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.16.0](service/emr/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/emrcontainers`: [v1.12.0](service/emrcontainers/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.14.0](service/eventbridge/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/evidently`: [v1.5.0](service/evidently/CHANGELOG.md#v150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/finspace`: [v1.7.0](service/finspace/CHANGELOG.md#v170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.9.0](service/finspacedata/CHANGELOG.md#v190-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/firehose`: [v1.13.0](service/firehose/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/fis`: [v1.11.0](service/fis/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.14.0](service/fms/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.18.0](service/forecast/CHANGELOG.md#v1180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/forecastquery`: [v1.10.0](service/forecastquery/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+ * **Bug Fix**: Fixed an issue that resulted in the wrong service endpoints being constructed.
+* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.18.0](service/frauddetector/CHANGELOG.md#v1180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.19.0](service/fsx/CHANGELOG.md#v1190-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.13.0](service/gamelift/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/glacier`: [v1.12.0](service/glacier/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/globalaccelerator`: [v1.12.0](service/globalaccelerator/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.20.0](service/glue/CHANGELOG.md#v1200-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/grafana`: [v1.6.0](service/grafana/CHANGELOG.md#v160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/greengrass`: [v1.12.0](service/greengrass/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.14.0](service/greengrassv2/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/groundstation`: [v1.12.0](service/groundstation/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/guardduty`: [v1.12.0](service/guardduty/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.14.0](service/health/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/healthlake`: [v1.13.0](service/healthlake/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/honeycode`: [v1.11.0](service/honeycode/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.17.0](service/iam/CHANGELOG.md#v1170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.13.0](service/identitystore/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.18.0](service/imagebuilder/CHANGELOG.md#v1180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/inspector`: [v1.11.0](service/inspector/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/inspector2`: [v1.5.0](service/inspector2/CHANGELOG.md#v150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/internal/checksum`: [v1.0.0](service/internal/checksum/CHANGELOG.md#v100-2022-02-24)
+ * **Release**: New module for computing checksums
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.22.0](service/iot/CHANGELOG.md#v1220-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iot1clickdevicesservice`: [v1.9.0](service/iot1clickdevicesservice/CHANGELOG.md#v190-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iot1clickprojects`: [v1.10.0](service/iot1clickprojects/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotanalytics`: [v1.11.0](service/iotanalytics/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotdataplane`: [v1.10.0](service/iotdataplane/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotdeviceadvisor`: [v1.13.0](service/iotdeviceadvisor/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotevents`: [v1.13.0](service/iotevents/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ioteventsdata`: [v1.10.0](service/ioteventsdata/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotfleethub`: [v1.11.0](service/iotfleethub/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotjobsdataplane`: [v1.10.0](service/iotjobsdataplane/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotsecuretunneling`: [v1.11.0](service/iotsecuretunneling/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.19.0](service/iotsitewise/CHANGELOG.md#v1190-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotthingsgraph`: [v1.11.0](service/iotthingsgraph/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iottwinmaker`: [v1.4.0](service/iottwinmaker/CHANGELOG.md#v140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.17.0](service/iotwireless/CHANGELOG.md#v1170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.15.0](service/ivs/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kafka`: [v1.16.0](service/kafka/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kafkaconnect`: [v1.7.0](service/kafkaconnect/CHANGELOG.md#v170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.21.0](service/kendra/CHANGELOG.md#v1210-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.14.0](service/kinesis/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesisanalytics`: [v1.12.0](service/kinesisanalytics/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2`: [v1.13.0](service/kinesisanalyticsv2/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesisvideo`: [v1.10.0](service/kinesisvideo/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesisvideoarchivedmedia`: [v1.11.0](service/kinesisvideoarchivedmedia/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesisvideomedia`: [v1.9.0](service/kinesisvideomedia/CHANGELOG.md#v190-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesisvideosignaling`: [v1.9.0](service/kinesisvideosignaling/CHANGELOG.md#v190-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.15.0](service/kms/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.14.0](service/lakeformation/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.18.0](service/lambda/CHANGELOG.md#v1180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice`: [v1.15.0](service/lexmodelbuildingservice/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.18.0](service/lexmodelsv2/CHANGELOG.md#v1180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexruntimeservice`: [v1.11.0](service/lexruntimeservice/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.13.0](service/lexruntimev2/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.14.0](service/licensemanager/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.16.0](service/lightsail/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.14.0](service/location/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lookoutequipment`: [v1.11.0](service/lookoutequipment/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.10.0](service/lookoutmetrics/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lookoutvision`: [v1.11.0](service/lookoutvision/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/machinelearning`: [v1.13.0](service/machinelearning/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/macie`: [v1.13.0](service/macie/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.19.0](service/macie2/CHANGELOG.md#v1190-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/managedblockchain`: [v1.11.0](service/managedblockchain/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/marketplacecatalog`: [v1.11.0](service/marketplacecatalog/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/marketplacecommerceanalytics`: [v1.10.0](service/marketplacecommerceanalytics/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/marketplaceentitlementservice`: [v1.10.0](service/marketplaceentitlementservice/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/marketplacemetering`: [v1.12.0](service/marketplacemetering/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediaconnect`: [v1.14.0](service/mediaconnect/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.20.0](service/mediaconvert/CHANGELOG.md#v1200-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.18.0](service/medialive/CHANGELOG.md#v1180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.14.0](service/mediapackage/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.15.0](service/mediapackagevod/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediastore`: [v1.11.0](service/mediastore/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediastoredata`: [v1.11.0](service/mediastoredata/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.15.0](service/mediatailor/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/memorydb`: [v1.8.0](service/memorydb/CHANGELOG.md#v180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.12.0](service/mgn/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/migrationhub`: [v1.11.0](service/migrationhub/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/migrationhubconfig`: [v1.11.0](service/migrationhubconfig/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces`: [v1.4.0](service/migrationhubrefactorspaces/CHANGELOG.md#v140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/migrationhubstrategy`: [v1.4.0](service/migrationhubstrategy/CHANGELOG.md#v140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mobile`: [v1.10.0](service/mobile/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mq`: [v1.11.0](service/mq/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mturk`: [v1.12.0](service/mturk/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mwaa`: [v1.11.0](service/mwaa/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.15.0](service/neptune/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.14.0](service/networkfirewall/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/networkmanager`: [v1.11.0](service/networkmanager/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/nimble`: [v1.11.0](service/nimble/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.8.0](service/opensearch/CHANGELOG.md#v180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/opsworks`: [v1.12.0](service/opsworks/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/opsworkscm`: [v1.13.0](service/opsworkscm/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/organizations`: [v1.13.0](service/organizations/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.16.0](service/outposts/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/panorama`: [v1.5.0](service/panorama/CHANGELOG.md#v150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.16.0](service/personalize/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/personalizeevents`: [v1.10.0](service/personalizeevents/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/personalizeruntime`: [v1.10.0](service/personalizeruntime/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/pi`: [v1.13.0](service/pi/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/pinpoint`: [v1.15.0](service/pinpoint/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/pinpointemail`: [v1.10.0](service/pinpointemail/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoice`: [v1.9.0](service/pinpointsmsvoice/CHANGELOG.md#v190-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.12.0](service/polly/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/pricing`: [v1.13.0](service/pricing/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.11.0](service/proton/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.13.0](service/qldb/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/qldbsession`: [v1.12.0](service/qldbsession/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.19.0](service/quicksight/CHANGELOG.md#v1190-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.15.0](service/ram/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rbin`: [v1.5.0](service/rbin/CHANGELOG.md#v150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.17.0](service/rds/CHANGELOG.md#v1170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rdsdata`: [v1.10.0](service/rdsdata/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.20.0](service/redshift/CHANGELOG.md#v1200-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/redshiftdata`: [v1.14.0](service/redshiftdata/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.16.0](service/rekognition/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/resiliencehub`: [v1.4.0](service/resiliencehub/CHANGELOG.md#v140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/resourcegroups`: [v1.11.0](service/resourcegroups/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi`: [v1.12.0](service/resourcegroupstaggingapi/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.15.0](service/robomaker/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.18.0](service/route53/CHANGELOG.md#v1180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53domains`: [v1.11.0](service/route53domains/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53recoverycluster`: [v1.7.0](service/route53recoverycluster/CHANGELOG.md#v170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig`: [v1.8.0](service/route53recoverycontrolconfig/CHANGELOG.md#v180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness`: [v1.7.0](service/route53recoveryreadiness/CHANGELOG.md#v170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53resolver`: [v1.14.0](service/route53resolver/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rum`: [v1.5.0](service/rum/CHANGELOG.md#v150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.25.0](service/s3/CHANGELOG.md#v1250-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.19.0](service/s3control/CHANGELOG.md#v1190-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3outposts`: [v1.11.0](service/s3outposts/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.25.0](service/sagemaker/CHANGELOG.md#v1250-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemakera2iruntime`: [v1.11.0](service/sagemakera2iruntime/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemakeredge`: [v1.10.0](service/sagemakeredge/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemakerfeaturestoreruntime`: [v1.10.0](service/sagemakerfeaturestoreruntime/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemakerruntime`: [v1.14.0](service/sagemakerruntime/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/savingsplans`: [v1.10.0](service/savingsplans/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/schemas`: [v1.13.0](service/schemas/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.14.0](service/secretsmanager/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.18.0](service/securityhub/CHANGELOG.md#v1180-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/serverlessapplicationrepository`: [v1.10.0](service/serverlessapplicationrepository/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/servicecatalog`: [v1.12.0](service/servicecatalog/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry`: [v1.11.0](service/servicecatalogappregistry/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/servicediscovery`: [v1.16.0](service/servicediscovery/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/servicequotas`: [v1.12.0](service/servicequotas/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ses`: [v1.13.0](service/ses/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sesv2`: [v1.12.0](service/sesv2/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sfn`: [v1.12.0](service/sfn/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/shield`: [v1.15.0](service/shield/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/signer`: [v1.12.0](service/signer/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sms`: [v1.11.0](service/sms/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/snowball`: [v1.14.0](service/snowball/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/snowdevicemanagement`: [v1.7.0](service/snowdevicemanagement/CHANGELOG.md#v170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.16.0](service/sns/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.17.0](service/sqs/CHANGELOG.md#v1170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.21.0](service/ssm/CHANGELOG.md#v1210-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.12.0](service/ssmcontacts/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.11.0](service/ssmincidents/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sso`: [v1.10.0](service/sso/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssoadmin`: [v1.13.0](service/ssoadmin/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssooidc`: [v1.11.0](service/ssooidc/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.15.0](service/storagegateway/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.15.0](service/sts/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/support`: [v1.12.0](service/support/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/swf`: [v1.12.0](service/swf/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.13.0](service/synthetics/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.13.0](service/textract/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/timestreamquery`: [v1.12.0](service/timestreamquery/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/timestreamwrite`: [v1.12.0](service/timestreamwrite/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.16.0](service/transcribe/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/transcribestreaming`: [v1.4.0](service/transcribestreaming/CHANGELOG.md#v140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.16.0](service/transfer/CHANGELOG.md#v1160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/translate`: [v1.12.0](service/translate/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/voiceid`: [v1.7.0](service/voiceid/CHANGELOG.md#v170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/waf`: [v1.10.0](service/waf/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/wafregional`: [v1.11.0](service/wafregional/CHANGELOG.md#v1110-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.17.0](service/wafv2/CHANGELOG.md#v1170-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/wellarchitected`: [v1.13.0](service/wellarchitected/CHANGELOG.md#v1130-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/wisdom`: [v1.6.0](service/wisdom/CHANGELOG.md#v160-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/workdocs`: [v1.10.0](service/workdocs/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/worklink`: [v1.10.0](service/worklink/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/workmail`: [v1.14.0](service/workmail/CHANGELOG.md#v1140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/workmailmessageflow`: [v1.10.0](service/workmailmessageflow/CHANGELOG.md#v1100-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.15.0](service/workspaces/CHANGELOG.md#v1150-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/workspacesweb`: [v1.4.0](service/workspacesweb/CHANGELOG.md#v140-2022-02-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/xray`: [v1.12.0](service/xray/CHANGELOG.md#v1120-2022-02-24)
+ * **Feature**: API client updated
+
+# Release (2022-01-28)
+
+## General Highlights
+* **Bug Fix**: Fixes the SDK's handling of `duration_sections` in the shared credentials file or specified in multiple shared config and shared credentials files under the same profile. [#1568](https://github.com/aws/aws-sdk-go-v2/pull/1568). Thanks to [Amir Szekely](https://github.com/kichik) for help reproduce this bug.
+* **Bug Fix**: Updates SDK API client deserialization to pre-allocate byte slice and string response payloads, [#1565](https://github.com/aws/aws-sdk-go-v2/pull/1565). Thanks to [Tyson Mote](https://github.com/tysonmote) for submitting this PR.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/config`: [v1.13.1](config/CHANGELOG.md#v1131-2022-01-28)
+ * **Bug Fix**: Fixes LoadDefaultConfig handling of errors returned by passed in functional options. Previously errors returned from the LoadOptions passed into LoadDefaultConfig were incorrectly ignored. [#1562](https://github.com/aws/aws-sdk-go-v2/pull/1562). Thanks to [Pinglei Guo](https://github.com/pingleig) for submitting this PR.
+ * **Bug Fix**: Updates `config` module to use os.UserHomeDir instead of hard coded environment variable for OS. [#1563](https://github.com/aws/aws-sdk-go-v2/pull/1563)
+* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.13.0](service/applicationinsights/CHANGELOG.md#v1130-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.13.1](service/cloudtrail/CHANGELOG.md#v1131-2022-01-28)
+ * **Documentation**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/codegurureviewer`: [v1.13.1](service/codegurureviewer/CHANGELOG.md#v1131-2022-01-28)
+ * **Documentation**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.16.0](service/configservice/CHANGELOG.md#v1160-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.17.0](service/connect/CHANGELOG.md#v1170-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.12.1](service/ebs/CHANGELOG.md#v1121-2022-01-28)
+ * **Documentation**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.29.0](service/ec2/CHANGELOG.md#v1290-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ec2instanceconnect`: [v1.11.0](service/ec2instanceconnect/CHANGELOG.md#v1110-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.14.0](service/efs/CHANGELOG.md#v1140-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/fis`: [v1.10.0](service/fis/CHANGELOG.md#v1100-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.17.0](service/frauddetector/CHANGELOG.md#v1170-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.18.0](service/fsx/CHANGELOG.md#v1180-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/greengrass`: [v1.11.0](service/greengrass/CHANGELOG.md#v1110-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.13.0](service/greengrassv2/CHANGELOG.md#v1130-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/guardduty`: [v1.11.0](service/guardduty/CHANGELOG.md#v1110-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/honeycode`: [v1.10.0](service/honeycode/CHANGELOG.md#v1100-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.14.0](service/ivs/CHANGELOG.md#v1140-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/kafka`: [v1.15.0](service/kafka/CHANGELOG.md#v1150-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.13.0](service/location/CHANGELOG.md#v1130-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.9.0](service/lookoutmetrics/CHANGELOG.md#v190-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.18.0](service/macie2/CHANGELOG.md#v1180-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.19.0](service/mediaconvert/CHANGELOG.md#v1190-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.14.0](service/mediatailor/CHANGELOG.md#v1140-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.14.0](service/ram/CHANGELOG.md#v1140-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness`: [v1.6.1](service/route53recoveryreadiness/CHANGELOG.md#v161-2022-01-28)
+ * **Documentation**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.24.0](service/sagemaker/CHANGELOG.md#v1240-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.17.0](service/securityhub/CHANGELOG.md#v1170-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.14.0](service/storagegateway/CHANGELOG.md#v1140-2022-01-28)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.15.0](service/transcribe/CHANGELOG.md#v1150-2022-01-28)
+ * **Feature**: Updated to latest API model.
+
+# Release (2022-01-14)
+
+## General Highlights
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.13.0
+ * **Bug Fix**: Updates the Retry middleware to release the retry token, on subsequent attempts. This fixes #1413, and is based on PR #1424
+* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue`: [v1.6.0](feature/dynamodb/attributevalue/CHANGELOG.md#v160-2022-01-14)
+ * **Feature**: Adds new MarshalWithOptions and UnmarshalWithOptions helpers allowing Encoding and Decoding options to be specified when serializing AttributeValues. Addresses issue: https://github.com/aws/aws-sdk-go-v2/issues/1494
+* `github.com/aws/aws-sdk-go-v2/feature/dynamodbstreams/attributevalue`: [v1.6.0](feature/dynamodbstreams/attributevalue/CHANGELOG.md#v160-2022-01-14)
+ * **Feature**: Adds new MarshalWithOptions and UnmarshalWithOptions helpers allowing Encoding and Decoding options to be specified when serializing AttributeValues. Addresses issue: https://github.com/aws/aws-sdk-go-v2/issues/1494
+* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.12.0](service/appsync/CHANGELOG.md#v1120-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/autoscalingplans`: [v1.10.0](service/autoscalingplans/CHANGELOG.md#v1100-2022-01-14)
+ * **Documentation**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.15.0](service/computeoptimizer/CHANGELOG.md#v1150-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/costexplorer`: [v1.15.0](service/costexplorer/CHANGELOG.md#v1150-2022-01-14)
+ * **Documentation**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.16.0](service/databasemigrationservice/CHANGELOG.md#v1160-2022-01-14)
+ * **Documentation**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.16.0](service/databrew/CHANGELOG.md#v1160-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.28.0](service/ec2/CHANGELOG.md#v1280-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.18.0](service/elasticache/CHANGELOG.md#v1180-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.13.0](service/elasticsearchservice/CHANGELOG.md#v1130-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.8.0](service/finspacedata/CHANGELOG.md#v180-2022-01-14)
+ * **Documentation**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.13.0](service/fms/CHANGELOG.md#v1130-2022-01-14)
+ * **Documentation**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.19.0](service/glue/CHANGELOG.md#v1190-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/honeycode`: [v1.9.0](service/honeycode/CHANGELOG.md#v190-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.12.0](service/identitystore/CHANGELOG.md#v1120-2022-01-14)
+ * **Documentation**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/ioteventsdata`: [v1.9.0](service/ioteventsdata/CHANGELOG.md#v190-2022-01-14)
+ * **Documentation**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.16.0](service/iotwireless/CHANGELOG.md#v1160-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.20.0](service/kendra/CHANGELOG.md#v1200-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.17.0](service/lexmodelsv2/CHANGELOG.md#v1170-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.12.0](service/lexruntimev2/CHANGELOG.md#v1120-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.8.0](service/lookoutmetrics/CHANGELOG.md#v180-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.17.0](service/medialive/CHANGELOG.md#v1170-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.13.0](service/mediatailor/CHANGELOG.md#v1130-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/mwaa`: [v1.10.0](service/mwaa/CHANGELOG.md#v1100-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/nimble`: [v1.10.0](service/nimble/CHANGELOG.md#v1100-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.7.0](service/opensearch/CHANGELOG.md#v170-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/pi`: [v1.12.0](service/pi/CHANGELOG.md#v1120-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/pinpoint`: [v1.14.0](service/pinpoint/CHANGELOG.md#v1140-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.16.0](service/rds/CHANGELOG.md#v1160-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.20.0](service/ssm/CHANGELOG.md#v1200-2022-01-14)
+ * **Feature**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/sso`: [v1.9.0](service/sso/CHANGELOG.md#v190-2022-01-14)
+ * **Documentation**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.14.0](service/transcribe/CHANGELOG.md#v1140-2022-01-14)
+ * **Documentation**: Updated API models
+* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.14.0](service/workspaces/CHANGELOG.md#v1140-2022-01-14)
+ * **Feature**: Updated API models
+
+# Release (2022-01-07)
+
+## General Highlights
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/config`: [v1.12.0](config/CHANGELOG.md#v1120-2022-01-07)
+ * **Feature**: Add load option for CredentialCache. Adds a new member to the LoadOptions struct, CredentialsCacheOptions. This member allows specifying a function that will be used to configure the CredentialsCache. The CredentialsCacheOptions will only be used if the configuration loader will wrap the underlying credential provider in the CredentialsCache.
+* `github.com/aws/aws-sdk-go-v2/service/appstream`: [v1.12.0](service/appstream/CHANGELOG.md#v1120-2022-01-07)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.12.0](service/cloudtrail/CHANGELOG.md#v1120-2022-01-07)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/detective`: [v1.12.0](service/detective/CHANGELOG.md#v1120-2022-01-07)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.27.0](service/ec2/CHANGELOG.md#v1270-2022-01-07)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.15.0](service/ecs/CHANGELOG.md#v1150-2022-01-07)
+ * **Documentation**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.17.0](service/eks/CHANGELOG.md#v1170-2022-01-07)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.18.0](service/glue/CHANGELOG.md#v1180-2022-01-07)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.11.0](service/greengrassv2/CHANGELOG.md#v1110-2022-01-07)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.20.0](service/iot/CHANGELOG.md#v1200-2022-01-07)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.12.0](service/lakeformation/CHANGELOG.md#v1120-2022-01-07)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.16.0](service/lambda/CHANGELOG.md#v1160-2022-01-07)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.17.0](service/mediaconvert/CHANGELOG.md#v1170-2022-01-07)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.17.0](service/quicksight/CHANGELOG.md#v1170-2022-01-07)
+ * **Documentation**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.15.0](service/rds/CHANGELOG.md#v1150-2022-01-07)
+ * **Documentation**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.14.0](service/rekognition/CHANGELOG.md#v1140-2022-01-07)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.23.0](service/s3/CHANGELOG.md#v1230-2022-01-07)
+ * **Documentation**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.17.0](service/s3control/CHANGELOG.md#v1170-2022-01-07)
+ * **Documentation**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3outposts`: [v1.9.0](service/s3outposts/CHANGELOG.md#v190-2022-01-07)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.22.0](service/sagemaker/CHANGELOG.md#v1220-2022-01-07)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.12.0](service/secretsmanager/CHANGELOG.md#v1120-2022-01-07)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssooidc`: [v1.9.0](service/ssooidc/CHANGELOG.md#v190-2022-01-07)
+ * **Feature**: API client updated
+
+# Release (2021-12-21)
+
+## General Highlights
+* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/accessanalyzer`: [v1.11.0](service/accessanalyzer/CHANGELOG.md#v1110-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/acm`: [v1.10.0](service/acm/CHANGELOG.md#v1100-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/apigateway`: [v1.11.0](service/apigateway/CHANGELOG.md#v1110-2021-12-21)
+ * **Documentation**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/applicationautoscaling`: [v1.11.0](service/applicationautoscaling/CHANGELOG.md#v1110-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.10.0](service/appsync/CHANGELOG.md#v1100-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.17.0](service/autoscaling/CHANGELOG.md#v1170-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.3.0](service/chimesdkmeetings/CHANGELOG.md#v130-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.5.0](service/chimesdkmessaging/CHANGELOG.md#v150-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudcontrol`: [v1.4.0](service/cloudcontrol/CHANGELOG.md#v140-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.16.0](service/cloudformation/CHANGELOG.md#v1160-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.13.0](service/cloudwatch/CHANGELOG.md#v1130-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatchevents`: [v1.10.0](service/cloudwatchevents/CHANGELOG.md#v1100-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.11.0](service/cloudwatchlogs/CHANGELOG.md#v1110-2021-12-21)
+ * **Feature**: API client updated
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/codedeploy`: [v1.10.0](service/codedeploy/CHANGELOG.md#v1100-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/comprehendmedical`: [v1.9.0](service/comprehendmedical/CHANGELOG.md#v190-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.13.0](service/configservice/CHANGELOG.md#v1130-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.13.0](service/customerprofiles/CHANGELOG.md#v1130-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.14.0](service/databasemigrationservice/CHANGELOG.md#v1140-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.10.0](service/datasync/CHANGELOG.md#v1100-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.12.0](service/devopsguru/CHANGELOG.md#v1120-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.13.0](service/directconnect/CHANGELOG.md#v1130-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.13.0](service/docdb/CHANGELOG.md#v1130-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.11.0](service/dynamodb/CHANGELOG.md#v1110-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/dynamodbstreams`: [v1.9.0](service/dynamodbstreams/CHANGELOG.md#v190-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.26.0](service/ec2/CHANGELOG.md#v1260-2021-12-21)
+ * **Feature**: API client updated
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.12.0](service/ecr/CHANGELOG.md#v1120-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.14.0](service/ecs/CHANGELOG.md#v1140-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.16.0](service/elasticache/CHANGELOG.md#v1160-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing`: [v1.10.0](service/elasticloadbalancing/CHANGELOG.md#v1100-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.14.0](service/elasticloadbalancingv2/CHANGELOG.md#v1140-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.11.0](service/elasticsearchservice/CHANGELOG.md#v1110-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.13.0](service/emr/CHANGELOG.md#v1130-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.11.0](service/eventbridge/CHANGELOG.md#v1110-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.6.0](service/finspacedata/CHANGELOG.md#v160-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.15.0](service/forecast/CHANGELOG.md#v1150-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/glacier`: [v1.9.0](service/glacier/CHANGELOG.md#v190-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/groundstation`: [v1.9.0](service/groundstation/CHANGELOG.md#v190-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.11.0](service/health/CHANGELOG.md#v1110-2021-12-21)
+ * **Documentation**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.15.0](service/imagebuilder/CHANGELOG.md#v1150-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.19.0](service/iot/CHANGELOG.md#v1190-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.11.0](service/kinesis/CHANGELOG.md#v1110-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/kinesisanalytics`: [v1.9.0](service/kinesisanalytics/CHANGELOG.md#v190-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2`: [v1.10.0](service/kinesisanalyticsv2/CHANGELOG.md#v1100-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.12.0](service/kms/CHANGELOG.md#v1120-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.15.0](service/lambda/CHANGELOG.md#v1150-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.15.0](service/lexmodelsv2/CHANGELOG.md#v1150-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.10.0](service/location/CHANGELOG.md#v1100-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.6.0](service/lookoutmetrics/CHANGELOG.md#v160-2021-12-21)
+ * **Feature**: API client updated
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/lookoutvision`: [v1.8.0](service/lookoutvision/CHANGELOG.md#v180-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/marketplacemetering`: [v1.9.0](service/marketplacemetering/CHANGELOG.md#v190-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/mediaconnect`: [v1.11.0](service/mediaconnect/CHANGELOG.md#v1110-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.12.0](service/neptune/CHANGELOG.md#v1120-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.11.0](service/networkfirewall/CHANGELOG.md#v1110-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/nimble`: [v1.8.0](service/nimble/CHANGELOG.md#v180-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.5.0](service/opensearch/CHANGELOG.md#v150-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.13.0](service/outposts/CHANGELOG.md#v1130-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/pi`: [v1.10.0](service/pi/CHANGELOG.md#v1100-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.10.0](service/qldb/CHANGELOG.md#v1100-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.14.0](service/rds/CHANGELOG.md#v1140-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.17.0](service/redshift/CHANGELOG.md#v1170-2021-12-21)
+ * **Feature**: API client updated
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/resourcegroups`: [v1.8.0](service/resourcegroups/CHANGELOG.md#v180-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi`: [v1.9.0](service/resourcegroupstaggingapi/CHANGELOG.md#v190-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.15.0](service/route53/CHANGELOG.md#v1150-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53domains`: [v1.8.0](service/route53domains/CHANGELOG.md#v180-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig`: [v1.5.0](service/route53recoverycontrolconfig/CHANGELOG.md#v150-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.22.0](service/s3/CHANGELOG.md#v1220-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.16.0](service/s3control/CHANGELOG.md#v1160-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.21.0](service/sagemaker/CHANGELOG.md#v1210-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/savingsplans`: [v1.7.3](service/savingsplans/CHANGELOG.md#v173-2021-12-21)
+ * **Documentation**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.11.0](service/secretsmanager/CHANGELOG.md#v1110-2021-12-21)
+ * **Documentation**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.14.0](service/securityhub/CHANGELOG.md#v1140-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sfn`: [v1.9.0](service/sfn/CHANGELOG.md#v190-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/sms`: [v1.8.0](service/sms/CHANGELOG.md#v180-2021-12-21)
+ * **Documentation**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.13.0](service/sns/CHANGELOG.md#v1130-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.14.0](service/sqs/CHANGELOG.md#v1140-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.18.0](service/ssm/CHANGELOG.md#v1180-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.12.0](service/sts/CHANGELOG.md#v1120-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/support`: [v1.9.0](service/support/CHANGELOG.md#v190-2021-12-21)
+ * **Documentation**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/swf`: [v1.9.0](service/swf/CHANGELOG.md#v190-2021-12-21)
+ * **Feature**: Updated to latest service endpoints
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.13.0](service/transfer/CHANGELOG.md#v1130-2021-12-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/workmail`: [v1.11.0](service/workmail/CHANGELOG.md#v1110-2021-12-21)
+ * **Feature**: API client updated
+
+# Release (2021-12-03)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/accessanalyzer`: [v1.10.1](service/accessanalyzer/CHANGELOG.md#v1101-2021-12-03)
+ * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
+* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.9.3](service/amp/CHANGELOG.md#v193-2021-12-03)
+ * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
+* `github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder`: [v1.0.0](service/amplifyuibuilder/CHANGELOG.md#v100-2021-12-03)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.8.3](service/appmesh/CHANGELOG.md#v183-2021-12-03)
+ * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
+* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.10.2](service/braket/CHANGELOG.md#v1102-2021-12-03)
+ * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
+* `github.com/aws/aws-sdk-go-v2/service/codeguruprofiler`: [v1.7.3](service/codeguruprofiler/CHANGELOG.md#v173-2021-12-03)
+ * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
+* `github.com/aws/aws-sdk-go-v2/service/evidently`: [v1.1.1](service/evidently/CHANGELOG.md#v111-2021-12-03)
+ * **Bug Fix**: Fixed a bug that prevented the resolution of the correct endpoint for some API operations.
+* `github.com/aws/aws-sdk-go-v2/service/grafana`: [v1.2.3](service/grafana/CHANGELOG.md#v123-2021-12-03)
+ * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
+* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.9.2](service/location/CHANGELOG.md#v192-2021-12-03)
+ * **Bug Fix**: Fixed a bug that prevented the resolution of the correct endpoint for some API operations.
+ * **Bug Fix**: Fixed an issue that caused some operations to not be signed using sigv4, resulting in authentication failures.
+* `github.com/aws/aws-sdk-go-v2/service/networkmanager`: [v1.7.0](service/networkmanager/CHANGELOG.md#v170-2021-12-03)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/nimble`: [v1.7.3](service/nimble/CHANGELOG.md#v173-2021-12-03)
+ * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
+* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.7.2](service/proton/CHANGELOG.md#v172-2021-12-03)
+ * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
+* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.10.0](service/ram/CHANGELOG.md#v1100-2021-12-03)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.12.0](service/rekognition/CHANGELOG.md#v1120-2021-12-03)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/snowdevicemanagement`: [v1.3.3](service/snowdevicemanagement/CHANGELOG.md#v133-2021-12-03)
+ * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
+* `github.com/aws/aws-sdk-go-v2/service/wisdom`: [v1.2.3](service/wisdom/CHANGELOG.md#v123-2021-12-03)
+ * **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller.
+
+# Release (2021-12-02)
+
+## General Highlights
+* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514))
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/config`: [v1.11.0](config/CHANGELOG.md#v1110-2021-12-02)
+ * **Feature**: Add support for specifying `EndpointResolverWithOptions` on `LoadOptions`, and associated `WithEndpointResolverWithOptions`.
+* `github.com/aws/aws-sdk-go-v2/service/accessanalyzer`: [v1.10.0](service/accessanalyzer/CHANGELOG.md#v1100-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.9.0](service/applicationinsights/CHANGELOG.md#v190-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/backupgateway`: [v1.0.0](service/backupgateway/CHANGELOG.md#v100-2021-12-02)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/cloudhsm`: [v1.8.0](service/cloudhsm/CHANGELOG.md#v180-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.11.0](service/devopsguru/CHANGELOG.md#v1110-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.12.0](service/directconnect/CHANGELOG.md#v1120-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.10.0](service/dynamodb/CHANGELOG.md#v1100-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.25.0](service/ec2/CHANGELOG.md#v1250-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/evidently`: [v1.1.0](service/evidently/CHANGELOG.md#v110-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.14.0](service/fsx/CHANGELOG.md#v1140-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.16.0](service/glue/CHANGELOG.md#v1160-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/inspector2`: [v1.1.0](service/inspector2/CHANGELOG.md#v110-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.18.0](service/iot/CHANGELOG.md#v1180-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iottwinmaker`: [v1.0.0](service/iottwinmaker/CHANGELOG.md#v100-2021-12-02)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/kafka`: [v1.11.0](service/kafka/CHANGELOG.md#v1110-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.17.0](service/kendra/CHANGELOG.md#v1170-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.10.0](service/kinesis/CHANGELOG.md#v1100-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.10.0](service/lakeformation/CHANGELOG.md#v1100-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.14.0](service/lexmodelsv2/CHANGELOG.md#v1140-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.10.0](service/lexruntimev2/CHANGELOG.md#v1100-2021-12-02)
+ * **Feature**: Support has been added for the `StartConversation` API.
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.12.0](service/outposts/CHANGELOG.md#v1120-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rbin`: [v1.1.0](service/rbin/CHANGELOG.md#v110-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/redshiftdata`: [v1.10.0](service/redshiftdata/CHANGELOG.md#v1100-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rum`: [v1.1.0](service/rum/CHANGELOG.md#v110-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.21.0](service/s3/CHANGELOG.md#v1210-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.20.0](service/sagemaker/CHANGELOG.md#v1200-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemakerruntime`: [v1.11.0](service/sagemakerruntime/CHANGELOG.md#v1110-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/shield`: [v1.11.0](service/shield/CHANGELOG.md#v1110-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/snowball`: [v1.10.0](service/snowball/CHANGELOG.md#v1100-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.10.0](service/storagegateway/CHANGELOG.md#v1100-2021-12-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/workspacesweb`: [v1.0.0](service/workspacesweb/CHANGELOG.md#v100-2021-12-02)
+ * **Release**: New AWS service client module
+
+# Release (2021-11-30)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.16.0](service/autoscaling/CHANGELOG.md#v1160-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.10.0](service/backup/CHANGELOG.md#v1100-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.10.0](service/braket/CHANGELOG.md#v1100-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.2.0](service/chimesdkmeetings/CHANGELOG.md#v120-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.15.0](service/cloudformation/CHANGELOG.md#v1150-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.13.0](service/computeoptimizer/CHANGELOG.md#v1130-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.13.0](service/connect/CHANGELOG.md#v1130-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.12.0](service/customerprofiles/CHANGELOG.md#v1120-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.13.0](service/databasemigrationservice/CHANGELOG.md#v1130-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/dataexchange`: [v1.9.0](service/dataexchange/CHANGELOG.md#v190-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.9.0](service/dynamodb/CHANGELOG.md#v190-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.24.0](service/ec2/CHANGELOG.md#v1240-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.11.0](service/ecr/CHANGELOG.md#v1110-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.13.0](service/ecs/CHANGELOG.md#v1130-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.15.0](service/eks/CHANGELOG.md#v1150-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.15.0](service/elasticache/CHANGELOG.md#v1150-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.13.0](service/elasticloadbalancingv2/CHANGELOG.md#v1130-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.10.0](service/elasticsearchservice/CHANGELOG.md#v1100-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/evidently`: [v1.0.0](service/evidently/CHANGELOG.md#v100-2021-11-30)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.5.0](service/finspacedata/CHANGELOG.md#v150-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.14.0](service/imagebuilder/CHANGELOG.md#v1140-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/inspector2`: [v1.0.0](service/inspector2/CHANGELOG.md#v100-2021-11-30)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery`: [v1.3.2](service/internal/endpoint-discovery/CHANGELOG.md#v132-2021-11-30)
+ * **Bug Fix**: Fixed a race condition that caused concurrent calls relying on endpoint discovery to share the same `url.URL` reference in their operation's http.Request.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.17.0](service/iot/CHANGELOG.md#v1170-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotdeviceadvisor`: [v1.9.0](service/iotdeviceadvisor/CHANGELOG.md#v190-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.15.0](service/iotsitewise/CHANGELOG.md#v1150-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.13.0](service/iotwireless/CHANGELOG.md#v1130-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.14.0](service/lambda/CHANGELOG.md#v1140-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.14.0](service/macie2/CHANGELOG.md#v1140-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.8.0](service/mgn/CHANGELOG.md#v180-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/migrationhubrefactorspaces`: [v1.0.0](service/migrationhubrefactorspaces/CHANGELOG.md#v100-2021-11-30)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.4.0](service/opensearch/CHANGELOG.md#v140-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.11.0](service/outposts/CHANGELOG.md#v1110-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.12.0](service/personalize/CHANGELOG.md#v1120-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/personalizeruntime`: [v1.7.0](service/personalizeruntime/CHANGELOG.md#v170-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/pinpoint`: [v1.12.0](service/pinpoint/CHANGELOG.md#v1120-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.7.0](service/proton/CHANGELOG.md#v170-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.15.0](service/quicksight/CHANGELOG.md#v1150-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rbin`: [v1.0.0](service/rbin/CHANGELOG.md#v100-2021-11-30)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.13.0](service/rds/CHANGELOG.md#v1130-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.16.0](service/redshift/CHANGELOG.md#v1160-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rum`: [v1.0.0](service/rum/CHANGELOG.md#v100-2021-11-30)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.20.0](service/s3/CHANGELOG.md#v1200-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.15.0](service/s3control/CHANGELOG.md#v1150-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.13.0](service/sqs/CHANGELOG.md#v1130-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.17.0](service/ssm/CHANGELOG.md#v1170-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.11.0](service/sts/CHANGELOG.md#v1110-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.10.0](service/textract/CHANGELOG.md#v1100-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/timestreamquery`: [v1.8.0](service/timestreamquery/CHANGELOG.md#v180-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/timestreamwrite`: [v1.8.0](service/timestreamwrite/CHANGELOG.md#v180-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/transcribestreaming`: [v1.1.0](service/transcribestreaming/CHANGELOG.md#v110-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/translate`: [v1.8.0](service/translate/CHANGELOG.md#v180-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/wellarchitected`: [v1.9.0](service/wellarchitected/CHANGELOG.md#v190-2021-11-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.11.0](service/workspaces/CHANGELOG.md#v1110-2021-11-30)
+ * **Feature**: API client updated
+
+# Release (2021-11-19)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.11.1
+ * **Bug Fix**: Fixed a bug that prevented aws.EndpointResolverWithOptionsFunc from satisfying the aws.EndpointResolverWithOptions interface.
+* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.8.0](service/amplifybackend/CHANGELOG.md#v180-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/apigateway`: [v1.10.0](service/apigateway/CHANGELOG.md#v1100-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appconfig`: [v1.7.0](service/appconfig/CHANGELOG.md#v170-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appconfigdata`: [v1.0.0](service/appconfigdata/CHANGELOG.md#v100-2021-11-19)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.8.0](service/applicationinsights/CHANGELOG.md#v180-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appstream`: [v1.10.0](service/appstream/CHANGELOG.md#v1100-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.12.0](service/auditmanager/CHANGELOG.md#v1120-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.11.0](service/batch/CHANGELOG.md#v1110-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.14.0](service/chime/CHANGELOG.md#v1140-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.1.0](service/chimesdkmeetings/CHANGELOG.md#v110-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.14.0](service/cloudformation/CHANGELOG.md#v1140-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.10.0](service/cloudtrail/CHANGELOG.md#v1100-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.12.0](service/cloudwatch/CHANGELOG.md#v1120-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.12.0](service/connect/CHANGELOG.md#v1120-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.12.0](service/databasemigrationservice/CHANGELOG.md#v1120-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.13.0](service/databrew/CHANGELOG.md#v1130-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.10.0](service/devopsguru/CHANGELOG.md#v1100-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/drs`: [v1.0.0](service/drs/CHANGELOG.md#v100-2021-11-19)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/dynamodbstreams`: [v1.8.0](service/dynamodbstreams/CHANGELOG.md#v180-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.23.0](service/ec2/CHANGELOG.md#v1230-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.14.0](service/eks/CHANGELOG.md#v1140-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.14.0](service/forecast/CHANGELOG.md#v1140-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.10.0](service/ivs/CHANGELOG.md#v1100-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kafka`: [v1.10.0](service/kafka/CHANGELOG.md#v1100-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.16.0](service/kendra/CHANGELOG.md#v1160-2021-11-19)
+ * **Announcement**: Fix API modeling bug incorrectly generating `DocumentAttributeValue` type as a union instead of a structure. This update corrects this bug by correcting the `DocumentAttributeValue` type to be a `struct` instead of an `interface`. This change also removes the `DocumentAttributeValueMember` types. To migrate to this change your application using service/kendra will need to be updated to use struct members in `DocumentAttributeValue` instead of `DocumentAttributeValueMember` types.
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.11.0](service/kms/CHANGELOG.md#v1110-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.13.0](service/lambda/CHANGELOG.md#v1130-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.13.0](service/lexmodelsv2/CHANGELOG.md#v1130-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.9.0](service/lexruntimev2/CHANGELOG.md#v190-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.9.0](service/location/CHANGELOG.md#v190-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.15.0](service/mediaconvert/CHANGELOG.md#v1150-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.14.0](service/medialive/CHANGELOG.md#v1140-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.7.0](service/mgn/CHANGELOG.md#v170-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/migrationhubstrategy`: [v1.0.0](service/migrationhubstrategy/CHANGELOG.md#v100-2021-11-19)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.9.0](service/qldb/CHANGELOG.md#v190-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/qldbsession`: [v1.9.0](service/qldbsession/CHANGELOG.md#v190-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.15.0](service/redshift/CHANGELOG.md#v1150-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.12.0](service/sns/CHANGELOG.md#v1120-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.16.0](service/ssm/CHANGELOG.md#v1160-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.12.0](service/transfer/CHANGELOG.md#v1120-2021-11-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.14.0](service/wafv2/CHANGELOG.md#v1140-2021-11-19)
+ * **Feature**: API client updated
+
+# Release (2021-11-12)
+
+## General Highlights
+* **Feature**: Service clients now support custom endpoints that have an initial URI path defined.
+* **Feature**: Waiters now have a `WaitForOutput` method, which can be used to retrieve the output of the successful wait operation. Thank you to [Andrew Haines](https://github.com/haines) for contributing this feature.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.9.0](service/backup/CHANGELOG.md#v190-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.10.0](service/batch/CHANGELOG.md#v1100-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmeetings`: [v1.0.0](service/chimesdkmeetings/CHANGELOG.md#v100-2021-11-12)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.12.0](service/computeoptimizer/CHANGELOG.md#v1120-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.11.0](service/connect/CHANGELOG.md#v1110-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.12.0](service/docdb/CHANGELOG.md#v1120-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.8.0](service/dynamodb/CHANGELOG.md#v180-2021-11-12)
+ * **Documentation**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.22.0](service/ec2/CHANGELOG.md#v1220-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.12.0](service/ecs/CHANGELOG.md#v1120-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.9.0](service/gamelift/CHANGELOG.md#v190-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.9.0](service/greengrassv2/CHANGELOG.md#v190-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.10.0](service/health/CHANGELOG.md#v1100-2021-11-12)
+ * **Documentation**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.9.0](service/identitystore/CHANGELOG.md#v190-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.12.0](service/iotwireless/CHANGELOG.md#v1120-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.11.0](service/neptune/CHANGELOG.md#v1110-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.12.0](service/rds/CHANGELOG.md#v1120-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/resiliencehub`: [v1.0.0](service/resiliencehub/CHANGELOG.md#v100-2021-11-12)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi`: [v1.8.0](service/resourcegroupstaggingapi/CHANGELOG.md#v180-2021-11-12)
+ * **Documentation**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.14.0](service/s3control/CHANGELOG.md#v1140-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.19.0](service/sagemaker/CHANGELOG.md#v1190-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/sagemakerruntime`: [v1.10.0](service/sagemakerruntime/CHANGELOG.md#v1100-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.7.0](service/ssmincidents/CHANGELOG.md#v170-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.11.0](service/transcribe/CHANGELOG.md#v1110-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/translate`: [v1.7.0](service/translate/CHANGELOG.md#v170-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.13.0](service/wafv2/CHANGELOG.md#v1130-2021-11-12)
+ * **Feature**: Updated service to latest API model.
+
+# Release (2021-11-06)
+
+## General Highlights
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream`: [v1.0.0](aws/protocol/eventstream/CHANGELOG.md#v100-2021-11-06)
+ * **Announcement**: Support has been added for AWS EventStream APIs for Kinesis, S3, and Transcribe Streaming. Support for the Lex Runtime V2 EventStream API will be added in a future release.
+ * **Release**: Protocol support has been added for AWS event stream.
+* `github.com/aws/aws-sdk-go-v2/internal/endpoints/v2`: [v2.0.0](internal/endpoints/v2/CHANGELOG.md#v200-2021-11-06)
+ * **Release**: Endpoint Variant Model Support
+* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.6.0](service/applicationinsights/CHANGELOG.md#v160-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/appstream`: [v1.8.0](service/appstream/CHANGELOG.md#v180-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.11.0](service/auditmanager/CHANGELOG.md#v1110-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.14.0](service/autoscaling/CHANGELOG.md#v1140-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.13.0](service/chime/CHANGELOG.md#v1130-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkidentity`: [v1.4.0](service/chimesdkidentity/CHANGELOG.md#v140-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.4.0](service/chimesdkmessaging/CHANGELOG.md#v140-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.10.0](service/cloudfront/CHANGELOG.md#v1100-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/codecommit`: [v1.7.0](service/codecommit/CHANGELOG.md#v170-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.10.0](service/connect/CHANGELOG.md#v1100-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/connectcontactlens`: [v1.7.0](service/connectcontactlens/CHANGELOG.md#v170-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/connectparticipant`: [v1.6.0](service/connectparticipant/CHANGELOG.md#v160-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.10.0](service/databasemigrationservice/CHANGELOG.md#v1100-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.8.0](service/datasync/CHANGELOG.md#v180-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.11.0](service/docdb/CHANGELOG.md#v1110-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.9.0](service/ebs/CHANGELOG.md#v190-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.21.0](service/ec2/CHANGELOG.md#v1210-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.9.0](service/ecr/CHANGELOG.md#v190-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.11.0](service/ecs/CHANGELOG.md#v1110-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.12.0](service/eks/CHANGELOG.md#v1120-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.13.0](service/elasticache/CHANGELOG.md#v1130-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.9.0](service/elasticsearchservice/CHANGELOG.md#v190-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/emrcontainers`: [v1.8.0](service/emrcontainers/CHANGELOG.md#v180-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/finspace`: [v1.4.0](service/finspace/CHANGELOG.md#v140-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.12.0](service/fsx/CHANGELOG.md#v1120-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.8.0](service/gamelift/CHANGELOG.md#v180-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.9.0](service/health/CHANGELOG.md#v190-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.12.0](service/iam/CHANGELOG.md#v1120-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/internal/eventstreamtesting`: [v1.0.0](service/internal/eventstreamtesting/CHANGELOG.md#v100-2021-11-06)
+ * **Release**: Protocol support has been added for AWS event stream.
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.13.0](service/iotsitewise/CHANGELOG.md#v1130-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.14.0](service/kendra/CHANGELOG.md#v1140-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.8.0](service/kinesis/CHANGELOG.md#v180-2021-11-06)
+ * **Feature**: Support has been added for the SubscribeToShard API.
+* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.9.0](service/kms/CHANGELOG.md#v190-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.12.0](service/lightsail/CHANGELOG.md#v1120-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.13.0](service/macie2/CHANGELOG.md#v1130-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.6.0](service/mgn/CHANGELOG.md#v160-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.10.0](service/neptune/CHANGELOG.md#v1100-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/networkmanager`: [v1.6.0](service/networkmanager/CHANGELOG.md#v160-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/nimble`: [v1.6.0](service/nimble/CHANGELOG.md#v160-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.3.0](service/opensearch/CHANGELOG.md#v130-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.14.0](service/quicksight/CHANGELOG.md#v1140-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.11.0](service/rds/CHANGELOG.md#v1110-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.10.0](service/rekognition/CHANGELOG.md#v1100-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53resolver`: [v1.9.0](service/route53resolver/CHANGELOG.md#v190-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.18.0](service/s3/CHANGELOG.md#v1180-2021-11-06)
+ * **Feature**: Support has been added for the SelectObjectContent API.
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.13.0](service/s3control/CHANGELOG.md#v1130-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.18.0](service/sagemaker/CHANGELOG.md#v1180-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/servicediscovery`: [v1.11.0](service/servicediscovery/CHANGELOG.md#v1110-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.6.0](service/ssmincidents/CHANGELOG.md#v160-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/sso`: [v1.6.0](service/sso/CHANGELOG.md#v160-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.8.0](service/storagegateway/CHANGELOG.md#v180-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/support`: [v1.7.0](service/support/CHANGELOG.md#v170-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.8.0](service/textract/CHANGELOG.md#v180-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.10.0](service/transcribe/CHANGELOG.md#v1100-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/transcribestreaming`: [v1.0.0](service/transcribestreaming/CHANGELOG.md#v100-2021-11-06)
+ * **Release**: New AWS service client module
+ * **Feature**: Support has been added for the StartStreamTranscription and StartMedicalStreamTranscription APIs.
+* `github.com/aws/aws-sdk-go-v2/service/waf`: [v1.6.0](service/waf/CHANGELOG.md#v160-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/wisdom`: [v1.2.0](service/wisdom/CHANGELOG.md#v120-2021-11-06)
+ * **Feature**: Updated service to latest API model.
+
+# Release (2021-10-21)
+
+## General Highlights
+* **Feature**: Updated to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.10.0
+ * **Feature**: Adds dynamic signing middleware that switches to unsigned payload when TLS is enabled.
+* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.8.0](service/appflow/CHANGELOG.md#v180-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/applicationautoscaling`: [v1.8.0](service/applicationautoscaling/CHANGELOG.md#v180-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.13.0](service/autoscaling/CHANGELOG.md#v1130-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.3.0](service/chimesdkmessaging/CHANGELOG.md#v130-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.11.0](service/cloudformation/CHANGELOG.md#v1110-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudsearch`: [v1.7.0](service/cloudsearch/CHANGELOG.md#v170-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.7.0](service/cloudtrail/CHANGELOG.md#v170-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.9.0](service/cloudwatch/CHANGELOG.md#v190-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatchevents`: [v1.7.0](service/cloudwatchevents/CHANGELOG.md#v170-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.8.0](service/cloudwatchlogs/CHANGELOG.md#v180-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codedeploy`: [v1.7.0](service/codedeploy/CHANGELOG.md#v170-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.10.0](service/configservice/CHANGELOG.md#v1100-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/dataexchange`: [v1.7.0](service/dataexchange/CHANGELOG.md#v170-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.9.0](service/directconnect/CHANGELOG.md#v190-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.10.0](service/docdb/CHANGELOG.md#v1100-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.6.0](service/dynamodb/CHANGELOG.md#v160-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.20.0](service/ec2/CHANGELOG.md#v1200-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.8.0](service/ecr/CHANGELOG.md#v180-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.10.0](service/ecs/CHANGELOG.md#v1100-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.9.0](service/efs/CHANGELOG.md#v190-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.12.0](service/elasticache/CHANGELOG.md#v1120-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing`: [v1.7.0](service/elasticloadbalancing/CHANGELOG.md#v170-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.10.0](service/elasticloadbalancingv2/CHANGELOG.md#v1100-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.10.0](service/emr/CHANGELOG.md#v1100-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.8.0](service/eventbridge/CHANGELOG.md#v180-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/glacier`: [v1.6.0](service/glacier/CHANGELOG.md#v160-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.13.0](service/glue/CHANGELOG.md#v1130-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.8.0](service/ivs/CHANGELOG.md#v180-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.13.0](service/kendra/CHANGELOG.md#v1130-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.7.0](service/kinesis/CHANGELOG.md#v170-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2`: [v1.7.0](service/kinesisanalyticsv2/CHANGELOG.md#v170-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.8.0](service/kms/CHANGELOG.md#v180-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.10.0](service/lambda/CHANGELOG.md#v1100-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.13.0](service/mediaconvert/CHANGELOG.md#v1130-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.9.0](service/mediapackage/CHANGELOG.md#v190-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.10.0](service/mediapackagevod/CHANGELOG.md#v1100-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.9.0](service/mediatailor/CHANGELOG.md#v190-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.9.0](service/neptune/CHANGELOG.md#v190-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/panorama`: [v1.0.0](service/panorama/CHANGELOG.md#v100-2021-10-21)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.13.0](service/quicksight/CHANGELOG.md#v1130-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.10.0](service/rds/CHANGELOG.md#v1100-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.12.0](service/redshift/CHANGELOG.md#v1120-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.10.0](service/robomaker/CHANGELOG.md#v1100-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.17.0](service/s3/CHANGELOG.md#v1170-2021-10-21)
+ * **Feature**: Updates S3 streaming operations - PutObject, UploadPart, WriteGetObjectResponse to use unsigned payload signing auth when TLS is enabled.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.17.0](service/sagemaker/CHANGELOG.md#v1170-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.12.0](service/securityhub/CHANGELOG.md#v1120-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sfn`: [v1.6.0](service/sfn/CHANGELOG.md#v160-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.9.0](service/sns/CHANGELOG.md#v190-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.10.0](service/sqs/CHANGELOG.md#v1100-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.7.0](service/storagegateway/CHANGELOG.md#v170-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.8.0](service/sts/CHANGELOG.md#v180-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/swf`: [v1.6.0](service/swf/CHANGELOG.md#v160-2021-10-21)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/workmail`: [v1.8.0](service/workmail/CHANGELOG.md#v180-2021-10-21)
+ * **Feature**: API client updated
+
+# Release (2021-10-11)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/feature/ec2/imds`: [v1.6.0](feature/ec2/imds/CHANGELOG.md#v160-2021-10-11)
+ * **Feature**: Respect passed in Context Deadline/Timeout. Updates the IMDS Client operations to not override the passed in Context's Deadline or Timeout options. If an Client operation is called with a Context with a Deadline or Timeout, the client will no longer override it with the client's default timeout.
+ * **Bug Fix**: Fix IMDS client's response handling and operation timeout race. Fixes #1253
+* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.5.0](service/amplifybackend/CHANGELOG.md#v150-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/applicationautoscaling`: [v1.7.0](service/applicationautoscaling/CHANGELOG.md#v170-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/apprunner`: [v1.3.0](service/apprunner/CHANGELOG.md#v130-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.6.0](service/backup/CHANGELOG.md#v160-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.11.0](service/chime/CHANGELOG.md#v1110-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.11.0](service/codebuild/CHANGELOG.md#v1110-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.10.0](service/databrew/CHANGELOG.md#v1100-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.19.0](service/ec2/CHANGELOG.md#v1190-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.8.0](service/efs/CHANGELOG.md#v180-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.9.0](service/elasticloadbalancingv2/CHANGELOG.md#v190-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/firehose`: [v1.7.0](service/firehose/CHANGELOG.md#v170-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.10.0](service/frauddetector/CHANGELOG.md#v1100-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.10.0](service/fsx/CHANGELOG.md#v1100-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.12.0](service/glue/CHANGELOG.md#v1120-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/grafana`: [v1.0.0](service/grafana/CHANGELOG.md#v100-2021-10-11)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotevents`: [v1.8.0](service/iotevents/CHANGELOG.md#v180-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.12.0](service/kendra/CHANGELOG.md#v1120-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.7.0](service/kms/CHANGELOG.md#v170-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.9.0](service/lexmodelsv2/CHANGELOG.md#v190-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.6.0](service/lexruntimev2/CHANGELOG.md#v160-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.6.0](service/location/CHANGELOG.md#v160-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.12.0](service/mediaconvert/CHANGELOG.md#v1120-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.10.0](service/medialive/CHANGELOG.md#v1100-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.16.0](service/sagemaker/CHANGELOG.md#v1160-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.7.0](service/secretsmanager/CHANGELOG.md#v170-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.11.0](service/securityhub/CHANGELOG.md#v1110-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.12.0](service/ssm/CHANGELOG.md#v1120-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssooidc`: [v1.6.0](service/ssooidc/CHANGELOG.md#v160-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.7.0](service/synthetics/CHANGELOG.md#v170-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.6.0](service/textract/CHANGELOG.md#v160-2021-10-11)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/workmail`: [v1.7.0](service/workmail/CHANGELOG.md#v170-2021-10-11)
+ * **Feature**: API client updated
+
+# Release (2021-09-30)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/account`: [v1.0.0](service/account/CHANGELOG.md#v100-2021-09-30)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.6.0](service/amp/CHANGELOG.md#v160-2021-09-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appintegrations`: [v1.7.0](service/appintegrations/CHANGELOG.md#v170-2021-09-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudcontrol`: [v1.0.0](service/cloudcontrol/CHANGELOG.md#v100-2021-09-30)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudhsmv2`: [v1.5.0](service/cloudhsmv2/CHANGELOG.md#v150-2021-09-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.8.0](service/connect/CHANGELOG.md#v180-2021-09-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/dataexchange`: [v1.6.0](service/dataexchange/CHANGELOG.md#v160-2021-09-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.8.0](service/elasticloadbalancingv2/CHANGELOG.md#v180-2021-09-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.11.0](service/imagebuilder/CHANGELOG.md#v1110-2021-09-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.9.0](service/lambda/CHANGELOG.md#v190-2021-09-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.11.0](service/macie2/CHANGELOG.md#v1110-2021-09-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.7.0](service/networkfirewall/CHANGELOG.md#v170-2021-09-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/pinpoint`: [v1.8.0](service/pinpoint/CHANGELOG.md#v180-2021-09-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sesv2`: [v1.6.0](service/sesv2/CHANGELOG.md#v160-2021-09-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.8.0](service/transfer/CHANGELOG.md#v180-2021-09-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/voiceid`: [v1.0.0](service/voiceid/CHANGELOG.md#v100-2021-09-30)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/wisdom`: [v1.0.0](service/wisdom/CHANGELOG.md#v100-2021-09-30)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/workmail`: [v1.6.0](service/workmail/CHANGELOG.md#v160-2021-09-30)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.7.0](service/workspaces/CHANGELOG.md#v170-2021-09-30)
+ * **Feature**: API client updated
+
+# Release (2021-09-24)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression`: [v1.2.4](feature/dynamodb/expression/CHANGELOG.md#v124-2021-09-24)
+ * **Documentation**: Fixes typo in NameBuilder.NamesList example documentation to use the correct variable name.
+* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.6.0](service/appmesh/CHANGELOG.md#v160-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.7.0](service/appsync/CHANGELOG.md#v170-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.9.0](service/auditmanager/CHANGELOG.md#v190-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codecommit`: [v1.5.0](service/codecommit/CHANGELOG.md#v150-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/comprehend`: [v1.8.0](service/comprehend/CHANGELOG.md#v180-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.8.0](service/databasemigrationservice/CHANGELOG.md#v180-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.18.0](service/ec2/CHANGELOG.md#v1180-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.7.0](service/ecr/CHANGELOG.md#v170-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.7.0](service/elasticsearchservice/CHANGELOG.md#v170-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.10.0](service/iam/CHANGELOG.md#v1100-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.6.0](service/identitystore/CHANGELOG.md#v160-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.10.0](service/imagebuilder/CHANGELOG.md#v1100-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.13.0](service/iot/CHANGELOG.md#v1130-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotevents`: [v1.7.0](service/iotevents/CHANGELOG.md#v170-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kafkaconnect`: [v1.1.0](service/kafkaconnect/CHANGELOG.md#v110-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.6.0](service/lakeformation/CHANGELOG.md#v160-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.8.0](service/lexmodelsv2/CHANGELOG.md#v180-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.5.0](service/lexruntimev2/CHANGELOG.md#v150-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.8.0](service/licensemanager/CHANGELOG.md#v180-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.11.0](service/mediaconvert/CHANGELOG.md#v1110-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.9.0](service/mediapackagevod/CHANGELOG.md#v190-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.8.0](service/mediatailor/CHANGELOG.md#v180-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.1.0](service/opensearch/CHANGELOG.md#v110-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.12.0](service/quicksight/CHANGELOG.md#v1120-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.11.0](service/ssm/CHANGELOG.md#v1110-2021-09-24)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.10.0](service/wafv2/CHANGELOG.md#v1100-2021-09-24)
+ * **Feature**: API client updated
+
+# Release (2021-09-17)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.10.0](service/chime/CHANGELOG.md#v1100-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.10.1](service/cloudformation/CHANGELOG.md#v1101-2021-09-17)
+ * **Documentation**: Updated API client documentation.
+* `github.com/aws/aws-sdk-go-v2/service/comprehend`: [v1.7.0](service/comprehend/CHANGELOG.md#v170-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.17.0](service/ec2/CHANGELOG.md#v1170-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ecr`: [v1.6.0](service/ecr/CHANGELOG.md#v160-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.12.0](service/iot/CHANGELOG.md#v1120-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/kafkaconnect`: [v1.0.0](service/kafkaconnect/CHANGELOG.md#v100-2021-09-17)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.7.0](service/lexmodelsv2/CHANGELOG.md#v170-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.4.0](service/lexruntimev2/CHANGELOG.md#v140-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.10.0](service/macie2/CHANGELOG.md#v1100-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.8.0](service/mediapackagevod/CHANGELOG.md#v180-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.6.0](service/networkfirewall/CHANGELOG.md#v160-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/pinpoint`: [v1.7.0](service/pinpoint/CHANGELOG.md#v170-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.11.0](service/quicksight/CHANGELOG.md#v1110-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.9.0](service/rds/CHANGELOG.md#v190-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.9.0](service/robomaker/CHANGELOG.md#v190-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.16.0](service/s3/CHANGELOG.md#v1160-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.15.0](service/sagemaker/CHANGELOG.md#v1150-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ssooidc`: [v1.5.0](service/ssooidc/CHANGELOG.md#v150-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.8.0](service/transcribe/CHANGELOG.md#v180-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.9.0](service/wafv2/CHANGELOG.md#v190-2021-09-17)
+ * **Feature**: Updated API client and endpoints to latest revision.
+
+# Release (2021-09-10)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/credentials`: [v1.4.1](credentials/CHANGELOG.md#v141-2021-09-10)
+ * **Documentation**: Fixes the AssumeRoleProvider's documentation for using custom TokenProviders.
+* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.5.0](service/amp/CHANGELOG.md#v150-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.7.0](service/braket/CHANGELOG.md#v170-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkidentity`: [v1.2.0](service/chimesdkidentity/CHANGELOG.md#v120-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.2.0](service/chimesdkmessaging/CHANGELOG.md#v120-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codegurureviewer`: [v1.7.0](service/codegurureviewer/CHANGELOG.md#v170-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.10.0](service/eks/CHANGELOG.md#v1100-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.11.0](service/elasticache/CHANGELOG.md#v1110-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.9.0](service/emr/CHANGELOG.md#v190-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.10.0](service/forecast/CHANGELOG.md#v1100-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.9.0](service/frauddetector/CHANGELOG.md#v190-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kafka`: [v1.7.0](service/kafka/CHANGELOG.md#v170-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lookoutequipment`: [v1.4.0](service/lookoutequipment/CHANGELOG.md#v140-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.8.0](service/mediapackage/CHANGELOG.md#v180-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/opensearch`: [v1.0.0](service/opensearch/CHANGELOG.md#v100-2021-09-10)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.8.0](service/outposts/CHANGELOG.md#v180-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.7.0](service/ram/CHANGELOG.md#v170-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.14.0](service/sagemaker/CHANGELOG.md#v1140-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/servicediscovery`: [v1.9.0](service/servicediscovery/CHANGELOG.md#v190-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.5.0](service/ssmcontacts/CHANGELOG.md#v150-2021-09-10)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/xray`: [v1.6.0](service/xray/CHANGELOG.md#v160-2021-09-10)
+ * **Feature**: API client updated
+
+# Release (2021-09-02)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/config`: [v1.8.0](config/CHANGELOG.md#v180-2021-09-02)
+ * **Feature**: Add support for S3 Multi-Region Access Point ARNs.
+* `github.com/aws/aws-sdk-go-v2/service/accessanalyzer`: [v1.7.0](service/accessanalyzer/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.8.0](service/acmpca/CHANGELOG.md#v180-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloud9`: [v1.8.0](service/cloud9/CHANGELOG.md#v180-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.10.0](service/cloudformation/CHANGELOG.md#v1100-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.6.0](service/cloudtrail/CHANGELOG.md#v160-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.10.0](service/codebuild/CHANGELOG.md#v1100-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.9.0](service/computeoptimizer/CHANGELOG.md#v190-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.9.0](service/configservice/CHANGELOG.md#v190-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.7.0](service/ebs/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.16.0](service/ec2/CHANGELOG.md#v1160-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.7.0](service/efs/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.8.0](service/emr/CHANGELOG.md#v180-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/firehose`: [v1.6.0](service/firehose/CHANGELOG.md#v160-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.8.0](service/frauddetector/CHANGELOG.md#v180-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.9.0](service/fsx/CHANGELOG.md#v190-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/internal/s3shared`: [v1.7.0](service/internal/s3shared/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: Add support for S3 Multi-Region Access Point ARNs.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.11.0](service/iot/CHANGELOG.md#v1110-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotjobsdataplane`: [v1.5.0](service/iotjobsdataplane/CHANGELOG.md#v150-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.7.0](service/ivs/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.6.0](service/kms/CHANGELOG.md#v160-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice`: [v1.9.0](service/lexmodelbuildingservice/CHANGELOG.md#v190-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.7.0](service/mediatailor/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/memorydb`: [v1.2.0](service/memorydb/CHANGELOG.md#v120-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mwaa`: [v1.5.0](service/mwaa/CHANGELOG.md#v150-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.6.0](service/polly/CHANGELOG.md#v160-2021-09-02)
+ * **Feature**: API client updated
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.10.0](service/quicksight/CHANGELOG.md#v1100-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.15.0](service/s3/CHANGELOG.md#v1150-2021-09-02)
+ * **Feature**: API client updated
+ * **Feature**: Add support for S3 Multi-Region Access Point ARNs.
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.11.0](service/s3control/CHANGELOG.md#v1110-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemakerruntime`: [v1.7.0](service/sagemakerruntime/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/schemas`: [v1.6.0](service/schemas/CHANGELOG.md#v160-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.10.0](service/securityhub/CHANGELOG.md#v1100-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry`: [v1.5.0](service/servicecatalogappregistry/CHANGELOG.md#v150-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.9.0](service/sqs/CHANGELOG.md#v190-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.4.0](service/ssmincidents/CHANGELOG.md#v140-2021-09-02)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.7.0](service/transfer/CHANGELOG.md#v170-2021-09-02)
+ * **Feature**: API client updated
+
+# Release (2021-08-27)
+
+## General Highlights
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/credentials`: [v1.4.0](credentials/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Adds support for Tags and TransitiveTagKeys to stscreds.AssumeRoleProvider. Closes https://github.com/aws/aws-sdk-go-v2/issues/723
+* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue`: [v1.2.0](feature/dynamodb/attributevalue/CHANGELOG.md#v120-2021-08-27)
+ * **Bug Fix**: Fix unmarshaler's decoding of AttributeValueMemberN into a type that is a string alias.
+* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.7.0](service/acmpca/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/amplify`: [v1.5.0](service/amplify/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.4.0](service/amplifybackend/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/apigateway`: [v1.7.0](service/apigateway/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/apigatewaymanagementapi`: [v1.4.0](service/apigatewaymanagementapi/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.7.0](service/appflow/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/applicationinsights`: [v1.4.0](service/applicationinsights/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/apprunner`: [v1.2.0](service/apprunner/CHANGELOG.md#v120-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/appstream`: [v1.6.0](service/appstream/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.6.0](service/appsync/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.6.0](service/athena/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.8.0](service/auditmanager/CHANGELOG.md#v180-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/autoscalingplans`: [v1.5.0](service/autoscalingplans/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/backup`: [v1.5.0](service/backup/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.7.0](service/batch/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.6.0](service/braket/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkidentity`: [v1.1.0](service/chimesdkidentity/CHANGELOG.md#v110-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.1.0](service/chimesdkmessaging/CHANGELOG.md#v110-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.5.0](service/cloudtrail/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatchevents`: [v1.6.0](service/cloudwatchevents/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/codeartifact`: [v1.5.0](service/codeartifact/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.9.0](service/codebuild/CHANGELOG.md#v190-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/codecommit`: [v1.4.0](service/codecommit/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/codeguruprofiler`: [v1.5.0](service/codeguruprofiler/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/codestarnotifications`: [v1.4.0](service/codestarnotifications/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentity`: [v1.5.0](service/cognitoidentity/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.6.0](service/cognitoidentityprovider/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/comprehend`: [v1.6.0](service/comprehend/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.8.0](service/computeoptimizer/CHANGELOG.md#v180-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/connectcontactlens`: [v1.5.0](service/connectcontactlens/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.9.0](service/customerprofiles/CHANGELOG.md#v190-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.7.0](service/databasemigrationservice/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.6.0](service/datasync/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/dax`: [v1.4.0](service/dax/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/directoryservice`: [v1.5.0](service/directoryservice/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/dlm`: [v1.5.0](service/dlm/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/dynamodbstreams`: [v1.4.0](service/dynamodbstreams/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.15.0](service/ec2/CHANGELOG.md#v1150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ecrpublic`: [v1.5.0](service/ecrpublic/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.6.0](service/efs/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.9.0](service/eks/CHANGELOG.md#v190-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/emrcontainers`: [v1.6.0](service/emrcontainers/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.7.0](service/eventbridge/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/finspace`: [v1.2.0](service/finspace/CHANGELOG.md#v120-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.2.0](service/finspacedata/CHANGELOG.md#v120-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/firehose`: [v1.5.0](service/firehose/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.7.0](service/fms/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.9.0](service/forecast/CHANGELOG.md#v190-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/forecastquery`: [v1.4.0](service/forecastquery/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.7.0](service/frauddetector/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.8.0](service/fsx/CHANGELOG.md#v180-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.6.0](service/gamelift/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.11.0](service/glue/CHANGELOG.md#v1110-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/groundstation`: [v1.6.0](service/groundstation/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/guardduty`: [v1.5.0](service/guardduty/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.7.0](service/health/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/healthlake`: [v1.6.0](service/healthlake/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.10.0](service/iot/CHANGELOG.md#v1100-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/iot1clickdevicesservice`: [v1.4.0](service/iot1clickdevicesservice/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/iotanalytics`: [v1.5.0](service/iotanalytics/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/iotdataplane`: [v1.4.0](service/iotdataplane/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/iotfleethub`: [v1.5.0](service/iotfleethub/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.11.0](service/iotsitewise/CHANGELOG.md#v1110-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ivs`: [v1.6.0](service/ivs/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.5.0](service/lakeformation/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.6.0](service/lexmodelsv2/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.3.0](service/lexruntimev2/CHANGELOG.md#v130-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.7.0](service/licensemanager/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.10.0](service/lightsail/CHANGELOG.md#v1100-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutequipment`: [v1.3.0](service/lookoutequipment/CHANGELOG.md#v130-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.3.0](service/lookoutmetrics/CHANGELOG.md#v130-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.9.0](service/macie2/CHANGELOG.md#v190-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.10.0](service/mediaconvert/CHANGELOG.md#v1100-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/mediapackage`: [v1.7.0](service/mediapackage/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.7.0](service/mediapackagevod/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/mq`: [v1.5.0](service/mq/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.5.0](service/networkfirewall/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.7.0](service/outposts/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/pi`: [v1.6.0](service/pi/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/pinpointsmsvoice`: [v1.4.0](service/pinpointsmsvoice/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.5.0](service/polly/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.6.0](service/qldb/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/qldbsession`: [v1.5.0](service/qldbsession/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.6.0](service/ram/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.8.0](service/rekognition/CHANGELOG.md#v180-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi`: [v1.5.0](service/resourcegroupstaggingapi/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.8.0](service/robomaker/CHANGELOG.md#v180-2021-08-27)
+ * **Bug Fix**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig`: [v1.1.0](service/route53recoverycontrolconfig/CHANGELOG.md#v110-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/route53resolver`: [v1.7.0](service/route53resolver/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.14.0](service/s3/CHANGELOG.md#v1140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.10.0](service/s3control/CHANGELOG.md#v1100-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/s3outposts`: [v1.5.0](service/s3outposts/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/servicecatalog`: [v1.5.0](service/servicecatalog/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry`: [v1.4.0](service/servicecatalogappregistry/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/signer`: [v1.5.0](service/signer/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/ssooidc`: [v1.4.0](service/ssooidc/CHANGELOG.md#v140-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.6.0](service/storagegateway/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.6.0](service/synthetics/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.5.0](service/textract/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.7.0](service/transcribe/CHANGELOG.md#v170-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.6.0](service/transfer/CHANGELOG.md#v160-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/wafregional`: [v1.5.0](service/wafregional/CHANGELOG.md#v150-2021-08-27)
+ * **Feature**: Updated API model to latest revision.
+
+# Release (2021-08-19)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/apigateway`: [v1.6.0](service/apigateway/CHANGELOG.md#v160-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/apigatewayv2`: [v1.5.0](service/apigatewayv2/CHANGELOG.md#v150-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.6.0](service/appflow/CHANGELOG.md#v160-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/applicationautoscaling`: [v1.5.0](service/applicationautoscaling/CHANGELOG.md#v150-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloud9`: [v1.6.0](service/cloud9/CHANGELOG.md#v160-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/clouddirectory`: [v1.4.0](service/clouddirectory/CHANGELOG.md#v140-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.6.0](service/cloudwatchlogs/CHANGELOG.md#v160-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.8.0](service/codebuild/CHANGELOG.md#v180-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.7.0](service/configservice/CHANGELOG.md#v170-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/costexplorer`: [v1.8.0](service/costexplorer/CHANGELOG.md#v180-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/customerprofiles`: [v1.8.0](service/customerprofiles/CHANGELOG.md#v180-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.8.0](service/databrew/CHANGELOG.md#v180-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/directoryservice`: [v1.4.0](service/directoryservice/CHANGELOG.md#v140-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.14.0](service/ec2/CHANGELOG.md#v1140-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.9.0](service/elasticache/CHANGELOG.md#v190-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.6.0](service/emr/CHANGELOG.md#v160-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.10.0](service/iotsitewise/CHANGELOG.md#v1100-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.7.0](service/lambda/CHANGELOG.md#v170-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.6.0](service/licensemanager/CHANGELOG.md#v160-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/memorydb`: [v1.0.0](service/memorydb/CHANGELOG.md#v100-2021-08-19)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.8.0](service/quicksight/CHANGELOG.md#v180-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.10.0](service/route53/CHANGELOG.md#v1100-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53resolver`: [v1.6.0](service/route53resolver/CHANGELOG.md#v160-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.13.0](service/s3/CHANGELOG.md#v1130-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.12.0](service/sagemaker/CHANGELOG.md#v1120-2021-08-19)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemakerruntime`: [v1.5.0](service/sagemakerruntime/CHANGELOG.md#v150-2021-08-19)
+ * **Feature**: API client updated
+
+# Release (2021-08-12)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/feature/cloudfront/sign`: [v1.3.1](feature/cloudfront/sign/CHANGELOG.md#v131-2021-08-12)
+ * **Bug Fix**: Update to not escape HTML when encoding the policy.
+* `github.com/aws/aws-sdk-go-v2/service/athena`: [v1.5.0](service/athena/CHANGELOG.md#v150-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.11.0](service/autoscaling/CHANGELOG.md#v1110-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.8.0](service/chime/CHANGELOG.md#v180-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkidentity`: [v1.0.0](service/chimesdkidentity/CHANGELOG.md#v100-2021-08-12)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chimesdkmessaging`: [v1.0.0](service/chimesdkmessaging/CHANGELOG.md#v100-2021-08-12)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.7.0](service/codebuild/CHANGELOG.md#v170-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.6.0](service/connect/CHANGELOG.md#v160-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ebs`: [v1.5.0](service/ebs/CHANGELOG.md#v150-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.8.0](service/ecs/CHANGELOG.md#v180-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.5.0](service/lexmodelsv2/CHANGELOG.md#v150-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.9.0](service/lightsail/CHANGELOG.md#v190-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/nimble`: [v1.3.0](service/nimble/CHANGELOG.md#v130-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.7.0](service/rekognition/CHANGELOG.md#v170-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.9.0](service/route53/CHANGELOG.md#v190-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/snowdevicemanagement`: [v1.0.0](service/snowdevicemanagement/CHANGELOG.md#v100-2021-08-12)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.9.0](service/ssm/CHANGELOG.md#v190-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.5.0](service/synthetics/CHANGELOG.md#v150-2021-08-12)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.7.0](service/wafv2/CHANGELOG.md#v170-2021-08-12)
+ * **Feature**: API client updated
+
+# Release (2021-08-04)
+
+## General Highlights
+* **Feature**: adds error handling for defered close calls
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.8.0
+ * **Bug Fix**: Corrected an issue where the retryer was not using the last attempt's ResultMetadata as the bases for the return result from the stack. ([#1345](https://github.com/aws/aws-sdk-go-v2/pull/1345))
+* `github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression`: [v1.2.0](feature/dynamodb/expression/CHANGELOG.md#v120-2021-08-04)
+ * **Feature**: Add IsSet helper for ConditionBuilder and KeyConditionBuilder ([#1329](https://github.com/aws/aws-sdk-go-v2/pull/1329))
+* `github.com/aws/aws-sdk-go-v2/service/accessanalyzer`: [v1.5.2](service/accessanalyzer/CHANGELOG.md#v152-2021-08-04)
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.3.1](service/amp/CHANGELOG.md#v131-2021-08-04)
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/appintegrations`: [v1.5.0](service/appintegrations/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.4.2](service/appmesh/CHANGELOG.md#v142-2021-08-04)
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/appsync`: [v1.5.0](service/appsync/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/auditmanager`: [v1.7.0](service/auditmanager/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/batch`: [v1.6.0](service/batch/CHANGELOG.md#v160-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.5.2](service/braket/CHANGELOG.md#v152-2021-08-04)
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.7.0](service/chime/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.8.0](service/cloudformation/CHANGELOG.md#v180-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.7.0](service/cloudwatch/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.6.0](service/codebuild/CHANGELOG.md#v160-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/codeguruprofiler`: [v1.4.2](service/codeguruprofiler/CHANGELOG.md#v142-2021-08-04)
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.5.0](service/cognitoidentityprovider/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.7.0](service/computeoptimizer/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.7.0](service/databrew/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.7.0](service/directconnect/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.13.0](service/ec2/CHANGELOG.md#v1130-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.7.0](service/ecs/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.6.0](service/elasticloadbalancingv2/CHANGELOG.md#v160-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/emr`: [v1.5.0](service/emr/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/emrcontainers`: [v1.5.0](service/emrcontainers/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.6.0](service/eventbridge/CHANGELOG.md#v160-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.10.0](service/glue/CHANGELOG.md#v1100-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.5.0](service/greengrassv2/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/groundstation`: [v1.5.2](service/groundstation/CHANGELOG.md#v152-2021-08-04)
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.8.0](service/iam/CHANGELOG.md#v180-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/identitystore`: [v1.4.0](service/identitystore/CHANGELOG.md#v140-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.8.0](service/imagebuilder/CHANGELOG.md#v180-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.9.0](service/iot/CHANGELOG.md#v190-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iotanalytics`: [v1.4.0](service/iotanalytics/CHANGELOG.md#v140-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.9.0](service/iotsitewise/CHANGELOG.md#v190-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.8.0](service/iotwireless/CHANGELOG.md#v180-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.10.0](service/kendra/CHANGELOG.md#v1100-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.6.0](service/lambda/CHANGELOG.md#v160-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice`: [v1.7.0](service/lexmodelbuildingservice/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.4.0](service/lexmodelsv2/CHANGELOG.md#v140-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.4.0](service/location/CHANGELOG.md#v140-2021-08-04)
+ * **Feature**: Updated to latest API model.
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.9.0](service/mediaconvert/CHANGELOG.md#v190-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.8.0](service/medialive/CHANGELOG.md#v180-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.3.1](service/mgn/CHANGELOG.md#v131-2021-08-04)
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.7.0](service/personalize/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.2.0](service/proton/CHANGELOG.md#v120-2021-08-04)
+ * **Feature**: Updated to latest API model.
+ * **Bug Fix**: Fixed an issue that caused one or more API operations to fail when attempting to resolve the service endpoint. ([#1349](https://github.com/aws/aws-sdk-go-v2/pull/1349))
+* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.5.0](service/qldb/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.7.0](service/quicksight/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.7.0](service/rds/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.10.0](service/redshift/CHANGELOG.md#v1100-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/redshiftdata`: [v1.5.0](service/redshiftdata/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/robomaker`: [v1.7.0](service/robomaker/CHANGELOG.md#v170-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.8.0](service/route53/CHANGELOG.md#v180-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53recoverycluster`: [v1.0.0](service/route53recoverycluster/CHANGELOG.md#v100-2021-08-04)
+ * **Release**: New AWS service client module
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53recoverycontrolconfig`: [v1.0.0](service/route53recoverycontrolconfig/CHANGELOG.md#v100-2021-08-04)
+ * **Release**: New AWS service client module
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53recoveryreadiness`: [v1.0.0](service/route53recoveryreadiness/CHANGELOG.md#v100-2021-08-04)
+ * **Release**: New AWS service client module
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.12.0](service/s3/CHANGELOG.md#v1120-2021-08-04)
+ * **Feature**: Add `HeadObject` presign support. ([#1346](https://github.com/aws/aws-sdk-go-v2/pull/1346))
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.9.0](service/s3control/CHANGELOG.md#v190-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/s3outposts`: [v1.4.0](service/s3outposts/CHANGELOG.md#v140-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.11.0](service/sagemaker/CHANGELOG.md#v1110-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/secretsmanager`: [v1.5.0](service/secretsmanager/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.8.0](service/securityhub/CHANGELOG.md#v180-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/shield`: [v1.6.0](service/shield/CHANGELOG.md#v160-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.3.0](service/ssmcontacts/CHANGELOG.md#v130-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.2.0](service/ssmincidents/CHANGELOG.md#v120-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssoadmin`: [v1.5.0](service/ssoadmin/CHANGELOG.md#v150-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/synthetics`: [v1.4.0](service/synthetics/CHANGELOG.md#v140-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/textract`: [v1.4.0](service/textract/CHANGELOG.md#v140-2021-08-04)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.6.0](service/transcribe/CHANGELOG.md#v160-2021-08-04)
+ * **Feature**: Updated to latest API model.
+
+# Release (2021-07-15)
+
+## General Highlights
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/config`: [v1.5.0](config/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: Support has been added for EC2 IPv6-enabled Instance Metadata Service Endpoints.
+* `github.com/aws/aws-sdk-go-v2/feature/ec2/imds`: [v1.3.0](feature/ec2/imds/CHANGELOG.md#v130-2021-07-15)
+ * **Feature**: Support has been added for EC2 IPv6-enabled Instance Metadata Service Endpoints.
+* `github.com/aws/aws-sdk-go-v2/service/acm`: [v1.5.0](service/acm/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.3.0](service/amp/CHANGELOG.md#v130-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/amplify`: [v1.4.0](service/amplify/CHANGELOG.md#v140-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.3.0](service/amplifybackend/CHANGELOG.md#v130-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.10.0](service/autoscaling/CHANGELOG.md#v1100-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.6.0](service/chime/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.7.0](service/cloudformation/CHANGELOG.md#v170-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.7.0](service/cloudfront/CHANGELOG.md#v170-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/cloudsearch`: [v1.5.0](service/cloudsearch/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.6.0](service/cloudwatch/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/databasemigrationservice`: [v1.6.0](service/databasemigrationservice/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/devopsguru`: [v1.6.0](service/devopsguru/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/directconnect`: [v1.6.0](service/directconnect/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.8.0](service/docdb/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.12.0](service/ec2/CHANGELOG.md#v1120-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.8.0](service/eks/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.8.0](service/elasticache/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk`: [v1.5.0](service/elasticbeanstalk/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing`: [v1.5.0](service/elasticloadbalancing/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.5.0](service/elasticloadbalancingv2/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/fms`: [v1.6.0](service/fms/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/frauddetector`: [v1.6.0](service/frauddetector/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.9.0](service/glue/CHANGELOG.md#v190-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/health`: [v1.6.0](service/health/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/healthlake`: [v1.5.0](service/healthlake/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.7.0](service/iam/CHANGELOG.md#v170-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.7.0](service/imagebuilder/CHANGELOG.md#v170-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.8.0](service/iot/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.8.0](service/iotsitewise/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.9.0](service/kendra/CHANGELOG.md#v190-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/lambda`: [v1.5.0](service/lambda/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelbuildingservice`: [v1.6.0](service/lexmodelbuildingservice/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.8.0](service/lightsail/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/macie`: [v1.5.1](service/macie/CHANGELOG.md#v151-2021-07-15)
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.8.1](service/macie2/CHANGELOG.md#v181-2021-07-15)
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.8.0](service/mediaconvert/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.5.0](service/mediatailor/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/mgn`: [v1.3.0](service/mgn/CHANGELOG.md#v130-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/mq`: [v1.4.0](service/mq/CHANGELOG.md#v140-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.7.0](service/neptune/CHANGELOG.md#v170-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.6.0](service/outposts/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/pricing`: [v1.5.1](service/pricing/CHANGELOG.md#v151-2021-07-15)
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.6.0](service/rds/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.9.0](service/redshift/CHANGELOG.md#v190-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.10.0](service/sagemaker/CHANGELOG.md#v1100-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/ses`: [v1.5.0](service/ses/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.7.0](service/sns/CHANGELOG.md#v170-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.7.0](service/sqs/CHANGELOG.md#v170-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.8.0](service/ssm/CHANGELOG.md#v180-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/storagegateway`: [v1.5.0](service/storagegateway/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.6.0](service/sts/CHANGELOG.md#v160-2021-07-15)
+ * **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+ * **Documentation**: Updated service model to latest revision.
+* `github.com/aws/aws-sdk-go-v2/service/wellarchitected`: [v1.5.0](service/wellarchitected/CHANGELOG.md#v150-2021-07-15)
+ * **Feature**: Updated service model to latest version.
+
+# Release (2021-07-01)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/internal/ini`: [v1.1.0](internal/ini/CHANGELOG.md#v110-2021-07-01)
+ * **Feature**: Support for `:`, `=`, `[`, `]` being present in expression values.
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.9.0](service/autoscaling/CHANGELOG.md#v190-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/databrew`: [v1.6.0](service/databrew/CHANGELOG.md#v160-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.11.0](service/ec2/CHANGELOG.md#v1110-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.8.0](service/glue/CHANGELOG.md#v180-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.8.0](service/kendra/CHANGELOG.md#v180-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.7.0](service/mediaconvert/CHANGELOG.md#v170-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediapackagevod`: [v1.6.0](service/mediapackagevod/CHANGELOG.md#v160-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.8.0](service/redshift/CHANGELOG.md#v180-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.9.0](service/sagemaker/CHANGELOG.md#v190-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/servicediscovery`: [v1.7.0](service/servicediscovery/CHANGELOG.md#v170-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.6.0](service/sqs/CHANGELOG.md#v160-2021-07-01)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.2.0](service/ssmcontacts/CHANGELOG.md#v120-2021-07-01)
+ * **Feature**: API client updated
+
+# Release (2021-06-25)
+
+## General Highlights
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.7.0
+ * **Feature**: Adds configuration values for enabling endpoint discovery.
+ * **Bug Fix**: Keep Object-Lock headers a header when presigning Sigv4 signing requests
+* `github.com/aws/aws-sdk-go-v2/config`: [v1.4.0](config/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: Adds configuration setting for enabling endpoint discovery.
+* `github.com/aws/aws-sdk-go-v2/credentials`: [v1.3.0](credentials/CHANGELOG.md#v130-2021-06-25)
+ * **Bug Fix**: Fixed example usages of aws.CredentialsCache ([#1275](https://github.com/aws/aws-sdk-go-v2/pull/1275))
+* `github.com/aws/aws-sdk-go-v2/feature/cloudfront/sign`: [v1.2.0](feature/cloudfront/sign/CHANGELOG.md#v120-2021-06-25)
+ * **Feature**: Add UnmarshalJSON for AWSEpochTime to correctly unmarshal AWSEpochTime, ([#1298](https://github.com/aws/aws-sdk-go-v2/pull/1298))
+* `github.com/aws/aws-sdk-go-v2/internal/configsources`: [v1.0.0](internal/configsources/CHANGELOG.md#v100-2021-06-25)
+ * **Release**: Release new modules
+* `github.com/aws/aws-sdk-go-v2/service/amp`: [v1.2.0](service/amp/CHANGELOG.md#v120-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/amplify`: [v1.3.0](service/amplify/CHANGELOG.md#v130-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/amplifybackend`: [v1.2.0](service/amplifybackend/CHANGELOG.md#v120-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appflow`: [v1.5.0](service/appflow/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/appmesh`: [v1.4.0](service/appmesh/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/chime`: [v1.5.0](service/chime/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloud9`: [v1.5.0](service/cloud9/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.6.0](service/cloudformation/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.6.0](service/cloudfront/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudsearch`: [v1.4.0](service/cloudsearch/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatch`: [v1.5.0](service/cloudwatch/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatchevents`: [v1.5.0](service/cloudwatchevents/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codebuild`: [v1.5.0](service/codebuild/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/codegurureviewer`: [v1.5.0](service/codegurureviewer/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentity`: [v1.4.0](service/cognitoidentity/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.4.0](service/cognitoidentityprovider/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.5.0](service/connect/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/dax`: [v1.3.0](service/dax/CHANGELOG.md#v130-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.7.0](service/docdb/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.4.0](service/dynamodb/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: Adds support for endpoint discovery.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.10.0](service/ec2/CHANGELOG.md#v1100-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.7.0](service/elasticache/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk`: [v1.4.0](service/elasticbeanstalk/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing`: [v1.4.0](service/elasticloadbalancing/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.4.0](service/elasticloadbalancingv2/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/eventbridge`: [v1.5.0](service/eventbridge/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/greengrass`: [v1.5.0](service/greengrass/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/greengrassv2`: [v1.4.0](service/greengrassv2/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.6.0](service/iam/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery`: [v1.0.0](service/internal/endpoint-discovery/CHANGELOG.md#v100-2021-06-25)
+ * **Release**: Release new modules
+ * **Feature**: Module supporting endpoint-discovery across all service clients.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.7.0](service/iot/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotanalytics`: [v1.3.0](service/iotanalytics/CHANGELOG.md#v130-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.7.0](service/kendra/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kms`: [v1.4.0](service/kms/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.3.0](service/lexmodelsv2/CHANGELOG.md#v130-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexruntimev2`: [v1.2.0](service/lexruntimev2/CHANGELOG.md#v120-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.5.0](service/licensemanager/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.2.0](service/lookoutmetrics/CHANGELOG.md#v120-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/managedblockchain`: [v1.4.0](service/managedblockchain/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediaconnect`: [v1.6.0](service/mediaconnect/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.7.0](service/medialive/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediatailor`: [v1.4.0](service/mediatailor/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.6.0](service/neptune/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.1.0](service/proton/CHANGELOG.md#v110-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.6.0](service/quicksight/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ram`: [v1.5.0](service/ram/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.5.0](service/rds/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.7.0](service/redshift/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/redshiftdata`: [v1.4.0](service/redshiftdata/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.7.0](service/route53/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.8.0](service/sagemaker/CHANGELOG.md#v180-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemakerfeaturestoreruntime`: [v1.4.0](service/sagemakerfeaturestoreruntime/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.7.0](service/securityhub/CHANGELOG.md#v170-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ses`: [v1.4.0](service/ses/CHANGELOG.md#v140-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/snowball`: [v1.5.0](service/snowball/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.6.0](service/sns/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.5.0](service/sqs/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.5.0](service/sts/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/timestreamquery`: [v1.3.0](service/timestreamquery/CHANGELOG.md#v130-2021-06-25)
+ * **Feature**: Adds support for endpoint discovery.
+* `github.com/aws/aws-sdk-go-v2/service/timestreamwrite`: [v1.3.0](service/timestreamwrite/CHANGELOG.md#v130-2021-06-25)
+ * **Feature**: Adds support for endpoint discovery.
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.5.0](service/transfer/CHANGELOG.md#v150-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/waf`: [v1.3.0](service/waf/CHANGELOG.md#v130-2021-06-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/wafv2`: [v1.6.0](service/wafv2/CHANGELOG.md#v160-2021-06-25)
+ * **Feature**: API client updated
+
+# Release (2021-06-11)
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.7.0](service/autoscaling/CHANGELOG.md#v170-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/cloudtrail`: [v1.3.2](service/cloudtrail/CHANGELOG.md#v132-2021-06-11)
+ * **Documentation**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider`: [v1.3.3](service/cognitoidentityprovider/CHANGELOG.md#v133-2021-06-11)
+ * **Documentation**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.6.0](service/eks/CHANGELOG.md#v160-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.6.0](service/fsx/CHANGELOG.md#v160-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/glue`: [v1.6.0](service/glue/CHANGELOG.md#v160-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.6.0](service/kendra/CHANGELOG.md#v160-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.7.0](service/macie2/CHANGELOG.md#v170-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/medialive`: [v1.6.0](service/medialive/CHANGELOG.md#v160-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/pi`: [v1.4.0](service/pi/CHANGELOG.md#v140-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/proton`: [v1.0.0](service/proton/CHANGELOG.md#v100-2021-06-11)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.3.1](service/qldb/CHANGELOG.md#v131-2021-06-11)
+ * **Documentation**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.4.2](service/rds/CHANGELOG.md#v142-2021-06-11)
+ * **Documentation**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.7.0](service/sagemaker/CHANGELOG.md#v170-2021-06-11)
+ * **Feature**: Updated to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.4.1](service/transfer/CHANGELOG.md#v141-2021-06-11)
+ * **Documentation**: Updated to latest API model.
+
+# Release (2021-06-04)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/acmpca`: [v1.5.0](service/acmpca/CHANGELOG.md#v150-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.6.0](service/autoscaling/CHANGELOG.md#v160-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/braket`: [v1.4.0](service/braket/CHANGELOG.md#v140-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/cloudfront`: [v1.5.2](service/cloudfront/CHANGELOG.md#v152-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/datasync`: [v1.4.0](service/datasync/CHANGELOG.md#v140-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/devicefarm`: [v1.3.0](service/devicefarm/CHANGELOG.md#v130-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.6.0](service/docdb/CHANGELOG.md#v160-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.9.0](service/ec2/CHANGELOG.md#v190-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.5.0](service/ecs/CHANGELOG.md#v150-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.7.0](service/forecast/CHANGELOG.md#v170-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/fsx`: [v1.5.0](service/fsx/CHANGELOG.md#v150-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.5.1](service/iam/CHANGELOG.md#v151-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/internal/s3shared`: [v1.4.0](service/internal/s3shared/CHANGELOG.md#v140-2021-06-04)
+ * **Feature**: The handling of AccessPoint and Outpost ARNs have been updated.
+* `github.com/aws/aws-sdk-go-v2/service/iotevents`: [v1.4.0](service/iotevents/CHANGELOG.md#v140-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ioteventsdata`: [v1.3.0](service/ioteventsdata/CHANGELOG.md#v130-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.6.0](service/iotsitewise/CHANGELOG.md#v160-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.6.0](service/iotwireless/CHANGELOG.md#v160-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/kendra`: [v1.5.0](service/kendra/CHANGELOG.md#v150-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.6.1](service/lightsail/CHANGELOG.md#v161-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/location`: [v1.2.0](service/location/CHANGELOG.md#v120-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/mwaa`: [v1.2.0](service/mwaa/CHANGELOG.md#v120-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/outposts`: [v1.4.0](service/outposts/CHANGELOG.md#v140-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/polly`: [v1.3.0](service/polly/CHANGELOG.md#v130-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/qldb`: [v1.3.0](service/qldb/CHANGELOG.md#v130-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/resourcegroups`: [v1.3.2](service/resourcegroups/CHANGELOG.md#v132-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.6.2](service/route53/CHANGELOG.md#v162-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53resolver`: [v1.4.2](service/route53resolver/CHANGELOG.md#v142-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.10.0](service/s3/CHANGELOG.md#v1100-2021-06-04)
+ * **Feature**: The handling of AccessPoint and Outpost ARNs have been updated.
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.7.0](service/s3control/CHANGELOG.md#v170-2021-06-04)
+ * **Feature**: The handling of AccessPoint and Outpost ARNs have been updated.
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/servicediscovery`: [v1.5.0](service/servicediscovery/CHANGELOG.md#v150-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.5.0](service/sns/CHANGELOG.md#v150-2021-06-04)
+ * **Feature**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.4.2](service/sqs/CHANGELOG.md#v142-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.6.2](service/ssm/CHANGELOG.md#v162-2021-06-04)
+ * **Documentation**: Updated service client to latest API model.
+
+# Release (2021-05-25)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs`: [v1.4.0](service/cloudwatchlogs/CHANGELOG.md#v140-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/commander`: [v1.1.0](service/commander/CHANGELOG.md#v110-2021-05-25)
+ * **Feature**: Deprecated module. The API client was incorrectly named. Use AWS Systems Manager Incident Manager (ssmincidents) instead.
+* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.5.0](service/computeoptimizer/CHANGELOG.md#v150-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/costexplorer`: [v1.6.0](service/costexplorer/CHANGELOG.md#v160-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.8.0](service/ec2/CHANGELOG.md#v180-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/efs`: [v1.4.0](service/efs/CHANGELOG.md#v140-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/forecast`: [v1.6.0](service/forecast/CHANGELOG.md#v160-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.6.0](service/iot/CHANGELOG.md#v160-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/opsworkscm`: [v1.4.0](service/opsworkscm/CHANGELOG.md#v140-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.5.0](service/quicksight/CHANGELOG.md#v150-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.9.0](service/s3/CHANGELOG.md#v190-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/ssmincidents`: [v1.0.0](service/ssmincidents/CHANGELOG.md#v100-2021-05-25)
+ * **Release**: New AWS service client module
+* `github.com/aws/aws-sdk-go-v2/service/transfer`: [v1.4.0](service/transfer/CHANGELOG.md#v140-2021-05-25)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/workspaces`: [v1.4.0](service/workspaces/CHANGELOG.md#v140-2021-05-25)
+ * **Feature**: API client updated
+
+# Release (2021-05-20)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.6.0
+ * **Feature**: `internal/ini`: This package has been migrated to a separate module at `github.com/aws/aws-sdk-go-v2/internal/ini`.
+* `github.com/aws/aws-sdk-go-v2/config`: [v1.3.0](config/CHANGELOG.md#v130-2021-05-20)
+ * **Feature**: SSO credentials can now be defined alongside other credential providers within the same configuration profile.
+ * **Bug Fix**: Profile names were incorrectly normalized to lower-case, which could result in unexpected profile configurations.
+* `github.com/aws/aws-sdk-go-v2/internal/ini`: [v1.0.0](internal/ini/CHANGELOG.md#v100-2021-05-20)
+ * **Release**: The `github.com/aws/aws-sdk-go-v2/internal/ini` package is now a Go Module.
+* `github.com/aws/aws-sdk-go-v2/service/applicationcostprofiler`: [v1.0.0](service/applicationcostprofiler/CHANGELOG.md#v100-2021-05-20)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/apprunner`: [v1.0.0](service/apprunner/CHANGELOG.md#v100-2021-05-20)
+ * **Release**: New AWS service client module
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.5.0](service/autoscaling/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/computeoptimizer`: [v1.4.0](service/computeoptimizer/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/detective`: [v1.6.0](service/detective/CHANGELOG.md#v160-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.5.0](service/eks/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.6.0](service/elasticache/CHANGELOG.md#v160-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/elasticsearchservice`: [v1.4.0](service/elasticsearchservice/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.5.0](service/iam/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/imagebuilder`: [v1.5.0](service/imagebuilder/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.5.0](service/iot/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotdeviceadvisor`: [v1.4.0](service/iotdeviceadvisor/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/iotsitewise`: [v1.5.0](service/iotsitewise/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.4.0](service/kinesis/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesisanalytics`: [v1.3.0](service/kinesisanalytics/CHANGELOG.md#v130-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2`: [v1.4.0](service/kinesisanalyticsv2/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lexmodelsv2`: [v1.2.0](service/lexmodelsv2/CHANGELOG.md#v120-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/licensemanager`: [v1.4.0](service/licensemanager/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/lightsail`: [v1.6.0](service/lightsail/CHANGELOG.md#v160-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/macie`: [v1.4.0](service/macie/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/macie2`: [v1.6.0](service/macie2/CHANGELOG.md#v160-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/mediaconnect`: [v1.5.0](service/mediaconnect/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.5.0](service/neptune/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/personalize`: [v1.5.0](service/personalize/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/quicksight`: [v1.4.0](service/quicksight/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/rekognition`: [v1.5.0](service/rekognition/CHANGELOG.md#v150-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.8.0](service/s3/CHANGELOG.md#v180-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemaker`: [v1.6.0](service/sagemaker/CHANGELOG.md#v160-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/sagemakera2iruntime`: [v1.3.0](service/sagemakera2iruntime/CHANGELOG.md#v130-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/securityhub`: [v1.6.0](service/securityhub/CHANGELOG.md#v160-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/support`: [v1.3.0](service/support/CHANGELOG.md#v130-2021-05-20)
+ * **Feature**: API client updated
+* `github.com/aws/aws-sdk-go-v2/service/transcribe`: [v1.4.0](service/transcribe/CHANGELOG.md#v140-2021-05-20)
+ * **Feature**: API client updated
+
+# Release (2021-05-14)
+
+## General Highlights
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/aws-sdk-go-v2`: v1.5.0
+ * **Feature**: `AddSDKAgentKey` and `AddSDKAgentKeyValue` in `aws/middleware` package have been updated to direct metadata to `User-Agent` HTTP header.
+* `github.com/aws/aws-sdk-go-v2/service/codeartifact`: [v1.3.0](service/codeartifact/CHANGELOG.md#v130-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/commander`: [v1.0.0](service/commander/CHANGELOG.md#v100-2021-05-14)
+ * **Release**: New AWS service client module
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/configservice`: [v1.5.0](service/configservice/CHANGELOG.md#v150-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.4.0](service/connect/CHANGELOG.md#v140-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/ec2`: [v1.7.0](service/ec2/CHANGELOG.md#v170-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/ecs`: [v1.4.0](service/ecs/CHANGELOG.md#v140-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/eks`: [v1.4.0](service/eks/CHANGELOG.md#v140-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/finspace`: [v1.0.0](service/finspace/CHANGELOG.md#v100-2021-05-14)
+ * **Release**: New AWS service client module
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/finspacedata`: [v1.0.0](service/finspacedata/CHANGELOG.md#v100-2021-05-14)
+ * **Release**: New AWS service client module
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/iot`: [v1.4.0](service/iot/CHANGELOG.md#v140-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/iotwireless`: [v1.5.0](service/iotwireless/CHANGELOG.md#v150-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/kinesis`: [v1.3.0](service/kinesis/CHANGELOG.md#v130-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/kinesisanalytics`: [v1.2.0](service/kinesisanalytics/CHANGELOG.md#v120-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2`: [v1.3.0](service/kinesisanalyticsv2/CHANGELOG.md#v130-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.3.0](service/lakeformation/CHANGELOG.md#v130-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/lookoutmetrics`: [v1.1.0](service/lookoutmetrics/CHANGELOG.md#v110-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/mediaconvert`: [v1.5.0](service/mediaconvert/CHANGELOG.md#v150-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/route53`: [v1.6.0](service/route53/CHANGELOG.md#v160-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.7.0](service/s3/CHANGELOG.md#v170-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/s3control`: [v1.6.0](service/s3control/CHANGELOG.md#v160-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssm`: [v1.6.0](service/ssm/CHANGELOG.md#v160-2021-05-14)
+ * **Feature**: Updated to latest service API model.
+* `github.com/aws/aws-sdk-go-v2/service/ssmcontacts`: [v1.0.0](service/ssmcontacts/CHANGELOG.md#v100-2021-05-14)
+ * **Release**: New AWS service client module
+ * **Feature**: Updated to latest service API model.
+
+# Release 2021-05-06
+
+## Breaking change
+* `service/ec2` - v1.6.0
+ * This release contains a breaking change to the Amazon EC2 API client. API number(int/int64/etc) and boolean members were changed from value, to pointer type. Your applications using the EC2 API client will fail to compile after upgrading for all members that were updated. To migrate to this module you'll need to update your application to use pointers for all number and boolean members in the API client module. The SDK provides helper utilities to convert between value and pointer types. For example the [aws.Bool](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Bool) function to get the address from a bool literal. Similar utilities are available for all other primitive types in the [aws](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws) package.
+
+## Service Client Highlights
+* `service/acmpca` - v1.3.0
+ * Feature: API client updated
+* `service/apigateway` - v1.3.0
+ * Feature: API client updated
+* `service/auditmanager` - v1.4.0
+ * Feature: API client updated
+* `service/chime` - v1.3.0
+ * Feature: API client updated
+* `service/cloudformation` - v1.4.0
+ * Feature: API client updated
+* `service/cloudfront` - v1.4.0
+ * Feature: API client updated
+* `service/codegurureviewer` - v1.3.0
+ * Feature: API client updated
+* `service/connect` - v1.3.0
+ * Feature: API client updated
+* `service/customerprofiles` - v1.5.0
+ * Feature: API client updated
+* `service/devopsguru` - v1.3.0
+ * Feature: API client updated
+* `service/docdb` - v1.4.0
+ * Feature: API client updated
+* `service/ec2` - v1.6.0
+ * Bug Fix: Fix incorrectly modeled Amazon EC2 number and boolean members in structures. The Amazon EC2 API client has been updated with a breaking change to fix all structure number and boolean members to be pointer types instead of value types. Fixes [#1107](https://github.com/aws/aws-sdk-go-v2/issues/1107), [#1178](https://github.com/aws/aws-sdk-go-v2/issues/1178), and [#1190](https://github.com/aws/aws-sdk-go-v2/issues/1190). This breaking change is made within the major version of the client' module, because the client operations failed and were unusable with value type number and boolean members with the EC2 API.
+ * Feature: API client updated
+* `service/ecs` - v1.3.0
+ * Feature: API client updated
+* `service/eks` - v1.3.0
+ * Feature: API client updated
+* `service/forecast` - v1.4.0
+ * Feature: API client updated
+* `service/glue` - v1.4.0
+ * Feature: API client updated
+* `service/health` - v1.3.0
+ * Feature: API client updated
+* `service/iotsitewise` - v1.3.0
+ * Feature: API client updated
+* `service/iotwireless` - v1.4.0
+ * Feature: API client updated
+* `service/kafka` - v1.3.0
+ * Feature: API client updated
+* `service/kinesisanalyticsv2` - v1.2.0
+ * Feature: API client updated
+* `service/macie2` - v1.4.0
+ * Feature: API client updated
+* `service/marketplacecatalog` - v1.2.0
+ * Feature: API client updated
+* `service/mediaconvert` - v1.4.0
+ * Feature: API client updated
+* `service/mediapackage` - v1.4.0
+ * Feature: API client updated
+* `service/mediapackagevod` - v1.3.0
+ * Feature: API client updated
+* `service/mturk` - v1.2.0
+ * Feature: API client updated
+* `service/nimble` - v1.0.0
+ * Feature: API client updated
+* `service/organizations` - v1.3.0
+ * Feature: API client updated
+* `service/personalize` - v1.3.0
+ * Feature: API client updated
+* `service/robomaker` - v1.4.0
+ * Feature: API client updated
+* `service/route53` - v1.5.0
+ * Feature: API client updated
+* `service/s3` - v1.6.0
+ * Bug Fix: Fix PutObject and UploadPart unseekable stream documentation link to point to the correct location.
+ * Feature: API client updated
+* `service/sagemaker` - v1.4.0
+ * Feature: API client updated
+* `service/securityhub` - v1.4.0
+ * Feature: API client updated
+* `service/servicediscovery` - v1.3.0
+ * Feature: API client updated
+* `service/snowball` - v1.3.0
+ * Feature: API client updated
+* `service/sns` - v1.3.0
+ * Feature: API client updated
+* `service/ssm` - v1.5.0
+ * Feature: API client updated
+## Core SDK Highlights
+* Dependency Update: Update smithy-go dependency to v1.4.0
+* Dependency Update: Updated SDK dependencies to their latest versions.
+* `aws` - v1.4.0
+ * Feature: Add support for FIPS global partition endpoints ([#1242](https://github.com/aws/aws-sdk-go-v2/pull/1242))
+
+# Release 2021-04-23
+## Service Client Highlights
+* `service/cloudformation` - v1.3.2
+ * Documentation: Service Documentation Updates
+* `service/cognitoidentityprovider` - v1.2.3
+ * Documentation: Service Documentation Updates
+* `service/costexplorer` - v1.4.0
+ * Feature: Service API Updates
+* `service/databasemigrationservice` - v1.3.0
+ * Feature: Service API Updates
+* `service/detective` - v1.4.0
+ * Feature: Service API Updates
+* `service/elasticache` - v1.4.0
+ * Feature: Service API Updates
+* `service/forecast` - v1.3.0
+ * Feature: Service API Updates
+* `service/groundstation` - v1.3.0
+ * Feature: Service API Updates
+* `service/kendra` - v1.3.0
+ * Feature: Service API Updates
+* `service/redshift` - v1.5.0
+ * Feature: Service API Updates
+* `service/savingsplans` - v1.2.0
+ * Feature: Service API Updates
+* `service/securityhub` - v1.3.0
+ * Feature: Service API Updates
+## Core SDK Highlights
+* Dependency Update: Updated SDK dependencies to their latest versions.
+* `feature/rds/auth` - v1.0.0
+ * Feature: Add Support for Amazon RDS IAM Authentication
+
+# Release 2021-04-14
+## Service Client Highlights
+* `service/codebuild` - v1.3.0
+ * Feature: API client updated
+* `service/codestarconnections` - v1.2.0
+ * Feature: API client updated
+* `service/comprehendmedical` - v1.2.0
+ * Feature: API client updated
+* `service/configservice` - v1.4.0
+ * Feature: API client updated
+* `service/ec2` - v1.5.0
+ * Feature: API client updated
+* `service/fsx` - v1.3.0
+ * Feature: API client updated
+* `service/lightsail` - v1.4.0
+ * Feature: API client updated
+* `service/mediaconnect` - v1.3.0
+ * Feature: API client updated
+* `service/rds` - v1.3.0
+ * Feature: API client updated
+* `service/redshift` - v1.4.0
+ * Feature: API client updated
+* `service/shield` - v1.3.0
+ * Feature: API client updated
+* `service/sts` - v1.3.0
+ * Feature: API client updated
+## Core SDK Highlights
+* Dependency Update: Updated SDK dependencies to their latest versions.
+
+# Release 2021-04-08
+## Service Client Highlights
+* Feature: API model sync
+* `service/lookoutequipment` - v1.0.0
+ * v1 Release: new service client
+* `service/mgn` - v1.0.0
+ * v1 Release: new service client
+## Core SDK Highlights
+* Dependency Update: smithy-go version bump
+* Dependency Update: Updated SDK dependencies to their latest versions.
+
+# Release 2021-04-01
+## Service Client Highlights
+* Bug Fix: Fix URL Path and RawQuery of resolved endpoint being ignored by the API client's request serialization.
+ * Fixes [issue#1191](https://github.com/aws/aws-sdk-go-v2/issues/1191)
+* Refactored internal endpoints model for accessors
+* Feature: updated to latest models
+* New services
+ * `service/location` - v1.0.0
+ * `service/lookoutmetrics` - v1.0.0
+## Core SDK Highlights
+* Dependency Update: update smithy-go module
+* Dependency Update: Updated SDK dependencies to their latest versions.
+
+# Release 2021-03-18
+## Service Client Highlights
+* Bug Fix: Updated presign URLs to no longer include the X-Amz-User-Agent header
+* Feature: Update API model
+* Add New supported API
+* `service/internal/s3shared` - v1.2.0
+ * Feature: Support for S3 Object Lambda
+* `service/s3` - v1.3.0
+ * Bug Fix: Adds documentation to the PutObject and UploadPart operations Body member how to upload unseekable objects to an Amazon S3 Bucket.
+ * Feature: S3 Object Lambda is a new S3 feature that enables users to apply their own custom code to process the output of a standard S3 GET request by automatically invoking a Lambda function with a GET request
+* `service/s3control` - v1.3.0
+ * Feature: S3 Object Lambda is a new S3 feature that enables users to apply their own custom code to process the output of a standard S3 GET request by automatically invoking a Lambda function with a GET request
+## Core SDK Highlights
+* Dependency Update: Updated SDK dependencies to their latest versions.
+* `aws` - v1.3.0
+ * Feature: Add helper to V4 signer package to swap compute payload hash middleware with unsigned payload middleware
+* `feature/s3/manager` - v1.1.0
+ * Bug Fix: Add support for Amazon S3 Object Lambda feature.
+ * Feature: Updates for S3 Object Lambda feature
+
+# Release 2021-03-12
+## Service Client Highlights
+* Bug Fix: Fixed a bug that could union shape types to be deserialized incorrectly
+* Bug Fix: Fixed a bug where unboxed shapes that were marked as required were not serialized and sent over the wire, causing an API error from the service.
+* Bug Fix: Fixed a bug with generated API Paginators' handling of nil input parameters causing a panic.
+* Dependency Update: update smithy-go dependency
+* `service/detective` - v1.1.2
+ * Bug Fix: Fix deserialization of API response timestamp member.
+* `service/docdb` - v1.2.0
+ * Feature: Client now support presigned URL generation for CopyDBClusterSnapshot and CreateDBCluster operations by specifying the target SourceRegion
+* `service/neptune` - v1.2.0
+ * Feature: Client now support presigned URL generation for CopyDBClusterSnapshot and CreateDBCluster operations by specifying the target SourceRegion
+* `service/s3` - v1.2.1
+ * Bug Fix: Fixed an issue where ListObjectsV2 and ListParts paginators could loop infinitely
+ * Bug Fix: Fixed key encoding when addressing S3 Access Points
+## Core SDK Highlights
+* Dependency Update: Updated SDK dependencies to their latest versions.
+* `config` - v1.1.2
+ * Bug Fix: Fixed a panic when using WithEC2IMDSRegion without a specified IMDS client
+
+# Release 2021-02-09
+## Service Client Highlights
+* `service/s3` - v1.2.0
+ * Feature: adds support for s3 vpc endpoint interface [#1113](https://github.com/aws/aws-sdk-go-v2/pull/1113)
+* `service/s3control` - v1.2.0
+ * Feature: adds support for s3 vpc endpoint interface [#1113](https://github.com/aws/aws-sdk-go-v2/pull/1113)
+## Core SDK Highlights
+* Dependency Update: Updated SDK dependencies to their latest versions.
+* `aws` - v1.2.0
+ * Feature: support to add endpoint source on context. Adds getter/setter for the endpoint source [#1113](https://github.com/aws/aws-sdk-go-v2/pull/1113)
+* `config` - v1.1.1
+ * Bug Fix: Only Validate SSO profile configuration when attempting to use SSO credentials [#1103](https://github.com/aws/aws-sdk-go-v2/pull/1103)
+ * Bug Fix: Environment credentials were not taking precedence over AWS_PROFILE [#1103](https://github.com/aws/aws-sdk-go-v2/pull/1103)
+
+# Release 2021-01-29
+## Service Client Highlights
+* Bug Fix: A serialization bug has been fixed that caused some service operations with empty inputs to not be serialized correctly ([#1071](https://github.com/aws/aws-sdk-go-v2/pull/1071))
+* Bug Fix: Fixes a bug that could cause a waiter to fail when comparing types ([#1083](https://github.com/aws/aws-sdk-go-v2/pull/1083))
+## Core SDK Highlights
+* Feature: EndpointResolverFromURL helpers have been added for constructing a service EndpointResolver type ([#1066](https://github.com/aws/aws-sdk-go-v2/pull/1066))
+* Dependency Update: Updated SDK dependencies to their latest versions.
+* `aws` - v1.1.0
+ * Feature: Add support for specifying the EndpointSource on aws.Endpoint types ([#1070](https://github.com/aws/aws-sdk-go-v2/pull/1070/))
+* `config` - v1.1.0
+ * Feature: Add Support for AWS Single Sign-On (SSO) credential provider ([#1072](https://github.com/aws/aws-sdk-go-v2/pull/1072))
+* `credentials` - v1.1.0
+ * Feature: Add AWS Single Sign-On (SSO) credential provider ([#1072](https://github.com/aws/aws-sdk-go-v2/pull/1072))
+
+# Release 2021-01-19
+
+We are excited to announce the [General Availability](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-version-2-general-availability/)
+(GA) release of the [AWS SDK for Go version 2 (v2)](https://github.com/aws/aws-sdk-go-v2).
+This release follows the [Release candidate](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-version-2-v2-release-candidate)
+of the AWS SDK for Go v2. Version 2 incorporates customer feedback from version 1 and takes advantage of modern Go language features.
+
+## Breaking Changes
+* `aws`: Updated Config.Retryer member to be a func that returns aws.Retryer ([#1033](https://github.com/aws/aws-sdk-go-v2/pull/1033))
+ * Updates the SDK's references to Config.Retryer to be a function that returns aws.Retryer value. This ensures that custom retry options specified in the `aws.Config` are scoped to individual client instances.
+ * All API clients created with the config will call the `Config.Retryer` function to get an aws.Retryer.
+ * Removes duplicate `Retryer` interface from `retry` package. Single definition is `aws.Retryer` now.
+* `aws/middleware`: Updates `AddAttemptClockSkewMiddleware` to use appropriate `AddRecordResponseTiming` naming ([#1031](https://github.com/aws/aws-sdk-go-v2/pull/1031))
+ * Removes `ResponseMetadata` struct type, and adds its members to middleware metadata directly, to improve discoverability.
+* `config`: Updated the `WithRetryer` helper to take a function that returns an aws.Retryer ([#1033](https://github.com/aws/aws-sdk-go-v2/pull/1033))
+ * All API clients created with the config will call the `Config.Retryer` function to get an aws.Retryer.
+* `API Clients`: Fix SDK's API client enum constant name generation to have expected casing ([#1020](https://github.com/aws/aws-sdk-go-v2/pull/1020))
+ * This updates of the generated enum const value names in API client's `types` package to have the expected casing. Prior to this, enum names were being generated with lowercase names instead of camel case.
+* `API Clients`: Updates SDK's API client request middleware stack values to be scoped to individual operation call ([#1019](https://github.com/aws/aws-sdk-go-v2/pull/1019))
+ * The API client request middleware stack values were mistakenly allowed to escape to nested API operation calls. This broke the SDK's presigners.
+ * Stack values that should not escape are not scoped to the individual operation call.
+* `Multiple API Clients`: Unexported the API client's `WithEndpointResolver` this type wasn't intended to be exported ([#1051](https://github.com/aws/aws-sdk-go-v2/pull/1051))
+ * Using the `aws.Config.EndpointResolver` member for setting custom endpoint resolver instead.
+
+## New Features
+* `service/sts`: Add support for presigning GetCallerIdentity operation ([#1030](https://github.com/aws/aws-sdk-go-v2/pull/1030))
+ * Adds a PresignClient to the `sts` API client module. Use PresignGetCallerIdentity to obtain presigned URLs for the create presigned URLs for the GetCallerIdentity operation.
+ * Fixes [#1021](https://github.com/aws/aws-sdk-go-v2/issues/1021)
+* `aws/retry`: Add package documentation for retry package ([#1033](https://github.com/aws/aws-sdk-go-v2/pull/1033))
+ * Adds documentation for the retry package
+
+## Bug Fixes
+* `Multiple API Clients`: Fix SDK's generated serde for unmodeled operation input/output ([#1050](https://github.com/aws/aws-sdk-go-v2/pull/1050))
+ * Fixes [#1047](https://github.com/aws/aws-sdk-go-v2/issues/1047) by fixing the how the SDKs generated serialization and deserialization of API operations that did not have modeled input or output types. This caused the SDK to incorrectly attempt to deserialize response documents that were either empty, or contained unexpected data.
+* `service/s3`: Fix Tagging parameter not serialized correctly for presigned PutObject requests ([#1017](https://github.com/aws/aws-sdk-go-v2/pull/1017))
+ * Fixes the Tagging parameter incorrectly being serialized to the URL's query string instead of being signed as a HTTP request header.
+ * When using PresignPutObject make sure to add all signed headers returned by the method to your down stream's HTTP client's request. These headers must be included in the request, or the request will fail with signature errors.
+ * Fixes [#1016](https://github.com/aws/aws-sdk-go-v2/issues/1016)
+* `service/s3`: Fix Unmarshaling `GetObjectAcl` operation's Grantee type response ([#1034](https://github.com/aws/aws-sdk-go-v2/pull/1034))
+ * Updates the SDK's codegen for correctly deserializing XML attributes in tags with XML namespaces.
+ * Fixes [#1013](https://github.com/aws/aws-sdk-go-v2/issues/1013)
+* `service/s3`: Fix Unmarshaling `GetBucketLocation` operation's response ([#1027](https://github.com/aws/aws-sdk-go-v2/pull/1027))
+ * Fixes [#908](https://github.com/aws/aws-sdk-go-v2/issues/908)
+
+## Migrating from v2 preview SDK's v0.31.0 to v1.0.0
+
+### aws.Config Retryer member
+
+If your application sets the `Config.Retryer` member the application will need
+to be updated to set a function that returns an `aws.Retryer`. In addition, if
+your application used the `config.WithRetryer` helper a function that returns
+an `aws.Retryer` needs to be used.
+
+If your application used the `retry.Retryer` type, update to using the
+`aws.Retryer` type instead.
+
+### API Client enum value names
+
+If your application used the enum values in the API Client's `types` package between v0.31.0 and the latest version of the client module you may need to update the naming of the enum value. The enum value name casing were updated to camel case instead lowercased.
+
+# Release 2020-12-23
+
+We’re happy to announce the Release Candidate (RC) of the AWS SDK for Go v2.
+This RC follows the developer preview release of the AWS SDK for Go v2. The SDK
+has undergone a major rewrite from the v1 code base to incorporate your
+feedback and to take advantage of modern Go language features.
+
+## Documentation
+* Developer Guide: https://aws.github.io/aws-sdk-go-v2/docs/
+* API Reference docs: https://pkg.go.dev/github.com/aws/aws-sdk-go-v2
+* Migration Guide: https://aws.github.io/aws-sdk-go-v2/docs/migrating/
+
+## Breaking Changes
+* Dependency `github.com/awslabs/smithy-go` has been relocated to `github.com/aws/smithy-go`
+ * The `smithy-go` repository was moved from the `awslabs` GitHub organization to `aws`.
+ * `xml`, `httpbinding`, and `json` package relocated under `encoding` package.
+* The module `ec2imds` moved to `feature/ec2/imds` path ([#984](https://github.com/aws/aws-sdk-go-v2/pull/984))
+ * Moves the `ec2imds` feature module to be in common location as other SDK features.
+* `aws/signer/v4`: Refactor AWS Sigv4 Signer and options types to allow function options ([#955](https://github.com/aws/aws-sdk-go-v2/pull/955))
+ * Fixes [#917](https://github.com/aws/aws-sdk-go-v2/issues/917), [#960](https://github.com/aws/aws-sdk-go-v2/issues/960), [#958](https://github.com/aws/aws-sdk-go-v2/issues/958)
+* `aws`: CredentialCache type updated to require constructor function ([#946](https://github.com/aws/aws-sdk-go-v2/pull/946))
+ * Fixes [#940](https://github.com/aws/aws-sdk-go-v2/issues/940)
+* `credentials`: ExpiryWindow and Jitter moved from credential provider to `CredentialCache` ([#946](https://github.com/aws/aws-sdk-go-v2/pull/946))
+ * Moves ExpiryWindow and Jitter options to common option of the `CredentialCache` instead of duplicated across providers.
+ * Fixes [#940](https://github.com/aws/aws-sdk-go-v2/issues/940)
+* `config`: Ensure shared credentials file has precedence over shared config file ([#990](https://github.com/aws/aws-sdk-go-v2/pull/990))
+ * The shared config file was incorrectly overriding the shared credentials file when merging values.
+* `config`: Add `context.Context` to `LoadDefaultConfig` ([#951](https://github.com/aws/aws-sdk-go-v2/pull/951))
+ * Updates `config#LoadDefaultConfig` function to take `context.Context` as well as functional options for the `config#LoadOptions` type.
+ * Fixes [#926](https://github.com/aws/aws-sdk-go-v2/issues/926), [#819](https://github.com/aws/aws-sdk-go-v2/issues/819)
+* `aws`: Rename `NoOpRetryer` to `NopRetryer` to have consistent naming with rest of SDK ([#987](https://github.com/aws/aws-sdk-go-v2/pull/987))
+ * Fixes [#878](https://github.com/aws/aws-sdk-go-v2/issues/878)
+* `service/s3control`: Change `S3InitiateRestoreObjectOperation.ExpirationInDays` from value to pointer type ([#988](https://github.com/aws/aws-sdk-go-v2/pull/988))
+* `aws`: `ReaderSeekerCloser` and `WriteAtBuffer` have been relocated to `feature/s3/manager`.
+
+## New Features
+* *Waiters*: Add Waiter utilities for API clients ([aws/smithy-go#237](https://github.com/aws/smithy-go/pull/237))
+ * Your application can now use Waiter utilities to wait for AWS resources.
+* `feature/dynamodb/attributevalue`: Add Amazon DynamoDB Attribute value marshaler utility ([#948](https://github.com/aws/aws-sdk-go-v2/pull/948))
+ * Adds a utility for marshaling Go types too and from Amazon DynamoDB AttributeValues.
+ * Also includes utility for converting from Amazon DynamoDB Streams AttributeValues to Amazon DynamoDB AttributeValues.
+* `feature/dynamodbstreams/attributevalue`: Add Amazon DynamoDB Streams Attribute value marshaler utility ([#948](https://github.com/aws/aws-sdk-go-v2/pull/948))
+ * Adds a utility for marshaling Go types too and from Amazon DynamoDB Streams AttributeValues.
+ * Also includes utility for converting from Amazon DynamoDB AttributeValues to Amazon DynamoDB Streams AttributeValues.
+* `feature/dynamodb/expression`: Add Amazon DynamoDB expression utility ([#981](https://github.com/aws/aws-sdk-go-v2/pull/981))
+ * Adds the expression utility to the SDK for easily building Amazon DynamoDB operation expressions in code.
+
+## Bug Fixes
+* `service/s3`: Fix Presigner to configure client correctly for Amazon S3 ([#969](https://github.com/aws/aws-sdk-go-v2/pull/969))
+* service/s3: Fix deserialization of CompleteMultipartUpload ([#965](https://github.com/aws/aws-sdk-go-v2/pull/965)
+ * Fixes [#927](https://github.com/aws/aws-sdk-go-v2/issues/927)
+* `codegen`: Fix API client union serialization ([#979](https://github.com/aws/aws-sdk-go-v2/pull/979))
+ * Fixes [#978](https://github.com/aws/aws-sdk-go-v2/issues/978)
+
+## Service Client Highlights
+* API Clients have been bumped to version `v0.31.0`
+* Regenerate API Clients from updated API models adding waiter utilities, and union parameters.
+* `codegen`:
+ * Add documentation to union API parameters describing valid member types, and usage example ([aws/smithy-go#239](https://github.com/aws/smithy-go/pull/239))
+ * Normalize Metadata header map keys to be lower case ([aws/smithy-go#241](https://github.com/aws/smithy-go/pull/241)), ([#982](https://github.com/aws/aws-sdk-go-v2/pull/982))
+ * Fixes [#376](https://github.com/aws/aws-sdk-go-v2/issues/376) Amazon S3 Metadata parameters keys are always returned as lower case.
+ * Fix API client deserialization of XML based responses ([aws/smithy-go#245](https://github.com/aws/smithy-go/pull/245)), ([#992](https://github.com/aws/aws-sdk-go-v2/pull/992))
+ * Fixes [#910](https://github.com/aws/aws-sdk-go-v2/issues/910)
+* `service/s3`, `service/s3control`:
+ * Add support for reading `s3_use_arn_region` from shared config file ([#991](https://github.com/aws/aws-sdk-go-v2/pull/991))
+ * Add Utility for getting RequestID and HostID of response ([#983](https://github.com/aws/aws-sdk-go-v2/pull/983))
+
+
+## Other changes
+* Updates branch `HEAD` points from `master` to `main`.
+ * This should not impact your application, but if you have pull requests or forks of the SDK you may need to update the upstream branch your fork is based off of.
+
+## Migrating from v2 preview SDK's v0.30.0 to v0.31.0 release candidate
+
+### smithy-go module relocation
+
+If your application uses `smithy-go` utilities for request pipeline your application will need to be updated to refer to the new import path of `github.com/aws/smithy-go`. If you application did *not* use `smithy-go` utilities directly, your application will update automatically.
+
+### EC2 IMDS module relocation
+
+If your application used the `ec2imds` module, it has been relocated to `feature/ec2/imds`. Your application will need to update to the new import path, `github.com/aws/aws-sdk-go-v2/feature/ec2/imds`.
+
+### CredentialsCache Constructor and ExpiryWindow Options
+
+The `aws#CredentialsCache` type was updated, and a new constructor function, `NewCredentialsCache` was added. This function needs to be used to initialize the `CredentialCache`. The constructor also has function options to specify additional configuration, e.g. ExpiryWindow and Jitter.
+
+If your application was specifying the `ExpiryWindow` with the `credentials/stscreds#AssumeRoleOptions`, `credentials/stscreds#WebIdentityRoleOptions`, `credentials/processcreds#Options`, or `credentials/ec2rolecrds#Options` types the `ExpiryWindow` option will need to specified on the `CredentialsCache` constructor instead.
+
+### AWS Sigv4 Signer Refactor
+
+The `aws/signer/v4` package's `Signer.SignHTTP` and `Signer.PresignHTTP` methods were updated to take functional options. If your application provided a custom implementation for API client's `HTTPSignerV4` or `HTTPPresignerV4` interfaces, that implementation will need to be updated for the new function signature.
+
+### Configuration Loading
+
+The `config#LoadDefaultConfig` function has been updated to require a `context.Context` as the first parameter, with additional optional function options as variadic additional arguments. Your application will need to update its usage of `LoadDefaultConfig` to pass in `context.Context` as the first parameter. If your application used the `With...` helpers those should continue to work without issue.
+
+The v2 SDK corrects its behavior to be inline with the AWS CLI and other AWS SDKs. Refer to https://docs.aws.amazon.com/credref/latest/refdocs/overview.html for more information how to use the shared config and credentials files.
+
+
+# Release 2020-11-30
+
+## Breaking Change
+* `codegen`: Add support for slice and maps generated with value members instead of pointer ([#887](https://github.com/aws/aws-sdk-go-v2/pull/887))
+ * This update allow the SDK's code generation to be aware of API shapes and members that are not nullable, and can be rendered as value types by the code generation instead of pointer types.
+ * Several API client parameter types will change from pointer members to value members for slice, map, number and bool member types.
+ * See Migration notes for migrating to v0.30.0 with this change.
+* `aws/transport/http`: Move aws.BuildableHTTPClient to HTTP transport package ([#898](https://github.com/aws/aws-sdk-go-v2/pull/898))
+ * Moves the `BuildableHTTPClient` from the SDK's `aws` package to the `aws/transport/http` package as `BuildableClient` to with other HTTP specific utilities.
+* `feature/cloudfront/sign`: Add CloudFront sign feature as module ([#884](https://github.com/aws/aws-sdk-go-v2/pull/884))
+ * Moves `service/cloudfront/sign` package out of the `cloudfront` module, and into its own module as `github.com/aws/aws-sdk-go-v2/feature/cloudfront/sign`.
+
+## New Features
+* `config`: Add a WithRetryer provider helper to the config loader ([#897](https://github.com/aws/aws-sdk-go-v2/pull/897))
+ * Adds a `WithRetryer` configuration provider to the config loader as a convenience helper to set the `Retryer` on the `aws.Config` when its being loaded.
+* `config`: Default to TLS 1.2 for HTTPS requests ([#892](https://github.com/aws/aws-sdk-go-v2/pull/892))
+ * Updates the SDK's default HTTP client to use TLS 1.2 as the minimum TLS version for all HTTPS requests by default.
+
+## Bug Fixes
+* `config`: Fix AWS_CA_BUNDLE usage while loading default config ([#912](https://github.com/aws/aws-sdk-go-v2/pull/))
+ * Fixes the `LoadDefaultConfig`'s configuration provider order to correctly load a custom HTTP client prior to configuring the client for `AWS_CA_BUNDLE` environment variable.
+* `service/s3`: Fix signature mismatch error for s3 ([#913](https://github.com/aws/aws-sdk-go-v2/pull/913))
+ * Fixes ([#883](https://github.com/aws/aws-sdk-go-v2/issues/883))
+* `service/s3control`:
+ * Fix HostPrefix addition behavior for s3control ([#882](https://github.com/aws/aws-sdk-go-v2/pull/882))
+ * Fixes ([#863](https://github.com/aws/aws-sdk-go-v2/issues/863))
+ * Fix s3control error deserializer ([#875](https://github.com/aws/aws-sdk-go-v2/pull/875))
+ * Fixes ([#864](https://github.com/aws/aws-sdk-go-v2/issues/864))
+
+## Service Client Highlights
+* Pagination support has been added to supported APIs. See [Using Operation Paginators](https://aws.github.io/aws-sdk-go-v2/docs/making-requests/#using-operation-paginators) in the Developer Guide. ([#885](https://github.com/aws/aws-sdk-go-v2/pull/885))
+* Logging support has been added to service clients. See [Logging](https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/logging/) in the Developer Guide. ([#872](https://github.com/aws/aws-sdk-go-v2/pull/872))
+* `service`: Add support for pre-signed URL clients for S3, RDS, EC2 service ([#888](https://github.com/aws/aws-sdk-go-v2/pull/888))
+ * `service/s3`: operations `PutObject` and `GetObject` are now supported with s3 pre-signed url client.
+ * `service/ec2`: operation `CopySnapshot` is now supported with ec2 pre-signed url client.
+ * `service/rds`: operations `CopyDBSnapshot`, `CreateDBInstanceReadReplica`, `CopyDBClusterSnapshot`, `CreateDBCluster` are now supported with rds pre-signed url client.
+* `service/s3`: Add support for S3 access point and S3 on outposts access point ARNs ([#870](https://github.com/aws/aws-sdk-go-v2/pull/870))
+* `service/s3control`: Adds support for S3 on outposts access point and S3 on outposts bucket ARNs ([#870](https://github.com/aws/aws-sdk-go-v2/pull/870))
+
+## Migrating from v2 preview SDK's v0.29.0 to v0.30.0
+
+### aws.BuildableHTTPClient move
+The `aws`'s `BuildableHTTPClient` HTTP client implementation was moved to `aws/transport/http` as `BuildableClient`. If your application used the `aws.BuildableHTTPClient` type, update it to use the `BuildableClient` in the `aws/transport/http` package.
+
+### Slice and Map API member types
+This release includes several code generation updates for API client's slice map members. Using API modeling metadata the Slice and map members are now generated as value types instead of pointer types. For your application this means that for these types, the SDK no longer will have pointer member types, and have value member types.
+
+To migrate to this change you'll need to remove the pointer handling for slice and map members, and instead use value type handling of the member values.
+
+### Boolean and Number API member types
+Similar to the slice and map API member types being generated as value, the SDK's code generation now has metadata where the SDK can generate boolean and number members as value type instead of pointer types.
+
+To migrate to this change you'll need to remove the pointer handling for numbers and boolean member types, and instead use value handling.
+
+# Release 2020-10-30
+
+## New Features
+* Adds HostnameImmutable flag on aws.Endpoint to direct SDK if the associated endpoint is modifiable.([#848](https://github.com/aws/aws-sdk-go-v2/pull/848))
+
+## Bug Fixes
+* Fix SDK handling of xml based services - xml namespaces ([#858](https://github.com/aws/aws-sdk-go-v2/pull/858))
+ * Fixes ([#850](https://github.com/aws/aws-sdk-go-v2/issues/850))
+
+## Service Client Highlights
+* API Clients have been bumped to version `v0.29.0`
+ * Regenerate API Clients from update API models.
+* Improve client doc generation.
+
+## Core SDK Highlights
+* Dependency Update: Updated SDK dependencies to their latest versions.
+
+## Migrating from v2 preview SDK's v0.28.0 to v0.29.0
+* API Clients ResolverOptions type renamed to EndpointResolverOptions
+
+# Release 2020-10-26
+
+## New Features
+* `service/s3`: Add support for Accelerate, and Dualstack ([#836](https://github.com/aws/aws-sdk-go-v2/pull/836))
+* `service/s3control`: Add support for Dualstack ([#836](https://github.com/aws/aws-sdk-go-v2/pull/836))
+
+## Service Client Highlights
+* API Clients have been bumped to version `v0.28.0`
+ * Regenerate API Clients from update API models.
+* `service/s3`: Add support for Accelerate, and Dualstack ([#836](https://github.com/aws/aws-sdk-go-v2/pull/836))
+* `service/s3control`: Add support for Dualstack ([#836](https://github.com/aws/aws-sdk-go-v2/pull/836))
+* `service/route53`: Fix sanitizeURL customization to handle leading slash(`/`) [#846](https://github.com/aws/aws-sdk-go-v2/pull/846)
+ * Fixes [#843](https://github.com/aws/aws-sdk-go-v2/issues/843)
+* `service/route53`: Fix codegen to correctly look for operations that need sanitize url ([#851](https://github.com/aws/aws-sdk-go-v2/pull/851))
+
+## Core SDK Highlights
+* `aws/protocol/restjson`: Fix unexpected JSON error response deserialization ([#837](https://github.com/aws/aws-sdk-go-v2/pull/837))
+ * Fixes [#832](https://github.com/aws/aws-sdk-go-v2/issues/832)
+* `example/service/s3/listobjects`: Add example for Amazon S3 ListObjectsV2 ([#838](https://github.com/aws/aws-sdk-go-v2/pull/838))
+
+# Release 2020-10-16
+
+## New Features
+* `feature/s3/manager`:
+ * Initial `v0.1.0` release
+ * Add the Amazon S3 Upload and Download transfer manager ([#802](https://github.com/aws/aws-sdk-go-v2/pull/802))
+
+## Service Client Highlights
+* Clients have been bumped to version `v0.27.0`
+* `service/machinelearning`: Add customization for setting client endpoint with PredictEndpoint value if set ([#782](https://github.com/aws/aws-sdk-go-v2/pull/782))
+* `service/s3`: Fix empty response body deserialization in case of error response ([#801](https://github.com/aws/aws-sdk-go-v2/pull/801))
+ * Fixes xml deserialization util to correctly handle empty response body in case of an error response.
+* `service/s3`: Add customization to auto fill Content-Md5 request header for Amazon S3 operations ([#812](https://github.com/aws/aws-sdk-go-v2/pull/812))
+* `service/s3`: Add fallback to using HTTP status code for error code ([#818](https://github.com/aws/aws-sdk-go-v2/pull/818))
+ * Adds falling back to using the HTTP status code to create a API Error code when not error code is received from the service, such as HeadObject.
+* `service/route53`: Add support for deserialzing `InvalidChangeBatch` API error ([#792](https://github.com/aws/aws-sdk-go-v2/pull/792))
+* `codegen`: Remove API client `Options` getter methods ([#788](https://github.com/aws/aws-sdk-go-v2/pull/788))
+* `codegen`: Regenerate API Client modeled endpoints ([#791](https://github.com/aws/aws-sdk-go-v2/pull/791))
+* `codegen`: Sort API Client struct member paramaters by required and alphabetical ([#787](https://github.com/aws/aws-sdk-go-v2/pull/787))
+* `codegen`: Add package docs to API client modules ([#821](https://github.com/aws/aws-sdk-go-v2/pull/821))
+* `codegen`: Rename `smithy-go`'s `smithy.OperationError` to `smithy.OperationInvokeError`.
+
+## Core SDK Highlights
+* `config`:
+ * Bumped to `v0.2.0`
+ * Refactor Config Module, Add Config Package Documentation and Examples, Improve Overall SDK Readme ([#822](https://github.com/aws/aws-sdk-go-v2/pull/822))
+* `credentials`:
+ * Bumped to `v0.1.2`
+ * Strip Monotonic Clock Readings when Comparing Credential Expiry Time ([#789](https://github.com/aws/aws-sdk-go-v2/pull/789))
+* `ec2imds`:
+ * Bumped to `v0.1.2`
+ * Fix refreshing API token if expired ([#789](https://github.com/aws/aws-sdk-go-v2/pull/789))
+
+## Migrating from v0.26.0 to v0.27.0
+
+#### Configuration
+
+The `config` module's exported types were trimmed down to add clarity and reduce confusion. Additional changes to the `config` module' helpers.
+
+* Refactored `WithCredentialsProvider`, `WithHTTPClient`, and `WithEndpointResolver` to functions instead of structs.
+* Removed `MFATokenFuncProvider`, use `AssumeRoleCredentialOptionsProvider` for setting options for `stscreds.AssumeRoleOptions`.
+* Renamed `WithWebIdentityCredentialProviderOptions` to `WithWebIdentityRoleCredentialOptions`
+* Renamed `AssumeRoleCredentialProviderOptions` to `AssumeRoleCredentialOptionsProvider`
+* Renamed `EndpointResolverFuncProvider` to `EndpointResolverProvider`
+
+#### API Client
+* API Client `Options` type getter methods have been removed. Use the struct members instead.
+* The error returned by API Client operations was renamed from `smithy.OperationError` to `smithy.OperationInvokeError`.
+
+# Release 2020-09-30
+
+## Service Client Highlights
+* Service clients have been bumped to `v0.26.0` simplify the documentation experience when using [pkg.go.dev](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2).
+* `service/s3`: Disable automatic decompression of getting Amazon S3 objects with the `Content-Encoding: gzip` metadata header. ([#748](https://github.com/aws/aws-sdk-go-v2/pull/748))
+ * This changes the SDK's default behavior with regard to making S3 API calls. The client will no longer automatically set the `Accept-Encoding` HTTP request header, nor will it automatically decompress the gzipped response when the `Content-Encoding: gzip` response header was received.
+ * If you'd like the client to sent the `Accept-Encoding: gzip` request header, you can add this header to the API operation method call with the [SetHeaderValue](https://pkg.go.dev/github.com/awslabs/smithy-go/transport/http#SetHeaderValue). middleware helper.
+* `service/cloudfront/sign`: Fix cloudfront example usage of SignWithPolicy ([#673](https://github.com/aws/aws-sdk-go-v2/pull/673))
+ * Fixes [#671](https://github.com/aws/aws-sdk-go-v2/issues/671) documentation typo by correcting the usage of `SignWithPolicy`.
+
+## Core SDK Highlights
+* SDK core module released at `v0.26.0`
+* `config` module released at `v0.1.1`
+* `credentials` module released at `v0.1.1`
+* `ec2imds` module released at `v0.1.1`
+
+
+# Release 2020-09-28
+## Announcements
+We’re happy to share the updated clients for the v0.25.0 preview version of the AWS SDK for Go V2.
+
+The updated clients leverage new developments and advancements within AWS and the Go software ecosystem at large since
+our original preview announcement. Using the new clients will be a bit different than before. The key differences are:
+simplified API operation invocation, performance improvements, support for error wrapping, and a new middleware architecture.
+So below we have a guided walkthrough to help try it out and share your feedback in order to better influence the features
+you’d like to see in the GA version.
+
+See [Announcement Blog Post](https://aws.amazon.com/blogs/developer/client-updates-in-the-preview-version-of-the-aws-sdk-for-go-v2/) for more details.
+
+## Service Client Highlights
+* Initial service clients released at version `v0.1.0`
+## Core SDK Highlights
+* SDK core module released at `v0.25.0`
+* `config` module released at `v0.1.0`
+* `credentials` module released at `v0.1.0`
+* `ec2imds` module released at `v0.1.0`
+
+## Migrating from v2 preview SDK's v0.24.0 to v0.25.0
+
+#### Design changes
+
+The v2 preview SDK `v0.25.0` release represents a significant stepping stone bringing the v2 SDK closer to its target design and usability. This release includes significant breaking changes to the v2 preview SDK. The updates in the `v0.25.0` release focus on refactoring and modularization of the SDK’s API clients to use the new [client design](https://github.com/aws/aws-sdk-go-v2/issues/438), updated request pipeline (aka [middleware](https://pkg.go.dev/github.com/awslabs/smithy-go/middleware)), refactored [credential providers](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/credentials), and [configuration loading](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config) packages.
+
+We've also bumped the minimum supported Go version with this release. Starting with v0.25.0 the SDK requires a minimum version of Go `v1.15`.
+
+As a part of the refactoring done to v2 preview SDK some components have not been included in this update. The following is a non exhaustive list of features that are not available.
+
+* API Paginators - [#439](https://github.com/aws/aws-sdk-go-v2/issues/439)
+* API Waiters - [#442](https://github.com/aws/aws-sdk-go-v2/issues/442)
+* Presign URL - [#794](https://github.com/aws/aws-sdk-go-v2/issues/794)
+* Amazon S3 Upload and Download manager - [#802](https://github.com/aws/aws-sdk-go-v2/pull/802)
+* Amazon DynamoDB's AttributeValue marshaler, and Expression package - [#790](https://github.com/aws/aws-sdk-go-v2/issues/790)
+* Debug Logging - [#594](https://github.com/aws/aws-sdk-go-v2/issues/594)
+
+We expect additional breaking changes to the v2 preview SDK in the coming releases. We expect these changes to focus on organizational, naming, and hardening the SDK's design for future feature capabilities after it is released for general availability.
+
+
+#### Relocated Packages
+
+In this release packages within the SDK were relocated, and in some cases those packages were converted to Go modules. The following is a list of packages have were relocated.
+
+* `github.com/aws/aws-sdk-go-v2/aws/external` => `github.com/aws/aws-sdk-go-v2/config` module
+* `github.com/aws/aws-sdk-go-v2/aws/ec2metadata` => `github.com/aws/aws-sdk-go-v2/ec2imds` module
+
+The `github.com/aws/aws-sdk-go-v2/credentials` module contains refactored credentials providers.
+
+* `github.com/aws/aws-sdk-go-v2/ec2rolecreds` => `github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds`
+* `github.com/aws/aws-sdk-go-v2/endpointcreds` => `github.com/aws/aws-sdk-go-v2/credentials/endpointcreds`
+* `github.com/aws/aws-sdk-go-v2/processcreds` => `github.com/aws/aws-sdk-go-v2/credentials/processcreds`
+* `github.com/aws/aws-sdk-go-v2/stscreds` => `github.com/aws/aws-sdk-go-v2/credentials/stscreds`
+
+
+#### Modularization
+
+New modules were added to the v2 preview SDK to allow the components to be versioned independently from each other. This allows your application to depend on specific versions of an API client module, and take discrete updates from the SDK core and other API client modules as desired.
+
+* [github.com/aws/aws-sdk-go-v2/config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config)
+* [github.com/aws/aws-sdk-go-v2/credentials](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/credentials)
+* Module for each API client, e.g. [github.com/aws/aws-sdk-go-v2/service/s3](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/s3)
+
+
+#### API Clients
+
+The following is a list of the major changes to the API client modules
+
+* Removed paginators: we plan to add these back once they are implemented to integrate with the SDK's new API client design.
+* Removed waiters: we need to further investigate how the V2 SDK should expose waiters, and how their behavior should be modeled.
+* API Clients are now Go modules. When migrating to the v2 preview SDK `v0.25.0`, you'll need to add the API client's module to your application's go.mod file.
+* API parameter nested types have been moved to a `types` package within the API client's module, e.g. `github.com/aws/aws-sdk-go-v2/service/s3/types` These types were moved to improve documentation and discovery of the API client, operation, and input/output types. For example Amazon S3's ListObject's operation [ListObjectOutput.Contents](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/s3/#ListObjectsOutput) input parameter is a slice of [types.Object](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/s3/types#Object).
+* The client operation method has been renamed, removing the `Request` suffix. The method now invokes the operation instead of constructing a request, which needed to be invoked separately. The operation methods were also expanded to include functional options for providing operation specific configuration, such as modifying the request pipeline.
+
+```go
+result, err := client.Scan(context.TODO(), &dynamodb.ScanInput{
+ TableName: aws.String("exampleTable"),
+}, func(o *Options) {
+ // Limit operation calls to only 1 attempt.
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, 1)
+})
+```
+
+
+#### Configuration
+
+In addition to the `github.com/aws/aws-sdk-go-v2/aws/external` package being made a module at `github.com/aws/aws-sdk-go-v2/config`, the `LoadDefaultAWSConfig` function was renamed to `LoadDefaultConfig`.
+
+The `github.com/aws/aws-sdk-go-v2/aws/defaults` package has been removed. Its components have been migrated to the `github.com/aws/aws-sdk-go-v2/aws` package, and `github.com/aws/aws-sdk-go-v2/config` module.
+
+
+#### Error Handling
+
+The `github.com/aws/aws-sdk-go-v2/aws/awserr` package was removed as a part of the SDK error handling refactor. The SDK now uses typed errors built around [Go v1.13](https://golang.org/doc/go1.13#error_wrapping)'s [errors.As](https://pkg.go.dev/errors#As) and [errors.Unwrap](https://pkg.go.dev/errors#Unwrap) features. All SDK error types that wrap other errors implement the `Unwrap` method. Generic v2 preview SDK errors created with `fmt.Errorf` use `%w` to wrap the underlying error.
+
+The SDK API clients now include generated public error types for errors modeled for an API. The SDK will automatically deserialize the error response from the API into the appropriate error type. Your application should use `errors.As` to check if the returned error matches one it is interested in. Your application can also use the generic interface [smithy.APIError](https://pkg.go.dev/github.com/awslabs/smithy-go/#APIError) to test if the API client's operation method returned an API error, but not check against a specific error.
+
+API client errors returned to the caller will use error wrapping to layer the error values. This allows underlying error types to be specific to their use case, and the SDK's more generic error types to wrap the underlying error.
+
+For example, if an [Amazon DynamoDB](https://aws.amazon.com/dynamodb/) [Scan](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/dynamodb#Scan) operation call cannot find the `TableName` requested, the error returned will contain [dynamodb.ResourceNotFoundException](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/dynamodb/types#ResourceNotFoundException). The SDK will return this error value wrapped in a couple layers, with each layer adding additional contextual information such as [ResponseError](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/transport/http#ResponseError) for AWS HTTP response error metadata , and [smithy.OperationError](https://pkg.go.dev/github.com/awslabs/smithy-go/#OperationError) for API operation call metadata.
+
+```go
+result, err := client.Scan(context.TODO(), params)
+if err != nil {
+ // To get a specific API error
+ var notFoundErr *types.ResourceNotFoundException
+ if errors.As(err, ¬FoundErr) {
+ log.Printf("scan failed because the table was not found, %v",
+ notFoundErr.ErrorMessage())
+ }
+
+ // To get any API error
+ var apiErr smithy.APIError
+ if errors.As(err, &apiErr) {
+ log.Printf("scan failed because of an API error, Code: %v, Message: %v",
+ apiErr.ErrorCode(), apiErr.ErrorMessage())
+ }
+
+ // To get the AWS response metadata, such as RequestID
+ var respErr *awshttp.ResponseError // Using import alias "awshttp" for package github.com/aws/aws-sdk-go-v2/aws/transport/http
+ if errors.As(err, &respErr) {
+ log.Printf("scan failed with HTTP status code %v, Request ID %v and error %v",
+ respErr.HTTPStatusCode(), respErr.ServiceRequestID(), respErr)
+ }
+
+ return err
+}
+```
+
+Logging an error value will include information from each wrapped error. For example, the following is a mock error logged for a Scan operation call that failed because the table was not found.
+
+> 2020/10/15 16:03:37 operation error DynamoDB: Scan, https response error StatusCode: 400, RequestID: ABCREQUESTID123, ResourceNotFoundException: Requested resource not found
+
+
+#### Endpoints
+
+The `github.com/aws/aws-sdk-go-v2/aws/endpoints` has been removed from the SDK, along with all exported endpoint definitions and iteration behavior. Each generated API client now includes its own endpoint definition internally to the module.
+
+API clients can optionally be configured with a generic [aws.EndpointResolver](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#EndpointResolver) via the [aws.Config.EndpointResolver](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Config.EndpointResolver). If the API client is not configured with a custom endpoint resolver it will defer to the endpoint resolver the client module was generated with.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/CODE_OF_CONDUCT.md b/vendor/github.com/aws/aws-sdk-go-v2/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000..3b6446687
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/CODE_OF_CONDUCT.md
@@ -0,0 +1,4 @@
+## Code of Conduct
+This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
+For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
+opensource-codeofconduct@amazon.com with any additional questions or comments.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/CONTRIBUTING.md b/vendor/github.com/aws/aws-sdk-go-v2/CONTRIBUTING.md
new file mode 100644
index 000000000..c2fc3b8f5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/CONTRIBUTING.md
@@ -0,0 +1,178 @@
+# Contributing to the AWS SDK for Go
+
+Thank you for your interest in contributing to the AWS SDK for Go!
+We work hard to provide a high-quality and useful SDK, and we greatly value
+feedback and contributions from our community. Whether it's a bug report,
+new feature, correction, or additional documentation, we welcome your issues
+and pull requests. Please read through this document before submitting any
+[issues] or [pull requests][pr] to ensure we have all the necessary information to
+effectively respond to your bug report or contribution.
+
+Jump To:
+
+* [Bug Reports](#bug-reports)
+* [Feature Requests](#feature-requests)
+* [Code Contributions](#code-contributions)
+
+
+## How to contribute
+
+*Before you send us a pull request, please be sure that:*
+
+1. You're working from the latest source on the master branch.
+2. You check existing open, and recently closed, pull requests to be sure
+ that someone else hasn't already addressed the problem.
+3. You create an issue before working on a contribution that will take a
+ significant amount of your time.
+
+*Creating a Pull Request*
+
+1. Fork the repository.
+2. In your fork, make your change in a branch that's based on this repo's master branch.
+3. Commit the change to your fork, using a clear and descriptive commit message.
+4. Create a pull request, answering any questions in the pull request form.
+
+For contributions that will take a significant amount of time, open a new
+issue to pitch your idea before you get started. Explain the problem and
+describe the content you want to see added to the documentation. Let us know
+if you'll write it yourself or if you'd like us to help. We'll discuss your
+proposal with you and let you know whether we're likely to accept it.
+
+## Bug Reports
+
+You can file bug reports against the SDK on the [GitHub issues][issues] page.
+
+If you are filing a report for a bug or regression in the SDK, it's extremely
+helpful to provide as much information as possible when opening the original
+issue. This helps us reproduce and investigate the possible bug without having
+to wait for this extra information to be provided. Please read the following
+guidelines prior to filing a bug report.
+
+1. Search through existing [issues][] to ensure that your specific issue has
+ not yet been reported. If it is a common issue, it is likely there is
+ already a bug report for your problem.
+
+2. Ensure that you have tested the latest version of the SDK. Although you
+ may have an issue against an older version of the SDK, we cannot provide
+ bug fixes for old versions. It's also possible that the bug may have been
+ fixed in the latest release.
+
+3. Provide as much information about your environment, SDK version, and
+ relevant dependencies as possible. For example, let us know what version
+ of Go you are using, which and version of the operating system, and the
+ the environment your code is running in. e.g Container.
+
+4. Provide a minimal test case that reproduces your issue or any error
+ information you related to your problem. We can provide feedback much
+ more quickly if we know what operations you are calling in the SDK. If
+ you cannot provide a full test case, provide as much code as you can
+ to help us diagnose the problem. Any relevant information should be provided
+ as well, like whether this is a persistent issue, or if it only occurs
+ some of the time.
+
+## Feature Requests
+
+Open an [issue][issues] with the following:
+
+* A short, descriptive title. Ideally, other community members should be able
+ to get a good idea of the feature just from reading the title.
+* A detailed description of the the proposed feature.
+ * Why it should be added to the SDK.
+ * If possible, example code to illustrate how it should work.
+* Use Markdown to make the request easier to read;
+* If you intend to implement this feature, indicate that you'd like to the issue to be assigned to you.
+
+## Code Contributions
+
+We are always happy to receive code and documentation contributions to the SDK.
+Please be aware of the following notes prior to opening a pull request:
+
+1. The SDK is released under the [Apache license][license]. Any code you submit
+ will be released under that license. For substantial contributions, we may
+ ask you to sign a [Contributor License Agreement (CLA)][cla].
+
+2. If you would like to implement support for a significant feature that is not
+ yet available in the SDK, please talk to us beforehand to avoid any
+ duplication of effort.
+
+3. Wherever possible, pull requests should contain tests as appropriate.
+ Bugfixes should contain tests that exercise the corrected behavior (i.e., the
+ test should fail without the bugfix and pass with it), and new features
+ should be accompanied by tests exercising the feature.
+
+4. Pull requests that contain failing tests will not be merged until the test
+ failures are addressed. Pull requests that cause a significant drop in the
+ SDK's test coverage percentage are unlikely to be merged until tests have
+ been added.
+
+5. The JSON files under the SDK's `models` folder are sourced from outside the SDK.
+ Such as `models/apis/ec2/2016-11-15/api.json`. We will not accept pull requests
+ directly on these models. If you discover an issue with the models please
+ create a [GitHub issue][issues] describing the issue.
+
+### Testing
+
+To run the tests locally, running the `make unit` command will `go get` the
+SDK's testing dependencies, and run vet, link and unit tests for the SDK.
+
+```
+make unit
+```
+
+Standard go testing functionality is supported as well. To test SDK code that
+is tagged with `codegen` you'll need to set the build tag in the go test
+command. The `make unit` command will do this automatically.
+
+```
+go test -tags codegen ./private/...
+```
+
+See the `Makefile` for additional testing tags that can be used in testing.
+
+To test on multiple platform the SDK includes several DockerFiles under the
+`awstesting/sandbox` folder, and associated make recipes to to execute
+unit testing within environments configured for specific Go versions.
+
+```
+make sandbox-test-go18
+```
+
+To run all sandbox environments use the following make recipe
+
+```
+# Optionally update the Go tip that will be used during the batch testing
+make update-aws-golang-tip
+
+# Run all SDK tests for supported Go versions in sandboxes
+make sandbox-test
+```
+
+In addition the sandbox environment include make recipes for interactive modes
+so you can run command within the Docker container and context of the SDK.
+
+```
+make sandbox-go18
+```
+
+### Changelog Documents
+
+You can see all release changes in the `CHANGELOG.md` file at the root of the
+repository. The release notes added to this file will contain service client
+updates, and major SDK changes. When submitting a pull request please include an entry in `CHANGELOG_PENDING.md` under the appropriate changelog type so your changelog entry is included on the following release.
+
+#### Changelog Types
+
+* `SDK Features` - For major additive features, internal changes that have
+outward impact, or updates to the SDK foundations. This will result in a minor
+version change.
+* `SDK Enhancements` - For minor additive features or incremental sized changes.
+This will result in a patch version change.
+* `SDK Bugs` - For minor changes that resolve an issue. This will result in a
+patch version change.
+
+[issues]: https://github.com/aws/aws-sdk-go/issues
+[pr]: https://github.com/aws/aws-sdk-go/pulls
+[license]: http://aws.amazon.com/apache2.0/
+[cla]: http://en.wikipedia.org/wiki/Contributor_License_Agreement
+[releasenotes]: https://github.com/aws/aws-sdk-go/releases
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/DESIGN.md b/vendor/github.com/aws/aws-sdk-go-v2/DESIGN.md
new file mode 100644
index 000000000..8490c7d67
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/DESIGN.md
@@ -0,0 +1,15 @@
+Open Discussions
+---
+The following issues are currently open for community feedback.
+All discourse must adhere to the [Code of Conduct] policy.
+
+* [Refactoring API Client Paginators](https://github.com/aws/aws-sdk-go-v2/issues/439)
+* [Refactoring API Client Waiters](https://github.com/aws/aws-sdk-go-v2/issues/442)
+* [Refactoring API Client Enums and Types to Discrete Packages](https://github.com/aws/aws-sdk-go-v2/issues/445)
+* [SDK Modularization](https://github.com/aws/aws-sdk-go-v2/issues/444)
+
+Past Discussions
+---
+The issues listed here are for documentation purposes, and is used to capture issues and their associated discussions.
+
+[Code of Conduct]: https://github.com/aws/aws-sdk-go-v2/blob/master/CODE_OF_CONDUCT.md
diff --git a/vendor/github.com/aws/aws-sdk-go/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/LICENSE.txt
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/LICENSE.txt
rename to vendor/github.com/aws/aws-sdk-go-v2/LICENSE.txt
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/Makefile b/vendor/github.com/aws/aws-sdk-go-v2/Makefile
new file mode 100644
index 000000000..4b761e771
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/Makefile
@@ -0,0 +1,519 @@
+# Lint rules to ignore
+LINTIGNORESINGLEFIGHT='internal/sync/singleflight/singleflight.go:.+error should be the last type'
+LINT_IGNORE_S3MANAGER_INPUT='feature/s3/manager/upload.go:.+struct field SSEKMSKeyId should be SSEKMSKeyID'
+
+UNIT_TEST_TAGS=
+BUILD_TAGS=-tags "example,codegen,integration,ec2env,perftest"
+
+SMITHY_GO_SRC ?= $(shell pwd)/../smithy-go
+
+SDK_MIN_GO_VERSION ?= 1.15
+
+EACHMODULE_FAILFAST ?= true
+EACHMODULE_FAILFAST_FLAG=-fail-fast=${EACHMODULE_FAILFAST}
+
+EACHMODULE_CONCURRENCY ?= 1
+EACHMODULE_CONCURRENCY_FLAG=-c ${EACHMODULE_CONCURRENCY}
+
+EACHMODULE_SKIP ?=
+EACHMODULE_SKIP_FLAG=-skip="${EACHMODULE_SKIP}"
+
+EACHMODULE_FLAGS=${EACHMODULE_CONCURRENCY_FLAG} ${EACHMODULE_FAILFAST_FLAG} ${EACHMODULE_SKIP_FLAG}
+
+# SDK's Core and client packages that are compatible with Go 1.9+.
+SDK_CORE_PKGS=./aws/... ./internal/...
+SDK_CLIENT_PKGS=./service/...
+SDK_COMPA_PKGS=${SDK_CORE_PKGS} ${SDK_CLIENT_PKGS}
+
+# SDK additional packages that are used for development of the SDK.
+SDK_EXAMPLES_PKGS=
+SDK_ALL_PKGS=${SDK_COMPA_PKGS} ${SDK_EXAMPLES_PKGS}
+
+RUN_NONE=-run NONE
+RUN_INTEG=-run '^TestInteg_'
+
+CODEGEN_RESOURCES_PATH=$(shell pwd)/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen
+CODEGEN_API_MODELS_PATH=$(shell pwd)/codegen/sdk-codegen/aws-models
+ENDPOINTS_JSON=${CODEGEN_RESOURCES_PATH}/endpoints.json
+ENDPOINT_PREFIX_JSON=${CODEGEN_RESOURCES_PATH}/endpoint-prefix.json
+
+LICENSE_FILE=$(shell pwd)/LICENSE.txt
+
+SMITHY_GO_VERSION ?=
+PRE_RELEASE_VERSION ?=
+RELEASE_MANIFEST_FILE ?=
+RELEASE_CHGLOG_DESC_FILE ?=
+
+REPOTOOLS_VERSION ?= latest
+REPOTOOLS_MODULE = github.com/awslabs/aws-go-multi-module-repository-tools
+REPOTOOLS_CMD_ANNOTATE_STABLE_GEN = ${REPOTOOLS_MODULE}/cmd/annotatestablegen@${REPOTOOLS_VERSION}
+REPOTOOLS_CMD_MAKE_RELATIVE = ${REPOTOOLS_MODULE}/cmd/makerelative@${REPOTOOLS_VERSION}
+REPOTOOLS_CMD_CALCULATE_RELEASE = ${REPOTOOLS_MODULE}/cmd/calculaterelease@${REPOTOOLS_VERSION}
+REPOTOOLS_CMD_UPDATE_REQUIRES = ${REPOTOOLS_MODULE}/cmd/updaterequires@${REPOTOOLS_VERSION}
+REPOTOOLS_CMD_UPDATE_MODULE_METADATA = ${REPOTOOLS_MODULE}/cmd/updatemodulemeta@${REPOTOOLS_VERSION}
+REPOTOOLS_CMD_GENERATE_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/generatechangelog@${REPOTOOLS_VERSION}
+REPOTOOLS_CMD_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/changelog@${REPOTOOLS_VERSION}
+REPOTOOLS_CMD_TAG_RELEASE = ${REPOTOOLS_MODULE}/cmd/tagrelease@${REPOTOOLS_VERSION}
+REPOTOOLS_CMD_EDIT_MODULE_DEPENDENCY = ${REPOTOOLS_MODULE}/cmd/editmoduledependency@${REPOTOOLS_VERSION}
+
+REPOTOOLS_CALCULATE_RELEASE_VERBOSE ?= false
+REPOTOOLS_CALCULATE_RELEASE_VERBOSE_FLAG=-v=${REPOTOOLS_CALCULATE_RELEASE_VERBOSE}
+
+REPOTOOLS_CALCULATE_RELEASE_ADDITIONAL_ARGS ?=
+
+ifneq ($(PRE_RELEASE_VERSION),)
+ REPOTOOLS_CALCULATE_RELEASE_ADDITIONAL_ARGS += -preview=${PRE_RELEASE_VERSION}
+endif
+
+.PHONY: all
+all: generate unit
+
+###################
+# Code Generation #
+###################
+.PHONY: generate smithy-generate smithy-build smithy-build-% smithy-clean smithy-go-publish-local format \
+gen-config-asserts gen-repo-mod-replace gen-mod-replace-smithy gen-mod-dropreplace-smithy-% gen-aws-ptrs tidy-modules-% \
+add-module-license-files sync-models sync-endpoints-model sync-endpoints.json clone-v1-models gen-internal-codegen \
+sync-api-models copy-attributevalue-feature min-go-version-% update-requires smithy-annotate-stable \
+update-module-metadata download-modules-%
+
+generate: smithy-generate update-requires gen-repo-mod-replace update-module-metadata smithy-annotate-stable \
+gen-config-asserts gen-internal-codegen copy-attributevalue-feature gen-mod-dropreplace-smithy-. min-go-version-. \
+tidy-modules-. add-module-license-files gen-aws-ptrs format
+
+smithy-generate:
+ cd codegen && ./gradlew clean build -Plog-tests && ./gradlew clean
+
+smithy-build:
+ cd codegen && ./gradlew clean build -Plog-tests
+
+smithy-build-%:
+ @# smithy-build- command that uses the pattern to define build filter that
+ @# the smithy API model service id starts with. Strips off the
+ @# "smithy-build-".
+ @#
+ @# e.g. smithy-build-com.amazonaws.rds
+ @# e.g. smithy-build-com.amazonaws.rds#AmazonRDSv19
+ cd codegen && \
+ SMITHY_GO_BUILD_API="$(subst smithy-build-,,$@)" ./gradlew clean build -Plog-tests
+
+smithy-annotate-stable:
+ go run ${REPOTOOLS_CMD_ANNOTATE_STABLE_GEN}
+
+smithy-clean:
+ cd codegen && ./gradlew clean
+
+smithy-go-publish-local:
+ rm -rf /tmp/smithy-go-local
+ git clone https://github.com/aws/smithy-go /tmp/smithy-go-local
+ make -C /tmp/smithy-go-local smithy-clean smithy-publish-local
+
+format:
+ gofmt -w -s .
+
+gen-config-asserts:
+ @echo "Generating SDK config package implementor assertions"
+ cd config \
+ && go mod tidy \
+ && go generate
+
+gen-internal-codegen:
+ @echo "Generating internal/codegen"
+ cd internal/codegen \
+ && go generate
+
+gen-repo-mod-replace:
+ @echo "Generating go.mod replace for repo modules"
+ go run ${REPOTOOLS_CMD_MAKE_RELATIVE}
+
+gen-mod-replace-smithy-%:
+ @# gen-mod-replace-smithy- command that uses the pattern to define build filter that
+ @# for modules to add replace to. Strips off the "gen-mod-replace-smithy-".
+ @#
+ @# SMITHY_GO_SRC environment variable is the path to add replace to
+ @#
+ @# e.g. gen-mod-replace-smithy-service_ssooidc
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst gen-mod-replace-smithy-,,$@)) ${EACHMODULE_FLAGS} \
+ "go mod edit -replace github.com/aws/smithy-go=${SMITHY_GO_SRC}"
+
+gen-mod-dropreplace-smithy-%:
+ @# gen-mod-dropreplace-smithy- command that uses the pattern to define build filter that
+ @# for modules to add replace to. Strips off the "gen-mod-dropreplace-smithy-".
+ @#
+ @# e.g. gen-mod-dropreplace-smithy-service_ssooidc
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst gen-mod-dropreplace-smithy-,,$@)) ${EACHMODULE_FLAGS} \
+ "go mod edit -dropreplace github.com/aws/smithy-go"
+
+gen-aws-ptrs:
+ cd aws && go generate
+
+tidy-modules-%:
+ @# tidy command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "tidy-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. tidy-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst tidy-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go mod tidy"
+
+download-modules-%:
+ @# download command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "download-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. download-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst download-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go mod download all"
+
+add-module-license-files:
+ cd internal/repotools/cmd/eachmodule && \
+ go run . -skip-root \
+ "cp $(LICENSE_FILE) ."
+
+sync-models: sync-endpoints-model sync-api-models
+
+sync-endpoints-model: sync-endpoints.json
+
+sync-endpoints.json:
+ [[ ! -z "${ENDPOINTS_MODEL}" ]] && cp ${ENDPOINTS_MODEL} ${ENDPOINTS_JSON} || echo "ENDPOINTS_MODEL not set, must not be empty"
+
+clone-v1-models:
+ rm -rf /tmp/aws-sdk-go-model-sync
+ git clone https://github.com/aws/aws-sdk-go.git --depth 1 /tmp/aws-sdk-go-model-sync
+
+sync-api-models:
+ cd internal/repotools/cmd/syncAPIModels && \
+ go run . \
+ -m ${API_MODELS} \
+ -o ${CODEGEN_API_MODELS_PATH}
+
+copy-attributevalue-feature:
+ cd ./feature/dynamodbstreams/attributevalue && \
+ find . -name "*.go" | grep -v "doc.go" | xargs -I % rm % && \
+ find ../../dynamodb/attributevalue -name "*.go" | grep -v "doc.go" | xargs -I % cp % . && \
+ ls *.go | grep -v "convert.go" | grep -v "doc.go" | \
+ xargs -I % sed -i.bk -E 's:github.com/aws/aws-sdk-go-v2/(service|feature)/dynamodb:github.com/aws/aws-sdk-go-v2/\1/dynamodbstreams:g' % && \
+ ls *.go | grep -v "convert.go" | grep -v "doc.go" | \
+ xargs -I % sed -i.bk 's:DynamoDB:DynamoDBStreams:g' % && \
+ ls *.go | grep -v "doc.go" | \
+ xargs -I % sed -i.bk 's:dynamodb\.:dynamodbstreams.:g' % && \
+ sed -i.bk 's:streams\.:ddbtypes.:g' "convert.go" && \
+ sed -i.bk 's:ddb\.:streams.:g' "convert.go" && \
+ sed -i.bk 's:ddbtypes\.:ddb.:g' "convert.go" &&\
+ sed -i.bk 's:Streams::g' "convert.go" && \
+ rm -rf ./*.bk && \
+ go mod tidy && \
+ gofmt -w -s . && \
+ go test .
+
+min-go-version-%:
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst min-go-version-,,$@)) ${EACHMODULE_FLAGS} \
+ "go mod edit -go=${SDK_MIN_GO_VERSION}"
+
+update-requires:
+ go run ${REPOTOOLS_CMD_UPDATE_REQUIRES}
+
+update-module-metadata:
+ go run ${REPOTOOLS_CMD_UPDATE_MODULE_METADATA}
+
+################
+# Unit Testing #
+################
+.PHONY: unit unit-race unit-test unit-race-test unit-race-modules-% unit-modules-% build build-modules-% \
+go-build-modules-% test test-race-modules-% test-modules-% cachedep cachedep-modules-% api-diff-modules-%
+
+unit: lint unit-modules-.
+unit-race: lint unit-race-modules-.
+
+unit-test: test-modules-.
+unit-race-test: test-race-modules-.
+
+unit-race-modules-%:
+ @# unit command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "unit-race-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. unit-race-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst unit-race-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go vet ${BUILD_TAGS} --all ./..." \
+ "go test ${BUILD_TAGS} ${RUN_NONE} ./..." \
+ "go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./..."
+
+
+unit-modules-%:
+ @# unit command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "unit-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. unit-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst unit-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go vet ${BUILD_TAGS} --all ./..." \
+ "go test ${BUILD_TAGS} ${RUN_NONE} ./..." \
+ "go test -timeout=1m ${UNIT_TEST_TAGS} ./..."
+
+build: build-modules-.
+
+build-modules-%:
+ @# build command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "build-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. build-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst build-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go test ${BUILD_TAGS} ${RUN_NONE} ./..."
+
+go-build-modules-%:
+ @# build command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "build-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# Validates that all modules in the repo have buildable Go files.
+ @#
+ @# e.g. go-build-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst go-build-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go build ${BUILD_TAGS} ./..."
+
+test: test-modules-.
+
+test-race-modules-%:
+ @# Test command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "test-race-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. test-race-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst test-race-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./..."
+
+test-modules-%:
+ @# Test command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "test-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. test-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst test-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go test -timeout=1m ${UNIT_TEST_TAGS} ./..."
+
+cachedep: cachedep-modules-.
+
+cachedep-modules-%:
+ @# build command that uses the pattern to define the root path that the
+ @# module caching will start from. Strips off the "cachedep-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. cachedep-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst cachedep-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go mod download"
+
+api-diff-modules-%:
+ @# Command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "api-diff-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# Requires golang.org/x/exp/cmd/gorelease to be available in the GOPATH.
+ @#
+ @# e.g. api-diff-modules-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst api-diff-modules-,,$@)) \
+ -fail-fast=true \
+ -c 1 \
+ -skip="internal/repotools" \
+ "$$(go env GOPATH)/bin/gorelease"
+
+##############
+# CI Testing #
+##############
+.PHONY: ci-test ci-test-no-generate ci-test-generate-validate
+
+ci-test: generate unit-race ci-test-generate-validate
+ci-test-no-generate: unit-race
+
+ci-test-generate-validate:
+ @echo "CI test validate no generated code changes"
+ git update-index --assume-unchanged go.mod go.sum
+ git add . -A
+ gitstatus=`git diff --cached --ignore-space-change`; \
+ echo "$$gitstatus"; \
+ if [ "$$gitstatus" != "" ] && [ "$$gitstatus" != "skipping validation" ]; then echo "$$gitstatus"; exit 1; fi
+ git update-index --no-assume-unchanged go.mod go.sum
+
+ci-lint: ci-lint-.
+
+ci-lint-%:
+ @# Run golangci-lint command that uses the pattern to define the root path that the
+ @# module check will start from. Strips off the "ci-lint-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. ci-lint-internal_protocoltest
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst ci-lint-,,$@)) \
+ -fail-fast=false \
+ -c 1 \
+ -skip="internal/repotools" \
+ "golangci-lint run"
+
+ci-lint-install:
+ @# Installs golangci-lint at GoPATH.
+ @# This should be used to run golangci-lint locally.
+ @#
+ go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
+
+#######################
+# Integration Testing #
+#######################
+.PHONY: integration integ-modules-% cleanup-integ-buckets
+
+integration: integ-modules-service
+
+integ-modules-%:
+ @# integration command that uses the pattern to define the root path that
+ @# the module testing will start from. Strips off the "integ-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. test-modules-service_dynamodb
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst integ-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go test -timeout=10m -tags "integration" -v ${RUN_INTEG} -count 1 ./..."
+
+cleanup-integ-buckets:
+ @echo "Cleaning up SDK integration resources"
+ go run -tags "integration" ./internal/awstesting/cmd/bucket_cleanup/main.go "aws-sdk-go-integration"
+
+##############
+# Benchmarks #
+##############
+.PHONY: bench bench-modules-%
+
+bench: bench-modules-.
+
+bench-modules-%:
+ @# benchmark command that uses the pattern to define the root path that
+ @# the module testing will start from. Strips off the "bench-modules-" and
+ @# replaces all "_" with "/".
+ @#
+ @# e.g. bench-modules-service_dynamodb
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst bench-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go test -timeout=10m -bench . --benchmem ${BUILD_TAGS} ${RUN_NONE} ./..."
+
+
+#####################
+# Release Process #
+#####################
+.PHONY: preview-release pre-release-validation release
+
+ls-changes:
+ go run ${REPOTOOLS_CMD_CHANGELOG} ls
+
+preview-release:
+ go run ${REPOTOOLS_CMD_CALCULATE_RELEASE} ${REPOTOOLS_CALCULATE_RELEASE_VERBOSE_FLAG} ${REPOTOOLS_CALCULATE_RELEASE_ADDITIONAL_ARGS}
+
+pre-release-validation:
+ @if [[ -z "${RELEASE_MANIFEST_FILE}" ]]; then \
+ echo "RELEASE_MANIFEST_FILE is required to specify the file to write the release manifest" && false; \
+ fi
+ @if [[ -z "${RELEASE_CHGLOG_DESC_FILE}" ]]; then \
+ echo "RELEASE_CHGLOG_DESC_FILE is required to specify the file to write the release notes" && false; \
+ fi
+
+release: pre-release-validation
+ go run ${REPOTOOLS_CMD_CALCULATE_RELEASE} -o ${RELEASE_MANIFEST_FILE} ${REPOTOOLS_CALCULATE_RELEASE_VERBOSE_FLAG} ${REPOTOOLS_CALCULATE_RELEASE_ADDITIONAL_ARGS}
+ go run ${REPOTOOLS_CMD_UPDATE_REQUIRES} -release ${RELEASE_MANIFEST_FILE}
+ go run ${REPOTOOLS_CMD_UPDATE_MODULE_METADATA} -release ${RELEASE_MANIFEST_FILE}
+ go run ${REPOTOOLS_CMD_GENERATE_CHANGELOG} -release ${RELEASE_MANIFEST_FILE} -o ${RELEASE_CHGLOG_DESC_FILE}
+ go run ${REPOTOOLS_CMD_CHANGELOG} rm -all
+ go run ${REPOTOOLS_CMD_TAG_RELEASE} -release ${RELEASE_MANIFEST_FILE}
+
+##############
+# Repo Tools #
+##############
+.PHONY: install-repotools
+
+install-repotools:
+ go install ${REPOTOOLS_MODULE}/cmd/changelog@${REPOTOOLS_VERSION}
+
+set-smithy-go-version:
+ @if [[ -z "${SMITHY_GO_VERSION}" ]]; then \
+ echo "SMITHY_GO_VERSION is required to update SDK's smithy-go module dependency version" && false; \
+ fi
+ go run ${REPOTOOLS_CMD_EDIT_MODULE_DEPENDENCY} -s "github.com/aws/smithy-go" -v "${SMITHY_GO_VERSION}"
+
+##################
+# Linting/Verify #
+##################
+.PHONY: verify lint vet vet-modules-% sdkv1check
+
+verify: lint vet sdkv1check
+
+lint:
+ @echo "go lint SDK and vendor packages"
+ @lint=`golint ./...`; \
+ dolint=`echo "$$lint" | grep -E -v \
+ -e ${LINT_IGNORE_S3MANAGER_INPUT} \
+ -e ${LINTIGNORESINGLEFIGHT}`; \
+ echo "$$dolint"; \
+ if [ "$$dolint" != "" ]; then exit 1; fi
+
+vet: vet-modules-.
+
+vet-modules-%:
+ cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst vet-modules-,,$@)) ${EACHMODULE_FLAGS} \
+ "go vet ${BUILD_TAGS} --all ./..."
+
+sdkv1check:
+ @echo "Checking for usage of AWS SDK for Go v1"
+ @sdkv1usage=`go list -test -f '''{{ if not .Standard }}{{ range $$_, $$name := .Imports }} * {{ $$.ImportPath }} -> {{ $$name }}{{ print "\n" }}{{ end }}{{ range $$_, $$name := .TestImports }} *: {{ $$.ImportPath }} -> {{ $$name }}{{ print "\n" }}{{ end }}{{ end}}''' ./... | sort -u | grep '''/aws-sdk-go/'''`; \
+ echo "$$sdkv1usage"; \
+ if [ "$$sdkv1usage" != "" ]; then exit 1; fi
+
+list-deps: list-deps-.
+
+list-deps-%:
+ @# command that uses the pattern to define the root path that the
+ @# module testing will start from. Strips off the "list-deps-" and
+ @# replaces all "_" with "/".
+ @#
+ @# Trim output to only include stdout for list of dependencies only.
+ @# make list-deps 2>&-
+ @#
+ @# e.g. list-deps-internal_protocoltest
+ @cd ./internal/repotools/cmd/eachmodule \
+ && go run . -p $(subst _,/,$(subst list-deps-,,$@)) ${EACHMODULE_FLAGS} \
+ "go list -m all | grep -v 'github.com/aws/aws-sdk-go-v2'" | sort -u
+
+###################
+# Sandbox Testing #
+###################
+.PHONY: sandbox-tests sandbox-build-% sandbox-run-% sandbox-test-% update-aws-golang-tip
+
+sandbox-tests: sandbox-test-go1.15 sandbox-test-go1.16 sandbox-test-go1.17 sandbox-test-gotip
+
+sandbox-build-%:
+ @# sandbox-build-go1.17
+ @# sandbox-build-gotip
+ docker build \
+ -f ./internal/awstesting/sandbox/Dockerfile.test.$(subst sandbox-build-,,$@) \
+ -t "aws-sdk-go-$(subst sandbox-build-,,$@)" .
+sandbox-run-%: sandbox-build-%
+ @# sandbox-run-go1.17
+ @# sandbox-run-gotip
+ docker run -i -t "aws-sdk-go-$(subst sandbox-run-,,$@)" bash
+sandbox-test-%: sandbox-build-%
+ @# sandbox-test-go1.17
+ @# sandbox-test-gotip
+ docker run -t "aws-sdk-go-$(subst sandbox-test-,,$@)"
+
+update-aws-golang-tip:
+ docker build --no-cache=true -f ./internal/awstesting/sandbox/Dockerfile.golang-tip -t "aws-golang:tip" .
diff --git a/vendor/github.com/aws/aws-sdk-go/NOTICE.txt b/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt
similarity index 92%
rename from vendor/github.com/aws/aws-sdk-go/NOTICE.txt
rename to vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt
index 899129ecc..5f14d1162 100644
--- a/vendor/github.com/aws/aws-sdk-go/NOTICE.txt
+++ b/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt
@@ -1,3 +1,3 @@
AWS SDK for Go
-Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2014-2015 Stripe, Inc.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/README.md b/vendor/github.com/aws/aws-sdk-go-v2/README.md
new file mode 100644
index 000000000..cda17f77d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/README.md
@@ -0,0 +1,157 @@
+# AWS SDK for Go v2
+
+[![Go Build status](https://github.com/aws/aws-sdk-go-v2/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/aws/aws-sdk-go-v2/actions/workflows/go.yml)[![Codegen Build status](https://github.com/aws/aws-sdk-go-v2/actions/workflows/codegen.yml/badge.svg?branch=main)](https://github.com/aws/aws-sdk-go-v2/actions/workflows/codegen.yml) [![SDK Documentation](https://img.shields.io/badge/SDK-Documentation-blue)](https://aws.github.io/aws-sdk-go-v2/docs/) [![Migration Guide](https://img.shields.io/badge/Migration-Guide-blue)](https://aws.github.io/aws-sdk-go-v2/docs/migrating/) [![API Reference](https://img.shields.io/badge/api-reference-blue.svg)](https://pkg.go.dev/mod/github.com/aws/aws-sdk-go-v2) [![Apache V2 License](https://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/aws/aws-sdk-go/blob/master/LICENSE.txt)
+
+
+`aws-sdk-go-v2` is the v2 AWS SDK for the Go programming language.
+
+The v2 SDK requires a minimum version of `Go 1.15`.
+
+Checkout out the [release notes](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md) for information about the latest bug
+fixes, updates, and features added to the SDK.
+
+Jump To:
+* [Getting Started](#getting-started)
+* [Getting Help](#getting-help)
+* [Contributing](#feedback-and-contributing)
+* [More Resources](#resources)
+
+## Maintenance and support for SDK major versions
+
+For information about maintenance and support for SDK major versions and their underlying dependencies, see the
+following in the AWS SDKs and Tools Shared Configuration and Credentials Reference Guide:
+
+* [AWS SDKs and Tools Maintenance Policy](https://docs.aws.amazon.com/credref/latest/refdocs/maint-policy.html)
+* [AWS SDKs and Tools Version Support Matrix](https://docs.aws.amazon.com/credref/latest/refdocs/version-support-matrix.html)
+
+## Getting started
+To get started working with the SDK setup your project for Go modules, and retrieve the SDK dependencies with `go get`.
+This example shows how you can use the v2 SDK to make an API request using the SDK's [Amazon DynamoDB] client.
+
+###### Initialize Project
+```sh
+$ mkdir ~/helloaws
+$ cd ~/helloaws
+$ go mod init helloaws
+```
+###### Add SDK Dependencies
+```sh
+$ go get github.com/aws/aws-sdk-go-v2/aws
+$ go get github.com/aws/aws-sdk-go-v2/config
+$ go get github.com/aws/aws-sdk-go-v2/service/dynamodb
+```
+
+###### Write Code
+In your preferred editor add the following content to `main.go`
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "log"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/config"
+ "github.com/aws/aws-sdk-go-v2/service/dynamodb"
+)
+
+func main() {
+ // Using the SDK's default configuration, loading additional config
+ // and credentials values from the environment variables, shared
+ // credentials, and shared configuration files
+ cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRegion("us-west-2"))
+ if err != nil {
+ log.Fatalf("unable to load SDK config, %v", err)
+ }
+
+ // Using the Config value, create the DynamoDB client
+ svc := dynamodb.NewFromConfig(cfg)
+
+ // Build the request with its input parameters
+ resp, err := svc.ListTables(context.TODO(), &dynamodb.ListTablesInput{
+ Limit: aws.Int32(5),
+ })
+ if err != nil {
+ log.Fatalf("failed to list tables, %v", err)
+ }
+
+ fmt.Println("Tables:")
+ for _, tableName := range resp.TableNames {
+ fmt.Println(tableName)
+ }
+}
+```
+
+###### Compile and Execute
+```sh
+$ go run .
+Table:
+tableOne
+tableTwo
+```
+
+## Getting Help
+
+Please use these community resources for getting help. We use the GitHub issues
+for tracking bugs and feature requests.
+
+* Ask a question on [StackOverflow](http://stackoverflow.com/) and tag it with the [`aws-sdk-go`](http://stackoverflow.com/questions/tagged/aws-sdk-go) tag.
+* Open a support ticket with [AWS Support](http://docs.aws.amazon.com/awssupport/latest/user/getting-started.html).
+* If you think you may have found a bug, please open an [issue](https://github.com/aws/aws-sdk-go-v2/issues/new/choose).
+
+This SDK implements AWS service APIs. For general issues regarding the AWS services and their limitations, you may also take a look at the [Amazon Web Services Discussion Forums](https://forums.aws.amazon.com/).
+
+### Opening Issues
+
+If you encounter a bug with the AWS SDK for Go we would like to hear about it.
+Search the [existing issues][Issues] and see
+if others are also experiencing the issue before opening a new issue. Please
+include the version of AWS SDK for Go, Go language, and OS you’re using. Please
+also include reproduction case when appropriate.
+
+The GitHub issues are intended for bug reports and feature requests. For help
+and questions with using AWS SDK for Go please make use of the resources listed
+in the [Getting Help](#getting-help) section.
+Keeping the list of open issues lean will help us respond in a timely manner.
+
+## Feedback and contributing
+
+The v2 SDK will use GitHub [Issues] to track feature requests and issues with the SDK. In addition, we'll use GitHub [Projects] to track large tasks spanning multiple pull requests, such as refactoring the SDK's internal request lifecycle. You can provide feedback to us in several ways.
+
+**GitHub issues**. To provide feedback or report bugs, file GitHub [Issues] on the SDK. This is the preferred mechanism to give feedback so that other users can engage in the conversation, +1 issues, etc. Issues you open will be evaluated, and included in our roadmap for the GA launch.
+
+**Contributing**. You can open pull requests for fixes or additions to the AWS SDK for Go 2.0. All pull requests must be submitted under the Apache 2.0 license and will be reviewed by an SDK team member before being merged in. Accompanying unit tests, where possible, are appreciated.
+
+## Resources
+
+[SDK Developer Guide](https://aws.github.io/aws-sdk-go-v2/docs/) - Use this document to learn how to get started and
+use the AWS SDK for Go V2.
+
+[SDK Migration Guide](https://aws.github.io/aws-sdk-go-v2/docs/migrating/) - Use this document to learn how to migrate to V2 from the AWS SDK for Go.
+
+[SDK API Reference Documentation](https://pkg.go.dev/mod/github.com/aws/aws-sdk-go-v2) - Use this
+document to look up all API operation input and output parameters for AWS
+services supported by the SDK. The API reference also includes documentation of
+the SDK, and examples how to using the SDK, service client API operations, and
+API operation require parameters.
+
+[Service Documentation](https://aws.amazon.com/documentation/) - Use this
+documentation to learn how to interface with AWS services. These guides are
+great for getting started with a service, or when looking for more
+information about a service. While this document is not required for coding,
+services may supply helpful samples to look out for.
+
+[Forum](https://forums.aws.amazon.com/forum.jspa?forumID=293) - Ask questions, get help, and give feedback
+
+[Issues] - Report issues, submit pull requests, and get involved
+ (see [Apache 2.0 License][license])
+
+[Dep]: https://github.com/golang/dep
+[Issues]: https://github.com/aws/aws-sdk-go-v2/issues
+[Projects]: https://github.com/aws/aws-sdk-go-v2/projects
+[CHANGELOG]: https://github.com/aws/aws-sdk-go-v2/blob/master/CHANGELOG.md
+[Amazon DynamoDB]: https://aws.amazon.com/dynamodb/
+[design]: https://github.com/aws/aws-sdk-go-v2/blob/master/DESIGN.md
+[license]: http://aws.amazon.com/apache2.0/
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/arn/arn.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/arn/arn.go
similarity index 94%
rename from vendor/github.com/aws/aws-sdk-go/aws/arn/arn.go
rename to vendor/github.com/aws/aws-sdk-go-v2/aws/arn/arn.go
index 1c4967429..fe63fedad 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/arn/arn.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/arn/arn.go
@@ -75,9 +75,8 @@ func Parse(arn string) (ARN, error) {
}, nil
}
-// IsARN returns whether the given string is an ARN by looking for
-// whether the string starts with "arn:" and contains the correct number
-// of sections delimited by colons(:).
+// IsARN returns whether the given string is an arn
+// by looking for whether the string starts with arn:
func IsARN(arn string) bool {
return strings.HasPrefix(arn, arnPrefix) && strings.Count(arn, ":") >= arnSections-1
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go
new file mode 100644
index 000000000..20153586b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go
@@ -0,0 +1,179 @@
+package aws
+
+import (
+ "net/http"
+
+ smithybearer "github.com/aws/smithy-go/auth/bearer"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// HTTPClient provides the interface to provide custom HTTPClients. Generally
+// *http.Client is sufficient for most use cases. The HTTPClient should not
+// follow 301 or 302 redirects.
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// A Config provides service configuration for service clients.
+type Config struct {
+ // The region to send requests to. This parameter is required and must
+ // be configured globally or on a per-client basis unless otherwise
+ // noted. A full list of regions is found in the "Regions and Endpoints"
+ // document.
+ //
+ // See http://docs.aws.amazon.com/general/latest/gr/rande.html for
+ // information on AWS regions.
+ Region string
+
+ // The credentials object to use when signing requests.
+ // Use the LoadDefaultConfig to load configuration from all the SDK's supported
+ // sources, and resolve credentials using the SDK's default credential chain.
+ Credentials CredentialsProvider
+
+ // The Bearer Authentication token provider to use for authenticating API
+ // operation calls with a Bearer Authentication token. The API clients and
+ // operation must support Bearer Authentication scheme in order for the
+ // token provider to be used. API clients created with NewFromConfig will
+ // automatically be configured with this option, if the API client support
+ // Bearer Authentication.
+ //
+ // The SDK's config.LoadDefaultConfig can automatically populate this
+ // option for external configuration options such as SSO session.
+ // https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
+ BearerAuthTokenProvider smithybearer.TokenProvider
+
+ // The HTTP Client the SDK's API clients will use to invoke HTTP requests.
+ // The SDK defaults to a BuildableClient allowing API clients to create
+ // copies of the HTTP Client for service specific customizations.
+ //
+ // Use a (*http.Client) for custom behavior. Using a custom http.Client
+ // will prevent the SDK from modifying the HTTP client.
+ HTTPClient HTTPClient
+
+ // An endpoint resolver that can be used to provide or override an endpoint
+ // for the given service and region.
+ //
+ // See the `aws.EndpointResolver` documentation for additional usage
+ // information.
+ //
+ // Deprecated: See Config.EndpointResolverWithOptions
+ EndpointResolver EndpointResolver
+
+ // An endpoint resolver that can be used to provide or override an endpoint
+ // for the given service and region.
+ //
+ // When EndpointResolverWithOptions is specified, it will be used by a
+ // service client rather than using EndpointResolver if also specified.
+ //
+ // See the `aws.EndpointResolverWithOptions` documentation for additional
+ // usage information.
+ EndpointResolverWithOptions EndpointResolverWithOptions
+
+ // RetryMaxAttempts specifies the maximum number attempts an API client
+ // will call an operation that fails with a retryable error.
+ //
+ // API Clients will only use this value to construct a retryer if the
+ // Config.Retryer member is not nil. This value will be ignored if
+ // Retryer is not nil.
+ RetryMaxAttempts int
+
+ // RetryMode specifies the retry model the API client will be created with.
+ //
+ // API Clients will only use this value to construct a retryer if the
+ // Config.Retryer member is not nil. This value will be ignored if
+ // Retryer is not nil.
+ RetryMode RetryMode
+
+ // Retryer is a function that provides a Retryer implementation. A Retryer
+ // guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer.
+ //
+ // In general, the provider function should return a new instance of a
+ // Retryer if you are attempting to provide a consistent Retryer
+ // configuration across all clients. This will ensure that each client will
+ // be provided a new instance of the Retryer implementation, and will avoid
+ // issues such as sharing the same retry token bucket across services.
+ //
+ // If not nil, RetryMaxAttempts, and RetryMode will be ignored by API
+ // clients.
+ Retryer func() Retryer
+
+ // ConfigSources are the sources that were used to construct the Config.
+ // Allows for additional configuration to be loaded by clients.
+ ConfigSources []interface{}
+
+ // APIOptions provides the set of middleware mutations modify how the API
+ // client requests will be handled. This is useful for adding additional
+ // tracing data to a request, or changing behavior of the SDK's client.
+ APIOptions []func(*middleware.Stack) error
+
+ // The logger writer interface to write logging messages to. Defaults to
+ // standard error.
+ Logger logging.Logger
+
+ // Configures the events that will be sent to the configured logger. This
+ // can be used to configure the logging of signing, retries, request, and
+ // responses of the SDK clients.
+ //
+ // See the ClientLogMode type documentation for the complete set of logging
+ // modes and available configuration.
+ ClientLogMode ClientLogMode
+
+ // The configured DefaultsMode. If not specified, service clients will
+ // default to legacy.
+ //
+ // Supported modes are: auto, cross-region, in-region, legacy, mobile,
+ // standard
+ DefaultsMode DefaultsMode
+
+ // The RuntimeEnvironment configuration, only populated if the DefaultsMode
+ // is set to DefaultsModeAuto and is initialized by
+ // `config.LoadDefaultConfig`. You should not populate this structure
+ // programmatically, or rely on the values here within your applications.
+ RuntimeEnvironment RuntimeEnvironment
+}
+
+// NewConfig returns a new Config pointer that can be chained with builder
+// methods to set multiple configuration values inline without using pointers.
+func NewConfig() *Config {
+ return &Config{}
+}
+
+// Copy will return a shallow copy of the Config object. If any additional
+// configurations are provided they will be merged into the new config returned.
+func (c Config) Copy() Config {
+ cp := c
+ return cp
+}
+
+// EndpointDiscoveryEnableState indicates if endpoint discovery is
+// enabled, disabled, auto or unset state.
+//
+// Default behavior (Auto or Unset) indicates operations that require endpoint
+// discovery will use Endpoint Discovery by default. Operations that
+// optionally use Endpoint Discovery will not use Endpoint Discovery
+// unless EndpointDiscovery is explicitly enabled.
+type EndpointDiscoveryEnableState uint
+
+// Enumeration values for EndpointDiscoveryEnableState
+const (
+ // EndpointDiscoveryUnset represents EndpointDiscoveryEnableState is unset.
+ // Users do not need to use this value explicitly. The behavior for unset
+ // is the same as for EndpointDiscoveryAuto.
+ EndpointDiscoveryUnset EndpointDiscoveryEnableState = iota
+
+ // EndpointDiscoveryAuto represents an AUTO state that allows endpoint
+ // discovery only when required by the api. This is the default
+ // configuration resolved by the client if endpoint discovery is neither
+ // enabled or disabled.
+ EndpointDiscoveryAuto // default state
+
+ // EndpointDiscoveryDisabled indicates client MUST not perform endpoint
+ // discovery even when required.
+ EndpointDiscoveryDisabled
+
+ // EndpointDiscoveryEnabled indicates client MUST always perform endpoint
+ // discovery if supported for the operation.
+ EndpointDiscoveryEnabled
+)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/context.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/context.go
new file mode 100644
index 000000000..4d8e26ef3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/context.go
@@ -0,0 +1,22 @@
+package aws
+
+import (
+ "context"
+ "time"
+)
+
+type suppressedContext struct {
+ context.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-v2/aws/credential_cache.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go
new file mode 100644
index 000000000..9e9525231
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go
@@ -0,0 +1,218 @@
+package aws
+
+import (
+ "context"
+ "fmt"
+ "sync/atomic"
+ "time"
+
+ sdkrand "github.com/aws/aws-sdk-go-v2/internal/rand"
+ "github.com/aws/aws-sdk-go-v2/internal/sync/singleflight"
+)
+
+// CredentialsCacheOptions are the options
+type CredentialsCacheOptions struct {
+
+ // ExpiryWindow will allow the credentials to trigger refreshing prior to
+ // the credentials actually expiring. This is beneficial so race conditions
+ // with expiring credentials do not cause request to fail unexpectedly
+ // due to ExpiredTokenException exceptions.
+ //
+ // An ExpiryWindow of 10s would cause calls to IsExpired() to return true
+ // 10 seconds before the credentials are actually expired. This can cause an
+ // increased number of requests to refresh the credentials to occur.
+ //
+ // If ExpiryWindow is 0 or less it will be ignored.
+ ExpiryWindow time.Duration
+
+ // ExpiryWindowJitterFrac provides a mechanism for randomizing the
+ // expiration of credentials within the configured ExpiryWindow by a random
+ // percentage. Valid values are between 0.0 and 1.0.
+ //
+ // As an example if ExpiryWindow is 60 seconds and ExpiryWindowJitterFrac
+ // is 0.5 then credentials will be set to expire between 30 to 60 seconds
+ // prior to their actual expiration time.
+ //
+ // If ExpiryWindow is 0 or less then ExpiryWindowJitterFrac is ignored.
+ // If ExpiryWindowJitterFrac is 0 then no randomization will be applied to the window.
+ // If ExpiryWindowJitterFrac < 0 the value will be treated as 0.
+ // If ExpiryWindowJitterFrac > 1 the value will be treated as 1.
+ ExpiryWindowJitterFrac float64
+}
+
+// CredentialsCache provides caching and concurrency safe credentials retrieval
+// via the provider's retrieve method.
+//
+// CredentialsCache will look for optional interfaces on the Provider to adjust
+// how the credential cache handles credentials caching.
+//
+// - HandleFailRefreshCredentialsCacheStrategy - Allows provider to handle
+// credential refresh failures. This could return an updated Credentials
+// value, or attempt another means of retrieving credentials.
+//
+// - AdjustExpiresByCredentialsCacheStrategy - Allows provider to adjust how
+// credentials Expires is modified. This could modify how the Credentials
+// Expires is adjusted based on the CredentialsCache ExpiryWindow option.
+// Such as providing a floor not to reduce the Expires below.
+type CredentialsCache struct {
+ provider CredentialsProvider
+
+ options CredentialsCacheOptions
+ creds atomic.Value
+ sf singleflight.Group
+}
+
+// NewCredentialsCache returns a CredentialsCache that wraps provider. Provider
+// is expected to not be nil. A variadic list of one or more functions can be
+// provided to modify the CredentialsCache configuration. This allows for
+// configuration of credential expiry window and jitter.
+func NewCredentialsCache(provider CredentialsProvider, optFns ...func(options *CredentialsCacheOptions)) *CredentialsCache {
+ options := CredentialsCacheOptions{}
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.ExpiryWindow < 0 {
+ options.ExpiryWindow = 0
+ }
+
+ if options.ExpiryWindowJitterFrac < 0 {
+ options.ExpiryWindowJitterFrac = 0
+ } else if options.ExpiryWindowJitterFrac > 1 {
+ options.ExpiryWindowJitterFrac = 1
+ }
+
+ return &CredentialsCache{
+ provider: provider,
+ options: options,
+ }
+}
+
+// Retrieve returns the credentials. If the credentials have already been
+// retrieved, and not expired the cached credentials will be returned. If the
+// credentials have not been retrieved yet, or expired the provider's Retrieve
+// method will be called.
+//
+// Returns and error if the provider's retrieve method returns an error.
+func (p *CredentialsCache) Retrieve(ctx context.Context) (Credentials, error) {
+ if creds, ok := p.getCreds(); ok && !creds.Expired() {
+ return creds, nil
+ }
+
+ resCh := p.sf.DoChan("", func() (interface{}, error) {
+ return p.singleRetrieve(&suppressedContext{ctx})
+ })
+ select {
+ case res := <-resCh:
+ return res.Val.(Credentials), res.Err
+ case <-ctx.Done():
+ return Credentials{}, &RequestCanceledError{Err: ctx.Err()}
+ }
+}
+
+func (p *CredentialsCache) singleRetrieve(ctx context.Context) (interface{}, error) {
+ currCreds, ok := p.getCreds()
+ if ok && !currCreds.Expired() {
+ return currCreds, nil
+ }
+
+ newCreds, err := p.provider.Retrieve(ctx)
+ if err != nil {
+ handleFailToRefresh := defaultHandleFailToRefresh
+ if cs, ok := p.provider.(HandleFailRefreshCredentialsCacheStrategy); ok {
+ handleFailToRefresh = cs.HandleFailToRefresh
+ }
+ newCreds, err = handleFailToRefresh(ctx, currCreds, err)
+ if err != nil {
+ return Credentials{}, fmt.Errorf("failed to refresh cached credentials, %w", err)
+ }
+ }
+
+ if newCreds.CanExpire && p.options.ExpiryWindow > 0 {
+ adjustExpiresBy := defaultAdjustExpiresBy
+ if cs, ok := p.provider.(AdjustExpiresByCredentialsCacheStrategy); ok {
+ adjustExpiresBy = cs.AdjustExpiresBy
+ }
+
+ randFloat64, err := sdkrand.CryptoRandFloat64()
+ if err != nil {
+ return Credentials{}, fmt.Errorf("failed to get random provider, %w", err)
+ }
+
+ var jitter time.Duration
+ if p.options.ExpiryWindowJitterFrac > 0 {
+ jitter = time.Duration(randFloat64 *
+ p.options.ExpiryWindowJitterFrac * float64(p.options.ExpiryWindow))
+ }
+
+ newCreds, err = adjustExpiresBy(newCreds, -(p.options.ExpiryWindow - jitter))
+ if err != nil {
+ return Credentials{}, fmt.Errorf("failed to adjust credentials expires, %w", err)
+ }
+ }
+
+ p.creds.Store(&newCreds)
+ return newCreds, nil
+}
+
+// getCreds returns the currently stored credentials and true. Returning false
+// if no credentials were stored.
+func (p *CredentialsCache) getCreds() (Credentials, bool) {
+ v := p.creds.Load()
+ if v == nil {
+ return Credentials{}, false
+ }
+
+ c := v.(*Credentials)
+ if c == nil || !c.HasKeys() {
+ return Credentials{}, false
+ }
+
+ return *c, true
+}
+
+// Invalidate will invalidate the cached credentials. The next call to Retrieve
+// will cause the provider's Retrieve method to be called.
+func (p *CredentialsCache) Invalidate() {
+ p.creds.Store((*Credentials)(nil))
+}
+
+// HandleFailRefreshCredentialsCacheStrategy is an interface for
+// CredentialsCache to allow CredentialsProvider how failed to refresh
+// credentials is handled.
+type HandleFailRefreshCredentialsCacheStrategy interface {
+ // Given the previously cached Credentials, if any, and refresh error, may
+ // returns new or modified set of Credentials, or error.
+ //
+ // Credential caches may use default implementation if nil.
+ HandleFailToRefresh(context.Context, Credentials, error) (Credentials, error)
+}
+
+// defaultHandleFailToRefresh returns the passed in error.
+func defaultHandleFailToRefresh(ctx context.Context, _ Credentials, err error) (Credentials, error) {
+ return Credentials{}, err
+}
+
+// AdjustExpiresByCredentialsCacheStrategy is an interface for CredentialCache
+// to allow CredentialsProvider to intercept adjustments to Credentials expiry
+// based on expectations and use cases of CredentialsProvider.
+//
+// Credential caches may use default implementation if nil.
+type AdjustExpiresByCredentialsCacheStrategy interface {
+ // Given a Credentials as input, applying any mutations and
+ // returning the potentially updated Credentials, or error.
+ AdjustExpiresBy(Credentials, time.Duration) (Credentials, error)
+}
+
+// defaultAdjustExpiresBy adds the duration to the passed in credentials Expires,
+// and returns the updated credentials value. If Credentials value's CanExpire
+// is false, the passed in credentials are returned unchanged.
+func defaultAdjustExpiresBy(creds Credentials, dur time.Duration) (Credentials, error) {
+ if !creds.CanExpire {
+ return creds, nil
+ }
+
+ creds.Expires = creds.Expires.Add(dur)
+ return creds, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go
new file mode 100644
index 000000000..24c8ce4a7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go
@@ -0,0 +1,131 @@
+package aws
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+)
+
+// AnonymousCredentials provides a sentinel CredentialsProvider that should be
+// used to instruct the SDK's signing middleware to not sign the request.
+//
+// Using `nil` credentials when configuring an API client will achieve the same
+// result. The AnonymousCredentials type allows you to configure the SDK's
+// external config loading to not attempt to source credentials from the shared
+// config or environment.
+//
+// For example you can use this CredentialsProvider with an API client's
+// Options to instruct the client not to sign a request for accessing public
+// S3 bucket objects.
+//
+// The following example demonstrates using the AnonymousCredentials to prevent
+// SDK's external config loading attempt to resolve credentials.
+//
+// cfg, err := config.LoadDefaultConfig(context.TODO(),
+// config.WithCredentialsProvider(aws.AnonymousCredentials{}),
+// )
+// if err != nil {
+// log.Fatalf("failed to load config, %v", err)
+// }
+//
+// client := s3.NewFromConfig(cfg)
+//
+// Alternatively you can leave the API client Option's `Credential` member to
+// nil. If using the `NewFromConfig` constructor you'll need to explicitly set
+// the `Credentials` member to nil, if the external config resolved a
+// credential provider.
+//
+// client := s3.New(s3.Options{
+// // Credentials defaults to a nil value.
+// })
+//
+// This can also be configured for specific operations calls too.
+//
+// cfg, err := config.LoadDefaultConfig(context.TODO())
+// if err != nil {
+// log.Fatalf("failed to load config, %v", err)
+// }
+//
+// client := s3.NewFromConfig(config)
+//
+// result, err := client.GetObject(context.TODO(), s3.GetObject{
+// Bucket: aws.String("example-bucket"),
+// Key: aws.String("example-key"),
+// }, func(o *s3.Options) {
+// o.Credentials = nil
+// // Or
+// o.Credentials = aws.AnonymousCredentials{}
+// })
+type AnonymousCredentials struct{}
+
+// Retrieve implements the CredentialsProvider interface, but will always
+// return error, and cannot be used to sign a request. The AnonymousCredentials
+// type is used as a sentinel type instructing the AWS request signing
+// middleware to not sign a request.
+func (AnonymousCredentials) Retrieve(context.Context) (Credentials, error) {
+ return Credentials{Source: "AnonymousCredentials"},
+ fmt.Errorf("the AnonymousCredentials is not a valid credential provider, and cannot be used to sign AWS requests with")
+}
+
+// A Credentials is the AWS credentials value for individual credential fields.
+type Credentials struct {
+ // AWS Access key ID
+ AccessKeyID string
+
+ // AWS Secret Access Key
+ SecretAccessKey string
+
+ // AWS Session Token
+ SessionToken string
+
+ // Source of the credentials
+ Source string
+
+ // States if the credentials can expire or not.
+ CanExpire bool
+
+ // The time the credentials will expire at. Should be ignored if CanExpire
+ // is false.
+ Expires time.Time
+}
+
+// Expired returns if the credentials have expired.
+func (v Credentials) Expired() bool {
+ if v.CanExpire {
+ // Calling Round(0) on the current time will truncate the monotonic
+ // reading only. Ensures credential expiry time is always based on
+ // reported wall-clock time.
+ return !v.Expires.After(sdk.NowTime().Round(0))
+ }
+
+ return false
+}
+
+// HasKeys returns if the credentials keys are set.
+func (v Credentials) HasKeys() bool {
+ return len(v.AccessKeyID) > 0 && len(v.SecretAccessKey) > 0
+}
+
+// A CredentialsProvider is the interface for any component which will provide
+// credentials Credentials. A CredentialsProvider is required to manage its own
+// Expired state, and what to be expired means.
+//
+// A credentials provider implementation can be wrapped with a CredentialCache
+// to cache the credential value retrieved. Without the cache the SDK will
+// attempt to retrieve the credentials for every request.
+type CredentialsProvider interface {
+ // Retrieve returns nil if it successfully retrieved the value.
+ // Error is returned if the value were not obtainable, or empty.
+ Retrieve(ctx context.Context) (Credentials, error)
+}
+
+// CredentialsProviderFunc provides a helper wrapping a function value to
+// satisfy the CredentialsProvider interface.
+type CredentialsProviderFunc func(context.Context) (Credentials, error)
+
+// Retrieve delegates to the function value the CredentialsProviderFunc wraps.
+func (fn CredentialsProviderFunc) Retrieve(ctx context.Context) (Credentials, error) {
+ return fn(ctx)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/auto.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/auto.go
new file mode 100644
index 000000000..fd408e518
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/auto.go
@@ -0,0 +1,38 @@
+package defaults
+
+import (
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "runtime"
+ "strings"
+)
+
+var getGOOS = func() string {
+ return runtime.GOOS
+}
+
+// ResolveDefaultsModeAuto is used to determine the effective aws.DefaultsMode when the mode
+// is set to aws.DefaultsModeAuto.
+func ResolveDefaultsModeAuto(region string, environment aws.RuntimeEnvironment) aws.DefaultsMode {
+ goos := getGOOS()
+ if goos == "android" || goos == "ios" {
+ return aws.DefaultsModeMobile
+ }
+
+ var currentRegion string
+ if len(environment.EnvironmentIdentifier) > 0 {
+ currentRegion = environment.Region
+ }
+
+ if len(currentRegion) == 0 && len(environment.EC2InstanceMetadataRegion) > 0 {
+ currentRegion = environment.EC2InstanceMetadataRegion
+ }
+
+ if len(region) > 0 && len(currentRegion) > 0 {
+ if strings.EqualFold(region, currentRegion) {
+ return aws.DefaultsModeInRegion
+ }
+ return aws.DefaultsModeCrossRegion
+ }
+
+ return aws.DefaultsModeStandard
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/configuration.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/configuration.go
new file mode 100644
index 000000000..8b7e01fa2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/configuration.go
@@ -0,0 +1,43 @@
+package defaults
+
+import (
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+// Configuration is the set of SDK configuration options that are determined based
+// on the configured DefaultsMode.
+type Configuration struct {
+ // RetryMode is the configuration's default retry mode API clients should
+ // use for constructing a Retryer.
+ RetryMode aws.RetryMode
+
+ // ConnectTimeout is the maximum amount of time a dial will wait for
+ // a connect to complete.
+ //
+ // See https://pkg.go.dev/net#Dialer.Timeout
+ ConnectTimeout *time.Duration
+
+ // TLSNegotiationTimeout specifies the maximum amount of time waiting to
+ // wait for a TLS handshake.
+ //
+ // See https://pkg.go.dev/net/http#Transport.TLSHandshakeTimeout
+ TLSNegotiationTimeout *time.Duration
+}
+
+// GetConnectTimeout returns the ConnectTimeout value, returns false if the value is not set.
+func (c *Configuration) GetConnectTimeout() (time.Duration, bool) {
+ if c.ConnectTimeout == nil {
+ return 0, false
+ }
+ return *c.ConnectTimeout, true
+}
+
+// GetTLSNegotiationTimeout returns the TLSNegotiationTimeout value, returns false if the value is not set.
+func (c *Configuration) GetTLSNegotiationTimeout() (time.Duration, bool) {
+ if c.TLSNegotiationTimeout == nil {
+ return 0, false
+ }
+ return *c.TLSNegotiationTimeout, true
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/defaults.go
new file mode 100644
index 000000000..dbaa873dc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/defaults.go
@@ -0,0 +1,50 @@
+// Code generated by github.com/aws/aws-sdk-go-v2/internal/codegen/cmd/defaultsconfig. DO NOT EDIT.
+
+package defaults
+
+import (
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "time"
+)
+
+// GetModeConfiguration returns the default Configuration descriptor for the given mode.
+//
+// Supports the following modes: cross-region, in-region, mobile, standard
+func GetModeConfiguration(mode aws.DefaultsMode) (Configuration, error) {
+ var mv aws.DefaultsMode
+ mv.SetFromString(string(mode))
+
+ switch mv {
+ case aws.DefaultsModeCrossRegion:
+ settings := Configuration{
+ ConnectTimeout: aws.Duration(3100 * time.Millisecond),
+ RetryMode: aws.RetryMode("standard"),
+ TLSNegotiationTimeout: aws.Duration(3100 * time.Millisecond),
+ }
+ return settings, nil
+ case aws.DefaultsModeInRegion:
+ settings := Configuration{
+ ConnectTimeout: aws.Duration(1100 * time.Millisecond),
+ RetryMode: aws.RetryMode("standard"),
+ TLSNegotiationTimeout: aws.Duration(1100 * time.Millisecond),
+ }
+ return settings, nil
+ case aws.DefaultsModeMobile:
+ settings := Configuration{
+ ConnectTimeout: aws.Duration(30000 * time.Millisecond),
+ RetryMode: aws.RetryMode("standard"),
+ TLSNegotiationTimeout: aws.Duration(30000 * time.Millisecond),
+ }
+ return settings, nil
+ case aws.DefaultsModeStandard:
+ settings := Configuration{
+ ConnectTimeout: aws.Duration(3100 * time.Millisecond),
+ RetryMode: aws.RetryMode("standard"),
+ TLSNegotiationTimeout: aws.Duration(3100 * time.Millisecond),
+ }
+ return settings, nil
+ default:
+ return Configuration{}, fmt.Errorf("unsupported defaults mode: %v", mode)
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/doc.go
new file mode 100644
index 000000000..2d90011b4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/doc.go
@@ -0,0 +1,2 @@
+// Package defaults provides recommended configuration values for AWS SDKs and CLIs.
+package defaults
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaultsmode.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaultsmode.go
new file mode 100644
index 000000000..fcf9387c2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaultsmode.go
@@ -0,0 +1,95 @@
+// Code generated by github.com/aws/aws-sdk-go-v2/internal/codegen/cmd/defaultsmode. DO NOT EDIT.
+
+package aws
+
+import (
+ "strings"
+)
+
+// DefaultsMode is the SDK defaults mode setting.
+type DefaultsMode string
+
+// The DefaultsMode constants.
+const (
+ // DefaultsModeAuto is an experimental mode that builds on the standard mode.
+ // The SDK will attempt to discover the execution environment to determine the
+ // appropriate settings automatically.
+ //
+ // Note that the auto detection is heuristics-based and does not guarantee 100%
+ // accuracy. STANDARD mode will be used if the execution environment cannot
+ // be determined. The auto detection might query EC2 Instance Metadata service
+ // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html),
+ // which might introduce latency. Therefore we recommend choosing an explicit
+ // defaults_mode instead if startup latency is critical to your application
+ DefaultsModeAuto DefaultsMode = "auto"
+
+ // DefaultsModeCrossRegion builds on the standard mode and includes optimization
+ // tailored for applications which call AWS services in a different region
+ //
+ // Note that the default values vended from this mode might change as best practices
+ // may evolve. As a result, it is encouraged to perform tests when upgrading
+ // the SDK
+ DefaultsModeCrossRegion DefaultsMode = "cross-region"
+
+ // DefaultsModeInRegion builds on the standard mode and includes optimization
+ // tailored for applications which call AWS services from within the same AWS
+ // region
+ //
+ // Note that the default values vended from this mode might change as best practices
+ // may evolve. As a result, it is encouraged to perform tests when upgrading
+ // the SDK
+ DefaultsModeInRegion DefaultsMode = "in-region"
+
+ // DefaultsModeLegacy provides default settings that vary per SDK and were used
+ // prior to establishment of defaults_mode
+ DefaultsModeLegacy DefaultsMode = "legacy"
+
+ // DefaultsModeMobile builds on the standard mode and includes optimization
+ // tailored for mobile applications
+ //
+ // Note that the default values vended from this mode might change as best practices
+ // may evolve. As a result, it is encouraged to perform tests when upgrading
+ // the SDK
+ DefaultsModeMobile DefaultsMode = "mobile"
+
+ // DefaultsModeStandard provides the latest recommended default values that
+ // should be safe to run in most scenarios
+ //
+ // Note that the default values vended from this mode might change as best practices
+ // may evolve. As a result, it is encouraged to perform tests when upgrading
+ // the SDK
+ DefaultsModeStandard DefaultsMode = "standard"
+)
+
+// SetFromString sets the DefaultsMode value to one of the pre-defined constants that matches
+// the provided string when compared using EqualFold. If the value does not match a known
+// constant it will be set to as-is and the function will return false. As a special case, if the
+// provided value is a zero-length string, the mode will be set to LegacyDefaultsMode.
+func (d *DefaultsMode) SetFromString(v string) (ok bool) {
+ switch {
+ case strings.EqualFold(v, string(DefaultsModeAuto)):
+ *d = DefaultsModeAuto
+ ok = true
+ case strings.EqualFold(v, string(DefaultsModeCrossRegion)):
+ *d = DefaultsModeCrossRegion
+ ok = true
+ case strings.EqualFold(v, string(DefaultsModeInRegion)):
+ *d = DefaultsModeInRegion
+ ok = true
+ case strings.EqualFold(v, string(DefaultsModeLegacy)):
+ *d = DefaultsModeLegacy
+ ok = true
+ case strings.EqualFold(v, string(DefaultsModeMobile)):
+ *d = DefaultsModeMobile
+ ok = true
+ case strings.EqualFold(v, string(DefaultsModeStandard)):
+ *d = DefaultsModeStandard
+ ok = true
+ case len(v) == 0:
+ *d = DefaultsModeLegacy
+ ok = true
+ default:
+ *d = DefaultsMode(v)
+ }
+ return ok
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go
similarity index 68%
rename from vendor/github.com/aws/aws-sdk-go/aws/doc.go
rename to vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go
index 4fcb61618..d8b6e09e5 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go
@@ -1,7 +1,7 @@
// Package aws provides the core SDK's utilities and shared types. Use this package's
// utilities to simplify setting and reading API operations parameters.
//
-// Value and Pointer Conversion Utilities
+// # Value and Pointer Conversion Utilities
//
// This package includes a helper conversion utility for each scalar type the SDK's
// API use. These utilities make getting a pointer of the scalar, and dereferencing
@@ -16,33 +16,33 @@
// to get pointer of a literal string value, because getting the address of a
// literal requires assigning the value to a variable first.
//
-// var strPtr *string
+// var strPtr *string
//
-// // Without the SDK's conversion functions
-// str := "my string"
-// strPtr = &str
+// // Without the SDK's conversion functions
+// str := "my string"
+// strPtr = &str
//
-// // With the SDK's conversion functions
-// strPtr = aws.String("my string")
+// // With the SDK's conversion functions
+// strPtr = aws.String("my string")
//
-// // Convert *string to string value
-// str = aws.StringValue(strPtr)
+// // Convert *string to string value
+// str = aws.ToString(strPtr)
//
// In addition to scalars the aws package also includes conversion utilities for
// map and slice for commonly types used in API parameters. The map and slice
// conversion functions use similar naming pattern as the scalar conversion
// functions.
//
-// var strPtrs []*string
-// var strs []string = []string{"Go", "Gophers", "Go"}
+// var strPtrs []*string
+// var strs []string = []string{"Go", "Gophers", "Go"}
//
-// // Convert []string to []*string
-// strPtrs = aws.StringSlice(strs)
+// // Convert []string to []*string
+// strPtrs = aws.StringSlice(strs)
//
-// // Convert []*string to []string
-// strs = aws.StringValueSlice(strPtrs)
+// // Convert []*string to []string
+// strs = aws.ToStringSlice(strPtrs)
//
-// SDK Default HTTP Client
+// # SDK Default HTTP Client
//
// The SDK will use the http.DefaultClient if a HTTP client is not provided to
// the SDK's Session, or service client constructor. This means that if the
@@ -54,3 +54,9 @@
// configure the SDK to use the custom HTTP Client by setting the HTTPClient
// value of the SDK's Config type when creating a Session or service client.
package aws
+
+// generate.go uses a build tag of "ignore", go run doesn't need to specify
+// this because go run ignores all build flags when running a go file directly.
+//go:generate go run -tags codegen generate.go
+//go:generate go run -tags codegen logging_generate.go
+//go:generate gofmt -w -s .
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go
new file mode 100644
index 000000000..aa10a9b40
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go
@@ -0,0 +1,229 @@
+package aws
+
+import (
+ "fmt"
+)
+
+// DualStackEndpointState is a constant to describe the dual-stack endpoint resolution behavior.
+type DualStackEndpointState uint
+
+const (
+ // DualStackEndpointStateUnset is the default value behavior for dual-stack endpoint resolution.
+ DualStackEndpointStateUnset DualStackEndpointState = iota
+
+ // DualStackEndpointStateEnabled enables dual-stack endpoint resolution for service endpoints.
+ DualStackEndpointStateEnabled
+
+ // DualStackEndpointStateDisabled disables dual-stack endpoint resolution for endpoints.
+ DualStackEndpointStateDisabled
+)
+
+// GetUseDualStackEndpoint takes a service's EndpointResolverOptions and returns the UseDualStackEndpoint value.
+// Returns boolean false if the provided options does not have a method to retrieve the DualStackEndpointState.
+func GetUseDualStackEndpoint(options ...interface{}) (value DualStackEndpointState, found bool) {
+ type iface interface {
+ GetUseDualStackEndpoint() DualStackEndpointState
+ }
+ for _, option := range options {
+ if i, ok := option.(iface); ok {
+ value = i.GetUseDualStackEndpoint()
+ found = true
+ break
+ }
+ }
+ return value, found
+}
+
+// FIPSEndpointState is a constant to describe the FIPS endpoint resolution behavior.
+type FIPSEndpointState uint
+
+const (
+ // FIPSEndpointStateUnset is the default value behavior for FIPS endpoint resolution.
+ FIPSEndpointStateUnset FIPSEndpointState = iota
+
+ // FIPSEndpointStateEnabled enables FIPS endpoint resolution for service endpoints.
+ FIPSEndpointStateEnabled
+
+ // FIPSEndpointStateDisabled disables FIPS endpoint resolution for endpoints.
+ FIPSEndpointStateDisabled
+)
+
+// GetUseFIPSEndpoint takes a service's EndpointResolverOptions and returns the UseDualStackEndpoint value.
+// Returns boolean false if the provided options does not have a method to retrieve the DualStackEndpointState.
+func GetUseFIPSEndpoint(options ...interface{}) (value FIPSEndpointState, found bool) {
+ type iface interface {
+ GetUseFIPSEndpoint() FIPSEndpointState
+ }
+ for _, option := range options {
+ if i, ok := option.(iface); ok {
+ value = i.GetUseFIPSEndpoint()
+ found = true
+ break
+ }
+ }
+ return value, found
+}
+
+// Endpoint represents the endpoint a service client should make API operation
+// calls to.
+//
+// The SDK will automatically resolve these endpoints per API client using an
+// internal endpoint resolvers. If you'd like to provide custom endpoint
+// resolving behavior you can implement the EndpointResolver interface.
+type Endpoint struct {
+ // The base URL endpoint the SDK API clients will use to make API calls to.
+ // The SDK will suffix URI path and query elements to this endpoint.
+ URL string
+
+ // Specifies if the endpoint's hostname can be modified by the SDK's API
+ // client.
+ //
+ // If the hostname is mutable the SDK API clients may modify any part of
+ // the hostname based on the requirements of the API, (e.g. adding, or
+ // removing content in the hostname). Such as, Amazon S3 API client
+ // prefixing "bucketname" to the hostname, or changing the
+ // hostname service name component from "s3." to "s3-accesspoint.dualstack."
+ // for the dualstack endpoint of an S3 Accesspoint resource.
+ //
+ // Care should be taken when providing a custom endpoint for an API. If the
+ // endpoint hostname is mutable, and the client cannot modify the endpoint
+ // correctly, the operation call will most likely fail, or have undefined
+ // behavior.
+ //
+ // If hostname is immutable, the SDK API clients will not modify the
+ // hostname of the URL. This may cause the API client not to function
+ // correctly if the API requires the operation specific hostname values
+ // to be used by the client.
+ //
+ // This flag does not modify the API client's behavior if this endpoint
+ // will be used instead of Endpoint Discovery, or if the endpoint will be
+ // used to perform Endpoint Discovery. That behavior is configured via the
+ // API Client's Options.
+ HostnameImmutable bool
+
+ // The AWS partition the endpoint belongs to.
+ PartitionID string
+
+ // The service name that should be used for signing the requests to the
+ // endpoint.
+ SigningName string
+
+ // The region that should be used for signing the request to the endpoint.
+ SigningRegion string
+
+ // The signing method that should be used for signing the requests to the
+ // endpoint.
+ SigningMethod string
+
+ // The source of the Endpoint. By default, this will be EndpointSourceServiceMetadata.
+ // When providing a custom endpoint, you should set the source as EndpointSourceCustom.
+ // If source is not provided when providing a custom endpoint, the SDK may not
+ // perform required host mutations correctly. Source should be used along with
+ // HostnameImmutable property as per the usage requirement.
+ Source EndpointSource
+}
+
+// EndpointSource is the endpoint source type.
+type EndpointSource int
+
+const (
+ // EndpointSourceServiceMetadata denotes service modeled endpoint metadata is used as Endpoint Source.
+ EndpointSourceServiceMetadata EndpointSource = iota
+
+ // EndpointSourceCustom denotes endpoint is a custom endpoint. This source should be used when
+ // user provides a custom endpoint to be used by the SDK.
+ EndpointSourceCustom
+)
+
+// EndpointNotFoundError is a sentinel error to indicate that the
+// EndpointResolver implementation was unable to resolve an endpoint for the
+// given service and region. Resolvers should use this to indicate that an API
+// client should fallback and attempt to use it's internal default resolver to
+// resolve the endpoint.
+type EndpointNotFoundError struct {
+ Err error
+}
+
+// Error is the error message.
+func (e *EndpointNotFoundError) Error() string {
+ return fmt.Sprintf("endpoint not found, %v", e.Err)
+}
+
+// Unwrap returns the underlying error.
+func (e *EndpointNotFoundError) Unwrap() error {
+ return e.Err
+}
+
+// EndpointResolver is an endpoint resolver that can be used to provide or
+// override an endpoint for the given service and region. API clients will
+// attempt to use the EndpointResolver first to resolve an endpoint if
+// available. If the EndpointResolver returns an EndpointNotFoundError error,
+// API clients will fallback to attempting to resolve the endpoint using its
+// internal default endpoint resolver.
+//
+// Deprecated: See EndpointResolverWithOptions
+type EndpointResolver interface {
+ ResolveEndpoint(service, region string) (Endpoint, error)
+}
+
+// EndpointResolverFunc wraps a function to satisfy the EndpointResolver interface.
+//
+// Deprecated: See EndpointResolverWithOptionsFunc
+type EndpointResolverFunc func(service, region string) (Endpoint, error)
+
+// ResolveEndpoint calls the wrapped function and returns the results.
+//
+// Deprecated: See EndpointResolverWithOptions.ResolveEndpoint
+func (e EndpointResolverFunc) ResolveEndpoint(service, region string) (Endpoint, error) {
+ return e(service, region)
+}
+
+// EndpointResolverWithOptions is an endpoint resolver that can be used to provide or
+// override an endpoint for the given service, region, and the service client's EndpointOptions. API clients will
+// attempt to use the EndpointResolverWithOptions first to resolve an endpoint if
+// available. If the EndpointResolverWithOptions returns an EndpointNotFoundError error,
+// API clients will fallback to attempting to resolve the endpoint using its
+// internal default endpoint resolver.
+type EndpointResolverWithOptions interface {
+ ResolveEndpoint(service, region string, options ...interface{}) (Endpoint, error)
+}
+
+// EndpointResolverWithOptionsFunc wraps a function to satisfy the EndpointResolverWithOptions interface.
+type EndpointResolverWithOptionsFunc func(service, region string, options ...interface{}) (Endpoint, error)
+
+// ResolveEndpoint calls the wrapped function and returns the results.
+func (e EndpointResolverWithOptionsFunc) ResolveEndpoint(service, region string, options ...interface{}) (Endpoint, error) {
+ return e(service, region, options...)
+}
+
+// GetDisableHTTPS takes a service's EndpointResolverOptions and returns the DisableHTTPS value.
+// Returns boolean false if the provided options does not have a method to retrieve the DisableHTTPS.
+func GetDisableHTTPS(options ...interface{}) (value bool, found bool) {
+ type iface interface {
+ GetDisableHTTPS() bool
+ }
+ for _, option := range options {
+ if i, ok := option.(iface); ok {
+ value = i.GetDisableHTTPS()
+ found = true
+ break
+ }
+ }
+ return value, found
+}
+
+// GetResolvedRegion takes a service's EndpointResolverOptions and returns the ResolvedRegion value.
+// Returns boolean false if the provided options does not have a method to retrieve the ResolvedRegion.
+func GetResolvedRegion(options ...interface{}) (value string, found bool) {
+ type iface interface {
+ GetResolvedRegion() string
+ }
+ for _, option := range options {
+ if i, ok := option.(iface); ok {
+ value = i.GetResolvedRegion()
+ found = true
+ break
+ }
+ }
+ return value, found
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/errors.go
new file mode 100644
index 000000000..f390a08f9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/errors.go
@@ -0,0 +1,9 @@
+package aws
+
+// MissingRegionError is an error that is returned if region configuration
+// value was not found.
+type MissingRegionError struct{}
+
+func (*MissingRegionError) Error() string {
+ return "an AWS region is required, but was not found"
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/from_ptr.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/from_ptr.go
new file mode 100644
index 000000000..2394418e9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/from_ptr.go
@@ -0,0 +1,365 @@
+// Code generated by aws/generate.go DO NOT EDIT.
+
+package aws
+
+import (
+ "github.com/aws/smithy-go/ptr"
+ "time"
+)
+
+// ToBool returns bool value dereferenced if the passed
+// in pointer was not nil. Returns a bool zero value if the
+// pointer was nil.
+func ToBool(p *bool) (v bool) {
+ return ptr.ToBool(p)
+}
+
+// ToBoolSlice returns a slice of bool values, that are
+// dereferenced if the passed in pointer was not nil. Returns a bool
+// zero value if the pointer was nil.
+func ToBoolSlice(vs []*bool) []bool {
+ return ptr.ToBoolSlice(vs)
+}
+
+// ToBoolMap returns a map of bool values, that are
+// dereferenced if the passed in pointer was not nil. The bool
+// zero value is used if the pointer was nil.
+func ToBoolMap(vs map[string]*bool) map[string]bool {
+ return ptr.ToBoolMap(vs)
+}
+
+// ToByte returns byte value dereferenced if the passed
+// in pointer was not nil. Returns a byte zero value if the
+// pointer was nil.
+func ToByte(p *byte) (v byte) {
+ return ptr.ToByte(p)
+}
+
+// ToByteSlice returns a slice of byte values, that are
+// dereferenced if the passed in pointer was not nil. Returns a byte
+// zero value if the pointer was nil.
+func ToByteSlice(vs []*byte) []byte {
+ return ptr.ToByteSlice(vs)
+}
+
+// ToByteMap returns a map of byte values, that are
+// dereferenced if the passed in pointer was not nil. The byte
+// zero value is used if the pointer was nil.
+func ToByteMap(vs map[string]*byte) map[string]byte {
+ return ptr.ToByteMap(vs)
+}
+
+// ToString returns string value dereferenced if the passed
+// in pointer was not nil. Returns a string zero value if the
+// pointer was nil.
+func ToString(p *string) (v string) {
+ return ptr.ToString(p)
+}
+
+// ToStringSlice returns a slice of string values, that are
+// dereferenced if the passed in pointer was not nil. Returns a string
+// zero value if the pointer was nil.
+func ToStringSlice(vs []*string) []string {
+ return ptr.ToStringSlice(vs)
+}
+
+// ToStringMap returns a map of string values, that are
+// dereferenced if the passed in pointer was not nil. The string
+// zero value is used if the pointer was nil.
+func ToStringMap(vs map[string]*string) map[string]string {
+ return ptr.ToStringMap(vs)
+}
+
+// ToInt returns int value dereferenced if the passed
+// in pointer was not nil. Returns a int zero value if the
+// pointer was nil.
+func ToInt(p *int) (v int) {
+ return ptr.ToInt(p)
+}
+
+// ToIntSlice returns a slice of int values, that are
+// dereferenced if the passed in pointer was not nil. Returns a int
+// zero value if the pointer was nil.
+func ToIntSlice(vs []*int) []int {
+ return ptr.ToIntSlice(vs)
+}
+
+// ToIntMap returns a map of int values, that are
+// dereferenced if the passed in pointer was not nil. The int
+// zero value is used if the pointer was nil.
+func ToIntMap(vs map[string]*int) map[string]int {
+ return ptr.ToIntMap(vs)
+}
+
+// ToInt8 returns int8 value dereferenced if the passed
+// in pointer was not nil. Returns a int8 zero value if the
+// pointer was nil.
+func ToInt8(p *int8) (v int8) {
+ return ptr.ToInt8(p)
+}
+
+// ToInt8Slice returns a slice of int8 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a int8
+// zero value if the pointer was nil.
+func ToInt8Slice(vs []*int8) []int8 {
+ return ptr.ToInt8Slice(vs)
+}
+
+// ToInt8Map returns a map of int8 values, that are
+// dereferenced if the passed in pointer was not nil. The int8
+// zero value is used if the pointer was nil.
+func ToInt8Map(vs map[string]*int8) map[string]int8 {
+ return ptr.ToInt8Map(vs)
+}
+
+// ToInt16 returns int16 value dereferenced if the passed
+// in pointer was not nil. Returns a int16 zero value if the
+// pointer was nil.
+func ToInt16(p *int16) (v int16) {
+ return ptr.ToInt16(p)
+}
+
+// ToInt16Slice returns a slice of int16 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a int16
+// zero value if the pointer was nil.
+func ToInt16Slice(vs []*int16) []int16 {
+ return ptr.ToInt16Slice(vs)
+}
+
+// ToInt16Map returns a map of int16 values, that are
+// dereferenced if the passed in pointer was not nil. The int16
+// zero value is used if the pointer was nil.
+func ToInt16Map(vs map[string]*int16) map[string]int16 {
+ return ptr.ToInt16Map(vs)
+}
+
+// ToInt32 returns int32 value dereferenced if the passed
+// in pointer was not nil. Returns a int32 zero value if the
+// pointer was nil.
+func ToInt32(p *int32) (v int32) {
+ return ptr.ToInt32(p)
+}
+
+// ToInt32Slice returns a slice of int32 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a int32
+// zero value if the pointer was nil.
+func ToInt32Slice(vs []*int32) []int32 {
+ return ptr.ToInt32Slice(vs)
+}
+
+// ToInt32Map returns a map of int32 values, that are
+// dereferenced if the passed in pointer was not nil. The int32
+// zero value is used if the pointer was nil.
+func ToInt32Map(vs map[string]*int32) map[string]int32 {
+ return ptr.ToInt32Map(vs)
+}
+
+// ToInt64 returns int64 value dereferenced if the passed
+// in pointer was not nil. Returns a int64 zero value if the
+// pointer was nil.
+func ToInt64(p *int64) (v int64) {
+ return ptr.ToInt64(p)
+}
+
+// ToInt64Slice returns a slice of int64 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a int64
+// zero value if the pointer was nil.
+func ToInt64Slice(vs []*int64) []int64 {
+ return ptr.ToInt64Slice(vs)
+}
+
+// ToInt64Map returns a map of int64 values, that are
+// dereferenced if the passed in pointer was not nil. The int64
+// zero value is used if the pointer was nil.
+func ToInt64Map(vs map[string]*int64) map[string]int64 {
+ return ptr.ToInt64Map(vs)
+}
+
+// ToUint returns uint value dereferenced if the passed
+// in pointer was not nil. Returns a uint zero value if the
+// pointer was nil.
+func ToUint(p *uint) (v uint) {
+ return ptr.ToUint(p)
+}
+
+// ToUintSlice returns a slice of uint values, that are
+// dereferenced if the passed in pointer was not nil. Returns a uint
+// zero value if the pointer was nil.
+func ToUintSlice(vs []*uint) []uint {
+ return ptr.ToUintSlice(vs)
+}
+
+// ToUintMap returns a map of uint values, that are
+// dereferenced if the passed in pointer was not nil. The uint
+// zero value is used if the pointer was nil.
+func ToUintMap(vs map[string]*uint) map[string]uint {
+ return ptr.ToUintMap(vs)
+}
+
+// ToUint8 returns uint8 value dereferenced if the passed
+// in pointer was not nil. Returns a uint8 zero value if the
+// pointer was nil.
+func ToUint8(p *uint8) (v uint8) {
+ return ptr.ToUint8(p)
+}
+
+// ToUint8Slice returns a slice of uint8 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a uint8
+// zero value if the pointer was nil.
+func ToUint8Slice(vs []*uint8) []uint8 {
+ return ptr.ToUint8Slice(vs)
+}
+
+// ToUint8Map returns a map of uint8 values, that are
+// dereferenced if the passed in pointer was not nil. The uint8
+// zero value is used if the pointer was nil.
+func ToUint8Map(vs map[string]*uint8) map[string]uint8 {
+ return ptr.ToUint8Map(vs)
+}
+
+// ToUint16 returns uint16 value dereferenced if the passed
+// in pointer was not nil. Returns a uint16 zero value if the
+// pointer was nil.
+func ToUint16(p *uint16) (v uint16) {
+ return ptr.ToUint16(p)
+}
+
+// ToUint16Slice returns a slice of uint16 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a uint16
+// zero value if the pointer was nil.
+func ToUint16Slice(vs []*uint16) []uint16 {
+ return ptr.ToUint16Slice(vs)
+}
+
+// ToUint16Map returns a map of uint16 values, that are
+// dereferenced if the passed in pointer was not nil. The uint16
+// zero value is used if the pointer was nil.
+func ToUint16Map(vs map[string]*uint16) map[string]uint16 {
+ return ptr.ToUint16Map(vs)
+}
+
+// ToUint32 returns uint32 value dereferenced if the passed
+// in pointer was not nil. Returns a uint32 zero value if the
+// pointer was nil.
+func ToUint32(p *uint32) (v uint32) {
+ return ptr.ToUint32(p)
+}
+
+// ToUint32Slice returns a slice of uint32 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a uint32
+// zero value if the pointer was nil.
+func ToUint32Slice(vs []*uint32) []uint32 {
+ return ptr.ToUint32Slice(vs)
+}
+
+// ToUint32Map returns a map of uint32 values, that are
+// dereferenced if the passed in pointer was not nil. The uint32
+// zero value is used if the pointer was nil.
+func ToUint32Map(vs map[string]*uint32) map[string]uint32 {
+ return ptr.ToUint32Map(vs)
+}
+
+// ToUint64 returns uint64 value dereferenced if the passed
+// in pointer was not nil. Returns a uint64 zero value if the
+// pointer was nil.
+func ToUint64(p *uint64) (v uint64) {
+ return ptr.ToUint64(p)
+}
+
+// ToUint64Slice returns a slice of uint64 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a uint64
+// zero value if the pointer was nil.
+func ToUint64Slice(vs []*uint64) []uint64 {
+ return ptr.ToUint64Slice(vs)
+}
+
+// ToUint64Map returns a map of uint64 values, that are
+// dereferenced if the passed in pointer was not nil. The uint64
+// zero value is used if the pointer was nil.
+func ToUint64Map(vs map[string]*uint64) map[string]uint64 {
+ return ptr.ToUint64Map(vs)
+}
+
+// ToFloat32 returns float32 value dereferenced if the passed
+// in pointer was not nil. Returns a float32 zero value if the
+// pointer was nil.
+func ToFloat32(p *float32) (v float32) {
+ return ptr.ToFloat32(p)
+}
+
+// ToFloat32Slice returns a slice of float32 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a float32
+// zero value if the pointer was nil.
+func ToFloat32Slice(vs []*float32) []float32 {
+ return ptr.ToFloat32Slice(vs)
+}
+
+// ToFloat32Map returns a map of float32 values, that are
+// dereferenced if the passed in pointer was not nil. The float32
+// zero value is used if the pointer was nil.
+func ToFloat32Map(vs map[string]*float32) map[string]float32 {
+ return ptr.ToFloat32Map(vs)
+}
+
+// ToFloat64 returns float64 value dereferenced if the passed
+// in pointer was not nil. Returns a float64 zero value if the
+// pointer was nil.
+func ToFloat64(p *float64) (v float64) {
+ return ptr.ToFloat64(p)
+}
+
+// ToFloat64Slice returns a slice of float64 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a float64
+// zero value if the pointer was nil.
+func ToFloat64Slice(vs []*float64) []float64 {
+ return ptr.ToFloat64Slice(vs)
+}
+
+// ToFloat64Map returns a map of float64 values, that are
+// dereferenced if the passed in pointer was not nil. The float64
+// zero value is used if the pointer was nil.
+func ToFloat64Map(vs map[string]*float64) map[string]float64 {
+ return ptr.ToFloat64Map(vs)
+}
+
+// ToTime returns time.Time value dereferenced if the passed
+// in pointer was not nil. Returns a time.Time zero value if the
+// pointer was nil.
+func ToTime(p *time.Time) (v time.Time) {
+ return ptr.ToTime(p)
+}
+
+// ToTimeSlice returns a slice of time.Time values, that are
+// dereferenced if the passed in pointer was not nil. Returns a time.Time
+// zero value if the pointer was nil.
+func ToTimeSlice(vs []*time.Time) []time.Time {
+ return ptr.ToTimeSlice(vs)
+}
+
+// ToTimeMap returns a map of time.Time values, that are
+// dereferenced if the passed in pointer was not nil. The time.Time
+// zero value is used if the pointer was nil.
+func ToTimeMap(vs map[string]*time.Time) map[string]time.Time {
+ return ptr.ToTimeMap(vs)
+}
+
+// ToDuration returns time.Duration value dereferenced if the passed
+// in pointer was not nil. Returns a time.Duration zero value if the
+// pointer was nil.
+func ToDuration(p *time.Duration) (v time.Duration) {
+ return ptr.ToDuration(p)
+}
+
+// ToDurationSlice returns a slice of time.Duration values, that are
+// dereferenced if the passed in pointer was not nil. Returns a time.Duration
+// zero value if the pointer was nil.
+func ToDurationSlice(vs []*time.Duration) []time.Duration {
+ return ptr.ToDurationSlice(vs)
+}
+
+// ToDurationMap returns a map of time.Duration values, that are
+// dereferenced if the passed in pointer was not nil. The time.Duration
+// zero value is used if the pointer was nil.
+func ToDurationMap(vs map[string]*time.Duration) map[string]time.Duration {
+ return ptr.ToDurationMap(vs)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
new file mode 100644
index 000000000..5ca68262b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package aws
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.16.16"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go
new file mode 100644
index 000000000..91c94d987
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go
@@ -0,0 +1,119 @@
+// Code generated by aws/logging_generate.go DO NOT EDIT.
+
+package aws
+
+// ClientLogMode represents the logging mode of SDK clients. The client logging mode is a bit-field where
+// each bit is a flag that describes the logging behavior for one or more client components.
+// The entire 64-bit group is reserved for later expansion by the SDK.
+//
+// Example: Setting ClientLogMode to enable logging of retries and requests
+//
+// clientLogMode := aws.LogRetries | aws.LogRequest
+//
+// Example: Adding an additional log mode to an existing ClientLogMode value
+//
+// clientLogMode |= aws.LogResponse
+type ClientLogMode uint64
+
+// Supported ClientLogMode bits that can be configured to toggle logging of specific SDK events.
+const (
+ LogSigning ClientLogMode = 1 << (64 - 1 - iota)
+ LogRetries
+ LogRequest
+ LogRequestWithBody
+ LogResponse
+ LogResponseWithBody
+ LogDeprecatedUsage
+ LogRequestEventMessage
+ LogResponseEventMessage
+)
+
+// IsSigning returns whether the Signing logging mode bit is set
+func (m ClientLogMode) IsSigning() bool {
+ return m&LogSigning != 0
+}
+
+// IsRetries returns whether the Retries logging mode bit is set
+func (m ClientLogMode) IsRetries() bool {
+ return m&LogRetries != 0
+}
+
+// IsRequest returns whether the Request logging mode bit is set
+func (m ClientLogMode) IsRequest() bool {
+ return m&LogRequest != 0
+}
+
+// IsRequestWithBody returns whether the RequestWithBody logging mode bit is set
+func (m ClientLogMode) IsRequestWithBody() bool {
+ return m&LogRequestWithBody != 0
+}
+
+// IsResponse returns whether the Response logging mode bit is set
+func (m ClientLogMode) IsResponse() bool {
+ return m&LogResponse != 0
+}
+
+// IsResponseWithBody returns whether the ResponseWithBody logging mode bit is set
+func (m ClientLogMode) IsResponseWithBody() bool {
+ return m&LogResponseWithBody != 0
+}
+
+// IsDeprecatedUsage returns whether the DeprecatedUsage logging mode bit is set
+func (m ClientLogMode) IsDeprecatedUsage() bool {
+ return m&LogDeprecatedUsage != 0
+}
+
+// IsRequestEventMessage returns whether the RequestEventMessage logging mode bit is set
+func (m ClientLogMode) IsRequestEventMessage() bool {
+ return m&LogRequestEventMessage != 0
+}
+
+// IsResponseEventMessage returns whether the ResponseEventMessage logging mode bit is set
+func (m ClientLogMode) IsResponseEventMessage() bool {
+ return m&LogResponseEventMessage != 0
+}
+
+// ClearSigning clears the Signing logging mode bit
+func (m *ClientLogMode) ClearSigning() {
+ *m &^= LogSigning
+}
+
+// ClearRetries clears the Retries logging mode bit
+func (m *ClientLogMode) ClearRetries() {
+ *m &^= LogRetries
+}
+
+// ClearRequest clears the Request logging mode bit
+func (m *ClientLogMode) ClearRequest() {
+ *m &^= LogRequest
+}
+
+// ClearRequestWithBody clears the RequestWithBody logging mode bit
+func (m *ClientLogMode) ClearRequestWithBody() {
+ *m &^= LogRequestWithBody
+}
+
+// ClearResponse clears the Response logging mode bit
+func (m *ClientLogMode) ClearResponse() {
+ *m &^= LogResponse
+}
+
+// ClearResponseWithBody clears the ResponseWithBody logging mode bit
+func (m *ClientLogMode) ClearResponseWithBody() {
+ *m &^= LogResponseWithBody
+}
+
+// ClearDeprecatedUsage clears the DeprecatedUsage logging mode bit
+func (m *ClientLogMode) ClearDeprecatedUsage() {
+ *m &^= LogDeprecatedUsage
+}
+
+// ClearRequestEventMessage clears the RequestEventMessage logging mode bit
+func (m *ClientLogMode) ClearRequestEventMessage() {
+ *m &^= LogRequestEventMessage
+}
+
+// ClearResponseEventMessage clears the ResponseEventMessage logging mode bit
+func (m *ClientLogMode) ClearResponseEventMessage() {
+ *m &^= LogResponseEventMessage
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/logging_generate.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/logging_generate.go
new file mode 100644
index 000000000..6ecc2231a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/logging_generate.go
@@ -0,0 +1,95 @@
+//go:build clientlogmode
+// +build clientlogmode
+
+package main
+
+import (
+ "fmt"
+ "log"
+ "os"
+ "strings"
+ "text/template"
+)
+
+var config = struct {
+ ModeBits []string
+}{
+ // Items should be appended only to keep bit-flag positions stable
+ ModeBits: []string{
+ "Signing",
+ "Retries",
+ "Request",
+ "RequestWithBody",
+ "Response",
+ "ResponseWithBody",
+ "DeprecatedUsage",
+ "RequestEventMessage",
+ "ResponseEventMessage",
+ },
+}
+
+func bitName(name string) string {
+ return strings.ToUpper(name[:1]) + name[1:]
+}
+
+var tmpl = template.Must(template.New("ClientLogMode").Funcs(map[string]interface{}{
+ "symbolName": func(name string) string {
+ return "Log" + bitName(name)
+ },
+ "bitName": bitName,
+}).Parse(`// Code generated by aws/logging_generate.go DO NOT EDIT.
+
+package aws
+
+// ClientLogMode represents the logging mode of SDK clients. The client logging mode is a bit-field where
+// each bit is a flag that describes the logging behavior for one or more client components.
+// The entire 64-bit group is reserved for later expansion by the SDK.
+//
+// Example: Setting ClientLogMode to enable logging of retries and requests
+// clientLogMode := aws.LogRetries | aws.LogRequest
+//
+// Example: Adding an additional log mode to an existing ClientLogMode value
+// clientLogMode |= aws.LogResponse
+type ClientLogMode uint64
+
+// Supported ClientLogMode bits that can be configured to toggle logging of specific SDK events.
+const (
+{{- range $index, $field := .ModeBits }}
+ {{ (symbolName $field) }}{{- if (eq 0 $index) }} ClientLogMode = 1 << (64 - 1 - iota){{- end }}
+{{- end }}
+)
+{{ range $_, $field := .ModeBits }}
+// Is{{- bitName $field }} returns whether the {{ bitName $field }} logging mode bit is set
+func (m ClientLogMode) Is{{- bitName $field }}() bool {
+ return m&{{- (symbolName $field) }} != 0
+}
+{{ end }}
+{{- range $_, $field := .ModeBits }}
+// Clear{{- bitName $field }} clears the {{ bitName $field }} logging mode bit
+func (m *ClientLogMode) Clear{{- bitName $field }}() {
+ *m &^= {{ (symbolName $field) }}
+}
+{{ end -}}
+`))
+
+func main() {
+ uniqueBitFields := make(map[string]struct{})
+
+ for _, bitName := range config.ModeBits {
+ if _, ok := uniqueBitFields[strings.ToLower(bitName)]; ok {
+ panic(fmt.Sprintf("duplicate bit field: %s", bitName))
+ }
+ uniqueBitFields[bitName] = struct{}{}
+ }
+
+ file, err := os.Create("logging.go")
+ if err != nil {
+ log.Fatal(err)
+ }
+ defer file.Close()
+
+ err = tmpl.Execute(file, config)
+ if err != nil {
+ log.Fatal(err)
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go
new file mode 100644
index 000000000..e6e87ac77
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go
@@ -0,0 +1,180 @@
+package middleware
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+
+ "github.com/aws/smithy-go/middleware"
+)
+
+// RegisterServiceMetadata registers metadata about the service and operation into the middleware context
+// so that it is available at runtime for other middleware to introspect.
+type RegisterServiceMetadata struct {
+ ServiceID string
+ SigningName string
+ Region string
+ OperationName string
+}
+
+// ID returns the middleware identifier.
+func (s *RegisterServiceMetadata) ID() string {
+ return "RegisterServiceMetadata"
+}
+
+// HandleInitialize registers service metadata information into the middleware context, allowing for introspection.
+func (s RegisterServiceMetadata) HandleInitialize(
+ ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler,
+) (out middleware.InitializeOutput, metadata middleware.Metadata, err error) {
+ if len(s.ServiceID) > 0 {
+ ctx = SetServiceID(ctx, s.ServiceID)
+ }
+ if len(s.SigningName) > 0 {
+ ctx = SetSigningName(ctx, s.SigningName)
+ }
+ if len(s.Region) > 0 {
+ ctx = setRegion(ctx, s.Region)
+ }
+ if len(s.OperationName) > 0 {
+ ctx = setOperationName(ctx, s.OperationName)
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+// service metadata keys for storing and lookup of runtime stack information.
+type (
+ serviceIDKey struct{}
+ signingNameKey struct{}
+ signingRegionKey struct{}
+ regionKey struct{}
+ operationNameKey struct{}
+ partitionIDKey struct{}
+)
+
+// GetServiceID retrieves the service id from the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetServiceID(ctx context.Context) (v string) {
+ v, _ = middleware.GetStackValue(ctx, serviceIDKey{}).(string)
+ return v
+}
+
+// GetSigningName retrieves the service signing name from the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetSigningName(ctx context.Context) (v string) {
+ v, _ = middleware.GetStackValue(ctx, signingNameKey{}).(string)
+ return v
+}
+
+// GetSigningRegion retrieves the region from the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetSigningRegion(ctx context.Context) (v string) {
+ v, _ = middleware.GetStackValue(ctx, signingRegionKey{}).(string)
+ return v
+}
+
+// GetRegion retrieves the endpoint region from the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetRegion(ctx context.Context) (v string) {
+ v, _ = middleware.GetStackValue(ctx, regionKey{}).(string)
+ return v
+}
+
+// GetOperationName retrieves the service operation metadata from the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetOperationName(ctx context.Context) (v string) {
+ v, _ = middleware.GetStackValue(ctx, operationNameKey{}).(string)
+ return v
+}
+
+// GetPartitionID retrieves the endpoint partition id from the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetPartitionID(ctx context.Context) string {
+ v, _ := middleware.GetStackValue(ctx, partitionIDKey{}).(string)
+ return v
+}
+
+// SetSigningName set or modifies the signing name on the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func SetSigningName(ctx context.Context, value string) context.Context {
+ return middleware.WithStackValue(ctx, signingNameKey{}, value)
+}
+
+// SetSigningRegion sets or modifies the region on the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func SetSigningRegion(ctx context.Context, value string) context.Context {
+ return middleware.WithStackValue(ctx, signingRegionKey{}, value)
+}
+
+// SetServiceID sets the service id on the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func SetServiceID(ctx context.Context, value string) context.Context {
+ return middleware.WithStackValue(ctx, serviceIDKey{}, value)
+}
+
+// setRegion sets the endpoint region on the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func setRegion(ctx context.Context, value string) context.Context {
+ return middleware.WithStackValue(ctx, regionKey{}, value)
+}
+
+// setOperationName sets the service operation on the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func setOperationName(ctx context.Context, value string) context.Context {
+ return middleware.WithStackValue(ctx, operationNameKey{}, value)
+}
+
+// SetPartitionID sets the partition id of a resolved region on the context
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func SetPartitionID(ctx context.Context, value string) context.Context {
+ return middleware.WithStackValue(ctx, partitionIDKey{}, value)
+}
+
+// EndpointSource key
+type endpointSourceKey struct{}
+
+// GetEndpointSource returns an endpoint source if set on context
+func GetEndpointSource(ctx context.Context) (v aws.EndpointSource) {
+ v, _ = middleware.GetStackValue(ctx, endpointSourceKey{}).(aws.EndpointSource)
+ return v
+}
+
+// SetEndpointSource sets endpoint source on context
+func SetEndpointSource(ctx context.Context, value aws.EndpointSource) context.Context {
+ return middleware.WithStackValue(ctx, endpointSourceKey{}, value)
+}
+
+type signingCredentialsKey struct{}
+
+// GetSigningCredentials returns the credentials that were used for signing if set on context.
+func GetSigningCredentials(ctx context.Context) (v aws.Credentials) {
+ v, _ = middleware.GetStackValue(ctx, signingCredentialsKey{}).(aws.Credentials)
+ return v
+}
+
+// SetSigningCredentials sets the credentails used for signing on the context.
+func SetSigningCredentials(ctx context.Context, value aws.Credentials) context.Context {
+ return middleware.WithStackValue(ctx, signingCredentialsKey{}, value)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go
new file mode 100644
index 000000000..9bd0dfb15
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go
@@ -0,0 +1,168 @@
+package middleware
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/internal/rand"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithyrand "github.com/aws/smithy-go/rand"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// ClientRequestID is a Smithy BuildMiddleware that will generate a unique ID for logical API operation
+// invocation.
+type ClientRequestID struct{}
+
+// ID the identifier for the ClientRequestID
+func (r *ClientRequestID) ID() string {
+ return "ClientRequestID"
+}
+
+// HandleBuild attaches a unique operation invocation id for the operation to the request
+func (r ClientRequestID) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", req)
+ }
+
+ invocationID, err := smithyrand.NewUUID(rand.Reader).GetUUID()
+ if err != nil {
+ return out, metadata, err
+ }
+
+ const invocationIDHeader = "Amz-Sdk-Invocation-Id"
+ req.Header[invocationIDHeader] = append(req.Header[invocationIDHeader][:0], invocationID)
+
+ return next.HandleBuild(ctx, in)
+}
+
+// RecordResponseTiming records the response timing for the SDK client requests.
+type RecordResponseTiming struct{}
+
+// ID is the middleware identifier
+func (a *RecordResponseTiming) ID() string {
+ return "RecordResponseTiming"
+}
+
+// HandleDeserialize calculates response metadata and clock skew
+func (a RecordResponseTiming) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ responseAt := sdk.NowTime()
+ setResponseAt(&metadata, responseAt)
+
+ var serverTime time.Time
+
+ switch resp := out.RawResponse.(type) {
+ case *smithyhttp.Response:
+ respDateHeader := resp.Header.Get("Date")
+ if len(respDateHeader) == 0 {
+ break
+ }
+ var parseErr error
+ serverTime, parseErr = smithyhttp.ParseTime(respDateHeader)
+ if parseErr != nil {
+ logger := middleware.GetLogger(ctx)
+ logger.Logf(logging.Warn, "failed to parse response Date header value, got %v",
+ parseErr.Error())
+ break
+ }
+ setServerTime(&metadata, serverTime)
+ }
+
+ if !serverTime.IsZero() {
+ attemptSkew := serverTime.Sub(responseAt)
+ setAttemptSkew(&metadata, attemptSkew)
+ }
+
+ return out, metadata, err
+}
+
+type responseAtKey struct{}
+
+// GetResponseAt returns the time response was received at.
+func GetResponseAt(metadata middleware.Metadata) (v time.Time, ok bool) {
+ v, ok = metadata.Get(responseAtKey{}).(time.Time)
+ return v, ok
+}
+
+// setResponseAt sets the response time on the metadata.
+func setResponseAt(metadata *middleware.Metadata, v time.Time) {
+ metadata.Set(responseAtKey{}, v)
+}
+
+type serverTimeKey struct{}
+
+// GetServerTime returns the server time for response.
+func GetServerTime(metadata middleware.Metadata) (v time.Time, ok bool) {
+ v, ok = metadata.Get(serverTimeKey{}).(time.Time)
+ return v, ok
+}
+
+// setServerTime sets the server time on the metadata.
+func setServerTime(metadata *middleware.Metadata, v time.Time) {
+ metadata.Set(serverTimeKey{}, v)
+}
+
+type attemptSkewKey struct{}
+
+// GetAttemptSkew returns Attempt clock skew for response from metadata.
+func GetAttemptSkew(metadata middleware.Metadata) (v time.Duration, ok bool) {
+ v, ok = metadata.Get(attemptSkewKey{}).(time.Duration)
+ return v, ok
+}
+
+// setAttemptSkew sets the attempt clock skew on the metadata.
+func setAttemptSkew(metadata *middleware.Metadata, v time.Duration) {
+ metadata.Set(attemptSkewKey{}, v)
+}
+
+// AddClientRequestIDMiddleware adds ClientRequestID to the middleware stack
+func AddClientRequestIDMiddleware(stack *middleware.Stack) error {
+ return stack.Build.Add(&ClientRequestID{}, middleware.After)
+}
+
+// AddRecordResponseTiming adds RecordResponseTiming middleware to the
+// middleware stack.
+func AddRecordResponseTiming(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&RecordResponseTiming{}, middleware.After)
+}
+
+// rawResponseKey is the accessor key used to store and access the
+// raw response within the response metadata.
+type rawResponseKey struct{}
+
+// addRawResponse middleware adds raw response on to the metadata
+type addRawResponse struct{}
+
+// ID the identifier for the ClientRequestID
+func (m *addRawResponse) ID() string {
+ return "AddRawResponseToMetadata"
+}
+
+// HandleDeserialize adds raw response on the middleware metadata
+func (m addRawResponse) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ metadata.Set(rawResponseKey{}, out.RawResponse)
+ return out, metadata, err
+}
+
+// AddRawResponseToMetadata adds middleware to the middleware stack that
+// store raw response on to the metadata.
+func AddRawResponseToMetadata(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&addRawResponse{}, middleware.Before)
+}
+
+// GetRawResponse returns raw response set on metadata
+func GetRawResponse(metadata middleware.Metadata) interface{} {
+ return metadata.Get(rawResponseKey{})
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname.go
new file mode 100644
index 000000000..ba262dadc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname.go
@@ -0,0 +1,24 @@
+//go:build go1.16
+// +build go1.16
+
+package middleware
+
+import "runtime"
+
+func getNormalizedOSName() (os string) {
+ switch runtime.GOOS {
+ case "android":
+ os = "android"
+ case "linux":
+ os = "linux"
+ case "windows":
+ os = "windows"
+ case "darwin":
+ os = "macos"
+ case "ios":
+ os = "ios"
+ default:
+ os = "other"
+ }
+ return os
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname_go115.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname_go115.go
new file mode 100644
index 000000000..e14a1e4ec
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname_go115.go
@@ -0,0 +1,24 @@
+//go:build !go1.16
+// +build !go1.16
+
+package middleware
+
+import "runtime"
+
+func getNormalizedOSName() (os string) {
+ switch runtime.GOOS {
+ case "android":
+ os = "android"
+ case "linux":
+ os = "linux"
+ case "windows":
+ os = "windows"
+ case "darwin":
+ // Due to Apple M1 we can't distinguish between macOS and iOS when GOOS/GOARCH is darwin/amd64
+ // For now declare this as "other" until we have a better detection mechanism.
+ fallthrough
+ default:
+ os = "other"
+ }
+ return os
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
new file mode 100644
index 000000000..dd3391fe4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go
@@ -0,0 +1,27 @@
+package middleware
+
+import (
+ "github.com/aws/smithy-go/middleware"
+)
+
+// requestIDKey is used to retrieve request id from response metadata
+type requestIDKey struct{}
+
+// SetRequestIDMetadata sets the provided request id over middleware metadata
+func SetRequestIDMetadata(metadata *middleware.Metadata, id string) {
+ metadata.Set(requestIDKey{}, id)
+}
+
+// GetRequestIDMetadata retrieves the request id from middleware metadata
+// returns string and bool indicating value of request id, whether request id was set.
+func GetRequestIDMetadata(metadata middleware.Metadata) (string, bool) {
+ if !metadata.Has(requestIDKey{}) {
+ return "", false
+ }
+
+ v, ok := metadata.Get(requestIDKey{}).(string)
+ if !ok {
+ return "", true
+ }
+ return v, true
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go
new file mode 100644
index 000000000..7ce48c611
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go
@@ -0,0 +1,49 @@
+package middleware
+
+import (
+ "context"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// AddRequestIDRetrieverMiddleware adds request id retriever middleware
+func AddRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
+ // add error wrapper middleware before operation deserializers so that it can wrap the error response
+ // returned by operation deserializers
+ return stack.Deserialize.Insert(&requestIDRetriever{}, "OperationDeserializer", middleware.Before)
+}
+
+type requestIDRetriever struct {
+}
+
+// ID returns the middleware identifier
+func (m *requestIDRetriever) ID() string {
+ return "RequestIDRetriever"
+}
+
+func (m *requestIDRetriever) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+
+ resp, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ // No raw response to wrap with.
+ return out, metadata, err
+ }
+
+ // Different header which can map to request id
+ requestIDHeaderList := []string{"X-Amzn-Requestid", "X-Amz-RequestId"}
+
+ for _, h := range requestIDHeaderList {
+ // check for headers known to contain Request id
+ if v := resp.Header.Get(h); len(v) != 0 {
+ // set reqID on metadata for successful responses.
+ SetRequestIDMetadata(&metadata, v)
+ break
+ }
+ }
+
+ return out, metadata, err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go
new file mode 100644
index 000000000..285b2bba8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go
@@ -0,0 +1,243 @@
+package middleware
+
+import (
+ "context"
+ "fmt"
+ "os"
+ "runtime"
+ "strings"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+var languageVersion = strings.TrimPrefix(runtime.Version(), "go")
+
+// SDKAgentKeyType is the metadata type to add to the SDK agent string
+type SDKAgentKeyType int
+
+// The set of valid SDKAgentKeyType constants. If an unknown value is assigned for SDKAgentKeyType it will
+// be mapped to AdditionalMetadata.
+const (
+ _ SDKAgentKeyType = iota
+ APIMetadata
+ OperatingSystemMetadata
+ LanguageMetadata
+ EnvironmentMetadata
+ FeatureMetadata
+ ConfigMetadata
+ FrameworkMetadata
+ AdditionalMetadata
+ ApplicationIdentifier
+)
+
+func (k SDKAgentKeyType) string() string {
+ switch k {
+ case APIMetadata:
+ return "api"
+ case OperatingSystemMetadata:
+ return "os"
+ case LanguageMetadata:
+ return "lang"
+ case EnvironmentMetadata:
+ return "exec-env"
+ case FeatureMetadata:
+ return "ft"
+ case ConfigMetadata:
+ return "cfg"
+ case FrameworkMetadata:
+ return "lib"
+ case ApplicationIdentifier:
+ return "app"
+ case AdditionalMetadata:
+ fallthrough
+ default:
+ return "md"
+ }
+}
+
+const execEnvVar = `AWS_EXECUTION_ENV`
+
+// requestUserAgent is a build middleware that set the User-Agent for the request.
+type requestUserAgent struct {
+ sdkAgent, userAgent *smithyhttp.UserAgentBuilder
+}
+
+// newRequestUserAgent returns a new requestUserAgent which will set the User-Agent and X-Amz-User-Agent for the
+// request.
+//
+// User-Agent example:
+//
+// aws-sdk-go-v2/1.2.3
+//
+// X-Amz-User-Agent example:
+//
+// aws-sdk-go-v2/1.2.3 md/GOOS/linux md/GOARCH/amd64 lang/go/1.15
+func newRequestUserAgent() *requestUserAgent {
+ userAgent, sdkAgent := smithyhttp.NewUserAgentBuilder(), smithyhttp.NewUserAgentBuilder()
+ addProductName(userAgent)
+ addProductName(sdkAgent)
+
+ r := &requestUserAgent{
+ sdkAgent: sdkAgent,
+ userAgent: userAgent,
+ }
+
+ addSDKMetadata(r)
+
+ return r
+}
+
+func addSDKMetadata(r *requestUserAgent) {
+ r.AddSDKAgentKey(OperatingSystemMetadata, getNormalizedOSName())
+ r.AddSDKAgentKeyValue(LanguageMetadata, "go", languageVersion)
+ r.AddSDKAgentKeyValue(AdditionalMetadata, "GOOS", runtime.GOOS)
+ r.AddSDKAgentKeyValue(AdditionalMetadata, "GOARCH", runtime.GOARCH)
+ if ev := os.Getenv(execEnvVar); len(ev) > 0 {
+ r.AddSDKAgentKey(EnvironmentMetadata, ev)
+ }
+}
+
+func addProductName(builder *smithyhttp.UserAgentBuilder) {
+ builder.AddKeyValue(aws.SDKName, aws.SDKVersion)
+}
+
+// AddUserAgentKey retrieves a requestUserAgent from the provided stack, or initializes one.
+func AddUserAgentKey(key string) func(*middleware.Stack) error {
+ return func(stack *middleware.Stack) error {
+ requestUserAgent, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+ requestUserAgent.AddUserAgentKey(key)
+ return nil
+ }
+}
+
+// AddUserAgentKeyValue retrieves a requestUserAgent from the provided stack, or initializes one.
+func AddUserAgentKeyValue(key, value string) func(*middleware.Stack) error {
+ return func(stack *middleware.Stack) error {
+ requestUserAgent, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+ requestUserAgent.AddUserAgentKeyValue(key, value)
+ return nil
+ }
+}
+
+// AddSDKAgentKey retrieves a requestUserAgent from the provided stack, or initializes one.
+func AddSDKAgentKey(keyType SDKAgentKeyType, key string) func(*middleware.Stack) error {
+ return func(stack *middleware.Stack) error {
+ requestUserAgent, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+ requestUserAgent.AddSDKAgentKey(keyType, key)
+ return nil
+ }
+}
+
+// AddSDKAgentKeyValue retrieves a requestUserAgent from the provided stack, or initializes one.
+func AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) func(*middleware.Stack) error {
+ return func(stack *middleware.Stack) error {
+ requestUserAgent, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+ requestUserAgent.AddSDKAgentKeyValue(keyType, key, value)
+ return nil
+ }
+}
+
+// AddRequestUserAgentMiddleware registers a requestUserAgent middleware on the stack if not present.
+func AddRequestUserAgentMiddleware(stack *middleware.Stack) error {
+ _, err := getOrAddRequestUserAgent(stack)
+ return err
+}
+
+func getOrAddRequestUserAgent(stack *middleware.Stack) (*requestUserAgent, error) {
+ id := (*requestUserAgent)(nil).ID()
+ bm, ok := stack.Build.Get(id)
+ if !ok {
+ bm = newRequestUserAgent()
+ err := stack.Build.Add(bm, middleware.After)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ requestUserAgent, ok := bm.(*requestUserAgent)
+ if !ok {
+ return nil, fmt.Errorf("%T for %s middleware did not match expected type", bm, id)
+ }
+
+ return requestUserAgent, nil
+}
+
+// AddUserAgentKey adds the component identified by name to the User-Agent string.
+func (u *requestUserAgent) AddUserAgentKey(key string) {
+ u.userAgent.AddKey(key)
+}
+
+// AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
+func (u *requestUserAgent) AddUserAgentKeyValue(key, value string) {
+ u.userAgent.AddKeyValue(key, value)
+}
+
+// AddUserAgentKey adds the component identified by name to the User-Agent string.
+func (u *requestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string) {
+ // TODO: should target sdkAgent
+ u.userAgent.AddKey(keyType.string() + "/" + key)
+}
+
+// AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
+func (u *requestUserAgent) AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) {
+ // TODO: should target sdkAgent
+ u.userAgent.AddKeyValue(keyType.string()+"/"+key, value)
+}
+
+// ID the name of the middleware.
+func (u *requestUserAgent) ID() string {
+ return "UserAgent"
+}
+
+// HandleBuild adds or appends the constructed user agent to the request.
+func (u *requestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ switch req := in.Request.(type) {
+ case *smithyhttp.Request:
+ u.addHTTPUserAgent(req)
+ // TODO: To be re-enabled
+ // u.addHTTPSDKAgent(req)
+ default:
+ return out, metadata, fmt.Errorf("unknown transport type %T", in)
+ }
+
+ return next.HandleBuild(ctx, in)
+}
+
+func (u *requestUserAgent) addHTTPUserAgent(request *smithyhttp.Request) {
+ const userAgent = "User-Agent"
+ updateHTTPHeader(request, userAgent, u.userAgent.Build())
+}
+
+func (u *requestUserAgent) addHTTPSDKAgent(request *smithyhttp.Request) {
+ const sdkAgent = "X-Amz-User-Agent"
+ updateHTTPHeader(request, sdkAgent, u.sdkAgent.Build())
+}
+
+func updateHTTPHeader(request *smithyhttp.Request, header string, value string) {
+ var current string
+ if v := request.Header[header]; len(v) > 0 {
+ current = v[0]
+ }
+ if len(current) > 0 {
+ current = value + " " + current
+ } else {
+ current = value
+ }
+ request.Header[header] = append(request.Header[header][:0], current)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md
new file mode 100644
index 000000000..253c5c966
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md
@@ -0,0 +1,6 @@
+# v1.0.0 (2021-11-06)
+
+* **Announcement**: Support has been added for AWS EventStream APIs for Kinesis, S3, and Transcribe Streaming. Support for the Lex Runtime V2 EventStream API will be added in a future release.
+* **Release**: Protocol support has been added for AWS event stream.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/aws/aws-sdk-go/private/protocol/eventstream/debug.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/debug.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/debug.go
rename to vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/debug.go
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/decode.go
similarity index 70%
rename from vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go
rename to vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/decode.go
index 474339391..d9ab7652f 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/decode.go
@@ -6,63 +6,62 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
+ "github.com/aws/smithy-go/logging"
"hash"
"hash/crc32"
"io"
-
- "github.com/aws/aws-sdk-go/aws"
)
+// DecoderOptions is the Decoder configuration options.
+type DecoderOptions struct {
+ Logger logging.Logger
+ LogMessages bool
+}
+
// Decoder provides decoding of an Event Stream messages.
type Decoder struct {
- r io.Reader
- logger aws.Logger
+ options DecoderOptions
}
// NewDecoder initializes and returns a Decoder for decoding event
// stream messages from the reader provided.
-func NewDecoder(r io.Reader, opts ...func(*Decoder)) *Decoder {
- d := &Decoder{
- r: r,
+func NewDecoder(optFns ...func(*DecoderOptions)) *Decoder {
+ options := DecoderOptions{}
+
+ for _, fn := range optFns {
+ fn(&options)
}
- 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
+ return &Decoder{
+ options: options,
}
}
// 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
+// Will return the event stream message, or error if decodeMessage fails to read
// the message from the stream.
-func (d *Decoder) Decode(payloadBuf []byte) (m Message, err error) {
- reader := d.r
- if d.logger != nil {
+//
+// payloadBuf is a byte slice that will be used in the returned Message.Payload. Callers
+// must ensure that the Message.Payload from a previous decode has been consumed before passing in the same underlying
+// payloadBuf byte slice.
+func (d *Decoder) Decode(reader io.Reader, payloadBuf []byte) (m Message, err error) {
+ if d.options.Logger != nil && d.options.LogMessages {
debugMsgBuf := bytes.NewBuffer(nil)
reader = io.TeeReader(reader, debugMsgBuf)
defer func() {
- logMessageDecode(d.logger, debugMsgBuf, m, err)
+ logMessageDecode(d.options.Logger, debugMsgBuf, m, err)
}()
}
- m, err = Decode(reader, payloadBuf)
+ m, err = decodeMessage(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
+// decodeMessage attempts to decode a single message from the event stream reader.
+// Will return the event stream message, or error if decodeMessage fails to read
// the message from the reader.
-func Decode(reader io.Reader, payloadBuf []byte) (m Message, err error) {
+func decodeMessage(reader io.Reader, payloadBuf []byte) (m Message, err error) {
crc := crc32.New(crc32IEEETable)
hashReader := io.TeeReader(reader, crc)
@@ -95,15 +94,15 @@ func Decode(reader io.Reader, payloadBuf []byte) (m Message, err error) {
return m, nil
}
-func logMessageDecode(logger aws.Logger, msgBuf *bytes.Buffer, msg Message, decodeErr error) {
+func logMessageDecode(logger logging.Logger, msgBuf *bytes.Buffer, msg Message, decodeErr error) {
w := bytes.NewBuffer(nil)
- defer func() { logger.Log(w.String()) }()
+ defer func() { logger.Logf(logging.Debug, w.String()) }()
fmt.Fprintf(w, "Raw message:\n%s\n",
hex.Dump(msgBuf.Bytes()))
if decodeErr != nil {
- fmt.Fprintf(w, "Decode error: %v\n", decodeErr)
+ fmt.Fprintf(w, "decodeMessage error: %v\n", decodeErr)
return
}
@@ -167,13 +166,14 @@ func decodeUint8(r io.Reader) (uint8, error) {
if br, ok := r.(byteReader); ok {
v, err := br.ReadByte()
- return uint8(v), err
+ return v, err
}
var b [1]byte
_, err := io.ReadFull(r, b[:])
- return uint8(b[0]), err
+ return b[0], err
}
+
func decodeUint16(r io.Reader) (uint16, error) {
var b [2]byte
bs := b[:]
@@ -183,6 +183,7 @@ func decodeUint16(r io.Reader) (uint16, error) {
}
return binary.BigEndian.Uint16(bs), nil
}
+
func decodeUint32(r io.Reader) (uint32, error) {
var b [4]byte
bs := b[:]
@@ -192,6 +193,7 @@ func decodeUint32(r io.Reader) (uint32, error) {
}
return binary.BigEndian.Uint32(bs), nil
}
+
func decodeUint64(r io.Reader) (uint64, error) {
var b [8]byte
bs := b[:]
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/encode.go
similarity index 73%
rename from vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go
rename to vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/encode.go
index ffade3bc0..f03ee4b93 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/encode.go
@@ -6,55 +6,54 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
+ "github.com/aws/smithy-go/logging"
"hash"
"hash/crc32"
"io"
-
- "github.com/aws/aws-sdk-go/aws"
)
+// EncoderOptions is the configuration options for Encoder.
+type EncoderOptions struct {
+ Logger logging.Logger
+ LogMessages bool
+}
+
// Encoder provides EventStream message encoding.
type Encoder struct {
- w io.Writer
- logger aws.Logger
+ options EncoderOptions
headersBuf *bytes.Buffer
+ messageBuf *bytes.Buffer
}
// NewEncoder initializes and returns an Encoder to encode Event Stream
-// messages to an io.Writer.
-func NewEncoder(w io.Writer, opts ...func(*Encoder)) *Encoder {
- e := &Encoder{
- w: w,
+// messages.
+func NewEncoder(optFns ...func(*EncoderOptions)) *Encoder {
+ o := EncoderOptions{}
+
+ for _, fn := range optFns {
+ fn(&o)
+ }
+
+ return &Encoder{
+ options: o,
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
+ messageBuf: bytes.NewBuffer(nil),
}
}
// 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) (err error) {
+func (e *Encoder) Encode(w io.Writer, msg Message) (err error) {
e.headersBuf.Reset()
+ e.messageBuf.Reset()
- writer := e.w
- if e.logger != nil {
+ var writer io.Writer = e.messageBuf
+ if e.options.Logger != nil && e.options.LogMessages {
encodeMsgBuf := bytes.NewBuffer(nil)
writer = io.MultiWriter(writer, encodeMsgBuf)
defer func() {
- logMessageEncode(e.logger, encodeMsgBuf, msg, err)
+ logMessageEncode(e.options.Logger, encodeMsgBuf, msg, err)
}()
}
@@ -85,12 +84,18 @@ func (e *Encoder) Encode(msg Message) (err error) {
}
msgCRC := crc.Sum32()
- return binary.Write(writer, binary.BigEndian, msgCRC)
+ if err := binary.Write(writer, binary.BigEndian, msgCRC); err != nil {
+ return err
+ }
+
+ _, err = io.Copy(w, e.messageBuf)
+
+ return err
}
-func logMessageEncode(logger aws.Logger, msgBuf *bytes.Buffer, msg Message, encodeErr error) {
+func logMessageEncode(logger logging.Logger, msgBuf *bytes.Buffer, msg Message, encodeErr error) {
w := bytes.NewBuffer(nil)
- defer func() { logger.Log(w.String()) }()
+ defer func() { logger.Logf(logging.Debug, w.String()) }()
fmt.Fprintf(w, "Message to encode:\n")
encoder := json.NewEncoder(w)
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/error.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/error.go
rename to vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/error.go
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/shared.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi/headers.go
similarity index 90%
rename from vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/shared.go
rename to vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi/headers.go
index e46b8acc2..93ea71ffd 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/shared.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi/headers.go
@@ -4,6 +4,7 @@ package eventstreamapi
const (
ChunkSignatureHeader = `:chunk-signature` // chunk signature for message
DateHeader = `:date` // Date header for signature
+ ContentTypeHeader = ":content-type" // message payload content-type
// Message header and values
MessageTypeHeader = `:message-type` // Identifies type of message.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi/middleware.go
new file mode 100644
index 000000000..d07ff6b89
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi/middleware.go
@@ -0,0 +1,71 @@
+package eventstreamapi
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+)
+
+type eventStreamWriterKey struct{}
+
+// GetInputStreamWriter returns EventTypeHeader io.PipeWriter used for the operation's input event stream.
+func GetInputStreamWriter(ctx context.Context) io.WriteCloser {
+ writeCloser, _ := middleware.GetStackValue(ctx, eventStreamWriterKey{}).(io.WriteCloser)
+ return writeCloser
+}
+
+func setInputStreamWriter(ctx context.Context, writeCloser io.WriteCloser) context.Context {
+ return middleware.WithStackValue(ctx, eventStreamWriterKey{}, writeCloser)
+}
+
+// InitializeStreamWriter is a Finalize middleware initializes an in-memory pipe for sending event stream messages
+// via the HTTP request body.
+type InitializeStreamWriter struct{}
+
+// AddInitializeStreamWriter adds the InitializeStreamWriter middleware to the provided stack.
+func AddInitializeStreamWriter(stack *middleware.Stack) error {
+ return stack.Finalize.Add(&InitializeStreamWriter{}, middleware.After)
+}
+
+// ID returns the identifier for the middleware.
+func (i *InitializeStreamWriter) ID() string {
+ return "InitializeStreamWriter"
+}
+
+// HandleFinalize is the middleware implementation.
+func (i *InitializeStreamWriter) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
+) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type: %T", in.Request)
+ }
+
+ inputReader, inputWriter := io.Pipe()
+ defer func() {
+ if err == nil {
+ return
+ }
+ _ = inputReader.Close()
+ _ = inputWriter.Close()
+ }()
+
+ request, err = request.SetStream(inputReader)
+ if err != nil {
+ return out, metadata, err
+ }
+ in.Request = request
+
+ ctx = setInputStreamWriter(ctx, inputWriter)
+
+ out, metadata, err = next.HandleFinalize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi/transport.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi/transport.go
new file mode 100644
index 000000000..cbf5a2862
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi/transport.go
@@ -0,0 +1,13 @@
+//go:build go1.18
+// +build go1.18
+
+package eventstreamapi
+
+import smithyhttp "github.com/aws/smithy-go/transport/http"
+
+// ApplyHTTPTransportFixes applies fixes to the HTTP request for proper event stream functionality.
+//
+// This operation is a no-op for Go 1.18 and above.
+func ApplyHTTPTransportFixes(r *smithyhttp.Request) error {
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi/transport_go117.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi/transport_go117.go
new file mode 100644
index 000000000..7d10ec2eb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi/transport_go117.go
@@ -0,0 +1,12 @@
+//go:build !go1.18
+// +build !go1.18
+
+package eventstreamapi
+
+import smithyhttp "github.com/aws/smithy-go/transport/http"
+
+// ApplyHTTPTransportFixes applies fixes to the HTTP request for proper event stream functionality.
+func ApplyHTTPTransportFixes(r *smithyhttp.Request) error {
+ r.Header.Set("Expect", "100-continue")
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go
new file mode 100644
index 000000000..4f06c4875
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package eventstream
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.0.0"
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header.go
rename to vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header.go
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header_value.go
similarity index 96%
rename from vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go
rename to vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header_value.go
index 9f509d8f6..423b6bb26 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header_value.go
@@ -3,6 +3,7 @@ package eventstream
import (
"encoding/base64"
"encoding/binary"
+ "encoding/hex"
"fmt"
"io"
"strconv"
@@ -487,7 +488,21 @@ func (UUIDValue) valueType() valueType {
}
func (v UUIDValue) String() string {
- return fmt.Sprintf(`%X-%X-%X-%X-%X`, v[0:4], v[4:6], v[6:8], v[8:10], v[10:])
+ var scratch [36]byte
+
+ const dash = '-'
+
+ hex.Encode(scratch[:8], v[0:4])
+ scratch[8] = dash
+ hex.Encode(scratch[9:13], v[4:6])
+ scratch[13] = dash
+ hex.Encode(scratch[14:18], v[6:8])
+ scratch[18] = dash
+ hex.Encode(scratch[19:23], v[8:10])
+ scratch[23] = dash
+ hex.Encode(scratch[24:], v[10:])
+
+ return string(scratch[:])
}
// encode encodes the UUIDValue into an eventstream binary value
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/message.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go
rename to vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/message.go
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go
new file mode 100644
index 000000000..9d7d3a0cb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go
@@ -0,0 +1,61 @@
+package query
+
+import (
+ "fmt"
+ "net/url"
+)
+
+// Array represents the encoding of Query lists and sets. A Query array is a
+// representation of a list of values of a fixed type. A serialized array might
+// look like the following:
+//
+// ListName.member.1=foo
+// &ListName.member.2=bar
+// &Listname.member.3=baz
+type Array struct {
+ // The query values to add the array to.
+ values url.Values
+ // The array's prefix, which includes the names of all parent structures
+ // and ends with the name of the list. For example, the prefix might be
+ // "ParentStructure.ListName". This prefix will be used to form the full
+ // keys for each element in the list. For example, an entry might have the
+ // key "ParentStructure.ListName.member.MemberName.1".
+ //
+ // While this is currently represented as a string that gets added to, it
+ // could also be represented as a stack that only gets condensed into a
+ // string when a finalized key is created. This could potentially reduce
+ // allocations.
+ prefix string
+ // Whether the list is flat or not. A list that is not flat will produce the
+ // following entry to the url.Values for a given entry:
+ // ListName.MemberName.1=value
+ // A list that is flat will produce the following:
+ // ListName.1=value
+ flat bool
+ // The location name of the member. In most cases this should be "member".
+ memberName string
+ // Elements are stored in values, so we keep track of the list size here.
+ size int32
+}
+
+func newArray(values url.Values, prefix string, flat bool, memberName string) *Array {
+ return &Array{
+ values: values,
+ prefix: prefix,
+ flat: flat,
+ memberName: memberName,
+ }
+}
+
+// Value adds a new element to the Query Array. Returns a Value type used to
+// encode the array element.
+func (a *Array) Value() Value {
+ // Query lists start a 1, so adjust the size first
+ a.size++
+ prefix := a.prefix
+ if !a.flat {
+ prefix = fmt.Sprintf("%s.%s", prefix, a.memberName)
+ }
+ // Lists can't have flat members
+ return newValue(a.values, fmt.Sprintf("%s.%d", prefix, a.size), false)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/encoder.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/encoder.go
new file mode 100644
index 000000000..2ecf9241c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/encoder.go
@@ -0,0 +1,80 @@
+package query
+
+import (
+ "io"
+ "net/url"
+ "sort"
+)
+
+// Encoder is a Query encoder that supports construction of Query body
+// values using methods.
+type Encoder struct {
+ // The query values that will be built up to manage encoding.
+ values url.Values
+ // The writer that the encoded body will be written to.
+ writer io.Writer
+ Value
+}
+
+// NewEncoder returns a new Query body encoder
+func NewEncoder(writer io.Writer) *Encoder {
+ values := url.Values{}
+ return &Encoder{
+ values: values,
+ writer: writer,
+ Value: newBaseValue(values),
+ }
+}
+
+// Encode returns the []byte slice representing the current
+// state of the Query encoder.
+func (e Encoder) Encode() error {
+ ws, ok := e.writer.(interface{ WriteString(string) (int, error) })
+ if !ok {
+ // Fall back to less optimal byte slice casting if WriteString isn't available.
+ ws = &wrapWriteString{writer: e.writer}
+ }
+
+ // Get the keys and sort them to have a stable output
+ keys := make([]string, 0, len(e.values))
+ for k := range e.values {
+ keys = append(keys, k)
+ }
+ sort.Strings(keys)
+ isFirstEntry := true
+ for _, key := range keys {
+ queryValues := e.values[key]
+ escapedKey := url.QueryEscape(key)
+ for _, value := range queryValues {
+ if !isFirstEntry {
+ if _, err := ws.WriteString(`&`); err != nil {
+ return err
+ }
+ } else {
+ isFirstEntry = false
+ }
+ if _, err := ws.WriteString(escapedKey); err != nil {
+ return err
+ }
+ if _, err := ws.WriteString(`=`); err != nil {
+ return err
+ }
+ if _, err := ws.WriteString(url.QueryEscape(value)); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+// wrapWriteString wraps an io.Writer to provide a WriteString method
+// where one is not available.
+type wrapWriteString struct {
+ writer io.Writer
+}
+
+// WriteString writes a string to the wrapped writer by casting it to
+// a byte array first.
+func (w wrapWriteString) WriteString(v string) (int, error) {
+ return w.writer.Write([]byte(v))
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go
new file mode 100644
index 000000000..dea242b8b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go
@@ -0,0 +1,78 @@
+package query
+
+import (
+ "fmt"
+ "net/url"
+)
+
+// Map represents the encoding of Query maps. A Query map is a representation
+// of a mapping of arbitrary string keys to arbitrary values of a fixed type.
+// A Map differs from an Object in that the set of keys is not fixed, in that
+// the values must all be of the same type, and that map entries are ordered.
+// A serialized map might look like the following:
+//
+// MapName.entry.1.key=Foo
+// &MapName.entry.1.value=spam
+// &MapName.entry.2.key=Bar
+// &MapName.entry.2.value=eggs
+type Map struct {
+ // The query values to add the map to.
+ values url.Values
+ // The map's prefix, which includes the names of all parent structures
+ // and ends with the name of the object. For example, the prefix might be
+ // "ParentStructure.MapName". This prefix will be used to form the full
+ // keys for each key-value pair of the map. For example, a value might have
+ // the key "ParentStructure.MapName.1.value".
+ //
+ // While this is currently represented as a string that gets added to, it
+ // could also be represented as a stack that only gets condensed into a
+ // string when a finalized key is created. This could potentially reduce
+ // allocations.
+ prefix string
+ // Whether the map is flat or not. A map that is not flat will produce the
+ // following entries to the url.Values for a given key-value pair:
+ // MapName.entry.1.KeyLocationName=mykey
+ // MapName.entry.1.ValueLocationName=myvalue
+ // A map that is flat will produce the following:
+ // MapName.1.KeyLocationName=mykey
+ // MapName.1.ValueLocationName=myvalue
+ flat bool
+ // The location name of the key. In most cases this should be "key".
+ keyLocationName string
+ // The location name of the value. In most cases this should be "value".
+ valueLocationName string
+ // Elements are stored in values, so we keep track of the list size here.
+ size int32
+}
+
+func newMap(values url.Values, prefix string, flat bool, keyLocationName string, valueLocationName string) *Map {
+ return &Map{
+ values: values,
+ prefix: prefix,
+ flat: flat,
+ keyLocationName: keyLocationName,
+ valueLocationName: valueLocationName,
+ }
+}
+
+// Key adds the given named key to the Query map.
+// Returns a Value encoder that should be used to encode a Query value type.
+func (m *Map) Key(name string) Value {
+ // Query lists start a 1, so adjust the size first
+ m.size++
+ var key string
+ var value string
+ if m.flat {
+ key = fmt.Sprintf("%s.%d.%s", m.prefix, m.size, m.keyLocationName)
+ value = fmt.Sprintf("%s.%d.%s", m.prefix, m.size, m.valueLocationName)
+ } else {
+ key = fmt.Sprintf("%s.entry.%d.%s", m.prefix, m.size, m.keyLocationName)
+ value = fmt.Sprintf("%s.entry.%d.%s", m.prefix, m.size, m.valueLocationName)
+ }
+
+ // The key can only be a string, so we just go ahead and set it here
+ newValue(m.values, key, false).String(name)
+
+ // Maps can't have flat members
+ return newValue(m.values, value, false)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go
new file mode 100644
index 000000000..360344791
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go
@@ -0,0 +1,62 @@
+package query
+
+import (
+ "context"
+ "fmt"
+ "io/ioutil"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// AddAsGetRequestMiddleware adds a middleware to the Serialize stack after the
+// operation serializer that will convert the query request body to a GET
+// operation with the query message in the HTTP request querystring.
+func AddAsGetRequestMiddleware(stack *middleware.Stack) error {
+ return stack.Serialize.Insert(&asGetRequest{}, "OperationSerializer", middleware.After)
+}
+
+type asGetRequest struct{}
+
+func (*asGetRequest) ID() string { return "Query:AsGetRequest" }
+
+func (m *asGetRequest) HandleSerialize(
+ ctx context.Context, input middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := input.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("expect smithy HTTP Request, got %T", input.Request)
+ }
+
+ req.Method = "GET"
+
+ // If the stream is not set, nothing else to do.
+ stream := req.GetStream()
+ if stream == nil {
+ return next.HandleSerialize(ctx, input)
+ }
+
+ // Clear the stream since there will not be any body.
+ req.Header.Del("Content-Type")
+ req, err = req.SetStream(nil)
+ if err != nil {
+ return out, metadata, fmt.Errorf("unable update request body %w", err)
+ }
+ input.Request = req
+
+ // Update request query with the body's query string value.
+ delim := ""
+ if len(req.URL.RawQuery) != 0 {
+ delim = "&"
+ }
+
+ b, err := ioutil.ReadAll(stream)
+ if err != nil {
+ return out, metadata, fmt.Errorf("unable to get request body %w", err)
+ }
+ req.URL.RawQuery += delim + string(b)
+
+ return next.HandleSerialize(ctx, input)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go
new file mode 100644
index 000000000..6a99d4ea8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go
@@ -0,0 +1,56 @@
+package query
+
+import (
+ "fmt"
+ "net/url"
+)
+
+// Object represents the encoding of Query structures and unions. A Query
+// object is a representation of a mapping of string keys to arbitrary
+// values where there is a fixed set of keys whose values each have their
+// own known type. A serialized object might look like the following:
+//
+// ObjectName.Foo=value
+// &ObjectName.Bar=5
+type Object struct {
+ // The query values to add the object to.
+ values url.Values
+ // The object's prefix, which includes the names of all parent structures
+ // and ends with the name of the object. For example, the prefix might be
+ // "ParentStructure.ObjectName". This prefix will be used to form the full
+ // keys for each member of the object. For example, a member might have the
+ // key "ParentStructure.ObjectName.MemberName".
+ //
+ // While this is currently represented as a string that gets added to, it
+ // could also be represented as a stack that only gets condensed into a
+ // string when a finalized key is created. This could potentially reduce
+ // allocations.
+ prefix string
+}
+
+func newObject(values url.Values, prefix string) *Object {
+ return &Object{
+ values: values,
+ prefix: prefix,
+ }
+}
+
+// Key adds the given named key to the Query object.
+// Returns a Value encoder that should be used to encode a Query value type.
+func (o *Object) Key(name string) Value {
+ return o.key(name, false)
+}
+
+// FlatKey adds the given named key to the Query object.
+// Returns a Value encoder that should be used to encode a Query value type. The
+// value will be flattened if it is a map or array.
+func (o *Object) FlatKey(name string) Value {
+ return o.key(name, true)
+}
+
+func (o *Object) key(name string, flatValue bool) Value {
+ if o.prefix != "" {
+ return newValue(o.values, fmt.Sprintf("%s.%s", o.prefix, name), flatValue)
+ }
+ return newValue(o.values, name, flatValue)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go
new file mode 100644
index 000000000..302525ab1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go
@@ -0,0 +1,106 @@
+package query
+
+import (
+ "math/big"
+ "net/url"
+
+ "github.com/aws/smithy-go/encoding/httpbinding"
+)
+
+// Value represents a Query Value type.
+type Value struct {
+ // The query values to add the value to.
+ values url.Values
+ // The value's key, which will form the prefix for complex types.
+ key string
+ // Whether the value should be flattened or not if it's a flattenable type.
+ flat bool
+ queryValue httpbinding.QueryValue
+}
+
+func newValue(values url.Values, key string, flat bool) Value {
+ return Value{
+ values: values,
+ key: key,
+ flat: flat,
+ queryValue: httpbinding.NewQueryValue(values, key, false),
+ }
+}
+
+func newBaseValue(values url.Values) Value {
+ return Value{
+ values: values,
+ queryValue: httpbinding.NewQueryValue(nil, "", false),
+ }
+}
+
+// Array returns a new Array encoder.
+func (qv Value) Array(locationName string) *Array {
+ return newArray(qv.values, qv.key, qv.flat, locationName)
+}
+
+// Object returns a new Object encoder.
+func (qv Value) Object() *Object {
+ return newObject(qv.values, qv.key)
+}
+
+// Map returns a new Map encoder.
+func (qv Value) Map(keyLocationName string, valueLocationName string) *Map {
+ return newMap(qv.values, qv.key, qv.flat, keyLocationName, valueLocationName)
+}
+
+// Base64EncodeBytes encodes v as a base64 query string value.
+// This is intended to enable compatibility with the JSON encoder.
+func (qv Value) Base64EncodeBytes(v []byte) {
+ qv.queryValue.Blob(v)
+}
+
+// Boolean encodes v as a query string value
+func (qv Value) Boolean(v bool) {
+ qv.queryValue.Boolean(v)
+}
+
+// String encodes v as a query string value
+func (qv Value) String(v string) {
+ qv.queryValue.String(v)
+}
+
+// Byte encodes v as a query string value
+func (qv Value) Byte(v int8) {
+ qv.queryValue.Byte(v)
+}
+
+// Short encodes v as a query string value
+func (qv Value) Short(v int16) {
+ qv.queryValue.Short(v)
+}
+
+// Integer encodes v as a query string value
+func (qv Value) Integer(v int32) {
+ qv.queryValue.Integer(v)
+}
+
+// Long encodes v as a query string value
+func (qv Value) Long(v int64) {
+ qv.queryValue.Long(v)
+}
+
+// Float encodes v as a query string value
+func (qv Value) Float(v float32) {
+ qv.queryValue.Float(v)
+}
+
+// Double encodes v as a query string value
+func (qv Value) Double(v float64) {
+ qv.queryValue.Double(v)
+}
+
+// BigInteger encodes v as a query string value
+func (qv Value) BigInteger(v *big.Int) {
+ qv.queryValue.BigInteger(v)
+}
+
+// BigDecimal encodes v as a query string value
+func (qv Value) BigDecimal(v *big.Float) {
+ qv.queryValue.BigDecimal(v)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/restjson/decoder_util.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/restjson/decoder_util.go
new file mode 100644
index 000000000..1bce78a4d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/restjson/decoder_util.go
@@ -0,0 +1,85 @@
+package restjson
+
+import (
+ "encoding/json"
+ "io"
+ "strings"
+
+ "github.com/aws/smithy-go"
+)
+
+// GetErrorInfo util looks for code, __type, and message members in the
+// json body. These members are optionally available, and the function
+// returns the value of member if it is available. This function is useful to
+// identify the error code, msg in a REST JSON error response.
+func GetErrorInfo(decoder *json.Decoder) (errorType string, message string, err error) {
+ var errInfo struct {
+ Code string
+ Type string `json:"__type"`
+ Message string
+ }
+
+ err = decoder.Decode(&errInfo)
+ if err != nil {
+ if err == io.EOF {
+ return errorType, message, nil
+ }
+ return errorType, message, err
+ }
+
+ // assign error type
+ if len(errInfo.Code) != 0 {
+ errorType = errInfo.Code
+ } else if len(errInfo.Type) != 0 {
+ errorType = errInfo.Type
+ }
+
+ // assign error message
+ if len(errInfo.Message) != 0 {
+ message = errInfo.Message
+ }
+
+ // sanitize error
+ if len(errorType) != 0 {
+ errorType = SanitizeErrorCode(errorType)
+ }
+
+ return errorType, message, nil
+}
+
+// SanitizeErrorCode sanitizes the errorCode string .
+// The rule for sanitizing is if a `:` character is present, then take only the
+// contents before the first : character in the value.
+// If a # character is present, then take only the contents after the
+// first # character in the value.
+func SanitizeErrorCode(errorCode string) string {
+ if strings.ContainsAny(errorCode, ":") {
+ errorCode = strings.SplitN(errorCode, ":", 2)[0]
+ }
+
+ if strings.ContainsAny(errorCode, "#") {
+ errorCode = strings.SplitN(errorCode, "#", 2)[1]
+ }
+
+ return errorCode
+}
+
+// GetSmithyGenericAPIError returns smithy generic api error and an error interface.
+// Takes in json decoder, and error Code string as args. The function retrieves error message
+// and error code from the decoder body. If errorCode of length greater than 0 is passed in as
+// an argument, it is used instead.
+func GetSmithyGenericAPIError(decoder *json.Decoder, errorCode string) (*smithy.GenericAPIError, error) {
+ errorType, message, err := GetErrorInfo(decoder)
+ if err != nil {
+ return nil, err
+ }
+
+ if len(errorCode) == 0 {
+ errorCode = errorType
+ }
+
+ return &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: message,
+ }, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go
new file mode 100644
index 000000000..c228f7d87
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go
@@ -0,0 +1,56 @@
+package xml
+
+import (
+ "encoding/xml"
+ "fmt"
+ "io"
+)
+
+// ErrorComponents represents the error response fields
+// that will be deserialized from an xml error response body
+type ErrorComponents struct {
+ Code string
+ Message string
+ RequestID string
+}
+
+// GetErrorResponseComponents returns the error fields from an xml error response body
+func GetErrorResponseComponents(r io.Reader, noErrorWrapping bool) (ErrorComponents, error) {
+ if noErrorWrapping {
+ var errResponse noWrappedErrorResponse
+ if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF {
+ return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err)
+ }
+ return ErrorComponents{
+ Code: errResponse.Code,
+ Message: errResponse.Message,
+ RequestID: errResponse.RequestID,
+ }, nil
+ }
+
+ var errResponse wrappedErrorResponse
+ if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF {
+ return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err)
+ }
+ return ErrorComponents{
+ Code: errResponse.Code,
+ Message: errResponse.Message,
+ RequestID: errResponse.RequestID,
+ }, nil
+}
+
+// noWrappedErrorResponse represents the error response body with
+// no internal ...
+type wrappedErrorResponse struct {
+ Code string `xml:"Error>Code"`
+ Message string `xml:"Error>Message"`
+ RequestID string `xml:"RequestId"`
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_bucket.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_bucket.go
new file mode 100644
index 000000000..974ef594f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_bucket.go
@@ -0,0 +1,96 @@
+package ratelimit
+
+import (
+ "sync"
+)
+
+// TokenBucket provides a concurrency safe utility for adding and removing
+// tokens from the available token bucket.
+type TokenBucket struct {
+ remainingTokens uint
+ maxCapacity uint
+ minCapacity uint
+ mu sync.Mutex
+}
+
+// NewTokenBucket returns an initialized TokenBucket with the capacity
+// specified.
+func NewTokenBucket(i uint) *TokenBucket {
+ return &TokenBucket{
+ remainingTokens: i,
+ maxCapacity: i,
+ minCapacity: 1,
+ }
+}
+
+// Retrieve attempts to reduce the available tokens by the amount requested. If
+// there are tokens available true will be returned along with the number of
+// available tokens remaining. If amount requested is larger than the available
+// capacity, false will be returned along with the available capacity. If the
+// amount is less than the available capacity, the capacity will be reduced by
+// that amount, and the remaining capacity and true will be returned.
+func (t *TokenBucket) Retrieve(amount uint) (available uint, retrieved bool) {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
+ if amount > t.remainingTokens {
+ return t.remainingTokens, false
+ }
+
+ t.remainingTokens -= amount
+ return t.remainingTokens, true
+}
+
+// Refund returns the amount of tokens back to the available token bucket, up
+// to the initial capacity.
+func (t *TokenBucket) Refund(amount uint) {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
+ // Capacity cannot exceed max capacity.
+ t.remainingTokens = uintMin(t.remainingTokens+amount, t.maxCapacity)
+}
+
+// Capacity returns the maximum capacity of tokens that the bucket could
+// contain.
+func (t *TokenBucket) Capacity() uint {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
+ return t.maxCapacity
+}
+
+// Remaining returns the number of tokens that remaining in the bucket.
+func (t *TokenBucket) Remaining() uint {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
+ return t.remainingTokens
+}
+
+// Resize adjusts the size of the token bucket. Returns the capacity remaining.
+func (t *TokenBucket) Resize(size uint) uint {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
+ t.maxCapacity = uintMax(size, t.minCapacity)
+
+ // Capacity needs to be capped at max capacity, if max size reduced.
+ t.remainingTokens = uintMin(t.remainingTokens, t.maxCapacity)
+
+ return t.remainingTokens
+}
+
+func uintMin(a, b uint) uint {
+ if a < b {
+ return a
+ }
+ return b
+}
+
+func uintMax(a, b uint) uint {
+ if a > b {
+ return a
+ }
+ return b
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go
new file mode 100644
index 000000000..12a3f0c4f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go
@@ -0,0 +1,87 @@
+package ratelimit
+
+import (
+ "context"
+ "fmt"
+)
+
+type rateToken struct {
+ tokenCost uint
+ bucket *TokenBucket
+}
+
+func (t rateToken) release() error {
+ t.bucket.Refund(t.tokenCost)
+ return nil
+}
+
+// TokenRateLimit provides a Token Bucket RateLimiter implementation
+// that limits the overall number of retry attempts that can be made across
+// operation invocations.
+type TokenRateLimit struct {
+ bucket *TokenBucket
+}
+
+// NewTokenRateLimit returns an TokenRateLimit with default values.
+// Functional options can configure the retry rate limiter.
+func NewTokenRateLimit(tokens uint) *TokenRateLimit {
+ return &TokenRateLimit{
+ bucket: NewTokenBucket(tokens),
+ }
+}
+
+func isTimeoutError(error) bool {
+ return false
+}
+
+type canceledError struct {
+ Err error
+}
+
+func (c canceledError) CanceledError() bool { return true }
+func (c canceledError) Unwrap() error { return c.Err }
+func (c canceledError) Error() string {
+ return fmt.Sprintf("canceled, %v", c.Err)
+}
+
+// GetToken may cause a available pool of retry quota to be
+// decremented. Will return an error if the decremented value can not be
+// reduced from the retry quota.
+func (l *TokenRateLimit) GetToken(ctx context.Context, cost uint) (func() error, error) {
+ select {
+ case <-ctx.Done():
+ return nil, canceledError{Err: ctx.Err()}
+ default:
+ }
+ if avail, ok := l.bucket.Retrieve(cost); !ok {
+ return nil, QuotaExceededError{Available: avail, Requested: cost}
+ }
+
+ return rateToken{
+ tokenCost: cost,
+ bucket: l.bucket,
+ }.release, nil
+}
+
+// AddTokens increments the token bucket by a fixed amount.
+func (l *TokenRateLimit) AddTokens(v uint) error {
+ l.bucket.Refund(v)
+ return nil
+}
+
+// Remaining returns the number of remaining tokens in the bucket.
+func (l *TokenRateLimit) Remaining() uint {
+ return l.bucket.Remaining()
+}
+
+// QuotaExceededError provides the SDK error when the retries for a given
+// token bucket have been exhausted.
+type QuotaExceededError struct {
+ Available uint
+ Requested uint
+}
+
+func (e QuotaExceededError) Error() string {
+ return fmt.Sprintf("retry quota exceeded, %d available, %d requested",
+ e.Available, e.Requested)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/request.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/request.go
new file mode 100644
index 000000000..d8d00e615
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/request.go
@@ -0,0 +1,25 @@
+package aws
+
+import (
+ "fmt"
+)
+
+// TODO remove replace with smithy.CanceledError
+
+// RequestCanceledError is the error that will be returned by an API request
+// that was canceled. Requests given a Context may return this error when
+// canceled.
+type RequestCanceledError struct {
+ Err error
+}
+
+// CanceledError returns true to satisfy interfaces checking for canceled errors.
+func (*RequestCanceledError) CanceledError() bool { return true }
+
+// Unwrap returns the underlying error, if there was one.
+func (e *RequestCanceledError) Unwrap() error {
+ return e.Err
+}
+func (e *RequestCanceledError) Error() string {
+ return fmt.Sprintf("request canceled, %v", e.Err)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go
new file mode 100644
index 000000000..4dfde8573
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go
@@ -0,0 +1,156 @@
+package retry
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+)
+
+const (
+ // DefaultRequestCost is the cost of a single request from the adaptive
+ // rate limited token bucket.
+ DefaultRequestCost uint = 1
+)
+
+// DefaultThrottles provides the set of errors considered throttle errors that
+// are checked by default.
+var DefaultThrottles = []IsErrorThrottle{
+ ThrottleErrorCode{
+ Codes: DefaultThrottleErrorCodes,
+ },
+}
+
+// AdaptiveModeOptions provides the functional options for configuring the
+// adaptive retry mode, and delay behavior.
+type AdaptiveModeOptions struct {
+ // If the adaptive token bucket is empty, when an attempt will be made
+ // AdaptiveMode will sleep until a token is available. This can occur when
+ // attempts fail with throttle errors. Use this option to disable the sleep
+ // until token is available, and return error immediately.
+ FailOnNoAttemptTokens bool
+
+ // The cost of an attempt from the AdaptiveMode's adaptive token bucket.
+ RequestCost uint
+
+ // Set of strategies to determine if the attempt failed due to a throttle
+ // error.
+ //
+ // It is safe to append to this list in NewAdaptiveMode's functional options.
+ Throttles []IsErrorThrottle
+
+ // Set of options for standard retry mode that AdaptiveMode is built on top
+ // of. AdaptiveMode may apply its own defaults to Standard retry mode that
+ // are different than the defaults of NewStandard. Use these options to
+ // override the default options.
+ StandardOptions []func(*StandardOptions)
+}
+
+// AdaptiveMode provides an experimental retry strategy that expands on the
+// Standard retry strategy, adding client attempt rate limits. The attempt rate
+// limit is initially unrestricted, but becomes restricted when the attempt
+// fails with for a throttle error. When restricted AdaptiveMode may need to
+// sleep before an attempt is made, if too many throttles have been received.
+// AdaptiveMode's sleep can be canceled with context cancel. Set
+// AdaptiveModeOptions FailOnNoAttemptTokens to change the behavior from sleep,
+// to fail fast.
+//
+// Eventually unrestricted attempt rate limit will be restored once attempts no
+// longer are failing due to throttle errors.
+type AdaptiveMode struct {
+ options AdaptiveModeOptions
+ throttles IsErrorThrottles
+
+ retryer aws.RetryerV2
+ rateLimit *adaptiveRateLimit
+}
+
+// NewAdaptiveMode returns an initialized AdaptiveMode retry strategy.
+func NewAdaptiveMode(optFns ...func(*AdaptiveModeOptions)) *AdaptiveMode {
+ o := AdaptiveModeOptions{
+ RequestCost: DefaultRequestCost,
+ Throttles: append([]IsErrorThrottle{}, DefaultThrottles...),
+ }
+ for _, fn := range optFns {
+ fn(&o)
+ }
+
+ return &AdaptiveMode{
+ options: o,
+ throttles: IsErrorThrottles(o.Throttles),
+ retryer: NewStandard(o.StandardOptions...),
+ rateLimit: newAdaptiveRateLimit(),
+ }
+}
+
+// IsErrorRetryable returns if the failed attempt is retryable. This check
+// should determine if the error can be retried, or if the error is
+// terminal.
+func (a *AdaptiveMode) IsErrorRetryable(err error) bool {
+ return a.retryer.IsErrorRetryable(err)
+}
+
+// MaxAttempts returns the maximum number of attempts that can be made for
+// an attempt before failing. A value of 0 implies that the attempt should
+// be retried until it succeeds if the errors are retryable.
+func (a *AdaptiveMode) MaxAttempts() int {
+ return a.retryer.MaxAttempts()
+}
+
+// RetryDelay returns the delay that should be used before retrying the
+// attempt. Will return error if the if the delay could not be determined.
+func (a *AdaptiveMode) RetryDelay(attempt int, opErr error) (
+ time.Duration, error,
+) {
+ return a.retryer.RetryDelay(attempt, opErr)
+}
+
+// GetRetryToken attempts to deduct the retry cost from the retry token pool.
+// Returning the token release function, or error.
+func (a *AdaptiveMode) GetRetryToken(ctx context.Context, opErr error) (
+ releaseToken func(error) error, err error,
+) {
+ return a.retryer.GetRetryToken(ctx, opErr)
+}
+
+// GetInitialToken returns the initial attempt token that can increment the
+// retry token pool if the attempt is successful.
+//
+// Deprecated: This method does not provide a way to block using Context,
+// nor can it return an error. Use RetryerV2, and GetAttemptToken instead. Only
+// present to implement Retryer interface.
+func (a *AdaptiveMode) GetInitialToken() (releaseToken func(error) error) {
+ return nopRelease
+}
+
+// GetAttemptToken returns the attempt token that can be used to rate limit
+// attempt calls. Will be used by the SDK's retry package's Attempt
+// middleware to get an attempt token prior to calling the temp and releasing
+// the attempt token after the attempt has been made.
+func (a *AdaptiveMode) GetAttemptToken(ctx context.Context) (func(error) error, error) {
+ for {
+ acquiredToken, waitTryAgain := a.rateLimit.AcquireToken(a.options.RequestCost)
+ if acquiredToken {
+ break
+ }
+ if a.options.FailOnNoAttemptTokens {
+ return nil, fmt.Errorf(
+ "unable to get attempt token, and FailOnNoAttemptTokens enables")
+ }
+
+ if err := sdk.SleepWithContext(ctx, waitTryAgain); err != nil {
+ return nil, fmt.Errorf("failed to wait for token to be available, %w", err)
+ }
+ }
+
+ return a.handleResponse, nil
+}
+
+func (a *AdaptiveMode) handleResponse(opErr error) error {
+ throttled := a.throttles.IsErrorThrottle(opErr).Bool()
+
+ a.rateLimit.Update(throttled)
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_ratelimit.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_ratelimit.go
new file mode 100644
index 000000000..ad96d9b8c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_ratelimit.go
@@ -0,0 +1,158 @@
+package retry
+
+import (
+ "math"
+ "sync"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+)
+
+type adaptiveRateLimit struct {
+ tokenBucketEnabled bool
+
+ smooth float64
+ beta float64
+ scaleConstant float64
+ minFillRate float64
+
+ fillRate float64
+ calculatedRate float64
+ lastRefilled time.Time
+ measuredTxRate float64
+ lastTxRateBucket float64
+ requestCount int64
+ lastMaxRate float64
+ lastThrottleTime time.Time
+ timeWindow float64
+
+ tokenBucket *adaptiveTokenBucket
+
+ mu sync.Mutex
+}
+
+func newAdaptiveRateLimit() *adaptiveRateLimit {
+ now := sdk.NowTime()
+ return &adaptiveRateLimit{
+ smooth: 0.8,
+ beta: 0.7,
+ scaleConstant: 0.4,
+
+ minFillRate: 0.5,
+
+ lastTxRateBucket: math.Floor(timeFloat64Seconds(now)),
+ lastThrottleTime: now,
+
+ tokenBucket: newAdaptiveTokenBucket(0),
+ }
+}
+
+func (a *adaptiveRateLimit) Enable(v bool) {
+ a.mu.Lock()
+ defer a.mu.Unlock()
+
+ a.tokenBucketEnabled = v
+}
+
+func (a *adaptiveRateLimit) AcquireToken(amount uint) (
+ tokenAcquired bool, waitTryAgain time.Duration,
+) {
+ a.mu.Lock()
+ defer a.mu.Unlock()
+
+ if !a.tokenBucketEnabled {
+ return true, 0
+ }
+
+ a.tokenBucketRefill()
+
+ available, ok := a.tokenBucket.Retrieve(float64(amount))
+ if !ok {
+ waitDur := float64Seconds((float64(amount) - available) / a.fillRate)
+ return false, waitDur
+ }
+
+ return true, 0
+}
+
+func (a *adaptiveRateLimit) Update(throttled bool) {
+ a.mu.Lock()
+ defer a.mu.Unlock()
+
+ a.updateMeasuredRate()
+
+ if throttled {
+ rateToUse := a.measuredTxRate
+ if a.tokenBucketEnabled {
+ rateToUse = math.Min(a.measuredTxRate, a.fillRate)
+ }
+
+ a.lastMaxRate = rateToUse
+ a.calculateTimeWindow()
+ a.lastThrottleTime = sdk.NowTime()
+ a.calculatedRate = a.cubicThrottle(rateToUse)
+ a.tokenBucketEnabled = true
+ } else {
+ a.calculateTimeWindow()
+ a.calculatedRate = a.cubicSuccess(sdk.NowTime())
+ }
+
+ newRate := math.Min(a.calculatedRate, 2*a.measuredTxRate)
+ a.tokenBucketUpdateRate(newRate)
+}
+
+func (a *adaptiveRateLimit) cubicSuccess(t time.Time) float64 {
+ dt := secondsFloat64(t.Sub(a.lastThrottleTime))
+ return (a.scaleConstant * math.Pow(dt-a.timeWindow, 3)) + a.lastMaxRate
+}
+
+func (a *adaptiveRateLimit) cubicThrottle(rateToUse float64) float64 {
+ return rateToUse * a.beta
+}
+
+func (a *adaptiveRateLimit) calculateTimeWindow() {
+ a.timeWindow = math.Pow((a.lastMaxRate*(1.-a.beta))/a.scaleConstant, 1./3.)
+}
+
+func (a *adaptiveRateLimit) tokenBucketUpdateRate(newRPS float64) {
+ a.tokenBucketRefill()
+ a.fillRate = math.Max(newRPS, a.minFillRate)
+ a.tokenBucket.Resize(newRPS)
+}
+
+func (a *adaptiveRateLimit) updateMeasuredRate() {
+ now := sdk.NowTime()
+ timeBucket := math.Floor(timeFloat64Seconds(now)*2.) / 2.
+ a.requestCount++
+
+ if timeBucket > a.lastTxRateBucket {
+ currentRate := float64(a.requestCount) / (timeBucket - a.lastTxRateBucket)
+ a.measuredTxRate = (currentRate * a.smooth) + (a.measuredTxRate * (1. - a.smooth))
+ a.requestCount = 0
+ a.lastTxRateBucket = timeBucket
+ }
+}
+
+func (a *adaptiveRateLimit) tokenBucketRefill() {
+ now := sdk.NowTime()
+ if a.lastRefilled.IsZero() {
+ a.lastRefilled = now
+ return
+ }
+
+ fillAmount := secondsFloat64(now.Sub(a.lastRefilled)) * a.fillRate
+ a.tokenBucket.Refund(fillAmount)
+ a.lastRefilled = now
+}
+
+func float64Seconds(v float64) time.Duration {
+ return time.Duration(v * float64(time.Second))
+}
+
+func secondsFloat64(v time.Duration) float64 {
+ return float64(v) / float64(time.Second)
+}
+
+func timeFloat64Seconds(v time.Time) float64 {
+ return float64(v.UnixNano()) / float64(time.Second)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_token_bucket.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_token_bucket.go
new file mode 100644
index 000000000..052723e8e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_token_bucket.go
@@ -0,0 +1,83 @@
+package retry
+
+import (
+ "math"
+ "sync"
+)
+
+// adaptiveTokenBucket provides a concurrency safe utility for adding and
+// removing tokens from the available token bucket.
+type adaptiveTokenBucket struct {
+ remainingTokens float64
+ maxCapacity float64
+ minCapacity float64
+ mu sync.Mutex
+}
+
+// newAdaptiveTokenBucket returns an initialized adaptiveTokenBucket with the
+// capacity specified.
+func newAdaptiveTokenBucket(i float64) *adaptiveTokenBucket {
+ return &adaptiveTokenBucket{
+ remainingTokens: i,
+ maxCapacity: i,
+ minCapacity: 1,
+ }
+}
+
+// Retrieve attempts to reduce the available tokens by the amount requested. If
+// there are tokens available true will be returned along with the number of
+// available tokens remaining. If amount requested is larger than the available
+// capacity, false will be returned along with the available capacity. If the
+// amount is less than the available capacity, the capacity will be reduced by
+// that amount, and the remaining capacity and true will be returned.
+func (t *adaptiveTokenBucket) Retrieve(amount float64) (available float64, retrieved bool) {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
+ if amount > t.remainingTokens {
+ return t.remainingTokens, false
+ }
+
+ t.remainingTokens -= amount
+ return t.remainingTokens, true
+}
+
+// Refund returns the amount of tokens back to the available token bucket, up
+// to the initial capacity.
+func (t *adaptiveTokenBucket) Refund(amount float64) {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
+ // Capacity cannot exceed max capacity.
+ t.remainingTokens = math.Min(t.remainingTokens+amount, t.maxCapacity)
+}
+
+// Capacity returns the maximum capacity of tokens that the bucket could
+// contain.
+func (t *adaptiveTokenBucket) Capacity() float64 {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
+ return t.maxCapacity
+}
+
+// Remaining returns the number of tokens that remaining in the bucket.
+func (t *adaptiveTokenBucket) Remaining() float64 {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
+ return t.remainingTokens
+}
+
+// Resize adjusts the size of the token bucket. Returns the capacity remaining.
+func (t *adaptiveTokenBucket) Resize(size float64) float64 {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
+ t.maxCapacity = math.Max(size, t.minCapacity)
+
+ // Capacity needs to be capped at max capacity, if max size reduced.
+ t.remainingTokens = math.Min(t.remainingTokens, t.maxCapacity)
+
+ return t.remainingTokens
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go
new file mode 100644
index 000000000..3a08ebe0a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go
@@ -0,0 +1,80 @@
+// Package retry provides interfaces and implementations for SDK request retry behavior.
+//
+// # Retryer Interface and Implementations
+//
+// This package defines Retryer interface that is used to either implement custom retry behavior
+// or to extend the existing retry implementations provided by the SDK. This package provides a single
+// retry implementation: Standard.
+//
+// # Standard
+//
+// Standard is the default retryer implementation used by service clients. The standard retryer is a rate limited
+// retryer that has a configurable max attempts to limit the number of retry attempts when a retryable error occurs.
+// In addition, the retryer uses a configurable token bucket to rate limit the retry attempts across the client,
+// and uses an additional delay policy to limit the time between a requests subsequent attempts.
+//
+// By default the standard retryer uses the DefaultRetryables slice of IsErrorRetryable types to determine whether
+// a given error is retryable. By default this list of retryables includes the following:
+// - Retrying errors that implement the RetryableError method, and return true.
+// - Connection Errors
+// - Errors that implement a ConnectionError, Temporary, or Timeout method that return true.
+// - Connection Reset Errors.
+// - net.OpErr types that are dialing errors or are temporary.
+// - HTTP Status Codes: 500, 502, 503, and 504.
+// - API Error Codes
+// - RequestTimeout, RequestTimeoutException
+// - Throttling, ThrottlingException, ThrottledException, RequestThrottledException, TooManyRequestsException,
+// RequestThrottled, SlowDown, EC2ThrottledException
+// - ProvisionedThroughputExceededException, RequestLimitExceeded, BandwidthLimitExceeded, LimitExceededException
+// - TransactionInProgressException, PriorRequestNotComplete
+//
+// The standard retryer will not retry a request in the event if the context associated with the request
+// has been cancelled. Applications must handle this case explicitly if they wish to retry with a different context
+// value.
+//
+// You can configure the standard retryer implementation to fit your applications by constructing a standard retryer
+// using the NewStandard function, and providing one more functional argument that mutate the StandardOptions
+// structure. StandardOptions provides the ability to modify the token bucket rate limiter, retryable error conditions,
+// and the retry delay policy.
+//
+// For example to modify the default retry attempts for the standard retryer:
+//
+// // configure the custom retryer
+// customRetry := retry.NewStandard(func(o *retry.StandardOptions) {
+// o.MaxAttempts = 5
+// })
+//
+// // create a service client with the retryer
+// s3.NewFromConfig(cfg, func(o *s3.Options) {
+// o.Retryer = customRetry
+// })
+//
+// # Utilities
+//
+// A number of package functions have been provided to easily wrap retryer implementations in an implementation agnostic
+// way. These are:
+//
+// AddWithErrorCodes - Provides the ability to add additional API error codes that should be considered retryable
+// in addition to those considered retryable by the provided retryer.
+//
+// AddWithMaxAttempts - Provides the ability to set the max number of attempts for retrying a request by wrapping
+// a retryer implementation.
+//
+// AddWithMaxBackoffDelay - Provides the ability to set the max back off delay that can occur before retrying a
+// request by wrapping a retryer implementation.
+//
+// The following package functions have been provided to easily satisfy different retry interfaces to further customize
+// a given retryer's behavior:
+//
+// BackoffDelayerFunc - Can be used to wrap a function to satisfy the BackoffDelayer interface. For example,
+// you can use this method to easily create custom back off policies to be used with the
+// standard retryer.
+//
+// IsErrorRetryableFunc - Can be used to wrap a function to satisfy the IsErrorRetryable interface. For example,
+// this can be used to extend the standard retryer to add additional logic to determine if an
+// error should be retried.
+//
+// IsErrorTimeoutFunc - Can be used to wrap a function to satisfy IsErrorTimeout interface. For example,
+// this can be used to extend the standard retryer to add additional logic to determine if an
+// error should be considered a timeout.
+package retry
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/errors.go
new file mode 100644
index 000000000..3e432eefe
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/errors.go
@@ -0,0 +1,20 @@
+package retry
+
+import "fmt"
+
+// MaxAttemptsError provides the error when the maximum number of attempts have
+// been exceeded.
+type MaxAttemptsError struct {
+ Attempt int
+ Err error
+}
+
+func (e *MaxAttemptsError) Error() string {
+ return fmt.Sprintf("exceeded maximum number of attempts, %d, %v", e.Attempt, e.Err)
+}
+
+// Unwrap returns the nested error causing the max attempts error. Provides the
+// implementation for errors.Is and errors.As to unwrap nested errors.
+func (e *MaxAttemptsError) Unwrap() error {
+ return e.Err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go
new file mode 100644
index 000000000..c266996de
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go
@@ -0,0 +1,49 @@
+package retry
+
+import (
+ "math"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/internal/rand"
+ "github.com/aws/aws-sdk-go-v2/internal/timeconv"
+)
+
+// ExponentialJitterBackoff provides backoff delays with jitter based on the
+// number of attempts.
+type ExponentialJitterBackoff struct {
+ maxBackoff time.Duration
+ // precomputed number of attempts needed to reach max backoff.
+ maxBackoffAttempts float64
+
+ randFloat64 func() (float64, error)
+}
+
+// NewExponentialJitterBackoff returns an ExponentialJitterBackoff configured
+// for the max backoff.
+func NewExponentialJitterBackoff(maxBackoff time.Duration) *ExponentialJitterBackoff {
+ return &ExponentialJitterBackoff{
+ maxBackoff: maxBackoff,
+ maxBackoffAttempts: math.Log2(
+ float64(maxBackoff) / float64(time.Second)),
+ randFloat64: rand.CryptoRandFloat64,
+ }
+}
+
+// BackoffDelay returns the duration to wait before the next attempt should be
+// made. Returns an error if unable get a duration.
+func (j *ExponentialJitterBackoff) BackoffDelay(attempt int, err error) (time.Duration, error) {
+ if attempt > int(j.maxBackoffAttempts) {
+ return j.maxBackoff, nil
+ }
+
+ b, err := j.randFloat64()
+ if err != nil {
+ return 0, err
+ }
+
+ // [0.0, 1.0) * 2 ^ attempts
+ ri := int64(1 << uint64(attempt))
+ delaySeconds := b * float64(ri)
+
+ return timeconv.FloatSecondsDur(delaySeconds), nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/metadata.go
new file mode 100644
index 000000000..7a3f18301
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/metadata.go
@@ -0,0 +1,52 @@
+package retry
+
+import (
+ awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// attemptResultsKey is a metadata accessor key to retrieve metadata
+// for all request attempts.
+type attemptResultsKey struct {
+}
+
+// GetAttemptResults retrieves attempts results from middleware metadata.
+func GetAttemptResults(metadata middleware.Metadata) (AttemptResults, bool) {
+ m, ok := metadata.Get(attemptResultsKey{}).(AttemptResults)
+ return m, ok
+}
+
+// AttemptResults represents struct containing metadata returned by all request attempts.
+type AttemptResults struct {
+
+ // Results is a slice consisting attempt result from all request attempts.
+ // Results are stored in order request attempt is made.
+ Results []AttemptResult
+}
+
+// AttemptResult represents attempt result returned by a single request attempt.
+type AttemptResult struct {
+
+ // Err is the error if received for the request attempt.
+ Err error
+
+ // Retryable denotes if request may be retried. This states if an
+ // error is considered retryable.
+ Retryable bool
+
+ // Retried indicates if this request was retried.
+ Retried bool
+
+ // ResponseMetadata is any existing metadata passed via the response middlewares.
+ ResponseMetadata middleware.Metadata
+}
+
+// addAttemptResults adds attempt results to middleware metadata
+func addAttemptResults(metadata *middleware.Metadata, v AttemptResults) {
+ metadata.Set(attemptResultsKey{}, v)
+}
+
+// GetRawResponse returns raw response recorded for the attempt result
+func (a AttemptResult) GetRawResponse() interface{} {
+ return awsmiddle.GetRawResponse(a.ResponseMetadata)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go
new file mode 100644
index 000000000..3326289a1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go
@@ -0,0 +1,331 @@
+package retry
+
+import (
+ "context"
+ "fmt"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithymiddle "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/transport/http"
+)
+
+// RequestCloner is a function that can take an input request type and clone
+// the request for use in a subsequent retry attempt.
+type RequestCloner func(interface{}) interface{}
+
+type retryMetadata struct {
+ AttemptNum int
+ AttemptTime time.Time
+ MaxAttempts int
+ AttemptClockSkew time.Duration
+}
+
+// Attempt is a Smithy Finalize middleware that handles retry attempts using
+// the provided Retryer implementation.
+type Attempt struct {
+ // Enable the logging of retry attempts performed by the SDK. This will
+ // include logging retry attempts, unretryable errors, and when max
+ // attempts are reached.
+ LogAttempts bool
+
+ retryer aws.RetryerV2
+ requestCloner RequestCloner
+}
+
+// NewAttemptMiddleware returns a new Attempt retry middleware.
+func NewAttemptMiddleware(retryer aws.Retryer, requestCloner RequestCloner, optFns ...func(*Attempt)) *Attempt {
+ m := &Attempt{
+ retryer: wrapAsRetryerV2(retryer),
+ requestCloner: requestCloner,
+ }
+ for _, fn := range optFns {
+ fn(m)
+ }
+ return m
+}
+
+// ID returns the middleware identifier
+func (r *Attempt) ID() string { return "Retry" }
+
+func (r Attempt) logf(logger logging.Logger, classification logging.Classification, format string, v ...interface{}) {
+ if !r.LogAttempts {
+ return
+ }
+ logger.Logf(classification, format, v...)
+}
+
+// HandleFinalize utilizes the provider Retryer implementation to attempt
+// retries over the next handler
+func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeInput, next smithymiddle.FinalizeHandler) (
+ out smithymiddle.FinalizeOutput, metadata smithymiddle.Metadata, err error,
+) {
+ var attemptNum int
+ var attemptClockSkew time.Duration
+ var attemptResults AttemptResults
+
+ maxAttempts := r.retryer.MaxAttempts()
+ releaseRetryToken := nopRelease
+
+ for {
+ attemptNum++
+ attemptInput := in
+ attemptInput.Request = r.requestCloner(attemptInput.Request)
+
+ // Record the metadata for the for attempt being started.
+ attemptCtx := setRetryMetadata(ctx, retryMetadata{
+ AttemptNum: attemptNum,
+ AttemptTime: sdk.NowTime().UTC(),
+ MaxAttempts: maxAttempts,
+ AttemptClockSkew: attemptClockSkew,
+ })
+
+ var attemptResult AttemptResult
+ out, attemptResult, releaseRetryToken, err = r.handleAttempt(attemptCtx, attemptInput, releaseRetryToken, next)
+ attemptClockSkew, _ = awsmiddle.GetAttemptSkew(attemptResult.ResponseMetadata)
+
+ // AttemptResult Retried states that the attempt was not successful, and
+ // should be retried.
+ shouldRetry := attemptResult.Retried
+
+ // Add attempt metadata to list of all attempt metadata
+ attemptResults.Results = append(attemptResults.Results, attemptResult)
+
+ if !shouldRetry {
+ // Ensure the last response's metadata is used as the bases for result
+ // metadata returned by the stack. The Slice of attempt results
+ // will be added to this cloned metadata.
+ metadata = attemptResult.ResponseMetadata.Clone()
+
+ break
+ }
+ }
+
+ addAttemptResults(&metadata, attemptResults)
+ return out, metadata, err
+}
+
+// handleAttempt handles an individual request attempt.
+func (r *Attempt) handleAttempt(
+ ctx context.Context, in smithymiddle.FinalizeInput, releaseRetryToken func(error) error, next smithymiddle.FinalizeHandler,
+) (
+ out smithymiddle.FinalizeOutput, attemptResult AttemptResult, _ func(error) error, err error,
+) {
+ defer func() {
+ attemptResult.Err = err
+ }()
+
+ // Short circuit if this attempt never can succeed because the context is
+ // canceled. This reduces the chance of token pools being modified for
+ // attempts that will not be made
+ select {
+ case <-ctx.Done():
+ return out, attemptResult, nopRelease, ctx.Err()
+ default:
+ }
+
+ //------------------------------
+ // Get Attempt Token
+ //------------------------------
+ releaseAttemptToken, err := r.retryer.GetAttemptToken(ctx)
+ if err != nil {
+ return out, attemptResult, nopRelease, fmt.Errorf(
+ "failed to get retry Send token, %w", err)
+ }
+
+ //------------------------------
+ // Send Attempt
+ //------------------------------
+ logger := smithymiddle.GetLogger(ctx)
+ service, operation := awsmiddle.GetServiceID(ctx), awsmiddle.GetOperationName(ctx)
+ retryMetadata, _ := getRetryMetadata(ctx)
+ attemptNum := retryMetadata.AttemptNum
+ maxAttempts := retryMetadata.MaxAttempts
+
+ // Following attempts must ensure the request payload stream starts in a
+ // rewound state.
+ if attemptNum > 1 {
+ if rewindable, ok := in.Request.(interface{ RewindStream() error }); ok {
+ if rewindErr := rewindable.RewindStream(); rewindErr != nil {
+ return out, attemptResult, nopRelease, fmt.Errorf(
+ "failed to rewind transport stream for retry, %w", rewindErr)
+ }
+ }
+
+ r.logf(logger, logging.Debug, "retrying request %s/%s, attempt %d",
+ service, operation, attemptNum)
+ }
+
+ var metadata smithymiddle.Metadata
+ out, metadata, err = next.HandleFinalize(ctx, in)
+ attemptResult.ResponseMetadata = metadata
+
+ //------------------------------
+ // Bookkeeping
+ //------------------------------
+ // Release the retry token based on the state of the attempt's error (if any).
+ if releaseError := releaseRetryToken(err); releaseError != nil && err != nil {
+ return out, attemptResult, nopRelease, fmt.Errorf(
+ "failed to release retry token after request error, %w", err)
+ }
+ // Release the attempt token based on the state of the attempt's error (if any).
+ if releaseError := releaseAttemptToken(err); releaseError != nil && err != nil {
+ return out, attemptResult, nopRelease, fmt.Errorf(
+ "failed to release initial token after request error, %w", err)
+ }
+ // If there was no error making the attempt, nothing further to do. There
+ // will be nothing to retry.
+ if err == nil {
+ return out, attemptResult, nopRelease, err
+ }
+
+ //------------------------------
+ // Is Retryable and Should Retry
+ //------------------------------
+ // If the attempt failed with an unretryable error, nothing further to do
+ // but return, and inform the caller about the terminal failure.
+ retryable := r.retryer.IsErrorRetryable(err)
+ if !retryable {
+ r.logf(logger, logging.Debug, "request failed with unretryable error %v", err)
+ return out, attemptResult, nopRelease, err
+ }
+
+ // set retryable to true
+ attemptResult.Retryable = true
+
+ // Once the maximum number of attempts have been exhausted there is nothing
+ // further to do other than inform the caller about the terminal failure.
+ if maxAttempts > 0 && attemptNum >= maxAttempts {
+ r.logf(logger, logging.Debug, "max retry attempts exhausted, max %d", maxAttempts)
+ err = &MaxAttemptsError{
+ Attempt: attemptNum,
+ Err: err,
+ }
+ return out, attemptResult, nopRelease, err
+ }
+
+ //------------------------------
+ // Get Retry (aka Retry Quota) Token
+ //------------------------------
+ // Get a retry token that will be released after the
+ releaseRetryToken, retryTokenErr := r.retryer.GetRetryToken(ctx, err)
+ if retryTokenErr != nil {
+ return out, attemptResult, nopRelease, retryTokenErr
+ }
+
+ //------------------------------
+ // Retry Delay and Sleep
+ //------------------------------
+ // Get the retry delay before another attempt can be made, and sleep for
+ // that time. Potentially early exist if the sleep is canceled via the
+ // context.
+ retryDelay, reqErr := r.retryer.RetryDelay(attemptNum, err)
+ if reqErr != nil {
+ return out, attemptResult, releaseRetryToken, reqErr
+ }
+ if reqErr = sdk.SleepWithContext(ctx, retryDelay); reqErr != nil {
+ err = &aws.RequestCanceledError{Err: reqErr}
+ return out, attemptResult, releaseRetryToken, err
+ }
+
+ // The request should be re-attempted.
+ attemptResult.Retried = true
+
+ return out, attemptResult, releaseRetryToken, err
+}
+
+// MetricsHeader attaches SDK request metric header for retries to the transport
+type MetricsHeader struct{}
+
+// ID returns the middleware identifier
+func (r *MetricsHeader) ID() string {
+ return "RetryMetricsHeader"
+}
+
+// HandleFinalize attaches the SDK request metric header to the transport layer
+func (r MetricsHeader) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeInput, next smithymiddle.FinalizeHandler) (
+ out smithymiddle.FinalizeOutput, metadata smithymiddle.Metadata, err error,
+) {
+ retryMetadata, _ := getRetryMetadata(ctx)
+
+ const retryMetricHeader = "Amz-Sdk-Request"
+ var parts []string
+
+ parts = append(parts, "attempt="+strconv.Itoa(retryMetadata.AttemptNum))
+ if retryMetadata.MaxAttempts != 0 {
+ parts = append(parts, "max="+strconv.Itoa(retryMetadata.MaxAttempts))
+ }
+
+ var ttl time.Time
+ if deadline, ok := ctx.Deadline(); ok {
+ ttl = deadline
+ }
+
+ // Only append the TTL if it can be determined.
+ if !ttl.IsZero() && retryMetadata.AttemptClockSkew > 0 {
+ const unixTimeFormat = "20060102T150405Z"
+ ttl = ttl.Add(retryMetadata.AttemptClockSkew)
+ parts = append(parts, "ttl="+ttl.Format(unixTimeFormat))
+ }
+
+ switch req := in.Request.(type) {
+ case *http.Request:
+ req.Header[retryMetricHeader] = append(req.Header[retryMetricHeader][:0], strings.Join(parts, "; "))
+ default:
+ return out, metadata, fmt.Errorf("unknown transport type %T", req)
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+type retryMetadataKey struct{}
+
+// getRetryMetadata retrieves retryMetadata from the context and a bool
+// indicating if it was set.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func getRetryMetadata(ctx context.Context) (metadata retryMetadata, ok bool) {
+ metadata, ok = middleware.GetStackValue(ctx, retryMetadataKey{}).(retryMetadata)
+ return metadata, ok
+}
+
+// setRetryMetadata sets the retryMetadata on the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func setRetryMetadata(ctx context.Context, metadata retryMetadata) context.Context {
+ return middleware.WithStackValue(ctx, retryMetadataKey{}, metadata)
+}
+
+// AddRetryMiddlewaresOptions is the set of options that can be passed to
+// AddRetryMiddlewares for configuring retry associated middleware.
+type AddRetryMiddlewaresOptions struct {
+ Retryer aws.Retryer
+
+ // Enable the logging of retry attempts performed by the SDK. This will
+ // include logging retry attempts, unretryable errors, and when max
+ // attempts are reached.
+ LogRetryAttempts bool
+}
+
+// AddRetryMiddlewares adds retry middleware to operation middleware stack
+func AddRetryMiddlewares(stack *smithymiddle.Stack, options AddRetryMiddlewaresOptions) error {
+ attempt := NewAttemptMiddleware(options.Retryer, http.RequestCloner, func(middleware *Attempt) {
+ middleware.LogAttempts = options.LogRetryAttempts
+ })
+
+ if err := stack.Finalize.Add(attempt, smithymiddle.After); err != nil {
+ return err
+ }
+ if err := stack.Finalize.Add(&MetricsHeader{}, smithymiddle.After); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go
new file mode 100644
index 000000000..af81635b3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go
@@ -0,0 +1,90 @@
+package retry
+
+import (
+ "context"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+// AddWithErrorCodes returns a Retryer with additional error codes considered
+// for determining if the error should be retried.
+func AddWithErrorCodes(r aws.Retryer, codes ...string) aws.Retryer {
+ retryable := &RetryableErrorCode{
+ Codes: map[string]struct{}{},
+ }
+ for _, c := range codes {
+ retryable.Codes[c] = struct{}{}
+ }
+
+ return &withIsErrorRetryable{
+ RetryerV2: wrapAsRetryerV2(r),
+ Retryable: retryable,
+ }
+}
+
+type withIsErrorRetryable struct {
+ aws.RetryerV2
+ Retryable IsErrorRetryable
+}
+
+func (r *withIsErrorRetryable) IsErrorRetryable(err error) bool {
+ if v := r.Retryable.IsErrorRetryable(err); v != aws.UnknownTernary {
+ return v.Bool()
+ }
+ return r.RetryerV2.IsErrorRetryable(err)
+}
+
+// AddWithMaxAttempts returns a Retryer with MaxAttempts set to the value
+// specified.
+func AddWithMaxAttempts(r aws.Retryer, max int) aws.Retryer {
+ return &withMaxAttempts{
+ RetryerV2: wrapAsRetryerV2(r),
+ Max: max,
+ }
+}
+
+type withMaxAttempts struct {
+ aws.RetryerV2
+ Max int
+}
+
+func (w *withMaxAttempts) MaxAttempts() int {
+ return w.Max
+}
+
+// AddWithMaxBackoffDelay returns a retryer wrapping the passed in retryer
+// overriding the RetryDelay behavior for a alternate minimum initial backoff
+// delay.
+func AddWithMaxBackoffDelay(r aws.Retryer, delay time.Duration) aws.Retryer {
+ return &withMaxBackoffDelay{
+ RetryerV2: wrapAsRetryerV2(r),
+ backoff: NewExponentialJitterBackoff(delay),
+ }
+}
+
+type withMaxBackoffDelay struct {
+ aws.RetryerV2
+ backoff *ExponentialJitterBackoff
+}
+
+func (r *withMaxBackoffDelay) RetryDelay(attempt int, err error) (time.Duration, error) {
+ return r.backoff.BackoffDelay(attempt, err)
+}
+
+type wrappedAsRetryerV2 struct {
+ aws.Retryer
+}
+
+func wrapAsRetryerV2(r aws.Retryer) aws.RetryerV2 {
+ v, ok := r.(aws.RetryerV2)
+ if !ok {
+ v = wrappedAsRetryerV2{Retryer: r}
+ }
+
+ return v
+}
+
+func (w wrappedAsRetryerV2) GetAttemptToken(context.Context) (func(error) error, error) {
+ return w.Retryer.GetInitialToken(), nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go
new file mode 100644
index 000000000..c695e6fe5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go
@@ -0,0 +1,186 @@
+package retry
+
+import (
+ "errors"
+ "net"
+ "net/url"
+ "strings"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+// IsErrorRetryable provides the interface of an implementation to determine if
+// a error as the result of an operation is retryable.
+type IsErrorRetryable interface {
+ IsErrorRetryable(error) aws.Ternary
+}
+
+// IsErrorRetryables is a collection of checks to determine of the error is
+// retryable. Iterates through the checks and returns the state of retryable
+// if any check returns something other than unknown.
+type IsErrorRetryables []IsErrorRetryable
+
+// IsErrorRetryable returns if the error is retryable if any of the checks in
+// the list return a value other than unknown.
+func (r IsErrorRetryables) IsErrorRetryable(err error) aws.Ternary {
+ for _, re := range r {
+ if v := re.IsErrorRetryable(err); v != aws.UnknownTernary {
+ return v
+ }
+ }
+ return aws.UnknownTernary
+}
+
+// IsErrorRetryableFunc wraps a function with the IsErrorRetryable interface.
+type IsErrorRetryableFunc func(error) aws.Ternary
+
+// IsErrorRetryable returns if the error is retryable.
+func (fn IsErrorRetryableFunc) IsErrorRetryable(err error) aws.Ternary {
+ return fn(err)
+}
+
+// RetryableError is an IsErrorRetryable implementation which uses the
+// optional interface Retryable on the error value to determine if the error is
+// retryable.
+type RetryableError struct{}
+
+// IsErrorRetryable returns if the error is retryable if it satisfies the
+// Retryable interface, and returns if the attempt should be retried.
+func (RetryableError) IsErrorRetryable(err error) aws.Ternary {
+ var v interface{ RetryableError() bool }
+
+ if !errors.As(err, &v) {
+ return aws.UnknownTernary
+ }
+
+ return aws.BoolTernary(v.RetryableError())
+}
+
+// NoRetryCanceledError detects if the error was an request canceled error and
+// returns if so.
+type NoRetryCanceledError struct{}
+
+// IsErrorRetryable returns the error is not retryable if the request was
+// canceled.
+func (NoRetryCanceledError) IsErrorRetryable(err error) aws.Ternary {
+ var v interface{ CanceledError() bool }
+
+ if !errors.As(err, &v) {
+ return aws.UnknownTernary
+ }
+
+ if v.CanceledError() {
+ return aws.FalseTernary
+ }
+ return aws.UnknownTernary
+}
+
+// RetryableConnectionError determines if the underlying error is an HTTP
+// connection and returns if it should be retried.
+//
+// Includes errors such as connection reset, connection refused, net dial,
+// temporary, and timeout errors.
+type RetryableConnectionError struct{}
+
+// IsErrorRetryable returns if the error is caused by and HTTP connection
+// error, and should be retried.
+func (r RetryableConnectionError) IsErrorRetryable(err error) aws.Ternary {
+ if err == nil {
+ return aws.UnknownTernary
+ }
+ var retryable bool
+
+ var conErr interface{ ConnectionError() bool }
+ var tempErr interface{ Temporary() bool }
+ var timeoutErr interface{ Timeout() bool }
+ var urlErr *url.Error
+ var netOpErr *net.OpError
+
+ switch {
+ case errors.As(err, &conErr) && conErr.ConnectionError():
+ retryable = true
+
+ case strings.Contains(err.Error(), "connection reset"):
+ retryable = true
+
+ case errors.As(err, &urlErr):
+ // Refused connections should be retried as the service may not yet be
+ // running on the port. Go TCP dial considers refused connections as
+ // not temporary.
+ if strings.Contains(urlErr.Error(), "connection refused") {
+ retryable = true
+ } else {
+ return r.IsErrorRetryable(errors.Unwrap(urlErr))
+ }
+
+ case errors.As(err, &netOpErr):
+ // Network dial, or temporary network errors are always retryable.
+ if strings.EqualFold(netOpErr.Op, "dial") || netOpErr.Temporary() {
+ retryable = true
+ } else {
+ return r.IsErrorRetryable(errors.Unwrap(netOpErr))
+ }
+
+ case errors.As(err, &tempErr) && tempErr.Temporary():
+ // Fallback to the generic temporary check, with temporary errors
+ // retryable.
+ retryable = true
+
+ case errors.As(err, &timeoutErr) && timeoutErr.Timeout():
+ // Fallback to the generic timeout check, with timeout errors
+ // retryable.
+ retryable = true
+
+ default:
+ return aws.UnknownTernary
+ }
+
+ return aws.BoolTernary(retryable)
+
+}
+
+// RetryableHTTPStatusCode provides a IsErrorRetryable based on HTTP status
+// codes.
+type RetryableHTTPStatusCode struct {
+ Codes map[int]struct{}
+}
+
+// IsErrorRetryable return if the passed in error is retryable based on the
+// HTTP status code.
+func (r RetryableHTTPStatusCode) IsErrorRetryable(err error) aws.Ternary {
+ var v interface{ HTTPStatusCode() int }
+
+ if !errors.As(err, &v) {
+ return aws.UnknownTernary
+ }
+
+ _, ok := r.Codes[v.HTTPStatusCode()]
+ if !ok {
+ return aws.UnknownTernary
+ }
+
+ return aws.TrueTernary
+}
+
+// RetryableErrorCode determines if an attempt should be retried based on the
+// API error code.
+type RetryableErrorCode struct {
+ Codes map[string]struct{}
+}
+
+// IsErrorRetryable return if the error is retryable based on the error codes.
+// Returns unknown if the error doesn't have a code or it is unknown.
+func (r RetryableErrorCode) IsErrorRetryable(err error) aws.Ternary {
+ var v interface{ ErrorCode() string }
+
+ if !errors.As(err, &v) {
+ return aws.UnknownTernary
+ }
+
+ _, ok := r.Codes[v.ErrorCode()]
+ if !ok {
+ return aws.UnknownTernary
+ }
+
+ return aws.TrueTernary
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go
new file mode 100644
index 000000000..25abffc81
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go
@@ -0,0 +1,258 @@
+package retry
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws/ratelimit"
+)
+
+// BackoffDelayer provides the interface for determining the delay to before
+// another request attempt, that previously failed.
+type BackoffDelayer interface {
+ BackoffDelay(attempt int, err error) (time.Duration, error)
+}
+
+// BackoffDelayerFunc provides a wrapper around a function to determine the
+// backoff delay of an attempt retry.
+type BackoffDelayerFunc func(int, error) (time.Duration, error)
+
+// BackoffDelay returns the delay before attempt to retry a request.
+func (fn BackoffDelayerFunc) BackoffDelay(attempt int, err error) (time.Duration, error) {
+ return fn(attempt, err)
+}
+
+const (
+ // DefaultMaxAttempts is the maximum of attempts for an API request
+ DefaultMaxAttempts int = 3
+
+ // DefaultMaxBackoff is the maximum back off delay between attempts
+ DefaultMaxBackoff time.Duration = 20 * time.Second
+)
+
+// Default retry token quota values.
+const (
+ DefaultRetryRateTokens uint = 500
+ DefaultRetryCost uint = 5
+ DefaultRetryTimeoutCost uint = 10
+ DefaultNoRetryIncrement uint = 1
+)
+
+// DefaultRetryableHTTPStatusCodes is the default set of HTTP status codes the SDK
+// should consider as retryable errors.
+var DefaultRetryableHTTPStatusCodes = map[int]struct{}{
+ 500: {},
+ 502: {},
+ 503: {},
+ 504: {},
+}
+
+// DefaultRetryableErrorCodes provides the set of API error codes that should
+// be retried.
+var DefaultRetryableErrorCodes = map[string]struct{}{
+ "RequestTimeout": {},
+ "RequestTimeoutException": {},
+}
+
+// DefaultThrottleErrorCodes provides the set of API error codes that are
+// considered throttle errors.
+var DefaultThrottleErrorCodes = map[string]struct{}{
+ "Throttling": {},
+ "ThrottlingException": {},
+ "ThrottledException": {},
+ "RequestThrottledException": {},
+ "TooManyRequestsException": {},
+ "ProvisionedThroughputExceededException": {},
+ "TransactionInProgressException": {},
+ "RequestLimitExceeded": {},
+ "BandwidthLimitExceeded": {},
+ "LimitExceededException": {},
+ "RequestThrottled": {},
+ "SlowDown": {},
+ "PriorRequestNotComplete": {},
+ "EC2ThrottledException": {},
+}
+
+// DefaultRetryables provides the set of retryable checks that are used by
+// default.
+var DefaultRetryables = []IsErrorRetryable{
+ NoRetryCanceledError{},
+ RetryableError{},
+ RetryableConnectionError{},
+ RetryableHTTPStatusCode{
+ Codes: DefaultRetryableHTTPStatusCodes,
+ },
+ RetryableErrorCode{
+ Codes: DefaultRetryableErrorCodes,
+ },
+ RetryableErrorCode{
+ Codes: DefaultThrottleErrorCodes,
+ },
+}
+
+// DefaultTimeouts provides the set of timeout checks that are used by default.
+var DefaultTimeouts = []IsErrorTimeout{
+ TimeouterError{},
+}
+
+// StandardOptions provides the functional options for configuring the standard
+// retryable, and delay behavior.
+type StandardOptions struct {
+ // Maximum number of attempts that should be made.
+ MaxAttempts int
+
+ // MaxBackoff duration between retried attempts.
+ MaxBackoff time.Duration
+
+ // Provides the backoff strategy the retryer will use to determine the
+ // delay between retry attempts.
+ Backoff BackoffDelayer
+
+ // Set of strategies to determine if the attempt should be retried based on
+ // the error response received.
+ //
+ // It is safe to append to this list in NewStandard's functional options.
+ Retryables []IsErrorRetryable
+
+ // Set of strategies to determine if the attempt failed due to a timeout
+ // error.
+ //
+ // It is safe to append to this list in NewStandard's functional options.
+ Timeouts []IsErrorTimeout
+
+ // Provides the rate limiting strategy for rate limiting attempt retries
+ // across all attempts the retryer is being used with.
+ RateLimiter RateLimiter
+
+ // The cost to deduct from the RateLimiter's token bucket per retry.
+ RetryCost uint
+
+ // The cost to deduct from the RateLimiter's token bucket per retry caused
+ // by timeout error.
+ RetryTimeoutCost uint
+
+ // The cost to payback to the RateLimiter's token bucket for successful
+ // attempts.
+ NoRetryIncrement uint
+}
+
+// RateLimiter provides the interface for limiting the rate of attempt retries
+// allowed by the retryer.
+type RateLimiter interface {
+ GetToken(ctx context.Context, cost uint) (releaseToken func() error, err error)
+ AddTokens(uint) error
+}
+
+// Standard is the standard retry pattern for the SDK. It uses a set of
+// retryable checks to determine of the failed attempt should be retried, and
+// what retry delay should be used.
+type Standard struct {
+ options StandardOptions
+
+ timeout IsErrorTimeout
+ retryable IsErrorRetryable
+ backoff BackoffDelayer
+}
+
+// NewStandard initializes a standard retry behavior with defaults that can be
+// overridden via functional options.
+func NewStandard(fnOpts ...func(*StandardOptions)) *Standard {
+ o := StandardOptions{
+ MaxAttempts: DefaultMaxAttempts,
+ MaxBackoff: DefaultMaxBackoff,
+ Retryables: append([]IsErrorRetryable{}, DefaultRetryables...),
+ Timeouts: append([]IsErrorTimeout{}, DefaultTimeouts...),
+
+ RateLimiter: ratelimit.NewTokenRateLimit(DefaultRetryRateTokens),
+ RetryCost: DefaultRetryCost,
+ RetryTimeoutCost: DefaultRetryTimeoutCost,
+ NoRetryIncrement: DefaultNoRetryIncrement,
+ }
+ for _, fn := range fnOpts {
+ fn(&o)
+ }
+ if o.MaxAttempts <= 0 {
+ o.MaxAttempts = DefaultMaxAttempts
+ }
+
+ backoff := o.Backoff
+ if backoff == nil {
+ backoff = NewExponentialJitterBackoff(o.MaxBackoff)
+ }
+
+ return &Standard{
+ options: o,
+ backoff: backoff,
+ retryable: IsErrorRetryables(o.Retryables),
+ timeout: IsErrorTimeouts(o.Timeouts),
+ }
+}
+
+// MaxAttempts returns the maximum number of attempts that can be made for a
+// request before failing.
+func (s *Standard) MaxAttempts() int {
+ return s.options.MaxAttempts
+}
+
+// IsErrorRetryable returns if the error is can be retried or not. Should not
+// consider the number of attempts made.
+func (s *Standard) IsErrorRetryable(err error) bool {
+ return s.retryable.IsErrorRetryable(err).Bool()
+}
+
+// RetryDelay returns the delay to use before another request attempt is made.
+func (s *Standard) RetryDelay(attempt int, err error) (time.Duration, error) {
+ return s.backoff.BackoffDelay(attempt, err)
+}
+
+// GetAttemptToken returns the token to be released after then attempt completes.
+// The release token will add NoRetryIncrement to the RateLimiter token pool if
+// the attempt was successful. If the attempt failed, nothing will be done.
+func (s *Standard) GetAttemptToken(context.Context) (func(error) error, error) {
+ return s.GetInitialToken(), nil
+}
+
+// GetInitialToken returns a token for adding the NoRetryIncrement to the
+// RateLimiter token if the attempt completed successfully without error.
+//
+// InitialToken applies to result of the each attempt, including the first.
+// Whereas the RetryToken applies to the result of subsequent attempts.
+//
+// Deprecated: use GetAttemptToken instead.
+func (s *Standard) GetInitialToken() func(error) error {
+ return releaseToken(s.noRetryIncrement).release
+}
+
+func (s *Standard) noRetryIncrement() error {
+ return s.options.RateLimiter.AddTokens(s.options.NoRetryIncrement)
+}
+
+// GetRetryToken attempts to deduct the retry cost from the retry token pool.
+// Returning the token release function, or error.
+func (s *Standard) GetRetryToken(ctx context.Context, opErr error) (func(error) error, error) {
+ cost := s.options.RetryCost
+
+ if s.timeout.IsErrorTimeout(opErr).Bool() {
+ cost = s.options.RetryTimeoutCost
+ }
+
+ fn, err := s.options.RateLimiter.GetToken(ctx, cost)
+ if err != nil {
+ return nil, fmt.Errorf("failed to get rate limit token, %w", err)
+ }
+
+ return releaseToken(fn).release, nil
+}
+
+func nopRelease(error) error { return nil }
+
+type releaseToken func() error
+
+func (f releaseToken) release(err error) error {
+ if err != nil {
+ return nil
+ }
+
+ return f()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/throttle_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/throttle_error.go
new file mode 100644
index 000000000..c4b844d15
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/throttle_error.go
@@ -0,0 +1,60 @@
+package retry
+
+import (
+ "errors"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+// IsErrorThrottle provides the interface of an implementation to determine if
+// a error response from an operation is a throttling error.
+type IsErrorThrottle interface {
+ IsErrorThrottle(error) aws.Ternary
+}
+
+// IsErrorThrottles is a collection of checks to determine of the error a
+// throttle error. Iterates through the checks and returns the state of
+// throttle if any check returns something other than unknown.
+type IsErrorThrottles []IsErrorThrottle
+
+// IsErrorThrottle returns if the error is a throttle error if any of the
+// checks in the list return a value other than unknown.
+func (r IsErrorThrottles) IsErrorThrottle(err error) aws.Ternary {
+ for _, re := range r {
+ if v := re.IsErrorThrottle(err); v != aws.UnknownTernary {
+ return v
+ }
+ }
+ return aws.UnknownTernary
+}
+
+// IsErrorThrottleFunc wraps a function with the IsErrorThrottle interface.
+type IsErrorThrottleFunc func(error) aws.Ternary
+
+// IsErrorThrottle returns if the error is a throttle error.
+func (fn IsErrorThrottleFunc) IsErrorThrottle(err error) aws.Ternary {
+ return fn(err)
+}
+
+// ThrottleErrorCode determines if an attempt should be retried based on the
+// API error code.
+type ThrottleErrorCode struct {
+ Codes map[string]struct{}
+}
+
+// IsErrorThrottle return if the error is a throttle error based on the error
+// codes. Returns unknown if the error doesn't have a code or it is unknown.
+func (r ThrottleErrorCode) IsErrorThrottle(err error) aws.Ternary {
+ var v interface{ ErrorCode() string }
+
+ if !errors.As(err, &v) {
+ return aws.UnknownTernary
+ }
+
+ _, ok := r.Codes[v.ErrorCode()]
+ if !ok {
+ return aws.UnknownTernary
+ }
+
+ return aws.TrueTernary
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/timeout_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/timeout_error.go
new file mode 100644
index 000000000..3d47870d2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/timeout_error.go
@@ -0,0 +1,52 @@
+package retry
+
+import (
+ "errors"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+// IsErrorTimeout provides the interface of an implementation to determine if
+// a error matches.
+type IsErrorTimeout interface {
+ IsErrorTimeout(err error) aws.Ternary
+}
+
+// IsErrorTimeouts is a collection of checks to determine of the error is
+// retryable. Iterates through the checks and returns the state of retryable
+// if any check returns something other than unknown.
+type IsErrorTimeouts []IsErrorTimeout
+
+// IsErrorTimeout returns if the error is retryable if any of the checks in
+// the list return a value other than unknown.
+func (ts IsErrorTimeouts) IsErrorTimeout(err error) aws.Ternary {
+ for _, t := range ts {
+ if v := t.IsErrorTimeout(err); v != aws.UnknownTernary {
+ return v
+ }
+ }
+ return aws.UnknownTernary
+}
+
+// IsErrorTimeoutFunc wraps a function with the IsErrorTimeout interface.
+type IsErrorTimeoutFunc func(error) aws.Ternary
+
+// IsErrorTimeout returns if the error is retryable.
+func (fn IsErrorTimeoutFunc) IsErrorTimeout(err error) aws.Ternary {
+ return fn(err)
+}
+
+// TimeouterError provides the IsErrorTimeout implementation for determining if
+// an error is a timeout based on type with the Timeout method.
+type TimeouterError struct{}
+
+// IsErrorTimeout returns if the error is a timeout error.
+func (t TimeouterError) IsErrorTimeout(err error) aws.Ternary {
+ var v interface{ Timeout() bool }
+
+ if !errors.As(err, &v) {
+ return aws.UnknownTernary
+ }
+
+ return aws.BoolTernary(v.Timeout())
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go
new file mode 100644
index 000000000..6777e21ef
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go
@@ -0,0 +1,127 @@
+package aws
+
+import (
+ "context"
+ "fmt"
+ "time"
+)
+
+// RetryMode provides the mode the API client will use to create a retryer
+// based on.
+type RetryMode string
+
+const (
+ // RetryModeStandard model provides rate limited retry attempts with
+ // exponential backoff delay.
+ RetryModeStandard RetryMode = "standard"
+
+ // RetryModeAdaptive model provides attempt send rate limiting on throttle
+ // responses in addition to standard mode's retry rate limiting.
+ //
+ // Adaptive retry mode is experimental and is subject to change in the
+ // future.
+ RetryModeAdaptive RetryMode = "adaptive"
+)
+
+// ParseRetryMode attempts to parse a RetryMode from the given string.
+// Returning error if the value is not a known RetryMode.
+func ParseRetryMode(v string) (mode RetryMode, err error) {
+ switch v {
+ case "standard":
+ return RetryModeStandard, nil
+ case "adaptive":
+ return RetryModeAdaptive, nil
+ default:
+ return mode, fmt.Errorf("unknown RetryMode, %v", v)
+ }
+}
+
+func (m RetryMode) String() string { return string(m) }
+
+// Retryer is an interface to determine if a given error from a
+// attempt should be retried, and if so what backoff delay to apply. The
+// default implementation used by most services is the retry package's Standard
+// type. Which contains basic retry logic using exponential backoff.
+type Retryer interface {
+ // IsErrorRetryable returns if the failed attempt is retryable. This check
+ // should determine if the error can be retried, or if the error is
+ // terminal.
+ IsErrorRetryable(error) bool
+
+ // MaxAttempts returns the maximum number of attempts that can be made for
+ // an attempt before failing. A value of 0 implies that the attempt should
+ // be retried until it succeeds if the errors are retryable.
+ MaxAttempts() int
+
+ // RetryDelay returns the delay that should be used before retrying the
+ // attempt. Will return error if the if the delay could not be determined.
+ RetryDelay(attempt int, opErr error) (time.Duration, error)
+
+ // GetRetryToken attempts to deduct the retry cost from the retry token pool.
+ // Returning the token release function, or error.
+ GetRetryToken(ctx context.Context, opErr error) (releaseToken func(error) error, err error)
+
+ // GetInitialToken returns the initial attempt token that can increment the
+ // retry token pool if the attempt is successful.
+ GetInitialToken() (releaseToken func(error) error)
+}
+
+// RetryerV2 is an interface to determine if a given error from an attempt
+// should be retried, and if so what backoff delay to apply. The default
+// implementation used by most services is the retry package's Standard type.
+// Which contains basic retry logic using exponential backoff.
+//
+// RetryerV2 replaces the Retryer interface, deprecating the GetInitialToken
+// method in favor of GetAttemptToken which takes a context, and can return an error.
+//
+// The SDK's retry package's Attempt middleware, and utilities will always
+// wrap a Retryer as a RetryerV2. Delegating to GetInitialToken, only if
+// GetAttemptToken is not implemented.
+type RetryerV2 interface {
+ Retryer
+
+ // GetInitialToken returns the initial attempt token that can increment the
+ // retry token pool if the attempt is successful.
+ //
+ // Deprecated: This method does not provide a way to block using Context,
+ // nor can it return an error. Use RetryerV2, and GetAttemptToken instead.
+ GetInitialToken() (releaseToken func(error) error)
+
+ // GetAttemptToken returns the send token that can be used to rate limit
+ // attempt calls. Will be used by the SDK's retry package's Attempt
+ // middleware to get a send token prior to calling the temp and releasing
+ // the send token after the attempt has been made.
+ GetAttemptToken(context.Context) (func(error) error, error)
+}
+
+// NopRetryer provides a RequestRetryDecider implementation that will flag
+// all attempt errors as not retryable, with a max attempts of 1.
+type NopRetryer struct{}
+
+// IsErrorRetryable returns false for all error values.
+func (NopRetryer) IsErrorRetryable(error) bool { return false }
+
+// MaxAttempts always returns 1 for the original attempt.
+func (NopRetryer) MaxAttempts() int { return 1 }
+
+// RetryDelay is not valid for the NopRetryer. Will always return error.
+func (NopRetryer) RetryDelay(int, error) (time.Duration, error) {
+ return 0, fmt.Errorf("not retrying any attempt errors")
+}
+
+// GetRetryToken returns a stub function that does nothing.
+func (NopRetryer) GetRetryToken(context.Context, error) (func(error) error, error) {
+ return nopReleaseToken, nil
+}
+
+// GetInitialToken returns a stub function that does nothing.
+func (NopRetryer) GetInitialToken() func(error) error {
+ return nopReleaseToken
+}
+
+// GetAttemptToken returns a stub function that does nothing.
+func (NopRetryer) GetAttemptToken(context.Context) (func(error) error, error) {
+ return nopReleaseToken, nil
+}
+
+func nopReleaseToken(error) error { return nil }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/runtime.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/runtime.go
new file mode 100644
index 000000000..3af9b2b33
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/runtime.go
@@ -0,0 +1,14 @@
+package aws
+
+// ExecutionEnvironmentID is the AWS execution environment runtime identifier.
+type ExecutionEnvironmentID string
+
+// RuntimeEnvironment is a collection of values that are determined at runtime
+// based on the environment that the SDK is executing in. Some of these values
+// may or may not be present based on the executing environment and certain SDK
+// configuration properties that drive whether these values are populated..
+type RuntimeEnvironment struct {
+ EnvironmentIdentifier ExecutionEnvironmentID
+ Region string
+ EC2InstanceMetadataRegion string
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/cache.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/cache.go
new file mode 100644
index 000000000..cbf22f1d0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/cache.go
@@ -0,0 +1,115 @@
+package v4
+
+import (
+ "strings"
+ "sync"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+func lookupKey(service, region string) string {
+ var s strings.Builder
+ s.Grow(len(region) + len(service) + 3)
+ s.WriteString(region)
+ s.WriteRune('/')
+ s.WriteString(service)
+ return s.String()
+}
+
+type derivedKey struct {
+ AccessKey string
+ Date time.Time
+ Credential []byte
+}
+
+type derivedKeyCache struct {
+ values map[string]derivedKey
+ mutex sync.RWMutex
+}
+
+func newDerivedKeyCache() derivedKeyCache {
+ return derivedKeyCache{
+ values: make(map[string]derivedKey),
+ }
+}
+
+func (s *derivedKeyCache) Get(credentials aws.Credentials, service, region string, signingTime SigningTime) []byte {
+ key := lookupKey(service, region)
+ s.mutex.RLock()
+ if cred, ok := s.get(key, credentials, signingTime.Time); ok {
+ s.mutex.RUnlock()
+ return cred
+ }
+ s.mutex.RUnlock()
+
+ s.mutex.Lock()
+ if cred, ok := s.get(key, credentials, signingTime.Time); ok {
+ s.mutex.Unlock()
+ return cred
+ }
+ cred := deriveKey(credentials.SecretAccessKey, service, region, signingTime)
+ entry := derivedKey{
+ AccessKey: credentials.AccessKeyID,
+ Date: signingTime.Time,
+ Credential: cred,
+ }
+ s.values[key] = entry
+ s.mutex.Unlock()
+
+ return cred
+}
+
+func (s *derivedKeyCache) get(key string, credentials aws.Credentials, signingTime time.Time) ([]byte, bool) {
+ cacheEntry, ok := s.retrieveFromCache(key)
+ if ok && cacheEntry.AccessKey == credentials.AccessKeyID && isSameDay(signingTime, cacheEntry.Date) {
+ return cacheEntry.Credential, true
+ }
+ return nil, false
+}
+
+func (s *derivedKeyCache) retrieveFromCache(key string) (derivedKey, bool) {
+ if v, ok := s.values[key]; ok {
+ return v, true
+ }
+ return derivedKey{}, false
+}
+
+// SigningKeyDeriver derives a signing key from a set of credentials
+type SigningKeyDeriver struct {
+ cache derivedKeyCache
+}
+
+// NewSigningKeyDeriver returns a new SigningKeyDeriver
+func NewSigningKeyDeriver() *SigningKeyDeriver {
+ return &SigningKeyDeriver{
+ cache: newDerivedKeyCache(),
+ }
+}
+
+// DeriveKey returns a derived signing key from the given credentials to be used with SigV4 signing.
+func (k *SigningKeyDeriver) DeriveKey(credential aws.Credentials, service, region string, signingTime SigningTime) []byte {
+ return k.cache.Get(credential, service, region, signingTime)
+}
+
+func deriveKey(secret, service, region string, t SigningTime) []byte {
+ hmacDate := HMACSHA256([]byte("AWS4"+secret), []byte(t.ShortTimeFormat()))
+ hmacRegion := HMACSHA256(hmacDate, []byte(region))
+ hmacService := HMACSHA256(hmacRegion, []byte(service))
+ return HMACSHA256(hmacService, []byte("aws4_request"))
+}
+
+func isSameDay(x, y time.Time) bool {
+ xYear, xMonth, xDay := x.Date()
+ yYear, yMonth, yDay := y.Date()
+
+ if xYear != yYear {
+ return false
+ }
+
+ if xMonth != yMonth {
+ return false
+ }
+
+ return xDay == yDay
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/const.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/const.go
new file mode 100644
index 000000000..a23cb003b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/const.go
@@ -0,0 +1,40 @@
+package v4
+
+// Signature Version 4 (SigV4) Constants
+const (
+ // EmptyStringSHA256 is the hex encoded sha256 value of an empty string
+ EmptyStringSHA256 = `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855`
+
+ // UnsignedPayload indicates that the request payload body is unsigned
+ UnsignedPayload = "UNSIGNED-PAYLOAD"
+
+ // AmzAlgorithmKey indicates the signing algorithm
+ AmzAlgorithmKey = "X-Amz-Algorithm"
+
+ // AmzSecurityTokenKey indicates the security token to be used with temporary credentials
+ AmzSecurityTokenKey = "X-Amz-Security-Token"
+
+ // AmzDateKey is the UTC timestamp for the request in the format YYYYMMDD'T'HHMMSS'Z'
+ AmzDateKey = "X-Amz-Date"
+
+ // AmzCredentialKey is the access key ID and credential scope
+ AmzCredentialKey = "X-Amz-Credential"
+
+ // AmzSignedHeadersKey is the set of headers signed for the request
+ AmzSignedHeadersKey = "X-Amz-SignedHeaders"
+
+ // AmzSignatureKey is the query parameter to store the SigV4 signature
+ AmzSignatureKey = "X-Amz-Signature"
+
+ // TimeFormat is the time format to be used in the X-Amz-Date header or query parameter
+ TimeFormat = "20060102T150405Z"
+
+ // ShortTimeFormat is the shorten time format used in the credential scope
+ ShortTimeFormat = "20060102"
+
+ // ContentSHAKey is the SHA256 of request body
+ ContentSHAKey = "X-Amz-Content-Sha256"
+
+ // StreamingEventsPayload indicates that the request payload body is a signed event stream.
+ StreamingEventsPayload = "STREAMING-AWS4-HMAC-SHA256-EVENTS"
+)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/header_rules.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/header_rules.go
new file mode 100644
index 000000000..c61955ad5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/header_rules.go
@@ -0,0 +1,82 @@
+package v4
+
+import (
+ sdkstrings "github.com/aws/aws-sdk-go-v2/internal/strings"
+)
+
+// Rules houses a set of Rule needed for validation of a
+// string value
+type Rules []Rule
+
+// Rule interface allows for more flexible rules and just simply
+// checks whether or not a value adheres to that Rule
+type Rule interface {
+ IsValid(value string) bool
+}
+
+// IsValid will iterate through all rules and see if any rules
+// apply to the value and supports nested rules
+func (r Rules) IsValid(value string) bool {
+ for _, rule := range r {
+ if rule.IsValid(value) {
+ return true
+ }
+ }
+ return false
+}
+
+// MapRule generic Rule for maps
+type MapRule map[string]struct{}
+
+// IsValid for the map Rule satisfies whether it exists in the map
+func (m MapRule) IsValid(value string) bool {
+ _, ok := m[value]
+ return ok
+}
+
+// AllowList is a generic Rule for include listing
+type AllowList struct {
+ Rule
+}
+
+// IsValid for AllowList checks if the value is within the AllowList
+func (w AllowList) IsValid(value string) bool {
+ return w.Rule.IsValid(value)
+}
+
+// ExcludeList is a generic Rule for exclude listing
+type ExcludeList struct {
+ Rule
+}
+
+// IsValid for AllowList checks if the value is within the AllowList
+func (b ExcludeList) IsValid(value string) bool {
+ return !b.Rule.IsValid(value)
+}
+
+// Patterns is a list of strings to match against
+type Patterns []string
+
+// IsValid for Patterns checks each pattern and returns if a match has
+// been found
+func (p Patterns) IsValid(value string) bool {
+ for _, pattern := range p {
+ if sdkstrings.HasPrefixFold(value, pattern) {
+ return true
+ }
+ }
+ return false
+}
+
+// InclusiveRules rules allow for rules to depend on one another
+type InclusiveRules []Rule
+
+// IsValid will return true if all rules are true
+func (r InclusiveRules) IsValid(value string) bool {
+ for _, rule := range r {
+ if !rule.IsValid(value) {
+ return false
+ }
+ }
+ return true
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go
new file mode 100644
index 000000000..85a1d8f03
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go
@@ -0,0 +1,68 @@
+package v4
+
+// IgnoredHeaders is a list of headers that are ignored during signing
+var IgnoredHeaders = Rules{
+ ExcludeList{
+ MapRule{
+ "Authorization": struct{}{},
+ "User-Agent": struct{}{},
+ "X-Amzn-Trace-Id": struct{}{},
+ },
+ },
+}
+
+// RequiredSignedHeaders is a allow list for Build canonical headers.
+var RequiredSignedHeaders = Rules{
+ AllowList{
+ MapRule{
+ "Cache-Control": struct{}{},
+ "Content-Disposition": struct{}{},
+ "Content-Encoding": struct{}{},
+ "Content-Language": struct{}{},
+ "Content-Md5": struct{}{},
+ "Content-Type": struct{}{},
+ "Expires": struct{}{},
+ "If-Match": struct{}{},
+ "If-Modified-Since": struct{}{},
+ "If-None-Match": struct{}{},
+ "If-Unmodified-Since": struct{}{},
+ "Range": struct{}{},
+ "X-Amz-Acl": struct{}{},
+ "X-Amz-Copy-Source": struct{}{},
+ "X-Amz-Copy-Source-If-Match": struct{}{},
+ "X-Amz-Copy-Source-If-Modified-Since": struct{}{},
+ "X-Amz-Copy-Source-If-None-Match": struct{}{},
+ "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{},
+ "X-Amz-Copy-Source-Range": struct{}{},
+ "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{},
+ "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{},
+ "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{},
+ "X-Amz-Grant-Full-control": struct{}{},
+ "X-Amz-Grant-Read": struct{}{},
+ "X-Amz-Grant-Read-Acp": struct{}{},
+ "X-Amz-Grant-Write": struct{}{},
+ "X-Amz-Grant-Write-Acp": struct{}{},
+ "X-Amz-Metadata-Directive": struct{}{},
+ "X-Amz-Mfa": struct{}{},
+ "X-Amz-Request-Payer": struct{}{},
+ "X-Amz-Server-Side-Encryption": struct{}{},
+ "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id": struct{}{},
+ "X-Amz-Server-Side-Encryption-Customer-Algorithm": struct{}{},
+ "X-Amz-Server-Side-Encryption-Customer-Key": struct{}{},
+ "X-Amz-Server-Side-Encryption-Customer-Key-Md5": struct{}{},
+ "X-Amz-Storage-Class": struct{}{},
+ "X-Amz-Website-Redirect-Location": struct{}{},
+ "X-Amz-Content-Sha256": struct{}{},
+ "X-Amz-Tagging": struct{}{},
+ },
+ },
+ Patterns{"X-Amz-Object-Lock-"},
+ Patterns{"X-Amz-Meta-"},
+}
+
+// AllowedQueryHoisting is a allowed list for Build query headers. The boolean value
+// represents whether or not it is a pattern.
+var AllowedQueryHoisting = InclusiveRules{
+ ExcludeList{RequiredSignedHeaders},
+ Patterns{"X-Amz-"},
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/hmac.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/hmac.go
new file mode 100644
index 000000000..e7fa7a1b1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/hmac.go
@@ -0,0 +1,13 @@
+package v4
+
+import (
+ "crypto/hmac"
+ "crypto/sha256"
+)
+
+// HMACSHA256 computes a HMAC-SHA256 of data given the provided key.
+func HMACSHA256(key []byte, data []byte) []byte {
+ hash := hmac.New(sha256.New, key)
+ hash.Write(data)
+ return hash.Sum(nil)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/host.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/host.go
new file mode 100644
index 000000000..bf93659a4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/host.go
@@ -0,0 +1,75 @@
+package v4
+
+import (
+ "net/http"
+ "strings"
+)
+
+// SanitizeHostForHeader removes default port from host and updates request.Host
+func SanitizeHostForHeader(r *http.Request) {
+ host := getHost(r)
+ port := portOnly(host)
+ if port != "" && isDefaultPort(r.URL.Scheme, port) {
+ r.Host = stripPort(host)
+ }
+}
+
+// Returns host from request
+func getHost(r *http.Request) string {
+ if r.Host != "" {
+ return r.Host
+ }
+
+ return r.URL.Host
+}
+
+// Hostname returns u.Host, without any port number.
+//
+// If Host is an IPv6 literal with a port number, Hostname returns the
+// IPv6 literal without the square brackets. IPv6 literals may include
+// a zone identifier.
+//
+// Copied from the Go 1.8 standard library (net/url)
+func stripPort(hostport string) string {
+ colon := strings.IndexByte(hostport, ':')
+ if colon == -1 {
+ return hostport
+ }
+ if i := strings.IndexByte(hostport, ']'); i != -1 {
+ return strings.TrimPrefix(hostport[:i], "[")
+ }
+ return hostport[:colon]
+}
+
+// Port returns the port part of u.Host, without the leading colon.
+// If u.Host doesn't contain a port, Port returns an empty string.
+//
+// Copied from the Go 1.8 standard library (net/url)
+func portOnly(hostport string) string {
+ colon := strings.IndexByte(hostport, ':')
+ if colon == -1 {
+ return ""
+ }
+ if i := strings.Index(hostport, "]:"); i != -1 {
+ return hostport[i+len("]:"):]
+ }
+ if strings.Contains(hostport, "]") {
+ return ""
+ }
+ return hostport[colon+len(":"):]
+}
+
+// Returns true if the specified URI is using the standard port
+// (i.e. port 80 for HTTP URIs or 443 for HTTPS URIs)
+func isDefaultPort(scheme, port string) bool {
+ if port == "" {
+ return true
+ }
+
+ lowerCaseScheme := strings.ToLower(scheme)
+ if (lowerCaseScheme == "http" && port == "80") || (lowerCaseScheme == "https" && port == "443") {
+ return true
+ }
+
+ return false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/scope.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/scope.go
new file mode 100644
index 000000000..fc7887909
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/scope.go
@@ -0,0 +1,13 @@
+package v4
+
+import "strings"
+
+// BuildCredentialScope builds the Signature Version 4 (SigV4) signing scope
+func BuildCredentialScope(signingTime SigningTime, region, service string) string {
+ return strings.Join([]string{
+ signingTime.ShortTimeFormat(),
+ region,
+ service,
+ "aws4_request",
+ }, "/")
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/time.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/time.go
new file mode 100644
index 000000000..1de06a765
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/time.go
@@ -0,0 +1,36 @@
+package v4
+
+import "time"
+
+// SigningTime provides a wrapper around a time.Time which provides cached values for SigV4 signing.
+type SigningTime struct {
+ time.Time
+ timeFormat string
+ shortTimeFormat string
+}
+
+// NewSigningTime creates a new SigningTime given a time.Time
+func NewSigningTime(t time.Time) SigningTime {
+ return SigningTime{
+ Time: t,
+ }
+}
+
+// TimeFormat provides a time formatted in the X-Amz-Date format.
+func (m *SigningTime) TimeFormat() string {
+ return m.format(&m.timeFormat, TimeFormat)
+}
+
+// ShortTimeFormat provides a time formatted of 20060102.
+func (m *SigningTime) ShortTimeFormat() string {
+ return m.format(&m.shortTimeFormat, ShortTimeFormat)
+}
+
+func (m *SigningTime) format(target *string, format string) string {
+ if len(*target) > 0 {
+ return *target
+ }
+ v := m.Time.Format(format)
+ *target = v
+ return v
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go
new file mode 100644
index 000000000..d025dbaa0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go
@@ -0,0 +1,80 @@
+package v4
+
+import (
+ "net/url"
+ "strings"
+)
+
+const doubleSpace = " "
+
+// StripExcessSpaces will rewrite the passed in slice's string values to not
+// contain multiple side-by-side spaces.
+func StripExcessSpaces(str string) string {
+ var j, k, l, m, spaces int
+ // Trim trailing spaces
+ for j = len(str) - 1; j >= 0 && str[j] == ' '; j-- {
+ }
+
+ // Trim leading spaces
+ for k = 0; k < j && str[k] == ' '; k++ {
+ }
+ str = str[k : j+1]
+
+ // Strip multiple spaces.
+ j = strings.Index(str, doubleSpace)
+ if j < 0 {
+ return str
+ }
+
+ buf := []byte(str)
+ for k, m, l = j, j, len(buf); k < l; k++ {
+ if buf[k] == ' ' {
+ if spaces == 0 {
+ // First space.
+ buf[m] = buf[k]
+ m++
+ }
+ spaces++
+ } else {
+ // End of multiple spaces.
+ spaces = 0
+ buf[m] = buf[k]
+ m++
+ }
+ }
+
+ return string(buf[:m])
+}
+
+// GetURIPath returns the escaped URI component from the provided URL.
+func GetURIPath(u *url.URL) string {
+ var uriPath string
+
+ if len(u.Opaque) > 0 {
+ const schemeSep, pathSep, queryStart = "//", "/", "?"
+
+ opaque := u.Opaque
+ // Cut off the query string if present.
+ if idx := strings.Index(opaque, queryStart); idx >= 0 {
+ opaque = opaque[:idx]
+ }
+
+ // Cutout the scheme separator if present.
+ if strings.Index(opaque, schemeSep) == 0 {
+ opaque = opaque[len(schemeSep):]
+ }
+
+ // capture URI path starting with first path separator.
+ if idx := strings.Index(opaque, pathSep); idx >= 0 {
+ uriPath = opaque[idx:]
+ }
+ } else {
+ uriPath = u.EscapedPath()
+ }
+
+ if len(uriPath) == 0 {
+ uriPath = "/"
+ }
+
+ return uriPath
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go
new file mode 100644
index 000000000..db8377ae5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go
@@ -0,0 +1,400 @@
+package v4
+
+import (
+ "context"
+ "crypto/sha256"
+ "encoding/hex"
+ "fmt"
+ "io"
+ "net/http"
+ "strings"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const computePayloadHashMiddlewareID = "ComputePayloadHash"
+
+// HashComputationError indicates an error occurred while computing the signing hash
+type HashComputationError struct {
+ Err error
+}
+
+// Error is the error message
+func (e *HashComputationError) Error() string {
+ return fmt.Sprintf("failed to compute payload hash: %v", e.Err)
+}
+
+// Unwrap returns the underlying error if one is set
+func (e *HashComputationError) Unwrap() error {
+ return e.Err
+}
+
+// SigningError indicates an error condition occurred while performing SigV4 signing
+type SigningError struct {
+ Err error
+}
+
+func (e *SigningError) Error() string {
+ return fmt.Sprintf("failed to sign request: %v", e.Err)
+}
+
+// Unwrap returns the underlying error cause
+func (e *SigningError) Unwrap() error {
+ return e.Err
+}
+
+// UseDynamicPayloadSigningMiddleware swaps the compute payload sha256 middleware with a resolver middleware that
+// switches between unsigned and signed payload based on TLS state for request.
+// This middleware should not be used for AWS APIs that do not support unsigned payload signing auth.
+// By default, SDK uses this middleware for known AWS APIs that support such TLS based auth selection .
+//
+// Usage example -
+// S3 PutObject API allows unsigned payload signing auth usage when TLS is enabled, and uses this middleware to
+// dynamically switch between unsigned and signed payload based on TLS state for request.
+func UseDynamicPayloadSigningMiddleware(stack *middleware.Stack) error {
+ _, err := stack.Build.Swap(computePayloadHashMiddlewareID, &dynamicPayloadSigningMiddleware{})
+ return err
+}
+
+// dynamicPayloadSigningMiddleware dynamically resolves the middleware that computes and set payload sha256 middleware.
+type dynamicPayloadSigningMiddleware struct {
+}
+
+// ID returns the resolver identifier
+func (m *dynamicPayloadSigningMiddleware) ID() string {
+ return computePayloadHashMiddlewareID
+}
+
+// HandleBuild sets a resolver that directs to the payload sha256 compute handler.
+func (m *dynamicPayloadSigningMiddleware) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ // if TLS is enabled, use unsigned payload when supported
+ if req.IsHTTPS() {
+ return (&unsignedPayload{}).HandleBuild(ctx, in, next)
+ }
+
+ // else fall back to signed payload
+ return (&computePayloadSHA256{}).HandleBuild(ctx, in, next)
+}
+
+// unsignedPayload sets the SigV4 request payload hash to unsigned.
+//
+// Will not set the Unsigned Payload magic SHA value, if a SHA has already been
+// stored in the context. (e.g. application pre-computed SHA256 before making
+// API call).
+//
+// This middleware does not check the X-Amz-Content-Sha256 header, if that
+// header is serialized a middleware must translate it into the context.
+type unsignedPayload struct{}
+
+// AddUnsignedPayloadMiddleware adds unsignedPayload to the operation
+// middleware stack
+func AddUnsignedPayloadMiddleware(stack *middleware.Stack) error {
+ return stack.Build.Add(&unsignedPayload{}, middleware.After)
+}
+
+// ID returns the unsignedPayload identifier
+func (m *unsignedPayload) ID() string {
+ return computePayloadHashMiddlewareID
+}
+
+// HandleBuild sets the payload hash to be an unsigned payload
+func (m *unsignedPayload) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ // This should not compute the content SHA256 if the value is already
+ // known. (e.g. application pre-computed SHA256 before making API call).
+ // Does not have any tight coupling to the X-Amz-Content-Sha256 header, if
+ // that header is provided a middleware must translate it into the context.
+ contentSHA := GetPayloadHash(ctx)
+ if len(contentSHA) == 0 {
+ contentSHA = v4Internal.UnsignedPayload
+ }
+
+ ctx = SetPayloadHash(ctx, contentSHA)
+ return next.HandleBuild(ctx, in)
+}
+
+// computePayloadSHA256 computes SHA256 payload hash to sign.
+//
+// Will not set the Unsigned Payload magic SHA value, if a SHA has already been
+// stored in the context. (e.g. application pre-computed SHA256 before making
+// API call).
+//
+// This middleware does not check the X-Amz-Content-Sha256 header, if that
+// header is serialized a middleware must translate it into the context.
+type computePayloadSHA256 struct{}
+
+// AddComputePayloadSHA256Middleware adds computePayloadSHA256 to the
+// operation middleware stack
+func AddComputePayloadSHA256Middleware(stack *middleware.Stack) error {
+ return stack.Build.Add(&computePayloadSHA256{}, middleware.After)
+}
+
+// RemoveComputePayloadSHA256Middleware removes computePayloadSHA256 from the
+// operation middleware stack
+func RemoveComputePayloadSHA256Middleware(stack *middleware.Stack) error {
+ _, err := stack.Build.Remove(computePayloadHashMiddlewareID)
+ return err
+}
+
+// ID is the middleware name
+func (m *computePayloadSHA256) ID() string {
+ return computePayloadHashMiddlewareID
+}
+
+// HandleBuild compute the payload hash for the request payload
+func (m *computePayloadSHA256) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &HashComputationError{
+ Err: fmt.Errorf("unexpected request middleware type %T", in.Request),
+ }
+ }
+
+ // This should not compute the content SHA256 if the value is already
+ // known. (e.g. application pre-computed SHA256 before making API call)
+ // Does not have any tight coupling to the X-Amz-Content-Sha256 header, if
+ // that header is provided a middleware must translate it into the context.
+ if contentSHA := GetPayloadHash(ctx); len(contentSHA) != 0 {
+ return next.HandleBuild(ctx, in)
+ }
+
+ hash := sha256.New()
+ if stream := req.GetStream(); stream != nil {
+ _, err = io.Copy(hash, stream)
+ if err != nil {
+ return out, metadata, &HashComputationError{
+ Err: fmt.Errorf("failed to compute payload hash, %w", err),
+ }
+ }
+
+ if err := req.RewindStream(); err != nil {
+ return out, metadata, &HashComputationError{
+ Err: fmt.Errorf("failed to seek body to start, %w", err),
+ }
+ }
+ }
+
+ ctx = SetPayloadHash(ctx, hex.EncodeToString(hash.Sum(nil)))
+
+ return next.HandleBuild(ctx, in)
+}
+
+// SwapComputePayloadSHA256ForUnsignedPayloadMiddleware replaces the
+// ComputePayloadSHA256 middleware with the UnsignedPayload middleware.
+//
+// Use this to disable computing the Payload SHA256 checksum and instead use
+// UNSIGNED-PAYLOAD for the SHA256 value.
+func SwapComputePayloadSHA256ForUnsignedPayloadMiddleware(stack *middleware.Stack) error {
+ _, err := stack.Build.Swap(computePayloadHashMiddlewareID, &unsignedPayload{})
+ return err
+}
+
+// contentSHA256Header sets the X-Amz-Content-Sha256 header value to
+// the Payload hash stored in the context.
+type contentSHA256Header struct{}
+
+// AddContentSHA256HeaderMiddleware adds ContentSHA256Header to the
+// operation middleware stack
+func AddContentSHA256HeaderMiddleware(stack *middleware.Stack) error {
+ return stack.Build.Insert(&contentSHA256Header{}, computePayloadHashMiddlewareID, middleware.After)
+}
+
+// RemoveContentSHA256HeaderMiddleware removes contentSHA256Header middleware
+// from the operation middleware stack
+func RemoveContentSHA256HeaderMiddleware(stack *middleware.Stack) error {
+ _, err := stack.Build.Remove((*contentSHA256Header)(nil).ID())
+ return err
+}
+
+// ID returns the ContentSHA256HeaderMiddleware identifier
+func (m *contentSHA256Header) ID() string {
+ return "SigV4ContentSHA256Header"
+}
+
+// HandleBuild sets the X-Amz-Content-Sha256 header value to the Payload hash
+// stored in the context.
+func (m *contentSHA256Header) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &HashComputationError{Err: fmt.Errorf("unexpected request middleware type %T", in.Request)}
+ }
+
+ req.Header.Set(v4Internal.ContentSHAKey, GetPayloadHash(ctx))
+
+ return next.HandleBuild(ctx, in)
+}
+
+// SignHTTPRequestMiddlewareOptions is the configuration options for the SignHTTPRequestMiddleware middleware.
+type SignHTTPRequestMiddlewareOptions struct {
+ CredentialsProvider aws.CredentialsProvider
+ Signer HTTPSigner
+ LogSigning bool
+}
+
+// SignHTTPRequestMiddleware is a `FinalizeMiddleware` implementation for SigV4 HTTP Signing
+type SignHTTPRequestMiddleware struct {
+ credentialsProvider aws.CredentialsProvider
+ signer HTTPSigner
+ logSigning bool
+}
+
+// NewSignHTTPRequestMiddleware constructs a SignHTTPRequestMiddleware using the given Signer for signing requests
+func NewSignHTTPRequestMiddleware(options SignHTTPRequestMiddlewareOptions) *SignHTTPRequestMiddleware {
+ return &SignHTTPRequestMiddleware{
+ credentialsProvider: options.CredentialsProvider,
+ signer: options.Signer,
+ logSigning: options.LogSigning,
+ }
+}
+
+// ID is the SignHTTPRequestMiddleware identifier
+func (s *SignHTTPRequestMiddleware) ID() string {
+ return "Signing"
+}
+
+// HandleFinalize will take the provided input and sign the request using the SigV4 authentication scheme
+func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ if !haveCredentialProvider(s.credentialsProvider) {
+ return next.HandleFinalize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &SigningError{Err: fmt.Errorf("unexpected request middleware type %T", in.Request)}
+ }
+
+ signingName, signingRegion := awsmiddleware.GetSigningName(ctx), awsmiddleware.GetSigningRegion(ctx)
+ payloadHash := GetPayloadHash(ctx)
+ if len(payloadHash) == 0 {
+ return out, metadata, &SigningError{Err: fmt.Errorf("computed payload hash missing from context")}
+ }
+
+ credentials, err := s.credentialsProvider.Retrieve(ctx)
+ if err != nil {
+ return out, metadata, &SigningError{Err: fmt.Errorf("failed to retrieve credentials: %w", err)}
+ }
+
+ err = s.signer.SignHTTP(ctx, credentials, req.Request, payloadHash, signingName, signingRegion, sdk.NowTime(),
+ func(o *SignerOptions) {
+ o.Logger = middleware.GetLogger(ctx)
+ o.LogSigning = s.logSigning
+ })
+ if err != nil {
+ return out, metadata, &SigningError{Err: fmt.Errorf("failed to sign http request, %w", err)}
+ }
+
+ ctx = awsmiddleware.SetSigningCredentials(ctx, credentials)
+
+ return next.HandleFinalize(ctx, in)
+}
+
+type streamingEventsPayload struct{}
+
+// AddStreamingEventsPayload adds the streamingEventsPayload middleware to the stack.
+func AddStreamingEventsPayload(stack *middleware.Stack) error {
+ return stack.Build.Add(&streamingEventsPayload{}, middleware.After)
+}
+
+func (s *streamingEventsPayload) ID() string {
+ return computePayloadHashMiddlewareID
+}
+
+func (s *streamingEventsPayload) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ contentSHA := GetPayloadHash(ctx)
+ if len(contentSHA) == 0 {
+ contentSHA = v4Internal.StreamingEventsPayload
+ }
+
+ ctx = SetPayloadHash(ctx, contentSHA)
+
+ return next.HandleBuild(ctx, in)
+}
+
+// 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) {
+ const authHeaderSignatureElem = "Signature="
+
+ 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 haveCredentialProvider(p aws.CredentialsProvider) bool {
+ if p == nil {
+ return false
+ }
+ switch p.(type) {
+ case aws.AnonymousCredentials,
+ *aws.AnonymousCredentials:
+ return false
+ }
+
+ return true
+}
+
+type payloadHashKey struct{}
+
+// GetPayloadHash retrieves the payload hash to use for signing
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetPayloadHash(ctx context.Context) (v string) {
+ v, _ = middleware.GetStackValue(ctx, payloadHashKey{}).(string)
+ return v
+}
+
+// SetPayloadHash sets the payload hash to be used for signing the request
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func SetPayloadHash(ctx context.Context, hash string) context.Context {
+ return middleware.WithStackValue(ctx, payloadHashKey{}, hash)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/presign_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/presign_middleware.go
new file mode 100644
index 000000000..e1a066512
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/presign_middleware.go
@@ -0,0 +1,127 @@
+package v4
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/smithy-go/middleware"
+ smithyHTTP "github.com/aws/smithy-go/transport/http"
+)
+
+// HTTPPresigner is an interface to a SigV4 signer that can sign create a
+// presigned URL for a HTTP requests.
+type HTTPPresigner interface {
+ PresignHTTP(
+ ctx context.Context, credentials aws.Credentials, r *http.Request,
+ payloadHash string, service string, region string, signingTime time.Time,
+ optFns ...func(*SignerOptions),
+ ) (url string, signedHeader http.Header, err error)
+}
+
+// PresignedHTTPRequest provides the URL and signed headers that are included
+// in the presigned URL.
+type PresignedHTTPRequest struct {
+ URL string
+ Method string
+ SignedHeader http.Header
+}
+
+// PresignHTTPRequestMiddlewareOptions is the options for the PresignHTTPRequestMiddleware middleware.
+type PresignHTTPRequestMiddlewareOptions struct {
+ CredentialsProvider aws.CredentialsProvider
+ Presigner HTTPPresigner
+ LogSigning bool
+}
+
+// PresignHTTPRequestMiddleware provides the Finalize middleware for creating a
+// presigned URL for an HTTP request.
+//
+// Will short circuit the middleware stack and not forward onto the next
+// Finalize handler.
+type PresignHTTPRequestMiddleware struct {
+ credentialsProvider aws.CredentialsProvider
+ presigner HTTPPresigner
+ logSigning bool
+}
+
+// NewPresignHTTPRequestMiddleware returns a new PresignHTTPRequestMiddleware
+// initialized with the presigner.
+func NewPresignHTTPRequestMiddleware(options PresignHTTPRequestMiddlewareOptions) *PresignHTTPRequestMiddleware {
+ return &PresignHTTPRequestMiddleware{
+ credentialsProvider: options.CredentialsProvider,
+ presigner: options.Presigner,
+ logSigning: options.LogSigning,
+ }
+}
+
+// ID provides the middleware ID.
+func (*PresignHTTPRequestMiddleware) ID() string { return "PresignHTTPRequest" }
+
+// HandleFinalize will take the provided input and create a presigned url for
+// the http request using the SigV4 presign authentication scheme.
+//
+// Since the signed request is not a valid HTTP request
+func (s *PresignHTTPRequestMiddleware) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
+) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyHTTP.Request)
+ if !ok {
+ return out, metadata, &SigningError{
+ Err: fmt.Errorf("unexpected request middleware type %T", in.Request),
+ }
+ }
+
+ httpReq := req.Build(ctx)
+ if !haveCredentialProvider(s.credentialsProvider) {
+ out.Result = &PresignedHTTPRequest{
+ URL: httpReq.URL.String(),
+ Method: httpReq.Method,
+ SignedHeader: http.Header{},
+ }
+
+ return out, metadata, nil
+ }
+
+ signingName := awsmiddleware.GetSigningName(ctx)
+ signingRegion := awsmiddleware.GetSigningRegion(ctx)
+ payloadHash := GetPayloadHash(ctx)
+ if len(payloadHash) == 0 {
+ return out, metadata, &SigningError{
+ Err: fmt.Errorf("computed payload hash missing from context"),
+ }
+ }
+
+ credentials, err := s.credentialsProvider.Retrieve(ctx)
+ if err != nil {
+ return out, metadata, &SigningError{
+ Err: fmt.Errorf("failed to retrieve credentials: %w", err),
+ }
+ }
+
+ u, h, err := s.presigner.PresignHTTP(ctx, credentials,
+ httpReq, payloadHash, signingName, signingRegion, sdk.NowTime(),
+ func(o *SignerOptions) {
+ o.Logger = middleware.GetLogger(ctx)
+ o.LogSigning = s.logSigning
+ })
+ if err != nil {
+ return out, metadata, &SigningError{
+ Err: fmt.Errorf("failed to sign http request, %w", err),
+ }
+ }
+
+ out.Result = &PresignedHTTPRequest{
+ URL: u,
+ Method: httpReq.Method,
+ SignedHeader: h,
+ }
+
+ return out, metadata, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go
new file mode 100644
index 000000000..66aa2bd6a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go
@@ -0,0 +1,86 @@
+package v4
+
+import (
+ "context"
+ "crypto/sha256"
+ "encoding/hex"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4"
+ "strings"
+ "time"
+)
+
+// EventStreamSigner is an AWS EventStream protocol signer.
+type EventStreamSigner interface {
+ GetSignature(ctx context.Context, headers, payload []byte, signingTime time.Time, optFns ...func(*StreamSignerOptions)) ([]byte, error)
+}
+
+// StreamSignerOptions is the configuration options for StreamSigner.
+type StreamSignerOptions struct{}
+
+// StreamSigner implements Signature Version 4 (SigV4) signing of event stream encoded payloads.
+type StreamSigner struct {
+ options StreamSignerOptions
+
+ credentials aws.Credentials
+ service string
+ region string
+
+ prevSignature []byte
+
+ signingKeyDeriver *v4Internal.SigningKeyDeriver
+}
+
+// NewStreamSigner returns a new AWS EventStream protocol signer.
+func NewStreamSigner(credentials aws.Credentials, service, region string, seedSignature []byte, optFns ...func(*StreamSignerOptions)) *StreamSigner {
+ o := StreamSignerOptions{}
+
+ for _, fn := range optFns {
+ fn(&o)
+ }
+
+ return &StreamSigner{
+ options: o,
+ credentials: credentials,
+ service: service,
+ region: region,
+ signingKeyDeriver: v4Internal.NewSigningKeyDeriver(),
+ prevSignature: seedSignature,
+ }
+}
+
+// GetSignature signs the provided header and payload bytes.
+func (s *StreamSigner) GetSignature(ctx context.Context, headers, payload []byte, signingTime time.Time, optFns ...func(*StreamSignerOptions)) ([]byte, error) {
+ options := s.options
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ prevSignature := s.prevSignature
+
+ st := v4Internal.NewSigningTime(signingTime)
+
+ sigKey := s.signingKeyDeriver.DeriveKey(s.credentials, s.service, s.region, st)
+
+ scope := v4Internal.BuildCredentialScope(st, s.region, s.service)
+
+ stringToSign := s.buildEventStreamStringToSign(headers, payload, prevSignature, scope, &st)
+
+ signature := v4Internal.HMACSHA256(sigKey, []byte(stringToSign))
+ s.prevSignature = signature
+
+ return signature, nil
+}
+
+func (s *StreamSigner) buildEventStreamStringToSign(headers, payload, previousSignature []byte, credentialScope string, signingTime *v4Internal.SigningTime) string {
+ hash := sha256.New()
+ return strings.Join([]string{
+ "AWS4-HMAC-SHA256-PAYLOAD",
+ signingTime.TimeFormat(),
+ credentialScope,
+ hex.EncodeToString(previousSignature),
+ hex.EncodeToString(makeHash(hash, headers)),
+ hex.EncodeToString(makeHash(hash, payload)),
+ }, "\n")
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go
new file mode 100644
index 000000000..afd069c1f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go
@@ -0,0 +1,548 @@
+// Package v4 implements signing for AWS V4 signer
+//
+// Provides request signing for request that need to be signed with
+// AWS V4 Signatures.
+//
+// # Standalone Signer
+//
+// Generally using the signer outside of the SDK should not require any additional
+//
+// The signer does this by taking advantage of the URL.EscapedPath method. If your request URI requires
+//
+// additional escaping you many need to use the URL.Opaque to define what the raw URI should be sent
+// to the service as.
+//
+// The signer will first check the URL.Opaque field, and use its value if set.
+// The signer does require the URL.Opaque field to be set in the form of:
+//
+// "///"
+//
+// // e.g.
+// "//example.com/some/path"
+//
+// The leading "//" and hostname are required or the URL.Opaque escaping will
+// not work correctly.
+//
+// If URL.Opaque is not set the signer will fallback to the URL.EscapedPath()
+// method and using the returned value.
+//
+// AWS v4 signature validation requires that the canonical string's URI path
+// element must be the URI escaped form of the HTTP request's path.
+// http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
+//
+// The Go HTTP client will perform escaping automatically on the request. Some
+// of these escaping may cause signature validation errors because the HTTP
+// request differs from the URI path or query that the signature was generated.
+// https://golang.org/pkg/net/url/#URL.EscapedPath
+//
+// Because of this, it is recommended that when using the signer outside of the
+// SDK that explicitly escaping the request prior to being signed is preferable,
+// and will help prevent signature validation errors. This can be done by setting
+// the URL.Opaque or URL.RawPath. The SDK will use URL.Opaque first and then
+// call URL.EscapedPath() if Opaque is not set.
+//
+// Test `TestStandaloneSign` provides a complete example of using the signer
+// outside of the SDK and pre-escaping the URI path.
+package v4
+
+import (
+ "context"
+ "crypto/sha256"
+ "encoding/hex"
+ "fmt"
+ "hash"
+ "net/http"
+ "net/textproto"
+ "net/url"
+ "sort"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4"
+ "github.com/aws/smithy-go/encoding/httpbinding"
+ "github.com/aws/smithy-go/logging"
+)
+
+const (
+ signingAlgorithm = "AWS4-HMAC-SHA256"
+ authorizationHeader = "Authorization"
+)
+
+// HTTPSigner is an interface to a SigV4 signer that can sign HTTP requests
+type HTTPSigner interface {
+ SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*SignerOptions)) error
+}
+
+type keyDerivator interface {
+ DeriveKey(credential aws.Credentials, service, region string, signingTime v4Internal.SigningTime) []byte
+}
+
+// SignerOptions is the SigV4 Signer options.
+type SignerOptions struct {
+ // Disables the Signer's moving HTTP header key/value pairs from the HTTP
+ // request header to the request's query string. This is most commonly used
+ // with pre-signed requests preventing headers from being added to the
+ // request's query string.
+ DisableHeaderHoisting bool
+
+ // Disables the automatic escaping of the URI path of the request for the
+ // siganture's canonical string's path. For services that do not need additional
+ // escaping then use this to disable the signer escaping the path.
+ //
+ // S3 is an example of a service that does not need additional escaping.
+ //
+ // http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
+ DisableURIPathEscaping bool
+
+ // The logger to send log messages to.
+ Logger logging.Logger
+
+ // Enable logging of signed requests.
+ // This will enable logging of the canonical request, the string to sign, and for presigning the subsequent
+ // presigned URL.
+ LogSigning bool
+}
+
+// Signer applies AWS v4 signing to given request. Use this to sign requests
+// that need to be signed with AWS V4 Signatures.
+type Signer struct {
+ options SignerOptions
+ keyDerivator keyDerivator
+}
+
+// NewSigner returns a new SigV4 Signer
+func NewSigner(optFns ...func(signer *SignerOptions)) *Signer {
+ options := SignerOptions{}
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &Signer{options: options, keyDerivator: v4Internal.NewSigningKeyDeriver()}
+}
+
+type httpSigner struct {
+ Request *http.Request
+ ServiceName string
+ Region string
+ Time v4Internal.SigningTime
+ Credentials aws.Credentials
+ KeyDerivator keyDerivator
+ IsPreSign bool
+
+ PayloadHash string
+
+ DisableHeaderHoisting bool
+ DisableURIPathEscaping bool
+}
+
+func (s *httpSigner) Build() (signedRequest, error) {
+ req := s.Request
+
+ query := req.URL.Query()
+ headers := req.Header
+
+ s.setRequiredSigningFields(headers, query)
+
+ // Sort Each Query Key's Values
+ for key := range query {
+ sort.Strings(query[key])
+ }
+
+ v4Internal.SanitizeHostForHeader(req)
+
+ credentialScope := s.buildCredentialScope()
+ credentialStr := s.Credentials.AccessKeyID + "/" + credentialScope
+ if s.IsPreSign {
+ query.Set(v4Internal.AmzCredentialKey, credentialStr)
+ }
+
+ unsignedHeaders := headers
+ if s.IsPreSign && !s.DisableHeaderHoisting {
+ var urlValues url.Values
+ urlValues, unsignedHeaders = buildQuery(v4Internal.AllowedQueryHoisting, headers)
+ for k := range urlValues {
+ query[k] = urlValues[k]
+ }
+ }
+
+ host := req.URL.Host
+ if len(req.Host) > 0 {
+ host = req.Host
+ }
+
+ signedHeaders, signedHeadersStr, canonicalHeaderStr := s.buildCanonicalHeaders(host, v4Internal.IgnoredHeaders, unsignedHeaders, s.Request.ContentLength)
+
+ if s.IsPreSign {
+ query.Set(v4Internal.AmzSignedHeadersKey, signedHeadersStr)
+ }
+
+ var rawQuery strings.Builder
+ rawQuery.WriteString(strings.Replace(query.Encode(), "+", "%20", -1))
+
+ canonicalURI := v4Internal.GetURIPath(req.URL)
+ if !s.DisableURIPathEscaping {
+ canonicalURI = httpbinding.EscapePath(canonicalURI, false)
+ }
+
+ canonicalString := s.buildCanonicalString(
+ req.Method,
+ canonicalURI,
+ rawQuery.String(),
+ signedHeadersStr,
+ canonicalHeaderStr,
+ )
+
+ strToSign := s.buildStringToSign(credentialScope, canonicalString)
+ signingSignature, err := s.buildSignature(strToSign)
+ if err != nil {
+ return signedRequest{}, err
+ }
+
+ if s.IsPreSign {
+ rawQuery.WriteString("&X-Amz-Signature=")
+ rawQuery.WriteString(signingSignature)
+ } else {
+ headers[authorizationHeader] = append(headers[authorizationHeader][:0], buildAuthorizationHeader(credentialStr, signedHeadersStr, signingSignature))
+ }
+
+ req.URL.RawQuery = rawQuery.String()
+
+ return signedRequest{
+ Request: req,
+ SignedHeaders: signedHeaders,
+ CanonicalString: canonicalString,
+ StringToSign: strToSign,
+ PreSigned: s.IsPreSign,
+ }, nil
+}
+
+func buildAuthorizationHeader(credentialStr, signedHeadersStr, signingSignature string) string {
+ const credential = "Credential="
+ const signedHeaders = "SignedHeaders="
+ const signature = "Signature="
+ const commaSpace = ", "
+
+ var parts strings.Builder
+ parts.Grow(len(signingAlgorithm) + 1 +
+ len(credential) + len(credentialStr) + 2 +
+ len(signedHeaders) + len(signedHeadersStr) + 2 +
+ len(signature) + len(signingSignature),
+ )
+ parts.WriteString(signingAlgorithm)
+ parts.WriteRune(' ')
+ parts.WriteString(credential)
+ parts.WriteString(credentialStr)
+ parts.WriteString(commaSpace)
+ parts.WriteString(signedHeaders)
+ parts.WriteString(signedHeadersStr)
+ parts.WriteString(commaSpace)
+ parts.WriteString(signature)
+ parts.WriteString(signingSignature)
+ return parts.String()
+}
+
+// SignHTTP signs AWS v4 requests with the provided payload hash, service name, region the
+// request is made to, and time the request is signed at. The signTime allows
+// you to specify that a request is signed for the future, and cannot be
+// used until then.
+//
+// The payloadHash is the hex encoded SHA-256 hash of the request payload, and
+// must be provided. Even if the request has no payload (aka body). If the
+// request has no payload you should use the hex encoded SHA-256 of an empty
+// string as the payloadHash value.
+//
+// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
+//
+// Some services such as Amazon S3 accept alternative values for the payload
+// hash, such as "UNSIGNED-PAYLOAD" for requests where the body will not be
+// included in the request signature.
+//
+// https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html
+//
+// Sign differs from Presign in that it will sign the request using HTTP
+// header values. This type of signing is intended for http.Request values that
+// will not be shared, or are shared in a way the header values on the request
+// will not be lost.
+//
+// The passed in request will be modified in place.
+func (s Signer) SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(options *SignerOptions)) error {
+ options := s.options
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ signer := &httpSigner{
+ Request: r,
+ PayloadHash: payloadHash,
+ ServiceName: service,
+ Region: region,
+ Credentials: credentials,
+ Time: v4Internal.NewSigningTime(signingTime.UTC()),
+ DisableHeaderHoisting: options.DisableHeaderHoisting,
+ DisableURIPathEscaping: options.DisableURIPathEscaping,
+ KeyDerivator: s.keyDerivator,
+ }
+
+ signedRequest, err := signer.Build()
+ if err != nil {
+ return err
+ }
+
+ logSigningInfo(ctx, options, &signedRequest, false)
+
+ return nil
+}
+
+// PresignHTTP signs AWS v4 requests with the payload hash, service name, region
+// the request is made to, and time the request is signed at. The signTime
+// allows you to specify that a request is signed for the future, and cannot
+// be used until then.
+//
+// Returns the signed URL and the map of HTTP headers that were included in the
+// signature or an error if signing the request failed. For presigned requests
+// these headers and their values must be included on the HTTP request when it
+// is made. This is helpful to know what header values need to be shared with
+// the party the presigned request will be distributed to.
+//
+// The payloadHash is the hex encoded SHA-256 hash of the request payload, and
+// must be provided. Even if the request has no payload (aka body). If the
+// request has no payload you should use the hex encoded SHA-256 of an empty
+// string as the payloadHash value.
+//
+// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
+//
+// Some services such as Amazon S3 accept alternative values for the payload
+// hash, such as "UNSIGNED-PAYLOAD" for requests where the body will not be
+// included in the request signature.
+//
+// https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html
+//
+// PresignHTTP differs from SignHTTP in that it will sign the request using
+// query string instead of header values. This allows you to share the
+// Presigned Request's URL with third parties, or distribute it throughout your
+// system with minimal dependencies.
+//
+// PresignHTTP will not set the expires time of the presigned request
+// automatically. To specify the expire duration for a request add the
+// "X-Amz-Expires" query parameter on the request with the value as the
+// duration in seconds the presigned URL should be considered valid for. This
+// parameter is not used by all AWS services, and is most notable used by
+// Amazon S3 APIs.
+//
+// expires := 20 * time.Minute
+// query := req.URL.Query()
+// query.Set("X-Amz-Expires", strconv.FormatInt(int64(expires/time.Second), 10)
+// req.URL.RawQuery = query.Encode()
+//
+// This method does not modify the provided request.
+func (s *Signer) PresignHTTP(
+ ctx context.Context, credentials aws.Credentials, r *http.Request,
+ payloadHash string, service string, region string, signingTime time.Time,
+ optFns ...func(*SignerOptions),
+) (signedURI string, signedHeaders http.Header, err error) {
+ options := s.options
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ signer := &httpSigner{
+ Request: r.Clone(r.Context()),
+ PayloadHash: payloadHash,
+ ServiceName: service,
+ Region: region,
+ Credentials: credentials,
+ Time: v4Internal.NewSigningTime(signingTime.UTC()),
+ IsPreSign: true,
+ DisableHeaderHoisting: options.DisableHeaderHoisting,
+ DisableURIPathEscaping: options.DisableURIPathEscaping,
+ KeyDerivator: s.keyDerivator,
+ }
+
+ signedRequest, err := signer.Build()
+ if err != nil {
+ return "", nil, err
+ }
+
+ logSigningInfo(ctx, options, &signedRequest, true)
+
+ signedHeaders = make(http.Header)
+
+ // For the signed headers we canonicalize the header keys in the returned map.
+ // This avoids situations where can standard library double headers like host header. For example the standard
+ // library will set the Host header, even if it is present in lower-case form.
+ for k, v := range signedRequest.SignedHeaders {
+ key := textproto.CanonicalMIMEHeaderKey(k)
+ signedHeaders[key] = append(signedHeaders[key], v...)
+ }
+
+ return signedRequest.Request.URL.String(), signedHeaders, nil
+}
+
+func (s *httpSigner) buildCredentialScope() string {
+ return v4Internal.BuildCredentialScope(s.Time, s.Region, s.ServiceName)
+}
+
+func buildQuery(r v4Internal.Rule, header http.Header) (url.Values, http.Header) {
+ query := url.Values{}
+ unsignedHeaders := http.Header{}
+ for k, h := range header {
+ if r.IsValid(k) {
+ query[k] = h
+ } else {
+ unsignedHeaders[k] = h
+ }
+ }
+
+ return query, unsignedHeaders
+}
+
+func (s *httpSigner) buildCanonicalHeaders(host string, rule v4Internal.Rule, header http.Header, length int64) (signed http.Header, signedHeaders, canonicalHeadersStr string) {
+ signed = make(http.Header)
+
+ var headers []string
+ const hostHeader = "host"
+ headers = append(headers, hostHeader)
+ signed[hostHeader] = append(signed[hostHeader], host)
+
+ const contentLengthHeader = "content-length"
+ if length > 0 {
+ headers = append(headers, contentLengthHeader)
+ signed[contentLengthHeader] = append(signed[contentLengthHeader], strconv.FormatInt(length, 10))
+ }
+
+ for k, v := range header {
+ if !rule.IsValid(k) {
+ continue // ignored header
+ }
+ if strings.EqualFold(k, contentLengthHeader) {
+ // prevent signing already handled content-length header.
+ continue
+ }
+
+ lowerCaseKey := strings.ToLower(k)
+ if _, ok := signed[lowerCaseKey]; ok {
+ // include additional values
+ signed[lowerCaseKey] = append(signed[lowerCaseKey], v...)
+ continue
+ }
+
+ headers = append(headers, lowerCaseKey)
+ signed[lowerCaseKey] = v
+ }
+ sort.Strings(headers)
+
+ signedHeaders = strings.Join(headers, ";")
+
+ var canonicalHeaders strings.Builder
+ n := len(headers)
+ const colon = ':'
+ for i := 0; i < n; i++ {
+ if headers[i] == hostHeader {
+ canonicalHeaders.WriteString(hostHeader)
+ canonicalHeaders.WriteRune(colon)
+ canonicalHeaders.WriteString(v4Internal.StripExcessSpaces(host))
+ } else {
+ canonicalHeaders.WriteString(headers[i])
+ canonicalHeaders.WriteRune(colon)
+ // Trim out leading, trailing, and dedup inner spaces from signed header values.
+ values := signed[headers[i]]
+ for j, v := range values {
+ cleanedValue := strings.TrimSpace(v4Internal.StripExcessSpaces(v))
+ canonicalHeaders.WriteString(cleanedValue)
+ if j < len(values)-1 {
+ canonicalHeaders.WriteRune(',')
+ }
+ }
+ }
+ canonicalHeaders.WriteRune('\n')
+ }
+ canonicalHeadersStr = canonicalHeaders.String()
+
+ return signed, signedHeaders, canonicalHeadersStr
+}
+
+func (s *httpSigner) buildCanonicalString(method, uri, query, signedHeaders, canonicalHeaders string) string {
+ return strings.Join([]string{
+ method,
+ uri,
+ query,
+ canonicalHeaders,
+ signedHeaders,
+ s.PayloadHash,
+ }, "\n")
+}
+
+func (s *httpSigner) buildStringToSign(credentialScope, canonicalRequestString string) string {
+ return strings.Join([]string{
+ signingAlgorithm,
+ s.Time.TimeFormat(),
+ credentialScope,
+ hex.EncodeToString(makeHash(sha256.New(), []byte(canonicalRequestString))),
+ }, "\n")
+}
+
+func makeHash(hash hash.Hash, b []byte) []byte {
+ hash.Reset()
+ hash.Write(b)
+ return hash.Sum(nil)
+}
+
+func (s *httpSigner) buildSignature(strToSign string) (string, error) {
+ key := s.KeyDerivator.DeriveKey(s.Credentials, s.ServiceName, s.Region, s.Time)
+ return hex.EncodeToString(v4Internal.HMACSHA256(key, []byte(strToSign))), nil
+}
+
+func (s *httpSigner) setRequiredSigningFields(headers http.Header, query url.Values) {
+ amzDate := s.Time.TimeFormat()
+
+ if s.IsPreSign {
+ query.Set(v4Internal.AmzAlgorithmKey, signingAlgorithm)
+ if sessionToken := s.Credentials.SessionToken; len(sessionToken) > 0 {
+ query.Set("X-Amz-Security-Token", sessionToken)
+ }
+
+ query.Set(v4Internal.AmzDateKey, amzDate)
+ return
+ }
+
+ headers[v4Internal.AmzDateKey] = append(headers[v4Internal.AmzDateKey][:0], amzDate)
+
+ if len(s.Credentials.SessionToken) > 0 {
+ headers[v4Internal.AmzSecurityTokenKey] = append(headers[v4Internal.AmzSecurityTokenKey][:0], s.Credentials.SessionToken)
+ }
+}
+
+func logSigningInfo(ctx context.Context, options SignerOptions, request *signedRequest, isPresign bool) {
+ if !options.LogSigning {
+ return
+ }
+ signedURLMsg := ""
+ if isPresign {
+ signedURLMsg = fmt.Sprintf(logSignedURLMsg, request.Request.URL.String())
+ }
+ logger := logging.WithContext(ctx, options.Logger)
+ logger.Logf(logging.Debug, logSignInfoMsg, request.CanonicalString, request.StringToSign, signedURLMsg)
+}
+
+type signedRequest struct {
+ Request *http.Request
+ SignedHeaders http.Header
+ CanonicalString string
+ StringToSign string
+ PreSigned bool
+}
+
+const logSignInfoMsg = `Request Signature:
+---[ CANONICAL STRING ]-----------------------------
+%s
+---[ STRING TO SIGN ]--------------------------------
+%s%s
+-----------------------------------------------------`
+const logSignedURLMsg = `
+---[ SIGNED URL ]------------------------------------
+%s`
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/to_ptr.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/to_ptr.go
new file mode 100644
index 000000000..f3fc4d610
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/to_ptr.go
@@ -0,0 +1,297 @@
+// Code generated by aws/generate.go DO NOT EDIT.
+
+package aws
+
+import (
+ "github.com/aws/smithy-go/ptr"
+ "time"
+)
+
+// Bool returns a pointer value for the bool value passed in.
+func Bool(v bool) *bool {
+ return ptr.Bool(v)
+}
+
+// BoolSlice returns a slice of bool pointers from the values
+// passed in.
+func BoolSlice(vs []bool) []*bool {
+ return ptr.BoolSlice(vs)
+}
+
+// BoolMap returns a map of bool pointers from the values
+// passed in.
+func BoolMap(vs map[string]bool) map[string]*bool {
+ return ptr.BoolMap(vs)
+}
+
+// Byte returns a pointer value for the byte value passed in.
+func Byte(v byte) *byte {
+ return ptr.Byte(v)
+}
+
+// ByteSlice returns a slice of byte pointers from the values
+// passed in.
+func ByteSlice(vs []byte) []*byte {
+ return ptr.ByteSlice(vs)
+}
+
+// ByteMap returns a map of byte pointers from the values
+// passed in.
+func ByteMap(vs map[string]byte) map[string]*byte {
+ return ptr.ByteMap(vs)
+}
+
+// String returns a pointer value for the string value passed in.
+func String(v string) *string {
+ return ptr.String(v)
+}
+
+// StringSlice returns a slice of string pointers from the values
+// passed in.
+func StringSlice(vs []string) []*string {
+ return ptr.StringSlice(vs)
+}
+
+// StringMap returns a map of string pointers from the values
+// passed in.
+func StringMap(vs map[string]string) map[string]*string {
+ return ptr.StringMap(vs)
+}
+
+// Int returns a pointer value for the int value passed in.
+func Int(v int) *int {
+ return ptr.Int(v)
+}
+
+// IntSlice returns a slice of int pointers from the values
+// passed in.
+func IntSlice(vs []int) []*int {
+ return ptr.IntSlice(vs)
+}
+
+// IntMap returns a map of int pointers from the values
+// passed in.
+func IntMap(vs map[string]int) map[string]*int {
+ return ptr.IntMap(vs)
+}
+
+// Int8 returns a pointer value for the int8 value passed in.
+func Int8(v int8) *int8 {
+ return ptr.Int8(v)
+}
+
+// Int8Slice returns a slice of int8 pointers from the values
+// passed in.
+func Int8Slice(vs []int8) []*int8 {
+ return ptr.Int8Slice(vs)
+}
+
+// Int8Map returns a map of int8 pointers from the values
+// passed in.
+func Int8Map(vs map[string]int8) map[string]*int8 {
+ return ptr.Int8Map(vs)
+}
+
+// Int16 returns a pointer value for the int16 value passed in.
+func Int16(v int16) *int16 {
+ return ptr.Int16(v)
+}
+
+// Int16Slice returns a slice of int16 pointers from the values
+// passed in.
+func Int16Slice(vs []int16) []*int16 {
+ return ptr.Int16Slice(vs)
+}
+
+// Int16Map returns a map of int16 pointers from the values
+// passed in.
+func Int16Map(vs map[string]int16) map[string]*int16 {
+ return ptr.Int16Map(vs)
+}
+
+// Int32 returns a pointer value for the int32 value passed in.
+func Int32(v int32) *int32 {
+ return ptr.Int32(v)
+}
+
+// Int32Slice returns a slice of int32 pointers from the values
+// passed in.
+func Int32Slice(vs []int32) []*int32 {
+ return ptr.Int32Slice(vs)
+}
+
+// Int32Map returns a map of int32 pointers from the values
+// passed in.
+func Int32Map(vs map[string]int32) map[string]*int32 {
+ return ptr.Int32Map(vs)
+}
+
+// Int64 returns a pointer value for the int64 value passed in.
+func Int64(v int64) *int64 {
+ return ptr.Int64(v)
+}
+
+// Int64Slice returns a slice of int64 pointers from the values
+// passed in.
+func Int64Slice(vs []int64) []*int64 {
+ return ptr.Int64Slice(vs)
+}
+
+// Int64Map returns a map of int64 pointers from the values
+// passed in.
+func Int64Map(vs map[string]int64) map[string]*int64 {
+ return ptr.Int64Map(vs)
+}
+
+// Uint returns a pointer value for the uint value passed in.
+func Uint(v uint) *uint {
+ return ptr.Uint(v)
+}
+
+// UintSlice returns a slice of uint pointers from the values
+// passed in.
+func UintSlice(vs []uint) []*uint {
+ return ptr.UintSlice(vs)
+}
+
+// UintMap returns a map of uint pointers from the values
+// passed in.
+func UintMap(vs map[string]uint) map[string]*uint {
+ return ptr.UintMap(vs)
+}
+
+// Uint8 returns a pointer value for the uint8 value passed in.
+func Uint8(v uint8) *uint8 {
+ return ptr.Uint8(v)
+}
+
+// Uint8Slice returns a slice of uint8 pointers from the values
+// passed in.
+func Uint8Slice(vs []uint8) []*uint8 {
+ return ptr.Uint8Slice(vs)
+}
+
+// Uint8Map returns a map of uint8 pointers from the values
+// passed in.
+func Uint8Map(vs map[string]uint8) map[string]*uint8 {
+ return ptr.Uint8Map(vs)
+}
+
+// Uint16 returns a pointer value for the uint16 value passed in.
+func Uint16(v uint16) *uint16 {
+ return ptr.Uint16(v)
+}
+
+// Uint16Slice returns a slice of uint16 pointers from the values
+// passed in.
+func Uint16Slice(vs []uint16) []*uint16 {
+ return ptr.Uint16Slice(vs)
+}
+
+// Uint16Map returns a map of uint16 pointers from the values
+// passed in.
+func Uint16Map(vs map[string]uint16) map[string]*uint16 {
+ return ptr.Uint16Map(vs)
+}
+
+// Uint32 returns a pointer value for the uint32 value passed in.
+func Uint32(v uint32) *uint32 {
+ return ptr.Uint32(v)
+}
+
+// Uint32Slice returns a slice of uint32 pointers from the values
+// passed in.
+func Uint32Slice(vs []uint32) []*uint32 {
+ return ptr.Uint32Slice(vs)
+}
+
+// Uint32Map returns a map of uint32 pointers from the values
+// passed in.
+func Uint32Map(vs map[string]uint32) map[string]*uint32 {
+ return ptr.Uint32Map(vs)
+}
+
+// Uint64 returns a pointer value for the uint64 value passed in.
+func Uint64(v uint64) *uint64 {
+ return ptr.Uint64(v)
+}
+
+// Uint64Slice returns a slice of uint64 pointers from the values
+// passed in.
+func Uint64Slice(vs []uint64) []*uint64 {
+ return ptr.Uint64Slice(vs)
+}
+
+// Uint64Map returns a map of uint64 pointers from the values
+// passed in.
+func Uint64Map(vs map[string]uint64) map[string]*uint64 {
+ return ptr.Uint64Map(vs)
+}
+
+// Float32 returns a pointer value for the float32 value passed in.
+func Float32(v float32) *float32 {
+ return ptr.Float32(v)
+}
+
+// Float32Slice returns a slice of float32 pointers from the values
+// passed in.
+func Float32Slice(vs []float32) []*float32 {
+ return ptr.Float32Slice(vs)
+}
+
+// Float32Map returns a map of float32 pointers from the values
+// passed in.
+func Float32Map(vs map[string]float32) map[string]*float32 {
+ return ptr.Float32Map(vs)
+}
+
+// Float64 returns a pointer value for the float64 value passed in.
+func Float64(v float64) *float64 {
+ return ptr.Float64(v)
+}
+
+// Float64Slice returns a slice of float64 pointers from the values
+// passed in.
+func Float64Slice(vs []float64) []*float64 {
+ return ptr.Float64Slice(vs)
+}
+
+// Float64Map returns a map of float64 pointers from the values
+// passed in.
+func Float64Map(vs map[string]float64) map[string]*float64 {
+ return ptr.Float64Map(vs)
+}
+
+// Time returns a pointer value for the time.Time value passed in.
+func Time(v time.Time) *time.Time {
+ return ptr.Time(v)
+}
+
+// TimeSlice returns a slice of time.Time pointers from the values
+// passed in.
+func TimeSlice(vs []time.Time) []*time.Time {
+ return ptr.TimeSlice(vs)
+}
+
+// TimeMap returns a map of time.Time pointers from the values
+// passed in.
+func TimeMap(vs map[string]time.Time) map[string]*time.Time {
+ return ptr.TimeMap(vs)
+}
+
+// Duration returns a pointer value for the time.Duration value passed in.
+func Duration(v time.Duration) *time.Duration {
+ return ptr.Duration(v)
+}
+
+// DurationSlice returns a slice of time.Duration pointers from the values
+// passed in.
+func DurationSlice(vs []time.Duration) []*time.Duration {
+ return ptr.DurationSlice(vs)
+}
+
+// DurationMap returns a map of time.Duration pointers from the values
+// passed in.
+func DurationMap(vs map[string]time.Duration) map[string]*time.Duration {
+ return ptr.DurationMap(vs)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go
new file mode 100644
index 000000000..26d90719b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go
@@ -0,0 +1,310 @@
+package http
+
+import (
+ "crypto/tls"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "net"
+ "net/http"
+ "reflect"
+ "sync"
+ "time"
+)
+
+// Defaults for the HTTPTransportBuilder.
+var (
+ // Default connection pool options
+ DefaultHTTPTransportMaxIdleConns = 100
+ DefaultHTTPTransportMaxIdleConnsPerHost = 10
+
+ // Default connection timeouts
+ DefaultHTTPTransportIdleConnTimeout = 90 * time.Second
+ DefaultHTTPTransportTLSHandleshakeTimeout = 10 * time.Second
+ DefaultHTTPTransportExpectContinueTimeout = 1 * time.Second
+
+ // Default to TLS 1.2 for all HTTPS requests.
+ DefaultHTTPTransportTLSMinVersion uint16 = tls.VersionTLS12
+)
+
+// Timeouts for net.Dialer's network connection.
+var (
+ DefaultDialConnectTimeout = 30 * time.Second
+ DefaultDialKeepAliveTimeout = 30 * time.Second
+)
+
+// BuildableClient provides a HTTPClient implementation with options to
+// create copies of the HTTPClient when additional configuration is provided.
+//
+// The client's methods will not share the http.Transport value between copies
+// of the BuildableClient. Only exported member values of the Transport and
+// optional Dialer will be copied between copies of BuildableClient.
+type BuildableClient struct {
+ transport *http.Transport
+ dialer *net.Dialer
+
+ initOnce sync.Once
+
+ clientTimeout time.Duration
+ client *http.Client
+}
+
+// NewBuildableClient returns an initialized client for invoking HTTP
+// requests.
+func NewBuildableClient() *BuildableClient {
+ return &BuildableClient{}
+}
+
+// Do implements the HTTPClient interface's Do method to invoke a HTTP request,
+// and receive the response. Uses the BuildableClient's current
+// configuration to invoke the http.Request.
+//
+// If connection pooling is enabled (aka HTTP KeepAlive) the client will only
+// share pooled connections with its own instance. Copies of the
+// BuildableClient will have their own connection pools.
+//
+// Redirect (3xx) responses will not be followed, the HTTP response received
+// will returned instead.
+func (b *BuildableClient) Do(req *http.Request) (*http.Response, error) {
+ b.initOnce.Do(b.build)
+
+ return b.client.Do(req)
+}
+
+// Freeze returns a frozen aws.HTTPClient implementation that is no longer a BuildableClient.
+// Use this to prevent the SDK from applying DefaultMode configuration values to a buildable client.
+func (b *BuildableClient) Freeze() aws.HTTPClient {
+ cpy := b.clone()
+ cpy.build()
+ return cpy.client
+}
+
+func (b *BuildableClient) build() {
+ b.client = wrapWithLimitedRedirect(&http.Client{
+ Timeout: b.clientTimeout,
+ Transport: b.GetTransport(),
+ })
+}
+
+func (b *BuildableClient) clone() *BuildableClient {
+ cpy := NewBuildableClient()
+ cpy.transport = b.GetTransport()
+ cpy.dialer = b.GetDialer()
+ cpy.clientTimeout = b.clientTimeout
+
+ return cpy
+}
+
+// WithTransportOptions copies the BuildableClient and returns it with the
+// http.Transport options applied.
+//
+// If a non (*http.Transport) was set as the round tripper, the round tripper
+// will be replaced with a default Transport value before invoking the option
+// functions.
+func (b *BuildableClient) WithTransportOptions(opts ...func(*http.Transport)) *BuildableClient {
+ cpy := b.clone()
+
+ tr := cpy.GetTransport()
+ for _, opt := range opts {
+ opt(tr)
+ }
+ cpy.transport = tr
+
+ return cpy
+}
+
+// WithDialerOptions copies the BuildableClient and returns it with the
+// net.Dialer options applied. Will set the client's http.Transport DialContext
+// member.
+func (b *BuildableClient) WithDialerOptions(opts ...func(*net.Dialer)) *BuildableClient {
+ cpy := b.clone()
+
+ dialer := cpy.GetDialer()
+ for _, opt := range opts {
+ opt(dialer)
+ }
+ cpy.dialer = dialer
+
+ tr := cpy.GetTransport()
+ tr.DialContext = cpy.dialer.DialContext
+ cpy.transport = tr
+
+ return cpy
+}
+
+// WithTimeout Sets the timeout used by the client for all requests.
+func (b *BuildableClient) WithTimeout(timeout time.Duration) *BuildableClient {
+ cpy := b.clone()
+ cpy.clientTimeout = timeout
+ return cpy
+}
+
+// GetTransport returns a copy of the client's HTTP Transport.
+func (b *BuildableClient) GetTransport() *http.Transport {
+ var tr *http.Transport
+ if b.transport != nil {
+ tr = b.transport.Clone()
+ } else {
+ tr = defaultHTTPTransport()
+ }
+
+ return tr
+}
+
+// GetDialer returns a copy of the client's network dialer.
+func (b *BuildableClient) GetDialer() *net.Dialer {
+ var dialer *net.Dialer
+ if b.dialer != nil {
+ dialer = shallowCopyStruct(b.dialer).(*net.Dialer)
+ } else {
+ dialer = defaultDialer()
+ }
+
+ return dialer
+}
+
+// GetTimeout returns a copy of the client's timeout to cancel requests with.
+func (b *BuildableClient) GetTimeout() time.Duration {
+ return b.clientTimeout
+}
+
+func defaultDialer() *net.Dialer {
+ return &net.Dialer{
+ Timeout: DefaultDialConnectTimeout,
+ KeepAlive: DefaultDialKeepAliveTimeout,
+ DualStack: true,
+ }
+}
+
+func defaultHTTPTransport() *http.Transport {
+ dialer := defaultDialer()
+
+ tr := &http.Transport{
+ Proxy: http.ProxyFromEnvironment,
+ DialContext: dialer.DialContext,
+ TLSHandshakeTimeout: DefaultHTTPTransportTLSHandleshakeTimeout,
+ MaxIdleConns: DefaultHTTPTransportMaxIdleConns,
+ MaxIdleConnsPerHost: DefaultHTTPTransportMaxIdleConnsPerHost,
+ IdleConnTimeout: DefaultHTTPTransportIdleConnTimeout,
+ ExpectContinueTimeout: DefaultHTTPTransportExpectContinueTimeout,
+ ForceAttemptHTTP2: true,
+ TLSClientConfig: &tls.Config{
+ MinVersion: DefaultHTTPTransportTLSMinVersion,
+ },
+ }
+
+ return tr
+}
+
+// shallowCopyStruct creates a shallow copy of the passed in source struct, and
+// returns that copy of the same struct type.
+func shallowCopyStruct(src interface{}) interface{} {
+ srcVal := reflect.ValueOf(src)
+ srcValType := srcVal.Type()
+
+ var returnAsPtr bool
+ if srcValType.Kind() == reflect.Ptr {
+ srcVal = srcVal.Elem()
+ srcValType = srcValType.Elem()
+ returnAsPtr = true
+ }
+ dstVal := reflect.New(srcValType).Elem()
+
+ for i := 0; i < srcValType.NumField(); i++ {
+ ft := srcValType.Field(i)
+ if len(ft.PkgPath) != 0 {
+ // unexported fields have a PkgPath
+ continue
+ }
+
+ dstVal.Field(i).Set(srcVal.Field(i))
+ }
+
+ if returnAsPtr {
+ dstVal = dstVal.Addr()
+ }
+
+ return dstVal.Interface()
+}
+
+// wrapWithLimitedRedirect updates the Client's Transport and CheckRedirect to
+// not follow any redirect other than 307 and 308. No other redirect will be
+// followed.
+//
+// If the client does not have a Transport defined will use a new SDK default
+// http.Transport configuration.
+func wrapWithLimitedRedirect(c *http.Client) *http.Client {
+ tr := c.Transport
+ if tr == nil {
+ tr = defaultHTTPTransport()
+ }
+
+ cc := *c
+ cc.CheckRedirect = limitedRedirect
+ cc.Transport = suppressBadHTTPRedirectTransport{
+ tr: tr,
+ }
+
+ return &cc
+}
+
+// limitedRedirect is a CheckRedirect that prevents the client from following
+// any non 307/308 HTTP status code redirects.
+//
+// The 307 and 308 redirects are allowed because the client must use the
+// original HTTP method for the redirected to location. Whereas 301 and 302
+// allow the client to switch to GET for the redirect.
+//
+// Suppresses all redirect requests with a URL of badHTTPRedirectLocation.
+func limitedRedirect(r *http.Request, via []*http.Request) error {
+ // Request.Response, in CheckRedirect is the response that is triggering
+ // the redirect.
+ resp := r.Response
+ if r.URL.String() == badHTTPRedirectLocation {
+ resp.Header.Del(badHTTPRedirectLocation)
+ return http.ErrUseLastResponse
+ }
+
+ switch resp.StatusCode {
+ case 307, 308:
+ // Only allow 307 and 308 redirects as they preserve the method.
+ return nil
+ }
+
+ return http.ErrUseLastResponse
+}
+
+// suppressBadHTTPRedirectTransport provides an http.RoundTripper
+// implementation that wraps another http.RoundTripper to prevent HTTP client
+// receiving 301 and 302 HTTP responses redirects without the required location
+// header.
+//
+// Clients using this utility must have a CheckRedirect, e.g. limitedRedirect,
+// that check for responses with having a URL of baseHTTPRedirectLocation, and
+// suppress the redirect.
+type suppressBadHTTPRedirectTransport struct {
+ tr http.RoundTripper
+}
+
+const badHTTPRedirectLocation = `https://amazonaws.com/badhttpredirectlocation`
+
+// RoundTrip backfills a stub location when a 301/302 response is received
+// without a location. This stub location is used by limitedRedirect to prevent
+// the HTTP client from failing attempting to use follow a redirect without a
+// location value.
+func (t suppressBadHTTPRedirectTransport) RoundTrip(r *http.Request) (*http.Response, error) {
+ resp, err := t.tr.RoundTrip(r)
+ if err != nil {
+ return resp, err
+ }
+
+ // S3 is the only known service to return 301 without location header.
+ // The Go standard library HTTP client will return an opaque error if it
+ // tries to follow a 301/302 response missing the location header.
+ switch resp.StatusCode {
+ case 301, 302:
+ if v := resp.Header.Get("Location"); len(v) == 0 {
+ resp.Header.Set("Location", badHTTPRedirectLocation)
+ }
+ }
+
+ return resp, err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/content_type.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/content_type.go
new file mode 100644
index 000000000..556f54a7f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/content_type.go
@@ -0,0 +1,42 @@
+package http
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// removeContentTypeHeader is a build middleware that removes
+// content type header if content-length header is unset or
+// is set to zero,
+type removeContentTypeHeader struct {
+}
+
+// ID the name of the middleware.
+func (m *removeContentTypeHeader) ID() string {
+ return "RemoveContentTypeHeader"
+}
+
+// HandleBuild adds or appends the constructed user agent to the request.
+func (m *removeContentTypeHeader) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in)
+ }
+
+ // remove contentTypeHeader when content-length is zero
+ if req.ContentLength == 0 {
+ req.Header.Del("content-type")
+ }
+
+ return next.HandleBuild(ctx, in)
+}
+
+// RemoveContentTypeHeader removes content-type header if
+// content length is unset or equal to zero.
+func RemoveContentTypeHeader(stack *middleware.Stack) error {
+ return stack.Build.Add(&removeContentTypeHeader{}, middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error.go
new file mode 100644
index 000000000..44651c990
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error.go
@@ -0,0 +1,33 @@
+package http
+
+import (
+ "errors"
+ "fmt"
+
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// ResponseError provides the HTTP centric error type wrapping the underlying error
+// with the HTTP response value and the deserialized RequestID.
+type ResponseError struct {
+ *smithyhttp.ResponseError
+
+ // RequestID associated with response error
+ RequestID string
+}
+
+// ServiceRequestID returns the request id associated with Response Error
+func (e *ResponseError) ServiceRequestID() string { return e.RequestID }
+
+// Error returns the formatted error
+func (e *ResponseError) Error() string {
+ return fmt.Sprintf(
+ "https response error StatusCode: %d, RequestID: %s, %v",
+ e.Response.StatusCode, e.RequestID, e.Err)
+}
+
+// As populates target and returns true if the type of target is a error type that
+// the ResponseError embeds, (e.g.AWS HTTP ResponseError)
+func (e *ResponseError) As(target interface{}) bool {
+ return errors.As(e.ResponseError, target)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go
new file mode 100644
index 000000000..8fd14cecd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go
@@ -0,0 +1,54 @@
+package http
+
+import (
+ "context"
+
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// AddResponseErrorMiddleware adds response error wrapper middleware
+func AddResponseErrorMiddleware(stack *middleware.Stack) error {
+ // add error wrapper middleware before request id retriever middleware so that it can wrap the error response
+ // returned by operation deserializers
+ return stack.Deserialize.Insert(&responseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
+}
+
+type responseErrorWrapper struct {
+}
+
+// ID returns the middleware identifier
+func (m *responseErrorWrapper) ID() string {
+ return "ResponseErrorWrapper"
+}
+
+func (m *responseErrorWrapper) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err == nil {
+ // Nothing to do when there is no error.
+ return out, metadata, err
+ }
+
+ resp, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ // No raw response to wrap with.
+ return out, metadata, err
+ }
+
+ // look for request id in metadata
+ reqID, _ := awsmiddleware.GetRequestIDMetadata(metadata)
+
+ // Wrap the returned smithy error with the request id retrieved from the metadata
+ err = &ResponseError{
+ ResponseError: &smithyhttp.ResponseError{
+ Response: resp,
+ Err: err,
+ },
+ RequestID: reqID,
+ }
+
+ return out, metadata, err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go
new file mode 100644
index 000000000..993929bd9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go
@@ -0,0 +1,104 @@
+package http
+
+import (
+ "context"
+ "fmt"
+ "io"
+ "time"
+
+ "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+type readResult struct {
+ n int
+ err error
+}
+
+// ResponseTimeoutError is an error when the reads from the response are
+// delayed longer than the timeout the read was configured for.
+type ResponseTimeoutError struct {
+ TimeoutDur time.Duration
+}
+
+// Timeout returns that the error is was caused by a timeout, and can be
+// retried.
+func (*ResponseTimeoutError) Timeout() bool { return true }
+
+func (e *ResponseTimeoutError) Error() string {
+ return fmt.Sprintf("read on body reach timeout limit, %v", e.TimeoutDur)
+}
+
+// timeoutReadCloser will handle body reads that take too long.
+// We will return a ErrReadTimeout error if a timeout occurs.
+type timeoutReadCloser struct {
+ reader io.ReadCloser
+ duration time.Duration
+}
+
+// Read will spin off a goroutine to call the reader's Read method. We will
+// select on the timer's channel or the read's channel. Whoever completes first
+// will be returned.
+func (r *timeoutReadCloser) Read(b []byte) (int, error) {
+ timer := time.NewTimer(r.duration)
+ c := make(chan readResult, 1)
+
+ go func() {
+ n, err := r.reader.Read(b)
+ timer.Stop()
+ c <- readResult{n: n, err: err}
+ }()
+
+ select {
+ case data := <-c:
+ return data.n, data.err
+ case <-timer.C:
+ return 0, &ResponseTimeoutError{TimeoutDur: r.duration}
+ }
+}
+
+func (r *timeoutReadCloser) Close() error {
+ return r.reader.Close()
+}
+
+// AddResponseReadTimeoutMiddleware adds a middleware to the stack that wraps the
+// response body so that a read that takes too long will return an error.
+func AddResponseReadTimeoutMiddleware(stack *middleware.Stack, duration time.Duration) error {
+ return stack.Deserialize.Add(&readTimeout{duration: duration}, middleware.After)
+}
+
+// readTimeout wraps the response body with a timeoutReadCloser
+type readTimeout struct {
+ duration time.Duration
+}
+
+// ID returns the id of the middleware
+func (*readTimeout) ID() string {
+ return "ReadResponseTimeout"
+}
+
+// HandleDeserialize implements the DeserializeMiddleware interface
+func (m *readTimeout) HandleDeserialize(
+ ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler,
+) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ response.Body = &timeoutReadCloser{
+ reader: response.Body,
+ duration: m.duration,
+ }
+ out.RawResponse = response
+
+ return out, metadata, err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
new file mode 100644
index 000000000..cc3ae8114
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
@@ -0,0 +1,42 @@
+package aws
+
+import (
+ "fmt"
+)
+
+// Ternary is an enum allowing an unknown or none state in addition to a bool's
+// true and false.
+type Ternary int
+
+func (t Ternary) String() string {
+ switch t {
+ case UnknownTernary:
+ return "unknown"
+ case FalseTernary:
+ return "false"
+ case TrueTernary:
+ return "true"
+ default:
+ return fmt.Sprintf("unknown value, %d", int(t))
+ }
+}
+
+// Bool returns true if the value is TrueTernary, false otherwise.
+func (t Ternary) Bool() bool {
+ return t == TrueTernary
+}
+
+// Enumerations for the values of the Ternary type.
+const (
+ UnknownTernary Ternary = iota
+ FalseTernary
+ TrueTernary
+)
+
+// BoolTernary returns a true or false Ternary value for the bool provided.
+func BoolTernary(v bool) Ternary {
+ if v {
+ return TrueTernary
+ }
+ return FalseTernary
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/version.go
similarity index 72%
rename from vendor/github.com/aws/aws-sdk-go/aws/version.go
rename to vendor/github.com/aws/aws-sdk-go-v2/aws/version.go
index fbd130725..5f729d45e 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/version.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/version.go
@@ -2,7 +2,7 @@
package aws
// SDKName is the name of this AWS SDK
-const SDKName = "aws-sdk-go"
+const SDKName = "aws-sdk-go-v2"
// SDKVersion is the version of this SDK
-const SDKVersion = "1.44.105"
+const SDKVersion = goModuleVersion
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/buildspec.yml b/vendor/github.com/aws/aws-sdk-go-v2/buildspec.yml
new file mode 100644
index 000000000..b11df5082
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/buildspec.yml
@@ -0,0 +1,12 @@
+version: 0.2
+
+phases:
+ build:
+ commands:
+ - echo Build started on `date`
+ - export GOPATH=/go
+ - export SDK_CODEBUILD_ROOT=`pwd`
+ - make ci-test-no-generate
+ post_build:
+ commands:
+ - echo Build completed on `date`
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
new file mode 100644
index 000000000..4b636add9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
@@ -0,0 +1,228 @@
+# v1.17.7 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.6 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.5 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.4 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.3 (2022-08-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.2 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.1 (2022-08-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.0 (2022-08-14)
+
+* **Feature**: Add alternative mechanism for determning the users `$HOME` or `%USERPROFILE%` location when the environment variables are not present.
+
+# v1.16.1 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.0 (2022-08-10)
+
+* **Feature**: Adds support for the following settings in the `~/.aws/credentials` file: `sso_account_id`, `sso_region`, `sso_role_name`, `sso_start_url`, and `ca_bundle`.
+
+# v1.15.17 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.16 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.15 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.14 (2022-07-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.13 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.12 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.11 (2022-06-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.10 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.9 (2022-05-26)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.8 (2022-05-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.7 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.6 (2022-05-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.5 (2022-05-09)
+
+* **Bug Fix**: Fixes a bug in LoadDefaultConfig to correctly assign ConfigSources so all config resolvers have access to the config sources. This fixes the feature/ec2/imds client not having configuration applied via config.LoadOptions such as EC2IMDSClientEnableState. PR [#1682](https://github.com/aws/aws-sdk-go-v2/pull/1682)
+
+# v1.15.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.3 (2022-03-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.2 (2022-03-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.1 (2022-03-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.0 (2022-03-08)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.0 (2022-02-24)
+
+* **Feature**: Adds support for loading RetryMaxAttempts and RetryMod from the environment and shared configuration files. These parameters drive how the SDK's API client will initialize its default retryer, if custome retryer has not been specified. See [config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config) module and [aws.Config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Config) for more information about and how to use these new options.
+* **Feature**: Adds support for the `ca_bundle` parameter in shared config and credentials files. The usage of the file is the same as environment variable, `AWS_CA_BUNDLE`, but sourced from shared config. Fixes [#1589](https://github.com/aws/aws-sdk-go-v2/issues/1589)
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.1 (2022-01-28)
+
+* **Bug Fix**: Fixes LoadDefaultConfig handling of errors returned by passed in functional options. Previously errors returned from the LoadOptions passed into LoadDefaultConfig were incorrectly ignored. [#1562](https://github.com/aws/aws-sdk-go-v2/pull/1562). Thanks to [Pinglei Guo](https://github.com/pingleig) for submitting this PR.
+* **Bug Fix**: Fixes the SDK's handling of `duration_sections` in the shared credentials file or specified in multiple shared config and shared credentials files under the same profile. [#1568](https://github.com/aws/aws-sdk-go-v2/pull/1568). Thanks to [Amir Szekely](https://github.com/kichik) for help reproduce this bug.
+* **Bug Fix**: Updates `config` module to use os.UserHomeDir instead of hard coded environment variable for OS. [#1563](https://github.com/aws/aws-sdk-go-v2/pull/1563)
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.0 (2022-01-14)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.0 (2022-01-07)
+
+* **Feature**: Add load option for CredentialCache. Adds a new member to the LoadOptions struct, CredentialsCacheOptions. This member allows specifying a function that will be used to configure the CredentialsCache. The CredentialsCacheOptions will only be used if the configuration loader will wrap the underlying credential provider in the CredentialsCache.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.1 (2021-12-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.0 (2021-12-02)
+
+* **Feature**: Add support for specifying `EndpointResolverWithOptions` on `LoadOptions`, and associated `WithEndpointResolverWithOptions`.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.3 (2021-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.2 (2021-11-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.1 (2021-11-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.0 (2021-11-06)
+
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.0 (2021-10-21)
+
+* **Feature**: Updated to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.3 (2021-10-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.2 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.1 (2021-09-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.0 (2021-09-02)
+
+* **Feature**: Add support for S3 Multi-Region Access Point ARNs.
+
+# v1.7.0 (2021-08-27)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.1 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.0 (2021-08-04)
+
+* **Feature**: adds error handling for defered close calls
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.0 (2021-07-15)
+
+* **Feature**: Support has been added for EC2 IPv6-enabled Instance Metadata Service Endpoints.
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.1 (2021-07-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2021-06-25)
+
+* **Feature**: Adds configuration setting for enabling endpoint discovery.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2021-05-20)
+
+* **Feature**: SSO credentials can now be defined alongside other credential providers within the same configuration profile.
+* **Bug Fix**: Profile names were incorrectly normalized to lower-case, which could result in unexpected profile configurations.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/config/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/aws/aws-sdk-go-v2/config/config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/config.go
new file mode 100644
index 000000000..5940f8e7e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/config.go
@@ -0,0 +1,201 @@
+package config
+
+import (
+ "context"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+// defaultLoaders are a slice of functions that will read external configuration
+// sources for configuration values. These values are read by the AWSConfigResolvers
+// using interfaces to extract specific information from the external configuration.
+var defaultLoaders = []loader{
+ loadEnvConfig,
+ loadSharedConfigIgnoreNotExist,
+}
+
+// defaultAWSConfigResolvers are a slice of functions that will resolve external
+// configuration values into AWS configuration values.
+//
+// This will setup the AWS configuration's Region,
+var defaultAWSConfigResolvers = []awsConfigResolver{
+ // Resolves the default configuration the SDK's aws.Config will be
+ // initialized with.
+ resolveDefaultAWSConfig,
+
+ // Sets the logger to be used. Could be user provided logger, and client
+ // logging mode.
+ resolveLogger,
+ resolveClientLogMode,
+
+ // Sets the HTTP client and configuration to use for making requests using
+ // the HTTP transport.
+ resolveHTTPClient,
+ resolveCustomCABundle,
+
+ // Sets the endpoint resolving behavior the API Clients will use for making
+ // requests to. Clients default to their own clients this allows overrides
+ // to be specified. The resolveEndpointResolver option is deprecated, but
+ // we still need to set it for backwards compatibility on config
+ // construction.
+ resolveEndpointResolver,
+ resolveEndpointResolverWithOptions,
+
+ // Sets the retry behavior API clients will use within their retry attempt
+ // middleware. Defaults to unset, allowing API clients to define their own
+ // retry behavior.
+ resolveRetryer,
+
+ // Sets the region the API Clients should use for making requests to.
+ resolveRegion,
+ resolveEC2IMDSRegion,
+ resolveDefaultRegion,
+
+ // Sets the additional set of middleware stack mutators that will custom
+ // API client request pipeline middleware.
+ resolveAPIOptions,
+
+ // Resolves the DefaultsMode that should be used by SDK clients. If this
+ // mode is set to DefaultsModeAuto.
+ //
+ // Comes after HTTPClient and CustomCABundle to ensure the HTTP client is
+ // configured if provided before invoking IMDS if mode is auto. Comes
+ // before resolving credentials so that those subsequent clients use the
+ // configured auto mode.
+ resolveDefaultsModeOptions,
+
+ // Sets the resolved credentials the API clients will use for
+ // authentication. Provides the SDK's default credential chain.
+ //
+ // Should probably be the last step in the resolve chain to ensure that all
+ // other configurations are resolved first in case downstream credentials
+ // implementations depend on or can be configured with earlier resolved
+ // configuration options.
+ resolveCredentials,
+
+ // Sets the resolved bearer authentication token API clients will use for
+ // httpBearerAuth authentication scheme.
+ resolveBearerAuthToken,
+}
+
+// A Config represents a generic configuration value or set of values. This type
+// will be used by the AWSConfigResolvers to extract
+//
+// General the Config type will use type assertion against the Provider interfaces
+// to extract specific data from the Config.
+type Config interface{}
+
+// A loader is used to load external configuration data and returns it as
+// a generic Config type.
+//
+// The loader should return an error if it fails to load the external configuration
+// or the configuration data is malformed, or required components missing.
+type loader func(context.Context, configs) (Config, error)
+
+// An awsConfigResolver will extract configuration data from the configs slice
+// using the provider interfaces to extract specific functionality. The extracted
+// configuration values will be written to the AWS Config value.
+//
+// The resolver should return an error if it it fails to extract the data, the
+// data is malformed, or incomplete.
+type awsConfigResolver func(ctx context.Context, cfg *aws.Config, configs configs) error
+
+// configs is a slice of Config values. These values will be used by the
+// AWSConfigResolvers to extract external configuration values to populate the
+// AWS Config type.
+//
+// Use AppendFromLoaders to add additional external Config values that are
+// loaded from external sources.
+//
+// Use ResolveAWSConfig after external Config values have been added or loaded
+// to extract the loaded configuration values into the AWS Config.
+type configs []Config
+
+// AppendFromLoaders iterates over the slice of loaders passed in calling each
+// loader function in order. The external config value returned by the loader
+// will be added to the returned configs slice.
+//
+// If a loader returns an error this method will stop iterating and return
+// that error.
+func (cs configs) AppendFromLoaders(ctx context.Context, loaders []loader) (configs, error) {
+ for _, fn := range loaders {
+ cfg, err := fn(ctx, cs)
+ if err != nil {
+ return nil, err
+ }
+
+ cs = append(cs, cfg)
+ }
+
+ return cs, nil
+}
+
+// ResolveAWSConfig returns a AWS configuration populated with values by calling
+// the resolvers slice passed in. Each resolver is called in order. Any resolver
+// may overwrite the AWS Configuration value of a previous resolver.
+//
+// If an resolver returns an error this method will return that error, and stop
+// iterating over the resolvers.
+func (cs configs) ResolveAWSConfig(ctx context.Context, resolvers []awsConfigResolver) (aws.Config, error) {
+ var cfg aws.Config
+
+ for _, fn := range resolvers {
+ if err := fn(ctx, &cfg, cs); err != nil {
+ return aws.Config{}, err
+ }
+ }
+
+ return cfg, nil
+}
+
+// ResolveConfig calls the provide function passing slice of configuration sources.
+// This implements the aws.ConfigResolver interface.
+func (cs configs) ResolveConfig(f func(configs []interface{}) error) error {
+ var cfgs []interface{}
+ for i := range cs {
+ cfgs = append(cfgs, cs[i])
+ }
+ return f(cfgs)
+}
+
+// LoadDefaultConfig reads the SDK's default external configurations, and
+// populates an AWS Config with the values from the external configurations.
+//
+// An optional variadic set of additional Config values can be provided as input
+// that will be prepended to the configs slice. Use this to add custom configuration.
+// The custom configurations must satisfy the respective providers for their data
+// or the custom data will be ignored by the resolvers and config loaders.
+//
+// cfg, err := config.LoadDefaultConfig( context.TODO(),
+// WithSharedConfigProfile("test-profile"),
+// )
+// if err != nil {
+// panic(fmt.Sprintf("failed loading config, %v", err))
+// }
+//
+// The default configuration sources are:
+// * Environment Variables
+// * Shared Configuration and Shared Credentials files.
+func LoadDefaultConfig(ctx context.Context, optFns ...func(*LoadOptions) error) (cfg aws.Config, err error) {
+ var options LoadOptions
+ for _, optFn := range optFns {
+ if err := optFn(&options); err != nil {
+ return aws.Config{}, err
+ }
+ }
+
+ // assign Load Options to configs
+ var cfgCpy = configs{options}
+
+ cfgCpy, err = cfgCpy.AppendFromLoaders(ctx, defaultLoaders)
+ if err != nil {
+ return aws.Config{}, err
+ }
+
+ cfg, err = cfgCpy.ResolveAWSConfig(ctx, defaultAWSConfigResolvers)
+ if err != nil {
+ return aws.Config{}, err
+ }
+
+ return cfg, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/defaultsmode.go b/vendor/github.com/aws/aws-sdk-go-v2/config/defaultsmode.go
new file mode 100644
index 000000000..20b66367f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/defaultsmode.go
@@ -0,0 +1,47 @@
+package config
+
+import (
+ "context"
+ "os"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+)
+
+const execEnvVar = "AWS_EXECUTION_ENV"
+
+// DefaultsModeOptions is the set of options that are used to configure
+type DefaultsModeOptions struct {
+ // The SDK configuration defaults mode. Defaults to legacy if not specified.
+ //
+ // Supported modes are: auto, cross-region, in-region, legacy, mobile, standard
+ Mode aws.DefaultsMode
+
+ // The EC2 Instance Metadata Client that should be used when performing environment
+ // discovery when aws.DefaultsModeAuto is set.
+ //
+ // If not specified the SDK will construct a client if the instance metadata service has not been disabled by
+ // the AWS_EC2_METADATA_DISABLED environment variable.
+ IMDSClient *imds.Client
+}
+
+func resolveDefaultsModeRuntimeEnvironment(ctx context.Context, envConfig *EnvConfig, client *imds.Client) (aws.RuntimeEnvironment, error) {
+ getRegionOutput, err := client.GetRegion(ctx, &imds.GetRegionInput{})
+ // honor context timeouts, but if we couldn't talk to IMDS don't fail runtime environment introspection.
+ select {
+ case <-ctx.Done():
+ return aws.RuntimeEnvironment{}, err
+ default:
+ }
+
+ var imdsRegion string
+ if err == nil {
+ imdsRegion = getRegionOutput.Region
+ }
+
+ return aws.RuntimeEnvironment{
+ EnvironmentIdentifier: aws.ExecutionEnvironmentID(os.Getenv(execEnvVar)),
+ Region: envConfig.Region,
+ EC2InstanceMetadataRegion: imdsRegion,
+ }, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/config/doc.go
new file mode 100644
index 000000000..aab7164e2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/doc.go
@@ -0,0 +1,20 @@
+// Package config provides utilities for loading configuration from multiple
+// sources that can be used to configure the SDK's API clients, and utilities.
+//
+// The config package will load configuration from environment variables, AWS
+// shared configuration file (~/.aws/config), and AWS shared credentials file
+// (~/.aws/credentials).
+//
+// Use the LoadDefaultConfig to load configuration from all the SDK's supported
+// sources, and resolve credentials using the SDK's default credential chain.
+//
+// LoadDefaultConfig allows for a variadic list of additional Config sources that can
+// provide one or more configuration values which can be used to programmatically control the resolution
+// of a specific value, or allow for broader range of additional configuration sources not supported by the SDK.
+// A Config source implements one or more provider interfaces defined in this package. Config sources passed in will
+// take precedence over the default environment and shared config sources used by the SDK. If one or more Config sources
+// implement the same provider interface, priority will be handled by the order in which the sources were passed in.
+//
+// A number of helpers (prefixed by “With“) are provided in this package that implement their respective provider
+// interface. These helpers should be used for overriding configuration programmatically at runtime.
+package config
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go
new file mode 100644
index 000000000..18c8e0121
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go
@@ -0,0 +1,665 @@
+package config
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "os"
+ "strconv"
+ "strings"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+)
+
+// CredentialsSourceName provides a name of the provider when config is
+// loaded from environment.
+const CredentialsSourceName = "EnvConfigCredentials"
+
+// Environment variables that will be read for configuration values.
+const (
+ awsAccessKeyIDEnvVar = "AWS_ACCESS_KEY_ID"
+ awsAccessKeyEnvVar = "AWS_ACCESS_KEY"
+
+ awsSecretAccessKeyEnvVar = "AWS_SECRET_ACCESS_KEY"
+ awsSecretKeyEnvVar = "AWS_SECRET_KEY"
+
+ awsSessionTokenEnvVar = "AWS_SESSION_TOKEN"
+
+ awsContainerCredentialsEndpointEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI"
+ awsContainerCredentialsRelativePathEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
+ awsContainerPProviderAuthorizationEnvVar = "AWS_CONTAINER_AUTHORIZATION_TOKEN"
+
+ awsRegionEnvVar = "AWS_REGION"
+ awsDefaultRegionEnvVar = "AWS_DEFAULT_REGION"
+
+ awsProfileEnvVar = "AWS_PROFILE"
+ awsDefaultProfileEnvVar = "AWS_DEFAULT_PROFILE"
+
+ awsSharedCredentialsFileEnvVar = "AWS_SHARED_CREDENTIALS_FILE"
+
+ awsConfigFileEnvVar = "AWS_CONFIG_FILE"
+
+ awsCustomCABundleEnvVar = "AWS_CA_BUNDLE"
+
+ awsWebIdentityTokenFilePathEnvVar = "AWS_WEB_IDENTITY_TOKEN_FILE"
+
+ awsRoleARNEnvVar = "AWS_ROLE_ARN"
+ awsRoleSessionNameEnvVar = "AWS_ROLE_SESSION_NAME"
+
+ awsEnableEndpointDiscoveryEnvVar = "AWS_ENABLE_ENDPOINT_DISCOVERY"
+
+ awsS3UseARNRegionEnvVar = "AWS_S3_USE_ARN_REGION"
+
+ awsEc2MetadataServiceEndpointModeEnvVar = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"
+
+ awsEc2MetadataServiceEndpointEnvVar = "AWS_EC2_METADATA_SERVICE_ENDPOINT"
+
+ awsEc2MetadataDisabled = "AWS_EC2_METADATA_DISABLED"
+
+ awsS3DisableMultiRegionAccessPointEnvVar = "AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS"
+
+ awsUseDualStackEndpoint = "AWS_USE_DUALSTACK_ENDPOINT"
+
+ awsUseFIPSEndpoint = "AWS_USE_FIPS_ENDPOINT"
+
+ awsDefaultMode = "AWS_DEFAULTS_MODE"
+
+ awsRetryMaxAttempts = "AWS_MAX_ATTEMPTS"
+ awsRetryMode = "AWS_RETRY_MODE"
+)
+
+var (
+ credAccessEnvKeys = []string{
+ awsAccessKeyIDEnvVar,
+ awsAccessKeyEnvVar,
+ }
+ credSecretEnvKeys = []string{
+ awsSecretAccessKeyEnvVar,
+ awsSecretKeyEnvVar,
+ }
+ regionEnvKeys = []string{
+ awsRegionEnvVar,
+ awsDefaultRegionEnvVar,
+ }
+ profileEnvKeys = []string{
+ awsProfileEnvVar,
+ awsDefaultProfileEnvVar,
+ }
+)
+
+// EnvConfig is a collection of environment values the SDK will read
+// setup config from. All environment values are optional. But some values
+// such as credentials require multiple values to be complete or the values
+// will be ignored.
+type EnvConfig struct {
+ // Environment configuration values. If set both Access Key ID and Secret Access
+ // Key must be provided. Session Token and optionally also be provided, but is
+ // not required.
+ //
+ // # Access Key ID
+ // AWS_ACCESS_KEY_ID=AKID
+ // AWS_ACCESS_KEY=AKID # only read if AWS_ACCESS_KEY_ID is not set.
+ //
+ // # Secret Access Key
+ // AWS_SECRET_ACCESS_KEY=SECRET
+ // AWS_SECRET_KEY=SECRET # only read if AWS_SECRET_ACCESS_KEY is not set.
+ //
+ // # Session Token
+ // AWS_SESSION_TOKEN=TOKEN
+ Credentials aws.Credentials
+
+ // ContainerCredentialsEndpoint value is the HTTP enabled endpoint to retrieve credentials
+ // using the endpointcreds.Provider
+ ContainerCredentialsEndpoint string
+
+ // ContainerCredentialsRelativePath is the relative URI path that will be used when attempting to retrieve
+ // credentials from the container endpoint.
+ ContainerCredentialsRelativePath string
+
+ // ContainerAuthorizationToken is the authorization token that will be included in the HTTP Authorization
+ // header when attempting to retrieve credentials from the container credentials endpoint.
+ ContainerAuthorizationToken string
+
+ // Region value will instruct the SDK where to make service API requests to. If is
+ // not provided in the environment the region must be provided before a service
+ // client request is made.
+ //
+ // AWS_REGION=us-west-2
+ // AWS_DEFAULT_REGION=us-west-2
+ Region string
+
+ // Profile name the SDK should load use when loading shared configuration from the
+ // shared configuration files. If not provided "default" will be used as the
+ // profile name.
+ //
+ // AWS_PROFILE=my_profile
+ // AWS_DEFAULT_PROFILE=my_profile
+ SharedConfigProfile string
+
+ // Shared credentials file path can be set to instruct the SDK to use an alternate
+ // file for the shared credentials. If not set the file will be loaded from
+ // $HOME/.aws/credentials on Linux/Unix based systems, and
+ // %USERPROFILE%\.aws\credentials on Windows.
+ //
+ // AWS_SHARED_CREDENTIALS_FILE=$HOME/my_shared_credentials
+ SharedCredentialsFile string
+
+ // Shared config file path can be set to instruct the SDK to use an alternate
+ // file for the shared config. If not set the file will be loaded from
+ // $HOME/.aws/config on Linux/Unix based systems, and
+ // %USERPROFILE%\.aws\config on Windows.
+ //
+ // AWS_CONFIG_FILE=$HOME/my_shared_config
+ SharedConfigFile string
+
+ // Sets the path to a custom Credentials Authority (CA) Bundle PEM file
+ // that the SDK will use instead of the system's root CA bundle.
+ // Only use this if you want to configure the SDK to use a custom set
+ // of CAs.
+ //
+ // Enabling this option will attempt to merge the Transport
+ // into the SDK's HTTP client. If the client's Transport is
+ // not a http.Transport an error will be returned. If the
+ // Transport's TLS config is set this option will cause the
+ // SDK to overwrite the Transport's TLS config's RootCAs value.
+ //
+ // Setting a custom HTTPClient in the aws.Config options will override this setting.
+ // To use this option and custom HTTP client, the HTTP client needs to be provided
+ // when creating the config. Not the service client.
+ //
+ // AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle
+ CustomCABundle string
+
+ // Enables endpoint discovery via environment variables.
+ //
+ // AWS_ENABLE_ENDPOINT_DISCOVERY=true
+ EnableEndpointDiscovery aws.EndpointDiscoveryEnableState
+
+ // Specifies the WebIdentity token the SDK should use to assume a role
+ // with.
+ //
+ // AWS_WEB_IDENTITY_TOKEN_FILE=file_path
+ WebIdentityTokenFilePath string
+
+ // Specifies the IAM role arn to use when assuming an role.
+ //
+ // AWS_ROLE_ARN=role_arn
+ RoleARN string
+
+ // Specifies the IAM role session name to use when assuming a role.
+ //
+ // AWS_ROLE_SESSION_NAME=session_name
+ RoleSessionName string
+
+ // 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
+
+ // Specifies if the EC2 IMDS service client is enabled.
+ //
+ // AWS_EC2_METADATA_DISABLED=true
+ EC2IMDSClientEnableState imds.ClientEnableState
+
+ // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
+ //
+ // AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE=IPv6
+ EC2IMDSEndpointMode imds.EndpointModeState
+
+ // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EC2IMDSEndpointMode.
+ //
+ // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://fd00:ec2::254
+ EC2IMDSEndpoint string
+
+ // Specifies if the S3 service should disable multi-region access points
+ // support.
+ //
+ // AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS=true
+ S3DisableMultiRegionAccessPoints *bool
+
+ // Specifies that SDK clients must resolve a dual-stack endpoint for
+ // services.
+ //
+ // AWS_USE_DUALSTACK_ENDPOINT=true
+ UseDualStackEndpoint aws.DualStackEndpointState
+
+ // Specifies that SDK clients must resolve a FIPS endpoint for
+ // services.
+ //
+ // AWS_USE_FIPS_ENDPOINT=true
+ UseFIPSEndpoint aws.FIPSEndpointState
+
+ // Specifies the SDK Defaults Mode used by services.
+ //
+ // AWS_DEFAULTS_MODE=standard
+ DefaultsMode aws.DefaultsMode
+
+ // Specifies the maximum number attempts an API client will call an
+ // operation that fails with a retryable error.
+ //
+ // AWS_MAX_ATTEMPTS=3
+ RetryMaxAttempts int
+
+ // Specifies the retry model the API client will be created with.
+ //
+ // aws_retry_mode=standard
+ RetryMode aws.RetryMode
+}
+
+// loadEnvConfig reads configuration values from the OS's environment variables.
+// Returning the a Config typed EnvConfig to satisfy the ConfigLoader func type.
+func loadEnvConfig(ctx context.Context, cfgs configs) (Config, error) {
+ return NewEnvConfig()
+}
+
+// NewEnvConfig retrieves the SDK's environment configuration.
+// See `EnvConfig` for the values that will be retrieved.
+func NewEnvConfig() (EnvConfig, error) {
+ var cfg EnvConfig
+
+ creds := aws.Credentials{
+ Source: CredentialsSourceName,
+ }
+ setStringFromEnvVal(&creds.AccessKeyID, credAccessEnvKeys)
+ setStringFromEnvVal(&creds.SecretAccessKey, credSecretEnvKeys)
+ if creds.HasKeys() {
+ creds.SessionToken = os.Getenv(awsSessionTokenEnvVar)
+ cfg.Credentials = creds
+ }
+
+ cfg.ContainerCredentialsEndpoint = os.Getenv(awsContainerCredentialsEndpointEnvVar)
+ cfg.ContainerCredentialsRelativePath = os.Getenv(awsContainerCredentialsRelativePathEnvVar)
+ cfg.ContainerAuthorizationToken = os.Getenv(awsContainerPProviderAuthorizationEnvVar)
+
+ setStringFromEnvVal(&cfg.Region, regionEnvKeys)
+ setStringFromEnvVal(&cfg.SharedConfigProfile, profileEnvKeys)
+
+ cfg.SharedCredentialsFile = os.Getenv(awsSharedCredentialsFileEnvVar)
+ cfg.SharedConfigFile = os.Getenv(awsConfigFileEnvVar)
+
+ cfg.CustomCABundle = os.Getenv(awsCustomCABundleEnvVar)
+
+ cfg.WebIdentityTokenFilePath = os.Getenv(awsWebIdentityTokenFilePathEnvVar)
+
+ cfg.RoleARN = os.Getenv(awsRoleARNEnvVar)
+ cfg.RoleSessionName = os.Getenv(awsRoleSessionNameEnvVar)
+
+ if err := setEndpointDiscoveryTypeFromEnvVal(&cfg.EnableEndpointDiscovery, []string{awsEnableEndpointDiscoveryEnvVar}); err != nil {
+ return cfg, err
+ }
+
+ if err := setBoolPtrFromEnvVal(&cfg.S3UseARNRegion, []string{awsS3UseARNRegionEnvVar}); err != nil {
+ return cfg, err
+ }
+
+ setEC2IMDSClientEnableState(&cfg.EC2IMDSClientEnableState, []string{awsEc2MetadataDisabled})
+ if err := setEC2IMDSEndpointMode(&cfg.EC2IMDSEndpointMode, []string{awsEc2MetadataServiceEndpointModeEnvVar}); err != nil {
+ return cfg, err
+ }
+ cfg.EC2IMDSEndpoint = os.Getenv(awsEc2MetadataServiceEndpointEnvVar)
+
+ if err := setBoolPtrFromEnvVal(&cfg.S3DisableMultiRegionAccessPoints, []string{awsS3DisableMultiRegionAccessPointEnvVar}); err != nil {
+ return cfg, err
+ }
+
+ if err := setUseDualStackEndpointFromEnvVal(&cfg.UseDualStackEndpoint, []string{awsUseDualStackEndpoint}); err != nil {
+ return cfg, err
+ }
+
+ if err := setUseFIPSEndpointFromEnvVal(&cfg.UseFIPSEndpoint, []string{awsUseFIPSEndpoint}); err != nil {
+ return cfg, err
+ }
+
+ if err := setDefaultsModeFromEnvVal(&cfg.DefaultsMode, []string{awsDefaultMode}); err != nil {
+ return cfg, err
+ }
+
+ if err := setIntFromEnvVal(&cfg.RetryMaxAttempts, []string{awsRetryMaxAttempts}); err != nil {
+ return cfg, err
+ }
+ if err := setRetryModeFromEnvVal(&cfg.RetryMode, []string{awsRetryMode}); err != nil {
+ return cfg, err
+ }
+
+ return cfg, nil
+}
+
+func (c EnvConfig) getDefaultsMode(ctx context.Context) (aws.DefaultsMode, bool, error) {
+ if len(c.DefaultsMode) == 0 {
+ return "", false, nil
+ }
+ return c.DefaultsMode, true, nil
+}
+
+// GetRetryMaxAttempts returns the value of AWS_MAX_ATTEMPTS if was specified,
+// and not 0.
+func (c EnvConfig) GetRetryMaxAttempts(ctx context.Context) (int, bool, error) {
+ if c.RetryMaxAttempts == 0 {
+ return 0, false, nil
+ }
+ return c.RetryMaxAttempts, true, nil
+}
+
+// GetRetryMode returns the RetryMode of AWS_RETRY_MODE if was specified, and a
+// valid value.
+func (c EnvConfig) GetRetryMode(ctx context.Context) (aws.RetryMode, bool, error) {
+ if len(c.RetryMode) == 0 {
+ return "", false, nil
+ }
+ return c.RetryMode, true, nil
+}
+
+func setEC2IMDSClientEnableState(state *imds.ClientEnableState, keys []string) {
+ for _, k := range keys {
+ value := os.Getenv(k)
+ if len(value) == 0 {
+ continue
+ }
+ switch {
+ case strings.EqualFold(value, "true"):
+ *state = imds.ClientDisabled
+ case strings.EqualFold(value, "false"):
+ *state = imds.ClientEnabled
+ default:
+ continue
+ }
+ break
+ }
+}
+
+func setDefaultsModeFromEnvVal(mode *aws.DefaultsMode, keys []string) error {
+ for _, k := range keys {
+ if value := os.Getenv(k); len(value) > 0 {
+ if ok := mode.SetFromString(value); !ok {
+ return fmt.Errorf("invalid %s value: %s", k, value)
+ }
+ break
+ }
+ }
+ return nil
+}
+
+func setRetryModeFromEnvVal(mode *aws.RetryMode, keys []string) (err error) {
+ for _, k := range keys {
+ if value := os.Getenv(k); len(value) > 0 {
+ *mode, err = aws.ParseRetryMode(value)
+ if err != nil {
+ return fmt.Errorf("invalid %s value, %w", k, err)
+ }
+ break
+ }
+ }
+ return nil
+}
+
+func setEC2IMDSEndpointMode(mode *imds.EndpointModeState, keys []string) error {
+ for _, k := range keys {
+ value := os.Getenv(k)
+ if len(value) == 0 {
+ continue
+ }
+ if err := mode.SetFromString(value); err != nil {
+ return fmt.Errorf("invalid value for environment variable, %s=%s, %v", k, value, err)
+ }
+ }
+ return nil
+}
+
+// GetRegion returns the AWS Region if set in the environment. Returns an empty
+// string if not set.
+func (c EnvConfig) getRegion(ctx context.Context) (string, bool, error) {
+ if len(c.Region) == 0 {
+ return "", false, nil
+ }
+ return c.Region, true, nil
+}
+
+// GetSharedConfigProfile returns the shared config profile if set in the
+// environment. Returns an empty string if not set.
+func (c EnvConfig) getSharedConfigProfile(ctx context.Context) (string, bool, error) {
+ if len(c.SharedConfigProfile) == 0 {
+ return "", false, nil
+ }
+
+ return c.SharedConfigProfile, true, nil
+}
+
+// getSharedConfigFiles returns a slice of filenames set in the environment.
+//
+// Will return the filenames in the order of:
+// * Shared Config
+func (c EnvConfig) getSharedConfigFiles(context.Context) ([]string, bool, error) {
+ var files []string
+ if v := c.SharedConfigFile; len(v) > 0 {
+ files = append(files, v)
+ }
+
+ if len(files) == 0 {
+ return nil, false, nil
+ }
+ return files, true, nil
+}
+
+// getSharedCredentialsFiles returns a slice of filenames set in the environment.
+//
+// Will return the filenames in the order of:
+// * Shared Credentials
+func (c EnvConfig) getSharedCredentialsFiles(context.Context) ([]string, bool, error) {
+ var files []string
+ if v := c.SharedCredentialsFile; len(v) > 0 {
+ files = append(files, v)
+ }
+ if len(files) == 0 {
+ return nil, false, nil
+ }
+ return files, true, nil
+}
+
+// GetCustomCABundle returns the custom CA bundle's PEM bytes if the file was
+func (c EnvConfig) getCustomCABundle(context.Context) (io.Reader, bool, error) {
+ if len(c.CustomCABundle) == 0 {
+ return nil, false, nil
+ }
+
+ b, err := ioutil.ReadFile(c.CustomCABundle)
+ if err != nil {
+ return nil, false, err
+ }
+ return bytes.NewReader(b), true, nil
+}
+
+// GetS3UseARNRegion returns whether to allow ARNs to direct the region
+// the S3 client's requests are sent to.
+func (c EnvConfig) GetS3UseARNRegion(ctx context.Context) (value, ok bool, err error) {
+ if c.S3UseARNRegion == nil {
+ return false, false, nil
+ }
+
+ return *c.S3UseARNRegion, true, nil
+}
+
+// GetS3DisableMultRegionAccessPoints returns whether to disable multi-region access point
+// support for the S3 client.
+func (c EnvConfig) GetS3DisableMultRegionAccessPoints(ctx context.Context) (value, ok bool, err error) {
+ if c.S3DisableMultiRegionAccessPoints == nil {
+ return false, false, nil
+ }
+
+ return *c.S3DisableMultiRegionAccessPoints, true, nil
+}
+
+// GetUseDualStackEndpoint returns whether the service's dual-stack endpoint should be
+// used for requests.
+func (c EnvConfig) GetUseDualStackEndpoint(ctx context.Context) (value aws.DualStackEndpointState, found bool, err error) {
+ if c.UseDualStackEndpoint == aws.DualStackEndpointStateUnset {
+ return aws.DualStackEndpointStateUnset, false, nil
+ }
+
+ return c.UseDualStackEndpoint, true, nil
+}
+
+// GetUseFIPSEndpoint returns whether the service's FIPS endpoint should be
+// used for requests.
+func (c EnvConfig) GetUseFIPSEndpoint(ctx context.Context) (value aws.FIPSEndpointState, found bool, err error) {
+ if c.UseFIPSEndpoint == aws.FIPSEndpointStateUnset {
+ return aws.FIPSEndpointStateUnset, false, nil
+ }
+
+ return c.UseFIPSEndpoint, true, nil
+}
+
+func setStringFromEnvVal(dst *string, keys []string) {
+ for _, k := range keys {
+ if v := os.Getenv(k); len(v) > 0 {
+ *dst = v
+ break
+ }
+ }
+}
+
+func setIntFromEnvVal(dst *int, keys []string) error {
+ for _, k := range keys {
+ if v := os.Getenv(k); len(v) > 0 {
+ i, err := strconv.ParseInt(v, 10, 64)
+ if err != nil {
+ return fmt.Errorf("invalid value %s=%s, %w", k, v, err)
+ }
+ *dst = int(i)
+ break
+ }
+ }
+
+ return nil
+}
+
+func setBoolPtrFromEnvVal(dst **bool, keys []string) error {
+ for _, k := range keys {
+ value := os.Getenv(k)
+ if len(value) == 0 {
+ continue
+ }
+
+ if *dst == nil {
+ *dst = new(bool)
+ }
+
+ switch {
+ case strings.EqualFold(value, "false"):
+ **dst = false
+ case strings.EqualFold(value, "true"):
+ **dst = true
+ default:
+ return fmt.Errorf(
+ "invalid value for environment variable, %s=%s, need true or false",
+ k, value)
+ }
+ break
+ }
+
+ return nil
+}
+
+func setEndpointDiscoveryTypeFromEnvVal(dst *aws.EndpointDiscoveryEnableState, keys []string) error {
+ for _, k := range keys {
+ value := os.Getenv(k)
+ if len(value) == 0 {
+ continue // skip if empty
+ }
+
+ switch {
+ case strings.EqualFold(value, endpointDiscoveryDisabled):
+ *dst = aws.EndpointDiscoveryDisabled
+ case strings.EqualFold(value, endpointDiscoveryEnabled):
+ *dst = aws.EndpointDiscoveryEnabled
+ case strings.EqualFold(value, endpointDiscoveryAuto):
+ *dst = aws.EndpointDiscoveryAuto
+ default:
+ return fmt.Errorf(
+ "invalid value for environment variable, %s=%s, need true, false or auto",
+ k, value)
+ }
+ }
+ return nil
+}
+
+func setUseDualStackEndpointFromEnvVal(dst *aws.DualStackEndpointState, keys []string) error {
+ for _, k := range keys {
+ value := os.Getenv(k)
+ if len(value) == 0 {
+ continue // skip if empty
+ }
+
+ switch {
+ case strings.EqualFold(value, "true"):
+ *dst = aws.DualStackEndpointStateEnabled
+ case strings.EqualFold(value, "false"):
+ *dst = aws.DualStackEndpointStateDisabled
+ default:
+ return fmt.Errorf(
+ "invalid value for environment variable, %s=%s, need true, false",
+ k, value)
+ }
+ }
+ return nil
+}
+
+func setUseFIPSEndpointFromEnvVal(dst *aws.FIPSEndpointState, keys []string) error {
+ for _, k := range keys {
+ value := os.Getenv(k)
+ if len(value) == 0 {
+ continue // skip if empty
+ }
+
+ switch {
+ case strings.EqualFold(value, "true"):
+ *dst = aws.FIPSEndpointStateEnabled
+ case strings.EqualFold(value, "false"):
+ *dst = aws.FIPSEndpointStateDisabled
+ default:
+ return fmt.Errorf(
+ "invalid value for environment variable, %s=%s, need true, false",
+ k, value)
+ }
+ }
+ return nil
+}
+
+// GetEnableEndpointDiscovery returns resolved value for EnableEndpointDiscovery env variable setting.
+func (c EnvConfig) GetEnableEndpointDiscovery(ctx context.Context) (value aws.EndpointDiscoveryEnableState, found bool, err error) {
+ if c.EnableEndpointDiscovery == aws.EndpointDiscoveryUnset {
+ return aws.EndpointDiscoveryUnset, false, nil
+ }
+
+ return c.EnableEndpointDiscovery, true, nil
+}
+
+// GetEC2IMDSClientEnableState implements a EC2IMDSClientEnableState options resolver interface.
+func (c EnvConfig) GetEC2IMDSClientEnableState() (imds.ClientEnableState, bool, error) {
+ if c.EC2IMDSClientEnableState == imds.ClientDefaultEnableState {
+ return imds.ClientDefaultEnableState, false, nil
+ }
+
+ return c.EC2IMDSClientEnableState, true, nil
+}
+
+// GetEC2IMDSEndpointMode implements a EC2IMDSEndpointMode option resolver interface.
+func (c EnvConfig) GetEC2IMDSEndpointMode() (imds.EndpointModeState, bool, error) {
+ if c.EC2IMDSEndpointMode == imds.EndpointModeStateUnset {
+ return imds.EndpointModeStateUnset, false, nil
+ }
+
+ return c.EC2IMDSEndpointMode, true, nil
+}
+
+// GetEC2IMDSEndpoint implements a EC2IMDSEndpoint option resolver interface.
+func (c EnvConfig) GetEC2IMDSEndpoint() (string, bool, error) {
+ if len(c.EC2IMDSEndpoint) == 0 {
+ return "", false, nil
+ }
+
+ return c.EC2IMDSEndpoint, true, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/generate.go b/vendor/github.com/aws/aws-sdk-go-v2/config/generate.go
new file mode 100644
index 000000000..654a7a77f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/generate.go
@@ -0,0 +1,4 @@
+package config
+
+//go:generate go run -tags codegen ./codegen -output=provider_assert_test.go
+//go:generate gofmt -s -w ./
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
new file mode 100644
index 000000000..c9d4a0907
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package config
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.17.7"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go b/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go
new file mode 100644
index 000000000..625147e97
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go
@@ -0,0 +1,1005 @@
+package config
+
+import (
+ "context"
+ "io"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/endpointcreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/processcreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/ssocreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/stscreds"
+ "github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+ smithybearer "github.com/aws/smithy-go/auth/bearer"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// LoadOptionsFunc is a type alias for LoadOptions functional option
+type LoadOptionsFunc func(*LoadOptions) error
+
+// LoadOptions are discrete set of options that are valid for loading the
+// configuration
+type LoadOptions struct {
+
+ // Region is the region to send requests to.
+ Region string
+
+ // Credentials object to use when signing requests.
+ Credentials aws.CredentialsProvider
+
+ // Token provider for authentication operations with bearer authentication.
+ BearerAuthTokenProvider smithybearer.TokenProvider
+
+ // HTTPClient the SDK's API clients will use to invoke HTTP requests.
+ HTTPClient HTTPClient
+
+ // EndpointResolver that can be used to provide or override an endpoint for
+ // the given service and region.
+ //
+ // See the `aws.EndpointResolver` documentation on usage.
+ //
+ // Deprecated: See EndpointResolverWithOptions
+ EndpointResolver aws.EndpointResolver
+
+ // EndpointResolverWithOptions that can be used to provide or override an
+ // endpoint for the given service and region.
+ //
+ // See the `aws.EndpointResolverWithOptions` documentation on usage.
+ EndpointResolverWithOptions aws.EndpointResolverWithOptions
+
+ // RetryMaxAttempts specifies the maximum number attempts an API client
+ // will call an operation that fails with a retryable error.
+ //
+ // This value will only be used if Retryer option is nil.
+ RetryMaxAttempts int
+
+ // RetryMode specifies the retry model the API client will be created with.
+ //
+ // This value will only be used if Retryer option is nil.
+ RetryMode aws.RetryMode
+
+ // Retryer is a function that provides a Retryer implementation. A Retryer
+ // guides how HTTP requests should be retried in case of recoverable
+ // failures.
+ //
+ // If not nil, RetryMaxAttempts, and RetryMode will be ignored.
+ Retryer func() aws.Retryer
+
+ // APIOptions provides the set of middleware mutations modify how the API
+ // client requests will be handled. This is useful for adding additional
+ // tracing data to a request, or changing behavior of the SDK's client.
+ APIOptions []func(*middleware.Stack) error
+
+ // Logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // ClientLogMode is used to configure the events that will be sent to the
+ // configured logger. This can be used to configure the logging of signing,
+ // retries, request, and responses of the SDK clients.
+ //
+ // See the ClientLogMode type documentation for the complete set of logging
+ // modes and available configuration.
+ ClientLogMode *aws.ClientLogMode
+
+ // SharedConfigProfile is the profile to be used when loading the SharedConfig
+ SharedConfigProfile string
+
+ // SharedConfigFiles is the slice of custom shared config files to use when
+ // loading the SharedConfig. A non-default profile used within config file
+ // must have name defined with prefix 'profile '. eg [profile xyz]
+ // indicates a profile with name 'xyz'. To read more on the format of the
+ // config file, please refer the documentation at
+ // https://docs.aws.amazon.com/credref/latest/refdocs/file-format.html#file-format-config
+ //
+ // If duplicate profiles are provided within the same, or across multiple
+ // shared config files, the next parsed profile will override only the
+ // properties that conflict with the previously defined profile. Note that
+ // if duplicate profiles are provided within the SharedCredentialsFiles and
+ // SharedConfigFiles, the properties defined in shared credentials file
+ // take precedence.
+ SharedConfigFiles []string
+
+ // SharedCredentialsFile is the slice of custom shared credentials files to
+ // use when loading the SharedConfig. The profile name used within
+ // credentials file must not prefix 'profile '. eg [xyz] indicates a
+ // profile with name 'xyz'. Profile declared as [profile xyz] will be
+ // ignored. To read more on the format of the credentials file, please
+ // refer the documentation at
+ // https://docs.aws.amazon.com/credref/latest/refdocs/file-format.html#file-format-creds
+ //
+ // If duplicate profiles are provided with a same, or across multiple
+ // shared credentials files, the next parsed profile will override only
+ // properties that conflict with the previously defined profile. Note that
+ // if duplicate profiles are provided within the SharedCredentialsFiles and
+ // SharedConfigFiles, the properties defined in shared credentials file
+ // take precedence.
+ SharedCredentialsFiles []string
+
+ // CustomCABundle is CA bundle PEM bytes reader
+ CustomCABundle io.Reader
+
+ // DefaultRegion is the fall back region, used if a region was not resolved
+ // from other sources
+ DefaultRegion string
+
+ // UseEC2IMDSRegion indicates if SDK should retrieve the region
+ // from the EC2 Metadata service
+ UseEC2IMDSRegion *UseEC2IMDSRegion
+
+ // CredentialsCacheOptions is a function for setting the
+ // aws.CredentialsCacheOptions
+ CredentialsCacheOptions func(*aws.CredentialsCacheOptions)
+
+ // BearerAuthTokenCacheOptions is a function for setting the smithy-go
+ // auth/bearer#TokenCacheOptions
+ BearerAuthTokenCacheOptions func(*smithybearer.TokenCacheOptions)
+
+ // SSOTokenProviderOptions is a function for setting the
+ // credentials/ssocreds.SSOTokenProviderOptions
+ SSOTokenProviderOptions func(*ssocreds.SSOTokenProviderOptions)
+
+ // ProcessCredentialOptions is a function for setting
+ // the processcreds.Options
+ ProcessCredentialOptions func(*processcreds.Options)
+
+ // EC2RoleCredentialOptions is a function for setting
+ // the ec2rolecreds.Options
+ EC2RoleCredentialOptions func(*ec2rolecreds.Options)
+
+ // EndpointCredentialOptions is a function for setting
+ // the endpointcreds.Options
+ EndpointCredentialOptions func(*endpointcreds.Options)
+
+ // WebIdentityRoleCredentialOptions is a function for setting
+ // the stscreds.WebIdentityRoleOptions
+ WebIdentityRoleCredentialOptions func(*stscreds.WebIdentityRoleOptions)
+
+ // AssumeRoleCredentialOptions is a function for setting the
+ // stscreds.AssumeRoleOptions
+ AssumeRoleCredentialOptions func(*stscreds.AssumeRoleOptions)
+
+ // SSOProviderOptions is a function for setting
+ // the ssocreds.Options
+ SSOProviderOptions func(options *ssocreds.Options)
+
+ // LogConfigurationWarnings when set to true, enables logging
+ // configuration warnings
+ LogConfigurationWarnings *bool
+
+ // S3UseARNRegion specifies if the S3 service should allow ARNs to direct
+ // the region, the client's requests are sent to.
+ S3UseARNRegion *bool
+
+ // EnableEndpointDiscovery specifies if endpoint discovery is enable for
+ // the client.
+ EnableEndpointDiscovery aws.EndpointDiscoveryEnableState
+
+ // Specifies if the EC2 IMDS service client is enabled.
+ //
+ // AWS_EC2_METADATA_DISABLED=true
+ EC2IMDSClientEnableState imds.ClientEnableState
+
+ // Specifies the EC2 Instance Metadata Service default endpoint selection
+ // mode (IPv4 or IPv6)
+ EC2IMDSEndpointMode imds.EndpointModeState
+
+ // Specifies the EC2 Instance Metadata Service endpoint to use. If
+ // specified it overrides EC2IMDSEndpointMode.
+ EC2IMDSEndpoint string
+
+ // Specifies that SDK clients must resolve a dual-stack endpoint for
+ // services.
+ UseDualStackEndpoint aws.DualStackEndpointState
+
+ // Specifies that SDK clients must resolve a FIPS endpoint for
+ // services.
+ UseFIPSEndpoint aws.FIPSEndpointState
+
+ // Specifies the SDK configuration mode for defaults.
+ DefaultsModeOptions DefaultsModeOptions
+}
+
+func (o LoadOptions) getDefaultsMode(ctx context.Context) (aws.DefaultsMode, bool, error) {
+ if len(o.DefaultsModeOptions.Mode) == 0 {
+ return "", false, nil
+ }
+ return o.DefaultsModeOptions.Mode, true, nil
+}
+
+// GetRetryMaxAttempts returns the RetryMaxAttempts if specified in the
+// LoadOptions and not 0.
+func (o LoadOptions) GetRetryMaxAttempts(ctx context.Context) (int, bool, error) {
+ if o.RetryMaxAttempts == 0 {
+ return 0, false, nil
+ }
+ return o.RetryMaxAttempts, true, nil
+}
+
+// GetRetryMode returns the RetryMode specified in the LoadOptions.
+func (o LoadOptions) GetRetryMode(ctx context.Context) (aws.RetryMode, bool, error) {
+ if len(o.RetryMode) == 0 {
+ return "", false, nil
+ }
+ return o.RetryMode, true, nil
+}
+
+func (o LoadOptions) getDefaultsModeIMDSClient(ctx context.Context) (*imds.Client, bool, error) {
+ if o.DefaultsModeOptions.IMDSClient == nil {
+ return nil, false, nil
+ }
+ return o.DefaultsModeOptions.IMDSClient, true, nil
+}
+
+// getRegion returns Region from config's LoadOptions
+func (o LoadOptions) getRegion(ctx context.Context) (string, bool, error) {
+ if len(o.Region) == 0 {
+ return "", false, nil
+ }
+
+ return o.Region, true, nil
+}
+
+// WithRegion is a helper function to construct functional options
+// that sets Region on config's LoadOptions. Setting the region to
+// an empty string, will result in the region value being ignored.
+// If multiple WithRegion calls are made, the last call overrides
+// the previous call values.
+func WithRegion(v string) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.Region = v
+ return nil
+ }
+}
+
+// getDefaultRegion returns DefaultRegion from config's LoadOptions
+func (o LoadOptions) getDefaultRegion(ctx context.Context) (string, bool, error) {
+ if len(o.DefaultRegion) == 0 {
+ return "", false, nil
+ }
+
+ return o.DefaultRegion, true, nil
+}
+
+// WithDefaultRegion is a helper function to construct functional options
+// that sets a DefaultRegion on config's LoadOptions. Setting the default
+// region to an empty string, will result in the default region value
+// being ignored. If multiple WithDefaultRegion calls are made, the last
+// call overrides the previous call values. Note that both WithRegion and
+// WithEC2IMDSRegion call takes precedence over WithDefaultRegion call
+// when resolving region.
+func WithDefaultRegion(v string) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.DefaultRegion = v
+ return nil
+ }
+}
+
+// getSharedConfigProfile returns SharedConfigProfile from config's LoadOptions
+func (o LoadOptions) getSharedConfigProfile(ctx context.Context) (string, bool, error) {
+ if len(o.SharedConfigProfile) == 0 {
+ return "", false, nil
+ }
+
+ return o.SharedConfigProfile, true, nil
+}
+
+// WithSharedConfigProfile is a helper function to construct functional options
+// that sets SharedConfigProfile on config's LoadOptions. Setting the shared
+// config profile to an empty string, will result in the shared config profile
+// value being ignored.
+// If multiple WithSharedConfigProfile calls are made, the last call overrides
+// the previous call values.
+func WithSharedConfigProfile(v string) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.SharedConfigProfile = v
+ return nil
+ }
+}
+
+// getSharedConfigFiles returns SharedConfigFiles set on config's LoadOptions
+func (o LoadOptions) getSharedConfigFiles(ctx context.Context) ([]string, bool, error) {
+ if o.SharedConfigFiles == nil {
+ return nil, false, nil
+ }
+
+ return o.SharedConfigFiles, true, nil
+}
+
+// WithSharedConfigFiles is a helper function to construct functional options
+// that sets slice of SharedConfigFiles on config's LoadOptions.
+// Setting the shared config files to an nil string slice, will result in the
+// shared config files value being ignored.
+// If multiple WithSharedConfigFiles calls are made, the last call overrides
+// the previous call values.
+func WithSharedConfigFiles(v []string) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.SharedConfigFiles = v
+ return nil
+ }
+}
+
+// getSharedCredentialsFiles returns SharedCredentialsFiles set on config's LoadOptions
+func (o LoadOptions) getSharedCredentialsFiles(ctx context.Context) ([]string, bool, error) {
+ if o.SharedCredentialsFiles == nil {
+ return nil, false, nil
+ }
+
+ return o.SharedCredentialsFiles, true, nil
+}
+
+// WithSharedCredentialsFiles is a helper function to construct functional options
+// that sets slice of SharedCredentialsFiles on config's LoadOptions.
+// Setting the shared credentials files to an nil string slice, will result in the
+// shared credentials files value being ignored.
+// If multiple WithSharedCredentialsFiles calls are made, the last call overrides
+// the previous call values.
+func WithSharedCredentialsFiles(v []string) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.SharedCredentialsFiles = v
+ return nil
+ }
+}
+
+// getCustomCABundle returns CustomCABundle from LoadOptions
+func (o LoadOptions) getCustomCABundle(ctx context.Context) (io.Reader, bool, error) {
+ if o.CustomCABundle == nil {
+ return nil, false, nil
+ }
+
+ return o.CustomCABundle, true, nil
+}
+
+// WithCustomCABundle is a helper function to construct functional options
+// that sets CustomCABundle on config's LoadOptions. Setting the custom CA Bundle
+// to nil will result in custom CA Bundle value being ignored.
+// If multiple WithCustomCABundle calls are made, the last call overrides the
+// previous call values.
+func WithCustomCABundle(v io.Reader) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.CustomCABundle = v
+ return nil
+ }
+}
+
+// UseEC2IMDSRegion provides a regionProvider that retrieves the region
+// from the EC2 Metadata service.
+type UseEC2IMDSRegion struct {
+ // If unset will default to generic EC2 IMDS client.
+ Client *imds.Client
+}
+
+// getRegion attempts to retrieve the region from EC2 Metadata service.
+func (p *UseEC2IMDSRegion) getRegion(ctx context.Context) (string, bool, error) {
+ if ctx == nil {
+ ctx = context.Background()
+ }
+
+ client := p.Client
+ if client == nil {
+ client = imds.New(imds.Options{})
+ }
+
+ result, err := client.GetRegion(ctx, nil)
+ if err != nil {
+ return "", false, err
+ }
+ if len(result.Region) != 0 {
+ return result.Region, true, nil
+ }
+ return "", false, nil
+}
+
+// getEC2IMDSRegion returns the value of EC2 IMDS region.
+func (o LoadOptions) getEC2IMDSRegion(ctx context.Context) (string, bool, error) {
+ if o.UseEC2IMDSRegion == nil {
+ return "", false, nil
+ }
+
+ return o.UseEC2IMDSRegion.getRegion(ctx)
+}
+
+// WithEC2IMDSRegion is a helper function to construct functional options
+// that enables resolving EC2IMDS region. The function takes
+// in a UseEC2IMDSRegion functional option, and can be used to set the
+// EC2IMDS client which will be used to resolve EC2IMDSRegion.
+// If no functional option is provided, an EC2IMDS client is built and used
+// by the resolver. If multiple WithEC2IMDSRegion calls are made, the last
+// call overrides the previous call values. Note that the WithRegion calls takes
+// precedence over WithEC2IMDSRegion when resolving region.
+func WithEC2IMDSRegion(fnOpts ...func(o *UseEC2IMDSRegion)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.UseEC2IMDSRegion = &UseEC2IMDSRegion{}
+
+ for _, fn := range fnOpts {
+ fn(o.UseEC2IMDSRegion)
+ }
+ return nil
+ }
+}
+
+// getCredentialsProvider returns the credentials value
+func (o LoadOptions) getCredentialsProvider(ctx context.Context) (aws.CredentialsProvider, bool, error) {
+ if o.Credentials == nil {
+ return nil, false, nil
+ }
+
+ return o.Credentials, true, nil
+}
+
+// WithCredentialsProvider is a helper function to construct functional options
+// that sets Credential provider value on config's LoadOptions. If credentials
+// provider is set to nil, the credentials provider value will be ignored.
+// If multiple WithCredentialsProvider calls are made, the last call overrides
+// the previous call values.
+func WithCredentialsProvider(v aws.CredentialsProvider) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.Credentials = v
+ return nil
+ }
+}
+
+// getCredentialsCacheOptionsProvider returns the wrapped function to set aws.CredentialsCacheOptions
+func (o LoadOptions) getCredentialsCacheOptions(ctx context.Context) (func(*aws.CredentialsCacheOptions), bool, error) {
+ if o.CredentialsCacheOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.CredentialsCacheOptions, true, nil
+}
+
+// WithCredentialsCacheOptions is a helper function to construct functional
+// options that sets a function to modify the aws.CredentialsCacheOptions the
+// aws.CredentialsCache will be configured with, if the CredentialsCache is used
+// by the configuration loader.
+//
+// If multiple WithCredentialsCacheOptions calls are made, the last call
+// overrides the previous call values.
+func WithCredentialsCacheOptions(v func(*aws.CredentialsCacheOptions)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.CredentialsCacheOptions = v
+ return nil
+ }
+}
+
+// getBearerAuthTokenProvider returns the credentials value
+func (o LoadOptions) getBearerAuthTokenProvider(ctx context.Context) (smithybearer.TokenProvider, bool, error) {
+ if o.BearerAuthTokenProvider == nil {
+ return nil, false, nil
+ }
+
+ return o.BearerAuthTokenProvider, true, nil
+}
+
+// WithBearerAuthTokenProvider is a helper function to construct functional options
+// that sets Credential provider value on config's LoadOptions. If credentials
+// provider is set to nil, the credentials provider value will be ignored.
+// If multiple WithBearerAuthTokenProvider calls are made, the last call overrides
+// the previous call values.
+func WithBearerAuthTokenProvider(v smithybearer.TokenProvider) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.BearerAuthTokenProvider = v
+ return nil
+ }
+}
+
+// getBearerAuthTokenCacheOptionsProvider returns the wrapped function to set smithybearer.TokenCacheOptions
+func (o LoadOptions) getBearerAuthTokenCacheOptions(ctx context.Context) (func(*smithybearer.TokenCacheOptions), bool, error) {
+ if o.BearerAuthTokenCacheOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.BearerAuthTokenCacheOptions, true, nil
+}
+
+// WithBearerAuthTokenCacheOptions is a helper function to construct functional options
+// that sets a function to modify the TokenCacheOptions the smithy-go
+// auth/bearer#TokenCache will be configured with, if the TokenCache is used by
+// the configuration loader.
+//
+// If multiple WithBearerAuthTokenCacheOptions calls are made, the last call overrides
+// the previous call values.
+func WithBearerAuthTokenCacheOptions(v func(*smithybearer.TokenCacheOptions)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.BearerAuthTokenCacheOptions = v
+ return nil
+ }
+}
+
+// getSSOTokenProviderOptionsProvider returns the wrapped function to set smithybearer.TokenCacheOptions
+func (o LoadOptions) getSSOTokenProviderOptions(ctx context.Context) (func(*ssocreds.SSOTokenProviderOptions), bool, error) {
+ if o.SSOTokenProviderOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.SSOTokenProviderOptions, true, nil
+}
+
+// WithSSOTokenProviderOptions is a helper function to construct functional
+// options that sets a function to modify the SSOtokenProviderOptions the SDK's
+// credentials/ssocreds#SSOProvider will be configured with, if the
+// SSOTokenProvider is used by the configuration loader.
+//
+// If multiple WithSSOTokenProviderOptions calls are made, the last call overrides
+// the previous call values.
+func WithSSOTokenProviderOptions(v func(*ssocreds.SSOTokenProviderOptions)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.SSOTokenProviderOptions = v
+ return nil
+ }
+}
+
+// getProcessCredentialOptions returns the wrapped function to set processcreds.Options
+func (o LoadOptions) getProcessCredentialOptions(ctx context.Context) (func(*processcreds.Options), bool, error) {
+ if o.ProcessCredentialOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.ProcessCredentialOptions, true, nil
+}
+
+// WithProcessCredentialOptions is a helper function to construct functional options
+// that sets a function to use processcreds.Options on config's LoadOptions.
+// If process credential options is set to nil, the process credential value will
+// be ignored. If multiple WithProcessCredentialOptions calls are made, the last call
+// overrides the previous call values.
+func WithProcessCredentialOptions(v func(*processcreds.Options)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.ProcessCredentialOptions = v
+ return nil
+ }
+}
+
+// getEC2RoleCredentialOptions returns the wrapped function to set the ec2rolecreds.Options
+func (o LoadOptions) getEC2RoleCredentialOptions(ctx context.Context) (func(*ec2rolecreds.Options), bool, error) {
+ if o.EC2RoleCredentialOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.EC2RoleCredentialOptions, true, nil
+}
+
+// WithEC2RoleCredentialOptions is a helper function to construct functional options
+// that sets a function to use ec2rolecreds.Options on config's LoadOptions. If
+// EC2 role credential options is set to nil, the EC2 role credential options value
+// will be ignored. If multiple WithEC2RoleCredentialOptions calls are made,
+// the last call overrides the previous call values.
+func WithEC2RoleCredentialOptions(v func(*ec2rolecreds.Options)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.EC2RoleCredentialOptions = v
+ return nil
+ }
+}
+
+// getEndpointCredentialOptions returns the wrapped function to set endpointcreds.Options
+func (o LoadOptions) getEndpointCredentialOptions(context.Context) (func(*endpointcreds.Options), bool, error) {
+ if o.EndpointCredentialOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.EndpointCredentialOptions, true, nil
+}
+
+// WithEndpointCredentialOptions is a helper function to construct functional options
+// that sets a function to use endpointcreds.Options on config's LoadOptions. If
+// endpoint credential options is set to nil, the endpoint credential options
+// value will be ignored. If multiple WithEndpointCredentialOptions calls are made,
+// the last call overrides the previous call values.
+func WithEndpointCredentialOptions(v func(*endpointcreds.Options)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.EndpointCredentialOptions = v
+ return nil
+ }
+}
+
+// getWebIdentityRoleCredentialOptions returns the wrapped function
+func (o LoadOptions) getWebIdentityRoleCredentialOptions(context.Context) (func(*stscreds.WebIdentityRoleOptions), bool, error) {
+ if o.WebIdentityRoleCredentialOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.WebIdentityRoleCredentialOptions, true, nil
+}
+
+// WithWebIdentityRoleCredentialOptions is a helper function to construct
+// functional options that sets a function to use stscreds.WebIdentityRoleOptions
+// on config's LoadOptions. If web identity role credentials options is set to nil,
+// the web identity role credentials value will be ignored. If multiple
+// WithWebIdentityRoleCredentialOptions calls are made, the last call
+// overrides the previous call values.
+func WithWebIdentityRoleCredentialOptions(v func(*stscreds.WebIdentityRoleOptions)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.WebIdentityRoleCredentialOptions = v
+ return nil
+ }
+}
+
+// getAssumeRoleCredentialOptions returns AssumeRoleCredentialOptions from LoadOptions
+func (o LoadOptions) getAssumeRoleCredentialOptions(context.Context) (func(options *stscreds.AssumeRoleOptions), bool, error) {
+ if o.AssumeRoleCredentialOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.AssumeRoleCredentialOptions, true, nil
+}
+
+// WithAssumeRoleCredentialOptions is a helper function to construct
+// functional options that sets a function to use stscreds.AssumeRoleOptions
+// on config's LoadOptions. If assume role credentials options is set to nil,
+// the assume role credentials value will be ignored. If multiple
+// WithAssumeRoleCredentialOptions calls are made, the last call overrides
+// the previous call values.
+func WithAssumeRoleCredentialOptions(v func(*stscreds.AssumeRoleOptions)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.AssumeRoleCredentialOptions = v
+ return nil
+ }
+}
+
+func (o LoadOptions) getHTTPClient(ctx context.Context) (HTTPClient, bool, error) {
+ if o.HTTPClient == nil {
+ return nil, false, nil
+ }
+
+ return o.HTTPClient, true, nil
+}
+
+// WithHTTPClient is a helper function to construct functional options
+// that sets HTTPClient on LoadOptions. If HTTPClient is set to nil,
+// the HTTPClient value will be ignored.
+// If multiple WithHTTPClient calls are made, the last call overrides
+// the previous call values.
+func WithHTTPClient(v HTTPClient) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.HTTPClient = v
+ return nil
+ }
+}
+
+func (o LoadOptions) getAPIOptions(ctx context.Context) ([]func(*middleware.Stack) error, bool, error) {
+ if o.APIOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.APIOptions, true, nil
+}
+
+// WithAPIOptions is a helper function to construct functional options
+// that sets APIOptions on LoadOptions. If APIOptions is set to nil, the
+// APIOptions value is ignored. If multiple WithAPIOptions calls are
+// made, the last call overrides the previous call values.
+func WithAPIOptions(v []func(*middleware.Stack) error) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ if v == nil {
+ return nil
+ }
+
+ o.APIOptions = append(o.APIOptions, v...)
+ return nil
+ }
+}
+
+func (o LoadOptions) getRetryMaxAttempts(ctx context.Context) (int, bool, error) {
+ if o.RetryMaxAttempts == 0 {
+ return 0, false, nil
+ }
+
+ return o.RetryMaxAttempts, true, nil
+}
+
+// WithRetryMaxAttempts is a helper function to construct functional options that sets
+// RetryMaxAttempts on LoadOptions. If RetryMaxAttempts is unset, the RetryMaxAttempts value is
+// ignored. If multiple WithRetryMaxAttempts calls are made, the last call overrides
+// the previous call values.
+//
+// Will be ignored of LoadOptions.Retryer or WithRetryer are used.
+func WithRetryMaxAttempts(v int) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.RetryMaxAttempts = v
+ return nil
+ }
+}
+
+func (o LoadOptions) getRetryMode(ctx context.Context) (aws.RetryMode, bool, error) {
+ if o.RetryMode == "" {
+ return "", false, nil
+ }
+
+ return o.RetryMode, true, nil
+}
+
+// WithRetryMode is a helper function to construct functional options that sets
+// RetryMode on LoadOptions. If RetryMode is unset, the RetryMode value is
+// ignored. If multiple WithRetryMode calls are made, the last call overrides
+// the previous call values.
+//
+// Will be ignored of LoadOptions.Retryer or WithRetryer are used.
+func WithRetryMode(v aws.RetryMode) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.RetryMode = v
+ return nil
+ }
+}
+
+func (o LoadOptions) getRetryer(ctx context.Context) (func() aws.Retryer, bool, error) {
+ if o.Retryer == nil {
+ return nil, false, nil
+ }
+
+ return o.Retryer, true, nil
+}
+
+// WithRetryer is a helper function to construct functional options
+// that sets Retryer on LoadOptions. If Retryer is set to nil, the
+// Retryer value is ignored. If multiple WithRetryer calls are
+// made, the last call overrides the previous call values.
+func WithRetryer(v func() aws.Retryer) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.Retryer = v
+ return nil
+ }
+}
+
+func (o LoadOptions) getEndpointResolver(ctx context.Context) (aws.EndpointResolver, bool, error) {
+ if o.EndpointResolver == nil {
+ return nil, false, nil
+ }
+
+ return o.EndpointResolver, true, nil
+}
+
+// WithEndpointResolver is a helper function to construct functional options
+// that sets the EndpointResolver on LoadOptions. If the EndpointResolver is set to nil,
+// the EndpointResolver value is ignored. If multiple WithEndpointResolver calls
+// are made, the last call overrides the previous call values.
+//
+// Deprecated: See WithEndpointResolverWithOptions
+func WithEndpointResolver(v aws.EndpointResolver) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.EndpointResolver = v
+ return nil
+ }
+}
+
+func (o LoadOptions) getEndpointResolverWithOptions(ctx context.Context) (aws.EndpointResolverWithOptions, bool, error) {
+ if o.EndpointResolverWithOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.EndpointResolverWithOptions, true, nil
+}
+
+// WithEndpointResolverWithOptions is a helper function to construct functional options
+// that sets the EndpointResolverWithOptions on LoadOptions. If the EndpointResolverWithOptions is set to nil,
+// the EndpointResolver value is ignored. If multiple WithEndpointResolver calls
+// are made, the last call overrides the previous call values.
+func WithEndpointResolverWithOptions(v aws.EndpointResolverWithOptions) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.EndpointResolverWithOptions = v
+ return nil
+ }
+}
+
+func (o LoadOptions) getLogger(ctx context.Context) (logging.Logger, bool, error) {
+ if o.Logger == nil {
+ return nil, false, nil
+ }
+
+ return o.Logger, true, nil
+}
+
+// WithLogger is a helper function to construct functional options
+// that sets Logger on LoadOptions. If Logger is set to nil, the
+// Logger value will be ignored. If multiple WithLogger calls are made,
+// the last call overrides the previous call values.
+func WithLogger(v logging.Logger) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.Logger = v
+ return nil
+ }
+}
+
+func (o LoadOptions) getClientLogMode(ctx context.Context) (aws.ClientLogMode, bool, error) {
+ if o.ClientLogMode == nil {
+ return 0, false, nil
+ }
+
+ return *o.ClientLogMode, true, nil
+}
+
+// WithClientLogMode is a helper function to construct functional options
+// that sets client log mode on LoadOptions. If client log mode is set to nil,
+// the client log mode value will be ignored. If multiple WithClientLogMode calls are made,
+// the last call overrides the previous call values.
+func WithClientLogMode(v aws.ClientLogMode) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.ClientLogMode = &v
+ return nil
+ }
+}
+
+func (o LoadOptions) getLogConfigurationWarnings(ctx context.Context) (v bool, found bool, err error) {
+ if o.LogConfigurationWarnings == nil {
+ return false, false, nil
+ }
+ return *o.LogConfigurationWarnings, true, nil
+}
+
+// WithLogConfigurationWarnings is a helper function to construct
+// functional options that can be used to set LogConfigurationWarnings
+// on LoadOptions.
+//
+// If multiple WithLogConfigurationWarnings calls are made, the last call
+// overrides the previous call values.
+func WithLogConfigurationWarnings(v bool) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.LogConfigurationWarnings = &v
+ return nil
+ }
+}
+
+// GetS3UseARNRegion returns whether to allow ARNs to direct the region
+// the S3 client's requests are sent to.
+func (o LoadOptions) GetS3UseARNRegion(ctx context.Context) (v bool, found bool, err error) {
+ if o.S3UseARNRegion == nil {
+ return false, false, nil
+ }
+ return *o.S3UseARNRegion, true, nil
+}
+
+// WithS3UseARNRegion is a helper function to construct functional options
+// that can be used to set S3UseARNRegion on LoadOptions.
+// If multiple WithS3UseARNRegion calls are made, the last call overrides
+// the previous call values.
+func WithS3UseARNRegion(v bool) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.S3UseARNRegion = &v
+ return nil
+ }
+}
+
+// GetEnableEndpointDiscovery returns if the EnableEndpointDiscovery flag is set.
+func (o LoadOptions) GetEnableEndpointDiscovery(ctx context.Context) (value aws.EndpointDiscoveryEnableState, ok bool, err error) {
+ if o.EnableEndpointDiscovery == aws.EndpointDiscoveryUnset {
+ return aws.EndpointDiscoveryUnset, false, nil
+ }
+ return o.EnableEndpointDiscovery, true, nil
+}
+
+// WithEndpointDiscovery is a helper function to construct functional options
+// that can be used to enable endpoint discovery on LoadOptions for supported clients.
+// If multiple WithEndpointDiscovery calls are made, the last call overrides
+// the previous call values.
+func WithEndpointDiscovery(v aws.EndpointDiscoveryEnableState) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.EnableEndpointDiscovery = v
+ return nil
+ }
+}
+
+// getSSOProviderOptions returns AssumeRoleCredentialOptions from LoadOptions
+func (o LoadOptions) getSSOProviderOptions(context.Context) (func(options *ssocreds.Options), bool, error) {
+ if o.SSOProviderOptions == nil {
+ return nil, false, nil
+ }
+
+ return o.SSOProviderOptions, true, nil
+}
+
+// WithSSOProviderOptions is a helper function to construct
+// functional options that sets a function to use ssocreds.Options
+// on config's LoadOptions. If the SSO credential provider options is set to nil,
+// the sso provider options value will be ignored. If multiple
+// WithSSOProviderOptions calls are made, the last call overrides
+// the previous call values.
+func WithSSOProviderOptions(v func(*ssocreds.Options)) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.SSOProviderOptions = v
+ return nil
+ }
+}
+
+// GetEC2IMDSClientEnableState implements a EC2IMDSClientEnableState options resolver interface.
+func (o LoadOptions) GetEC2IMDSClientEnableState() (imds.ClientEnableState, bool, error) {
+ if o.EC2IMDSClientEnableState == imds.ClientDefaultEnableState {
+ return imds.ClientDefaultEnableState, false, nil
+ }
+
+ return o.EC2IMDSClientEnableState, true, nil
+}
+
+// GetEC2IMDSEndpointMode implements a EC2IMDSEndpointMode option resolver interface.
+func (o LoadOptions) GetEC2IMDSEndpointMode() (imds.EndpointModeState, bool, error) {
+ if o.EC2IMDSEndpointMode == imds.EndpointModeStateUnset {
+ return imds.EndpointModeStateUnset, false, nil
+ }
+
+ return o.EC2IMDSEndpointMode, true, nil
+}
+
+// GetEC2IMDSEndpoint implements a EC2IMDSEndpoint option resolver interface.
+func (o LoadOptions) GetEC2IMDSEndpoint() (string, bool, error) {
+ if len(o.EC2IMDSEndpoint) == 0 {
+ return "", false, nil
+ }
+
+ return o.EC2IMDSEndpoint, true, nil
+}
+
+// WithEC2IMDSClientEnableState is a helper function to construct functional options that sets the EC2IMDSClientEnableState.
+func WithEC2IMDSClientEnableState(v imds.ClientEnableState) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.EC2IMDSClientEnableState = v
+ return nil
+ }
+}
+
+// WithEC2IMDSEndpointMode is a helper function to construct functional options that sets the EC2IMDSEndpointMode.
+func WithEC2IMDSEndpointMode(v imds.EndpointModeState) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.EC2IMDSEndpointMode = v
+ return nil
+ }
+}
+
+// WithEC2IMDSEndpoint is a helper function to construct functional options that sets the EC2IMDSEndpoint.
+func WithEC2IMDSEndpoint(v string) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.EC2IMDSEndpoint = v
+ return nil
+ }
+}
+
+// WithUseDualStackEndpoint is a helper function to construct
+// functional options that can be used to set UseDualStackEndpoint on LoadOptions.
+func WithUseDualStackEndpoint(v aws.DualStackEndpointState) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.UseDualStackEndpoint = v
+ return nil
+ }
+}
+
+// GetUseDualStackEndpoint returns whether the service's dual-stack endpoint should be
+// used for requests.
+func (o LoadOptions) GetUseDualStackEndpoint(ctx context.Context) (value aws.DualStackEndpointState, found bool, err error) {
+ if o.UseDualStackEndpoint == aws.DualStackEndpointStateUnset {
+ return aws.DualStackEndpointStateUnset, false, nil
+ }
+ return o.UseDualStackEndpoint, true, nil
+}
+
+// WithUseFIPSEndpoint is a helper function to construct
+// functional options that can be used to set UseFIPSEndpoint on LoadOptions.
+func WithUseFIPSEndpoint(v aws.FIPSEndpointState) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.UseFIPSEndpoint = v
+ return nil
+ }
+}
+
+// GetUseFIPSEndpoint returns whether the service's FIPS endpoint should be
+// used for requests.
+func (o LoadOptions) GetUseFIPSEndpoint(ctx context.Context) (value aws.FIPSEndpointState, found bool, err error) {
+ if o.UseFIPSEndpoint == aws.FIPSEndpointStateUnset {
+ return aws.FIPSEndpointStateUnset, false, nil
+ }
+ return o.UseFIPSEndpoint, true, nil
+}
+
+// WithDefaultsMode sets the SDK defaults configuration mode to the value provided.
+//
+// Zero or more functional options can be provided to provide configuration options for performing
+// environment discovery when using aws.DefaultsModeAuto.
+func WithDefaultsMode(mode aws.DefaultsMode, optFns ...func(options *DefaultsModeOptions)) LoadOptionsFunc {
+ do := DefaultsModeOptions{
+ Mode: mode,
+ }
+ for _, fn := range optFns {
+ fn(&do)
+ }
+ return func(options *LoadOptions) error {
+ options.DefaultsModeOptions = do
+ return nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/local.go b/vendor/github.com/aws/aws-sdk-go-v2/config/local.go
new file mode 100644
index 000000000..b629137c8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/local.go
@@ -0,0 +1,51 @@
+package config
+
+import (
+ "fmt"
+ "net"
+ "net/url"
+)
+
+var lookupHostFn = net.LookupHost
+
+func isLoopbackHost(host string) (bool, error) {
+ ip := net.ParseIP(host)
+ if ip != nil {
+ return ip.IsLoopback(), nil
+ }
+
+ // Host is not an ip, perform lookup
+ addrs, err := lookupHostFn(host)
+ if err != nil {
+ return false, err
+ }
+ if len(addrs) == 0 {
+ return false, fmt.Errorf("no addrs found for host, %s", host)
+ }
+
+ for _, addr := range addrs {
+ if !net.ParseIP(addr).IsLoopback() {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+func validateLocalURL(v string) error {
+ u, err := url.Parse(v)
+ if err != nil {
+ return err
+ }
+
+ host := u.Hostname()
+ if len(host) == 0 {
+ return fmt.Errorf("unable to parse host from local HTTP cred provider URL")
+ } else if isLoopback, err := isLoopbackHost(host); err != nil {
+ return fmt.Errorf("failed to resolve host %q, %v", host, err)
+ } else if !isLoopback {
+ return fmt.Errorf("invalid endpoint host, %q, only host resolving to loopback addresses are allowed", host)
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go
new file mode 100644
index 000000000..6f1ab8cd1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go
@@ -0,0 +1,601 @@
+package config
+
+import (
+ "context"
+ "io"
+ "net/http"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/endpointcreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/processcreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/ssocreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/stscreds"
+ "github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+ smithybearer "github.com/aws/smithy-go/auth/bearer"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// sharedConfigProfileProvider provides access to the shared config profile
+// name external configuration value.
+type sharedConfigProfileProvider interface {
+ getSharedConfigProfile(ctx context.Context) (string, bool, error)
+}
+
+// getSharedConfigProfile searches the configs for a sharedConfigProfileProvider
+// and returns the value if found. Returns an error if a provider fails before a
+// value is found.
+func getSharedConfigProfile(ctx context.Context, configs configs) (value string, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(sharedConfigProfileProvider); ok {
+ value, found, err = p.getSharedConfigProfile(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// sharedConfigFilesProvider provides access to the shared config filesnames
+// external configuration value.
+type sharedConfigFilesProvider interface {
+ getSharedConfigFiles(ctx context.Context) ([]string, bool, error)
+}
+
+// getSharedConfigFiles searches the configs for a sharedConfigFilesProvider
+// and returns the value if found. Returns an error if a provider fails before a
+// value is found.
+func getSharedConfigFiles(ctx context.Context, configs configs) (value []string, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(sharedConfigFilesProvider); ok {
+ value, found, err = p.getSharedConfigFiles(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+
+ return
+}
+
+// sharedCredentialsFilesProvider provides access to the shared credentials filesnames
+// external configuration value.
+type sharedCredentialsFilesProvider interface {
+ getSharedCredentialsFiles(ctx context.Context) ([]string, bool, error)
+}
+
+// getSharedCredentialsFiles searches the configs for a sharedCredentialsFilesProvider
+// and returns the value if found. Returns an error if a provider fails before a
+// value is found.
+func getSharedCredentialsFiles(ctx context.Context, configs configs) (value []string, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(sharedCredentialsFilesProvider); ok {
+ value, found, err = p.getSharedCredentialsFiles(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+
+ return
+}
+
+// customCABundleProvider provides access to the custom CA bundle PEM bytes.
+type customCABundleProvider interface {
+ getCustomCABundle(ctx context.Context) (io.Reader, bool, error)
+}
+
+// getCustomCABundle searches the configs for a customCABundleProvider
+// and returns the value if found. Returns an error if a provider fails before a
+// value is found.
+func getCustomCABundle(ctx context.Context, configs configs) (value io.Reader, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(customCABundleProvider); ok {
+ value, found, err = p.getCustomCABundle(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+
+ return
+}
+
+// regionProvider provides access to the region external configuration value.
+type regionProvider interface {
+ getRegion(ctx context.Context) (string, bool, error)
+}
+
+// getRegion searches the configs for a regionProvider and returns the value
+// if found. Returns an error if a provider fails before a value is found.
+func getRegion(ctx context.Context, configs configs) (value string, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(regionProvider); ok {
+ value, found, err = p.getRegion(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// ec2IMDSRegionProvider provides access to the ec2 imds region
+// configuration value
+type ec2IMDSRegionProvider interface {
+ getEC2IMDSRegion(ctx context.Context) (string, bool, error)
+}
+
+// getEC2IMDSRegion searches the configs for a ec2IMDSRegionProvider and
+// returns the value if found. Returns an error if a provider fails before
+// a value is found.
+func getEC2IMDSRegion(ctx context.Context, configs configs) (region string, found bool, err error) {
+ for _, cfg := range configs {
+ if provider, ok := cfg.(ec2IMDSRegionProvider); ok {
+ region, found, err = provider.getEC2IMDSRegion(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// credentialsProviderProvider provides access to the credentials external
+// configuration value.
+type credentialsProviderProvider interface {
+ getCredentialsProvider(ctx context.Context) (aws.CredentialsProvider, bool, error)
+}
+
+// getCredentialsProvider searches the configs for a credentialsProviderProvider
+// and returns the value if found. Returns an error if a provider fails before a
+// value is found.
+func getCredentialsProvider(ctx context.Context, configs configs) (p aws.CredentialsProvider, found bool, err error) {
+ for _, cfg := range configs {
+ if provider, ok := cfg.(credentialsProviderProvider); ok {
+ p, found, err = provider.getCredentialsProvider(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// credentialsCacheOptionsProvider is an interface for retrieving a function for setting
+// the aws.CredentialsCacheOptions.
+type credentialsCacheOptionsProvider interface {
+ getCredentialsCacheOptions(ctx context.Context) (func(*aws.CredentialsCacheOptions), bool, error)
+}
+
+// getCredentialsCacheOptionsProvider is an interface for retrieving a function for setting
+// the aws.CredentialsCacheOptions.
+func getCredentialsCacheOptionsProvider(ctx context.Context, configs configs) (
+ f func(*aws.CredentialsCacheOptions), found bool, err error,
+) {
+ for _, config := range configs {
+ if p, ok := config.(credentialsCacheOptionsProvider); ok {
+ f, found, err = p.getCredentialsCacheOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// bearerAuthTokenProviderProvider provides access to the bearer authentication
+// token external configuration value.
+type bearerAuthTokenProviderProvider interface {
+ getBearerAuthTokenProvider(context.Context) (smithybearer.TokenProvider, bool, error)
+}
+
+// getBearerAuthTokenProvider searches the config sources for a
+// bearerAuthTokenProviderProvider and returns the value if found. Returns an
+// error if a provider fails before a value is found.
+func getBearerAuthTokenProvider(ctx context.Context, configs configs) (p smithybearer.TokenProvider, found bool, err error) {
+ for _, cfg := range configs {
+ if provider, ok := cfg.(bearerAuthTokenProviderProvider); ok {
+ p, found, err = provider.getBearerAuthTokenProvider(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// bearerAuthTokenCacheOptionsProvider is an interface for retrieving a function for
+// setting the smithy-go auth/bearer#TokenCacheOptions.
+type bearerAuthTokenCacheOptionsProvider interface {
+ getBearerAuthTokenCacheOptions(context.Context) (func(*smithybearer.TokenCacheOptions), bool, error)
+}
+
+// getBearerAuthTokenCacheOptionsProvider is an interface for retrieving a function for
+// setting the smithy-go auth/bearer#TokenCacheOptions.
+func getBearerAuthTokenCacheOptions(ctx context.Context, configs configs) (
+ f func(*smithybearer.TokenCacheOptions), found bool, err error,
+) {
+ for _, config := range configs {
+ if p, ok := config.(bearerAuthTokenCacheOptionsProvider); ok {
+ f, found, err = p.getBearerAuthTokenCacheOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// ssoTokenProviderOptionsProvider is an interface for retrieving a function for
+// setting the SDK's credentials/ssocreds#SSOTokenProviderOptions.
+type ssoTokenProviderOptionsProvider interface {
+ getSSOTokenProviderOptions(context.Context) (func(*ssocreds.SSOTokenProviderOptions), bool, error)
+}
+
+// getSSOTokenProviderOptions is an interface for retrieving a function for
+// setting the SDK's credentials/ssocreds#SSOTokenProviderOptions.
+func getSSOTokenProviderOptions(ctx context.Context, configs configs) (
+ f func(*ssocreds.SSOTokenProviderOptions), found bool, err error,
+) {
+ for _, config := range configs {
+ if p, ok := config.(ssoTokenProviderOptionsProvider); ok {
+ f, found, err = p.getSSOTokenProviderOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// ssoTokenProviderOptionsProvider
+
+// processCredentialOptions is an interface for retrieving a function for setting
+// the processcreds.Options.
+type processCredentialOptions interface {
+ getProcessCredentialOptions(ctx context.Context) (func(*processcreds.Options), bool, error)
+}
+
+// getProcessCredentialOptions searches the slice of configs and returns the first function found
+func getProcessCredentialOptions(ctx context.Context, configs configs) (f func(*processcreds.Options), found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(processCredentialOptions); ok {
+ f, found, err = p.getProcessCredentialOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// ec2RoleCredentialOptionsProvider is an interface for retrieving a function
+// for setting the ec2rolecreds.Provider options.
+type ec2RoleCredentialOptionsProvider interface {
+ getEC2RoleCredentialOptions(ctx context.Context) (func(*ec2rolecreds.Options), bool, error)
+}
+
+// getEC2RoleCredentialProviderOptions searches the slice of configs and returns the first function found
+func getEC2RoleCredentialProviderOptions(ctx context.Context, configs configs) (f func(*ec2rolecreds.Options), found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(ec2RoleCredentialOptionsProvider); ok {
+ f, found, err = p.getEC2RoleCredentialOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// defaultRegionProvider is an interface for retrieving a default region if a region was not resolved from other sources
+type defaultRegionProvider interface {
+ getDefaultRegion(ctx context.Context) (string, bool, error)
+}
+
+// getDefaultRegion searches the slice of configs and returns the first fallback region found
+func getDefaultRegion(ctx context.Context, configs configs) (value string, found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(defaultRegionProvider); ok {
+ value, found, err = p.getDefaultRegion(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// endpointCredentialOptionsProvider is an interface for retrieving a function for setting
+// the endpointcreds.ProviderOptions.
+type endpointCredentialOptionsProvider interface {
+ getEndpointCredentialOptions(ctx context.Context) (func(*endpointcreds.Options), bool, error)
+}
+
+// getEndpointCredentialProviderOptions searches the slice of configs and returns the first function found
+func getEndpointCredentialProviderOptions(ctx context.Context, configs configs) (f func(*endpointcreds.Options), found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(endpointCredentialOptionsProvider); ok {
+ f, found, err = p.getEndpointCredentialOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// webIdentityRoleCredentialOptionsProvider is an interface for retrieving a function for setting
+// the stscreds.WebIdentityRoleProvider.
+type webIdentityRoleCredentialOptionsProvider interface {
+ getWebIdentityRoleCredentialOptions(ctx context.Context) (func(*stscreds.WebIdentityRoleOptions), bool, error)
+}
+
+// getWebIdentityCredentialProviderOptions searches the slice of configs and returns the first function found
+func getWebIdentityCredentialProviderOptions(ctx context.Context, configs configs) (f func(*stscreds.WebIdentityRoleOptions), found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(webIdentityRoleCredentialOptionsProvider); ok {
+ f, found, err = p.getWebIdentityRoleCredentialOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// assumeRoleCredentialOptionsProvider is an interface for retrieving a function for setting
+// the stscreds.AssumeRoleOptions.
+type assumeRoleCredentialOptionsProvider interface {
+ getAssumeRoleCredentialOptions(ctx context.Context) (func(*stscreds.AssumeRoleOptions), bool, error)
+}
+
+// getAssumeRoleCredentialProviderOptions searches the slice of configs and returns the first function found
+func getAssumeRoleCredentialProviderOptions(ctx context.Context, configs configs) (f func(*stscreds.AssumeRoleOptions), found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(assumeRoleCredentialOptionsProvider); ok {
+ f, found, err = p.getAssumeRoleCredentialOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// HTTPClient is an HTTP client implementation
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// httpClientProvider is an interface for retrieving HTTPClient
+type httpClientProvider interface {
+ getHTTPClient(ctx context.Context) (HTTPClient, bool, error)
+}
+
+// getHTTPClient searches the slice of configs and returns the HTTPClient set on configs
+func getHTTPClient(ctx context.Context, configs configs) (client HTTPClient, found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(httpClientProvider); ok {
+ client, found, err = p.getHTTPClient(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// apiOptionsProvider is an interface for retrieving APIOptions
+type apiOptionsProvider interface {
+ getAPIOptions(ctx context.Context) ([]func(*middleware.Stack) error, bool, error)
+}
+
+// getAPIOptions searches the slice of configs and returns the APIOptions set on configs
+func getAPIOptions(ctx context.Context, configs configs) (apiOptions []func(*middleware.Stack) error, found bool, err error) {
+ for _, config := range configs {
+ if p, ok := config.(apiOptionsProvider); ok {
+ // retrieve APIOptions from configs and set it on cfg
+ apiOptions, found, err = p.getAPIOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// endpointResolverProvider is an interface for retrieving an aws.EndpointResolver from a configuration source
+type endpointResolverProvider interface {
+ getEndpointResolver(ctx context.Context) (aws.EndpointResolver, bool, error)
+}
+
+// getEndpointResolver searches the provided config sources for a EndpointResolverFunc that can be used
+// to configure the aws.Config.EndpointResolver value.
+func getEndpointResolver(ctx context.Context, configs configs) (f aws.EndpointResolver, found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(endpointResolverProvider); ok {
+ f, found, err = p.getEndpointResolver(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// endpointResolverWithOptionsProvider is an interface for retrieving an aws.EndpointResolverWithOptions from a configuration source
+type endpointResolverWithOptionsProvider interface {
+ getEndpointResolverWithOptions(ctx context.Context) (aws.EndpointResolverWithOptions, bool, error)
+}
+
+// getEndpointResolver searches the provided config sources for a EndpointResolverFunc that can be used
+// to configure the aws.Config.EndpointResolver value.
+func getEndpointResolverWithOptions(ctx context.Context, configs configs) (f aws.EndpointResolverWithOptions, found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(endpointResolverWithOptionsProvider); ok {
+ f, found, err = p.getEndpointResolverWithOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// loggerProvider is an interface for retrieving a logging.Logger from a configuration source.
+type loggerProvider interface {
+ getLogger(ctx context.Context) (logging.Logger, bool, error)
+}
+
+// getLogger searches the provided config sources for a logging.Logger that can be used
+// to configure the aws.Config.Logger value.
+func getLogger(ctx context.Context, configs configs) (l logging.Logger, found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(loggerProvider); ok {
+ l, found, err = p.getLogger(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// clientLogModeProvider is an interface for retrieving the aws.ClientLogMode from a configuration source.
+type clientLogModeProvider interface {
+ getClientLogMode(ctx context.Context) (aws.ClientLogMode, bool, error)
+}
+
+func getClientLogMode(ctx context.Context, configs configs) (m aws.ClientLogMode, found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(clientLogModeProvider); ok {
+ m, found, err = p.getClientLogMode(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// retryProvider is an configuration provider for custom Retryer.
+type retryProvider interface {
+ getRetryer(ctx context.Context) (func() aws.Retryer, bool, error)
+}
+
+func getRetryer(ctx context.Context, configs configs) (v func() aws.Retryer, found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(retryProvider); ok {
+ v, found, err = p.getRetryer(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// logConfigurationWarningsProvider is an configuration provider for
+// retrieving a boolean indicating whether configuration issues should
+// be logged when loading from config sources
+type logConfigurationWarningsProvider interface {
+ getLogConfigurationWarnings(ctx context.Context) (bool, bool, error)
+}
+
+func getLogConfigurationWarnings(ctx context.Context, configs configs) (v bool, found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(logConfigurationWarningsProvider); ok {
+ v, found, err = p.getLogConfigurationWarnings(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// ssoCredentialOptionsProvider is an interface for retrieving a function for setting
+// the ssocreds.Options.
+type ssoCredentialOptionsProvider interface {
+ getSSOProviderOptions(context.Context) (func(*ssocreds.Options), bool, error)
+}
+
+func getSSOProviderOptions(ctx context.Context, configs configs) (v func(options *ssocreds.Options), found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(ssoCredentialOptionsProvider); ok {
+ v, found, err = p.getSSOProviderOptions(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return v, found, err
+}
+
+type defaultsModeIMDSClientProvider interface {
+ getDefaultsModeIMDSClient(context.Context) (*imds.Client, bool, error)
+}
+
+func getDefaultsModeIMDSClient(ctx context.Context, configs configs) (v *imds.Client, found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(defaultsModeIMDSClientProvider); ok {
+ v, found, err = p.getDefaultsModeIMDSClient(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return v, found, err
+}
+
+type defaultsModeProvider interface {
+ getDefaultsMode(context.Context) (aws.DefaultsMode, bool, error)
+}
+
+func getDefaultsMode(ctx context.Context, configs configs) (v aws.DefaultsMode, found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(defaultsModeProvider); ok {
+ v, found, err = p.getDefaultsMode(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return v, found, err
+}
+
+type retryMaxAttemptsProvider interface {
+ GetRetryMaxAttempts(context.Context) (int, bool, error)
+}
+
+func getRetryMaxAttempts(ctx context.Context, configs configs) (v int, found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(retryMaxAttemptsProvider); ok {
+ v, found, err = p.GetRetryMaxAttempts(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return v, found, err
+}
+
+type retryModeProvider interface {
+ GetRetryMode(context.Context) (aws.RetryMode, bool, error)
+}
+
+func getRetryMode(ctx context.Context, configs configs) (v aws.RetryMode, found bool, err error) {
+ for _, c := range configs {
+ if p, ok := c.(retryModeProvider); ok {
+ v, found, err = p.GetRetryMode(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return v, found, err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go
new file mode 100644
index 000000000..4428ba49c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go
@@ -0,0 +1,307 @@
+package config
+
+import (
+ "context"
+ "crypto/tls"
+ "crypto/x509"
+ "fmt"
+ "io/ioutil"
+ "net/http"
+ "os"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ "github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+ "github.com/aws/smithy-go/logging"
+)
+
+// resolveDefaultAWSConfig will write default configuration values into the cfg
+// value. It will write the default values, overwriting any previous value.
+//
+// This should be used as the first resolver in the slice of resolvers when
+// resolving external configuration.
+func resolveDefaultAWSConfig(ctx context.Context, cfg *aws.Config, cfgs configs) error {
+ var sources []interface{}
+ for _, s := range cfgs {
+ sources = append(sources, s)
+ }
+
+ *cfg = aws.Config{
+ Credentials: aws.AnonymousCredentials{},
+ Logger: logging.NewStandardLogger(os.Stderr),
+ ConfigSources: sources,
+ }
+ return nil
+}
+
+// resolveCustomCABundle extracts the first instance of a custom CA bundle filename
+// from the external configurations. It will update the HTTP Client's builder
+// to be configured with the custom CA bundle.
+//
+// Config provider used:
+// * customCABundleProvider
+func resolveCustomCABundle(ctx context.Context, cfg *aws.Config, cfgs configs) error {
+ pemCerts, found, err := getCustomCABundle(ctx, cfgs)
+ if err != nil {
+ // TODO error handling, What is the best way to handle this?
+ // capture previous errors continue. error out if all errors
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ if cfg.HTTPClient == nil {
+ cfg.HTTPClient = awshttp.NewBuildableClient()
+ }
+
+ trOpts, ok := cfg.HTTPClient.(*awshttp.BuildableClient)
+ if !ok {
+ return fmt.Errorf("unable to add custom RootCAs HTTPClient, "+
+ "has no WithTransportOptions, %T", cfg.HTTPClient)
+ }
+
+ var appendErr error
+ client := trOpts.WithTransportOptions(func(tr *http.Transport) {
+ if tr.TLSClientConfig == nil {
+ tr.TLSClientConfig = &tls.Config{}
+ }
+ if tr.TLSClientConfig.RootCAs == nil {
+ tr.TLSClientConfig.RootCAs = x509.NewCertPool()
+ }
+
+ b, err := ioutil.ReadAll(pemCerts)
+ if err != nil {
+ appendErr = fmt.Errorf("failed to read custom CA bundle PEM file")
+ }
+
+ if !tr.TLSClientConfig.RootCAs.AppendCertsFromPEM(b) {
+ appendErr = fmt.Errorf("failed to load custom CA bundle PEM file")
+ }
+ })
+ if appendErr != nil {
+ return appendErr
+ }
+
+ cfg.HTTPClient = client
+ return err
+}
+
+// resolveRegion extracts the first instance of a Region from the configs slice.
+//
+// Config providers used:
+// * regionProvider
+func resolveRegion(ctx context.Context, cfg *aws.Config, configs configs) error {
+ v, found, err := getRegion(ctx, configs)
+ if err != nil {
+ // TODO error handling, What is the best way to handle this?
+ // capture previous errors continue. error out if all errors
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.Region = v
+ return nil
+}
+
+// resolveDefaultRegion extracts the first instance of a default region and sets `aws.Config.Region` to the default
+// region if region had not been resolved from other sources.
+func resolveDefaultRegion(ctx context.Context, cfg *aws.Config, configs configs) error {
+ if len(cfg.Region) > 0 {
+ return nil
+ }
+
+ v, found, err := getDefaultRegion(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.Region = v
+
+ return nil
+}
+
+// resolveHTTPClient extracts the first instance of a HTTPClient and sets `aws.Config.HTTPClient` to the HTTPClient instance
+// if one has not been resolved from other sources.
+func resolveHTTPClient(ctx context.Context, cfg *aws.Config, configs configs) error {
+ c, found, err := getHTTPClient(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.HTTPClient = c
+ return nil
+}
+
+// resolveAPIOptions extracts the first instance of APIOptions and sets `aws.Config.APIOptions` to the resolved API options
+// if one has not been resolved from other sources.
+func resolveAPIOptions(ctx context.Context, cfg *aws.Config, configs configs) error {
+ o, found, err := getAPIOptions(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.APIOptions = o
+
+ return nil
+}
+
+// resolveEndpointResolver extracts the first instance of a EndpointResolverFunc from the config slice
+// and sets the functions result on the aws.Config.EndpointResolver
+func resolveEndpointResolver(ctx context.Context, cfg *aws.Config, configs configs) error {
+ endpointResolver, found, err := getEndpointResolver(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.EndpointResolver = endpointResolver
+
+ return nil
+}
+
+// resolveEndpointResolver extracts the first instance of a EndpointResolverFunc from the config slice
+// and sets the functions result on the aws.Config.EndpointResolver
+func resolveEndpointResolverWithOptions(ctx context.Context, cfg *aws.Config, configs configs) error {
+ endpointResolver, found, err := getEndpointResolverWithOptions(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.EndpointResolverWithOptions = endpointResolver
+
+ return nil
+}
+
+func resolveLogger(ctx context.Context, cfg *aws.Config, configs configs) error {
+ logger, found, err := getLogger(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.Logger = logger
+
+ return nil
+}
+
+func resolveClientLogMode(ctx context.Context, cfg *aws.Config, configs configs) error {
+ mode, found, err := getClientLogMode(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.ClientLogMode = mode
+
+ return nil
+}
+
+func resolveRetryer(ctx context.Context, cfg *aws.Config, configs configs) error {
+ retryer, found, err := getRetryer(ctx, configs)
+ if err != nil {
+ return err
+ }
+
+ if found {
+ cfg.Retryer = retryer
+ return nil
+ }
+
+ // Only load the retry options if a custom retryer has not be specified.
+ if err = resolveRetryMaxAttempts(ctx, cfg, configs); err != nil {
+ return err
+ }
+ return resolveRetryMode(ctx, cfg, configs)
+}
+
+func resolveEC2IMDSRegion(ctx context.Context, cfg *aws.Config, configs configs) error {
+ if len(cfg.Region) > 0 {
+ return nil
+ }
+
+ region, found, err := getEC2IMDSRegion(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+
+ cfg.Region = region
+
+ return nil
+}
+
+func resolveDefaultsModeOptions(ctx context.Context, cfg *aws.Config, configs configs) error {
+ defaultsMode, found, err := getDefaultsMode(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ defaultsMode = aws.DefaultsModeLegacy
+ }
+
+ var environment aws.RuntimeEnvironment
+ if defaultsMode == aws.DefaultsModeAuto {
+ envConfig, _, _ := getAWSConfigSources(configs)
+
+ client, found, err := getDefaultsModeIMDSClient(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if !found {
+ client = imds.NewFromConfig(*cfg)
+ }
+
+ environment, err = resolveDefaultsModeRuntimeEnvironment(ctx, envConfig, client)
+ if err != nil {
+ return err
+ }
+ }
+
+ cfg.DefaultsMode = defaultsMode
+ cfg.RuntimeEnvironment = environment
+
+ return nil
+}
+
+func resolveRetryMaxAttempts(ctx context.Context, cfg *aws.Config, configs configs) error {
+ maxAttempts, found, err := getRetryMaxAttempts(ctx, configs)
+ if err != nil || !found {
+ return err
+ }
+ cfg.RetryMaxAttempts = maxAttempts
+
+ return nil
+}
+
+func resolveRetryMode(ctx context.Context, cfg *aws.Config, configs configs) error {
+ retryMode, found, err := getRetryMode(ctx, configs)
+ if err != nil || !found {
+ return err
+ }
+ cfg.RetryMode = retryMode
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go
new file mode 100644
index 000000000..ae5fb27bd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go
@@ -0,0 +1,133 @@
+package config
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/credentials/ssocreds"
+ "github.com/aws/aws-sdk-go-v2/service/ssooidc"
+ smithybearer "github.com/aws/smithy-go/auth/bearer"
+)
+
+// resolveBearerAuthToken extracts a token provider from the config sources.
+//
+// If an explicit bearer authentication token provider is not found the
+// resolver will fallback to resolving token provider via other config sources
+// such as SharedConfig.
+func resolveBearerAuthToken(ctx context.Context, cfg *aws.Config, configs configs) error {
+ found, err := resolveBearerAuthTokenProvider(ctx, cfg, configs)
+ if found || err != nil {
+ return err
+ }
+
+ return resolveBearerAuthTokenProviderChain(ctx, cfg, configs)
+}
+
+// resolveBearerAuthTokenProvider extracts the first instance of
+// BearerAuthTokenProvider from the config sources.
+//
+// The resolved BearerAuthTokenProvider will be wrapped in a cache to ensure
+// the Token is only refreshed when needed. This also protects the
+// TokenProvider so it can be used concurrently.
+//
+// Config providers used:
+// * bearerAuthTokenProviderProvider
+func resolveBearerAuthTokenProvider(ctx context.Context, cfg *aws.Config, configs configs) (bool, error) {
+ tokenProvider, found, err := getBearerAuthTokenProvider(ctx, configs)
+ if !found || err != nil {
+ return false, err
+ }
+
+ cfg.BearerAuthTokenProvider, err = wrapWithBearerAuthTokenCache(
+ ctx, configs, tokenProvider)
+ if err != nil {
+ return false, err
+ }
+
+ return true, nil
+}
+
+func resolveBearerAuthTokenProviderChain(ctx context.Context, cfg *aws.Config, configs configs) (err error) {
+ _, sharedConfig, _ := getAWSConfigSources(configs)
+
+ var provider smithybearer.TokenProvider
+
+ if sharedConfig.SSOSession != nil || (sharedConfig.SSORegion != "" && sharedConfig.SSOStartURL != "") {
+ ssoSession := sharedConfig.SSOSession
+ if ssoSession == nil {
+ // Fallback to legacy SSO session config parameters, if the
+ // sso-session section wasn't used.
+ ssoSession = &SSOSession{
+ Name: sharedConfig.SSOStartURL,
+ SSORegion: sharedConfig.SSORegion,
+ SSOStartURL: sharedConfig.SSOStartURL,
+ }
+ }
+
+ provider, err = resolveBearerAuthSSOTokenProvider(
+ ctx, cfg, ssoSession, configs)
+ }
+
+ if err == nil && provider != nil {
+ cfg.BearerAuthTokenProvider, err = wrapWithBearerAuthTokenCache(
+ ctx, configs, provider)
+ }
+
+ return err
+}
+
+func resolveBearerAuthSSOTokenProvider(ctx context.Context, cfg *aws.Config, session *SSOSession, configs configs) (*ssocreds.SSOTokenProvider, error) {
+ ssoTokenProviderOptionsFn, found, err := getSSOTokenProviderOptions(ctx, configs)
+ if err != nil {
+ return nil, fmt.Errorf("failed to get SSOTokenProviderOptions from config sources, %w", err)
+ }
+
+ var optFns []func(*ssocreds.SSOTokenProviderOptions)
+ if found {
+ optFns = append(optFns, ssoTokenProviderOptionsFn)
+ }
+
+ cachePath, err := ssocreds.StandardCachedTokenFilepath(session.Name)
+ if err != nil {
+ return nil, fmt.Errorf("failed to get SSOTokenProvider's cache path, %w", err)
+ }
+
+ client := ssooidc.NewFromConfig(*cfg)
+ provider := ssocreds.NewSSOTokenProvider(client, cachePath, optFns...)
+
+ return provider, nil
+}
+
+// wrapWithBearerAuthTokenCache will wrap provider with an smithy-go
+// bearer/auth#TokenCache with the provided options if the provider is not
+// already a TokenCache.
+func wrapWithBearerAuthTokenCache(
+ ctx context.Context,
+ cfgs configs,
+ provider smithybearer.TokenProvider,
+ optFns ...func(*smithybearer.TokenCacheOptions),
+) (smithybearer.TokenProvider, error) {
+ _, ok := provider.(*smithybearer.TokenCache)
+ if ok {
+ return provider, nil
+ }
+
+ tokenCacheConfigOptions, optionsFound, err := getBearerAuthTokenCacheOptions(ctx, cfgs)
+ if err != nil {
+ return nil, err
+ }
+
+ opts := make([]func(*smithybearer.TokenCacheOptions), 0, 2+len(optFns))
+ opts = append(opts, func(o *smithybearer.TokenCacheOptions) {
+ o.RefreshBeforeExpires = 5 * time.Minute
+ o.RetrieveBearerTokenTimeout = 30 * time.Second
+ })
+ opts = append(opts, optFns...)
+ if optionsFound {
+ opts = append(opts, tokenCacheConfigOptions)
+ }
+
+ return smithybearer.NewTokenCache(provider, opts...), nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go
new file mode 100644
index 000000000..28705f47f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go
@@ -0,0 +1,461 @@
+package config
+
+import (
+ "context"
+ "fmt"
+ "net/url"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/credentials"
+ "github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/endpointcreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/processcreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/ssocreds"
+ "github.com/aws/aws-sdk-go-v2/credentials/stscreds"
+ "github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+ "github.com/aws/aws-sdk-go-v2/service/sso"
+ "github.com/aws/aws-sdk-go-v2/service/sts"
+)
+
+const (
+ // valid credential source values
+ credSourceEc2Metadata = "Ec2InstanceMetadata"
+ credSourceEnvironment = "Environment"
+ credSourceECSContainer = "EcsContainer"
+)
+
+var (
+ ecsContainerEndpoint = "http://169.254.170.2" // not constant to allow for swapping during unit-testing
+)
+
+// resolveCredentials extracts a credential provider from slice of config
+// sources.
+//
+// If an explicit credential provider is not found the resolver will fallback
+// to resolving credentials by extracting a credential provider from EnvConfig
+// and SharedConfig.
+func resolveCredentials(ctx context.Context, cfg *aws.Config, configs configs) error {
+ found, err := resolveCredentialProvider(ctx, cfg, configs)
+ if found || err != nil {
+ return err
+ }
+
+ return resolveCredentialChain(ctx, cfg, configs)
+}
+
+// resolveCredentialProvider extracts the first instance of Credentials from the
+// config slices.
+//
+// The resolved CredentialProvider will be wrapped in a cache to ensure the
+// credentials are only refreshed when needed. This also protects the
+// credential provider to be used concurrently.
+//
+// Config providers used:
+// * credentialsProviderProvider
+func resolveCredentialProvider(ctx context.Context, cfg *aws.Config, configs configs) (bool, error) {
+ credProvider, found, err := getCredentialsProvider(ctx, configs)
+ if !found || err != nil {
+ return false, err
+ }
+
+ cfg.Credentials, err = wrapWithCredentialsCache(ctx, configs, credProvider)
+ if err != nil {
+ return false, err
+ }
+
+ return true, nil
+}
+
+// resolveCredentialChain resolves a credential provider chain using EnvConfig
+// and SharedConfig if present in the slice of provided configs.
+//
+// The resolved CredentialProvider will be wrapped in a cache to ensure the
+// credentials are only refreshed when needed. This also protects the
+// credential provider to be used concurrently.
+func resolveCredentialChain(ctx context.Context, cfg *aws.Config, configs configs) (err error) {
+ envConfig, sharedConfig, other := getAWSConfigSources(configs)
+
+ // When checking if a profile was specified programmatically we should only consider the "other"
+ // configuration sources that have been provided. This ensures we correctly honor the expected credential
+ // hierarchy.
+ _, sharedProfileSet, err := getSharedConfigProfile(ctx, other)
+ if err != nil {
+ return err
+ }
+
+ switch {
+ case sharedProfileSet:
+ err = resolveCredsFromProfile(ctx, cfg, envConfig, sharedConfig, other)
+ case envConfig.Credentials.HasKeys():
+ cfg.Credentials = credentials.StaticCredentialsProvider{Value: envConfig.Credentials}
+ case len(envConfig.WebIdentityTokenFilePath) > 0:
+ err = assumeWebIdentity(ctx, cfg, envConfig.WebIdentityTokenFilePath, envConfig.RoleARN, envConfig.RoleSessionName, configs)
+ default:
+ err = resolveCredsFromProfile(ctx, cfg, envConfig, sharedConfig, other)
+ }
+ if err != nil {
+ return err
+ }
+
+ // Wrap the resolved provider in a cache so the SDK will cache credentials.
+ cfg.Credentials, err = wrapWithCredentialsCache(ctx, configs, cfg.Credentials)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func resolveCredsFromProfile(ctx context.Context, cfg *aws.Config, envConfig *EnvConfig, sharedConfig *SharedConfig, configs configs) (err error) {
+
+ switch {
+ case sharedConfig.Source != nil:
+ // Assume IAM role with credentials source from a different profile.
+ err = resolveCredsFromProfile(ctx, cfg, envConfig, sharedConfig.Source, configs)
+
+ case sharedConfig.Credentials.HasKeys():
+ // Static Credentials from Shared Config/Credentials file.
+ cfg.Credentials = credentials.StaticCredentialsProvider{
+ Value: sharedConfig.Credentials,
+ }
+
+ case len(sharedConfig.CredentialSource) != 0:
+ err = resolveCredsFromSource(ctx, cfg, envConfig, sharedConfig, configs)
+
+ case len(sharedConfig.WebIdentityTokenFile) != 0:
+ // Credentials from Assume Web Identity token require an IAM Role, and
+ // that roll will be assumed. May be wrapped with another assume role
+ // via SourceProfile.
+ return assumeWebIdentity(ctx, cfg, sharedConfig.WebIdentityTokenFile, sharedConfig.RoleARN, sharedConfig.RoleSessionName, configs)
+
+ case sharedConfig.hasSSOConfiguration():
+ err = resolveSSOCredentials(ctx, cfg, sharedConfig, configs)
+
+ case len(sharedConfig.CredentialProcess) != 0:
+ // Get credentials from CredentialProcess
+ err = processCredentials(ctx, cfg, sharedConfig, configs)
+
+ case len(envConfig.ContainerCredentialsEndpoint) != 0:
+ err = resolveLocalHTTPCredProvider(ctx, cfg, envConfig.ContainerCredentialsEndpoint, envConfig.ContainerAuthorizationToken, configs)
+
+ case len(envConfig.ContainerCredentialsRelativePath) != 0:
+ err = resolveHTTPCredProvider(ctx, cfg, ecsContainerURI(envConfig.ContainerCredentialsRelativePath), envConfig.ContainerAuthorizationToken, configs)
+
+ default:
+ err = resolveEC2RoleCredentials(ctx, cfg, configs)
+ }
+ if err != nil {
+ return err
+ }
+
+ if len(sharedConfig.RoleARN) > 0 {
+ return credsFromAssumeRole(ctx, cfg, sharedConfig, configs)
+ }
+
+ return nil
+}
+
+func resolveSSOCredentials(ctx context.Context, cfg *aws.Config, sharedConfig *SharedConfig, configs configs) error {
+ if err := sharedConfig.validateSSOConfiguration(); err != nil {
+ return err
+ }
+
+ var options []func(*ssocreds.Options)
+ v, found, err := getSSOProviderOptions(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if found {
+ options = append(options, v)
+ }
+
+ cfgCopy := cfg.Copy()
+ cfgCopy.Region = sharedConfig.SSORegion
+
+ cfg.Credentials = ssocreds.New(sso.NewFromConfig(cfgCopy), sharedConfig.SSOAccountID, sharedConfig.SSORoleName, sharedConfig.SSOStartURL, options...)
+
+ return nil
+}
+
+func ecsContainerURI(path string) string {
+ return fmt.Sprintf("%s%s", ecsContainerEndpoint, path)
+}
+
+func processCredentials(ctx context.Context, cfg *aws.Config, sharedConfig *SharedConfig, configs configs) error {
+ var opts []func(*processcreds.Options)
+
+ options, found, err := getProcessCredentialOptions(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if found {
+ opts = append(opts, options)
+ }
+
+ cfg.Credentials = processcreds.NewProvider(sharedConfig.CredentialProcess, opts...)
+
+ return nil
+}
+
+func resolveLocalHTTPCredProvider(ctx context.Context, cfg *aws.Config, endpointURL, authToken string, configs configs) error {
+ var resolveErr error
+
+ parsed, err := url.Parse(endpointURL)
+ if err != nil {
+ resolveErr = fmt.Errorf("invalid URL, %w", err)
+ } else {
+ host := parsed.Hostname()
+ if len(host) == 0 {
+ resolveErr = fmt.Errorf("unable to parse host from local HTTP cred provider URL")
+ } else if isLoopback, loopbackErr := isLoopbackHost(host); loopbackErr != nil {
+ resolveErr = fmt.Errorf("failed to resolve host %q, %v", host, loopbackErr)
+ } else if !isLoopback {
+ resolveErr = fmt.Errorf("invalid endpoint host, %q, only loopback hosts are allowed", host)
+ }
+ }
+
+ if resolveErr != nil {
+ return resolveErr
+ }
+
+ return resolveHTTPCredProvider(ctx, cfg, endpointURL, authToken, configs)
+}
+
+func resolveHTTPCredProvider(ctx context.Context, cfg *aws.Config, url, authToken string, configs configs) error {
+ optFns := []func(*endpointcreds.Options){
+ func(options *endpointcreds.Options) {
+ if len(authToken) != 0 {
+ options.AuthorizationToken = authToken
+ }
+ options.APIOptions = cfg.APIOptions
+ if cfg.Retryer != nil {
+ options.Retryer = cfg.Retryer()
+ }
+ },
+ }
+
+ optFn, found, err := getEndpointCredentialProviderOptions(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if found {
+ optFns = append(optFns, optFn)
+ }
+
+ provider := endpointcreds.New(url, optFns...)
+
+ cfg.Credentials, err = wrapWithCredentialsCache(ctx, configs, provider, func(options *aws.CredentialsCacheOptions) {
+ options.ExpiryWindow = 5 * time.Minute
+ })
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func resolveCredsFromSource(ctx context.Context, cfg *aws.Config, envConfig *EnvConfig, sharedCfg *SharedConfig, configs configs) (err error) {
+ switch sharedCfg.CredentialSource {
+ case credSourceEc2Metadata:
+ return resolveEC2RoleCredentials(ctx, cfg, configs)
+
+ case credSourceEnvironment:
+ cfg.Credentials = credentials.StaticCredentialsProvider{Value: envConfig.Credentials}
+
+ case credSourceECSContainer:
+ if len(envConfig.ContainerCredentialsRelativePath) == 0 {
+ return fmt.Errorf("EcsContainer was specified as the credential_source, but 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI' was not set")
+ }
+ return resolveHTTPCredProvider(ctx, cfg, ecsContainerURI(envConfig.ContainerCredentialsRelativePath), envConfig.ContainerAuthorizationToken, configs)
+
+ default:
+ return fmt.Errorf("credential_source values must be EcsContainer, Ec2InstanceMetadata, or Environment")
+ }
+
+ return nil
+}
+
+func resolveEC2RoleCredentials(ctx context.Context, cfg *aws.Config, configs configs) error {
+ optFns := make([]func(*ec2rolecreds.Options), 0, 2)
+
+ optFn, found, err := getEC2RoleCredentialProviderOptions(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if found {
+ optFns = append(optFns, optFn)
+ }
+
+ optFns = append(optFns, func(o *ec2rolecreds.Options) {
+ // Only define a client from config if not already defined.
+ if o.Client == nil {
+ o.Client = imds.NewFromConfig(*cfg)
+ }
+ })
+
+ provider := ec2rolecreds.New(optFns...)
+
+ cfg.Credentials, err = wrapWithCredentialsCache(ctx, configs, provider)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func getAWSConfigSources(cfgs configs) (*EnvConfig, *SharedConfig, configs) {
+ var (
+ envConfig *EnvConfig
+ sharedConfig *SharedConfig
+ other configs
+ )
+
+ for i := range cfgs {
+ switch c := cfgs[i].(type) {
+ case EnvConfig:
+ if envConfig == nil {
+ envConfig = &c
+ }
+ case *EnvConfig:
+ if envConfig == nil {
+ envConfig = c
+ }
+ case SharedConfig:
+ if sharedConfig == nil {
+ sharedConfig = &c
+ }
+ case *SharedConfig:
+ if envConfig == nil {
+ sharedConfig = c
+ }
+ default:
+ other = append(other, c)
+ }
+ }
+
+ if envConfig == nil {
+ envConfig = &EnvConfig{}
+ }
+
+ if sharedConfig == nil {
+ sharedConfig = &SharedConfig{}
+ }
+
+ return envConfig, sharedConfig, other
+}
+
+// AssumeRoleTokenProviderNotSetError is an error returned when creating a
+// session when the MFAToken option is not set when shared config is configured
+// load assume a role with an MFA token.
+type AssumeRoleTokenProviderNotSetError struct{}
+
+// Error is the error message
+func (e AssumeRoleTokenProviderNotSetError) Error() string {
+ return fmt.Sprintf("assume role with MFA enabled, but AssumeRoleTokenProvider session option not set.")
+}
+
+func assumeWebIdentity(ctx context.Context, cfg *aws.Config, filepath string, roleARN, sessionName string, configs configs) error {
+ if len(filepath) == 0 {
+ return fmt.Errorf("token file path is not set")
+ }
+
+ if len(roleARN) == 0 {
+ return fmt.Errorf("role ARN is not set")
+ }
+
+ optFns := []func(*stscreds.WebIdentityRoleOptions){
+ func(options *stscreds.WebIdentityRoleOptions) {
+ options.RoleSessionName = sessionName
+ },
+ }
+
+ optFn, found, err := getWebIdentityCredentialProviderOptions(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if found {
+ optFns = append(optFns, optFn)
+ }
+
+ provider := stscreds.NewWebIdentityRoleProvider(sts.NewFromConfig(*cfg), roleARN, stscreds.IdentityTokenFile(filepath), optFns...)
+
+ cfg.Credentials = provider
+
+ return nil
+}
+
+func credsFromAssumeRole(ctx context.Context, cfg *aws.Config, sharedCfg *SharedConfig, configs configs) (err error) {
+ optFns := []func(*stscreds.AssumeRoleOptions){
+ func(options *stscreds.AssumeRoleOptions) {
+ options.RoleSessionName = sharedCfg.RoleSessionName
+ if sharedCfg.RoleDurationSeconds != nil {
+ if *sharedCfg.RoleDurationSeconds/time.Minute > 15 {
+ options.Duration = *sharedCfg.RoleDurationSeconds
+ }
+ }
+ // Assume role with external ID
+ if len(sharedCfg.ExternalID) > 0 {
+ options.ExternalID = aws.String(sharedCfg.ExternalID)
+ }
+
+ // Assume role with MFA
+ if len(sharedCfg.MFASerial) != 0 {
+ options.SerialNumber = aws.String(sharedCfg.MFASerial)
+ }
+ },
+ }
+
+ optFn, found, err := getAssumeRoleCredentialProviderOptions(ctx, configs)
+ if err != nil {
+ return err
+ }
+ if found {
+ optFns = append(optFns, optFn)
+ }
+
+ {
+ // Synthesize options early to validate configuration errors sooner to ensure a token provider
+ // is present if the SerialNumber was set.
+ var o stscreds.AssumeRoleOptions
+ for _, fn := range optFns {
+ fn(&o)
+ }
+ if o.TokenProvider == nil && o.SerialNumber != nil {
+ return AssumeRoleTokenProviderNotSetError{}
+ }
+ }
+
+ cfg.Credentials = stscreds.NewAssumeRoleProvider(sts.NewFromConfig(*cfg), sharedCfg.RoleARN, optFns...)
+
+ return nil
+}
+
+// wrapWithCredentialsCache will wrap provider with an aws.CredentialsCache
+// with the provided options if the provider is not already a
+// aws.CredentialsCache.
+func wrapWithCredentialsCache(
+ ctx context.Context,
+ cfgs configs,
+ provider aws.CredentialsProvider,
+ optFns ...func(options *aws.CredentialsCacheOptions),
+) (aws.CredentialsProvider, error) {
+ _, ok := provider.(*aws.CredentialsCache)
+ if ok {
+ return provider, nil
+ }
+
+ credCacheOptions, optionsFound, err := getCredentialsCacheOptionsProvider(ctx, cfgs)
+ if err != nil {
+ return nil, err
+ }
+
+ // force allocation of a new slice if the additional options are
+ // needed, to prevent overwriting the passed in slice of options.
+ optFns = optFns[:len(optFns):len(optFns)]
+ if optionsFound {
+ optFns = append(optFns, credCacheOptions)
+ }
+
+ return aws.NewCredentialsCache(provider, optFns...), nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go
new file mode 100644
index 000000000..48aa7a8cf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go
@@ -0,0 +1,1364 @@
+package config
+
+import (
+ "bytes"
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "os"
+ "os/user"
+ "path/filepath"
+ "strings"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+ "github.com/aws/aws-sdk-go-v2/internal/ini"
+ "github.com/aws/smithy-go/logging"
+)
+
+const (
+ // Prefix to use for filtering profiles. The profile prefix should only
+ // exist in the shared config file, not the credentials file.
+ profilePrefix = `profile `
+
+ // Prefix to be used for SSO sections. These are supposed to only exist in
+ // the shared config file, not the credentials file.
+ ssoSectionPrefix = `sso-session `
+
+ // string equivalent for boolean
+ endpointDiscoveryDisabled = `false`
+ endpointDiscoveryEnabled = `true`
+ endpointDiscoveryAuto = `auto`
+
+ // Static Credentials group
+ accessKeyIDKey = `aws_access_key_id` // group required
+ secretAccessKey = `aws_secret_access_key` // group required
+ sessionTokenKey = `aws_session_token` // optional
+
+ // Assume Role Credentials group
+ roleArnKey = `role_arn` // group required
+ sourceProfileKey = `source_profile` // group required
+ 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
+
+ // AWS Single Sign-On (AWS SSO) group
+ ssoSessionNameKey = "sso_session"
+
+ ssoRegionKey = "sso_region"
+ ssoStartURLKey = "sso_start_url"
+
+ ssoAccountIDKey = "sso_account_id"
+ ssoRoleNameKey = "sso_role_name"
+
+ // Additional Config fields
+ regionKey = `region`
+
+ // endpoint discovery group
+ enableEndpointDiscoveryKey = `endpoint_discovery_enabled` // optional
+
+ // External Credential process
+ credentialProcessKey = `credential_process` // optional
+
+ // Web Identity Token File
+ webIdentityTokenFileKey = `web_identity_token_file` // optional
+
+ // S3 ARN Region Usage
+ s3UseARNRegionKey = "s3_use_arn_region"
+
+ ec2MetadataServiceEndpointModeKey = "ec2_metadata_service_endpoint_mode"
+
+ ec2MetadataServiceEndpointKey = "ec2_metadata_service_endpoint"
+
+ // Use DualStack Endpoint Resolution
+ useDualStackEndpoint = "use_dualstack_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 Disable Multi-Region AccessPoints
+ s3DisableMultiRegionAccessPointsKey = `s3_disable_multiregion_access_points`
+
+ useFIPSEndpointKey = "use_fips_endpoint"
+
+ defaultsModeKey = "defaults_mode"
+
+ // Retry options
+ retryMaxAttemptsKey = "max_attempts"
+ retryModeKey = "retry_mode"
+
+ caBundleKey = "ca_bundle"
+)
+
+// defaultSharedConfigProfile allows for swapping the default profile for testing
+var defaultSharedConfigProfile = DefaultSharedConfigProfile
+
+// DefaultSharedCredentialsFilename returns the SDK's default file path
+// for the shared credentials file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/credentials
+// - Windows: %USERPROFILE%\.aws\credentials
+func DefaultSharedCredentialsFilename() string {
+ return filepath.Join(userHomeDir(), ".aws", "credentials")
+}
+
+// DefaultSharedConfigFilename returns the SDK's default file path for
+// the shared config file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/config
+// - Windows: %USERPROFILE%\.aws\config
+func DefaultSharedConfigFilename() string {
+ return filepath.Join(userHomeDir(), ".aws", "config")
+}
+
+// DefaultSharedConfigFiles is a slice of the default shared config files that
+// the will be used in order to load the SharedConfig.
+var DefaultSharedConfigFiles = []string{
+ DefaultSharedConfigFilename(),
+}
+
+// DefaultSharedCredentialsFiles is a slice of the default shared credentials
+// files that the will be used in order to load the SharedConfig.
+var DefaultSharedCredentialsFiles = []string{
+ DefaultSharedCredentialsFilename(),
+}
+
+// SSOSession provides the shared configuration parameters of the sso-session
+// section.
+type SSOSession struct {
+ Name string
+ SSORegion string
+ SSOStartURL string
+}
+
+func (s *SSOSession) setFromIniSection(section ini.Section) error {
+ updateString(&s.SSORegion, section, ssoRegionKey)
+ updateString(&s.SSOStartURL, section, ssoStartURLKey)
+
+ if s.SSORegion == "" || s.SSOStartURL == "" {
+ return fmt.Errorf(
+ "%v and %v are required parameters in sso-session section",
+ ssoRegionKey, ssoStartURLKey,
+ )
+ }
+
+ return nil
+}
+
+// SharedConfig represents the configuration fields of the SDK config files.
+type SharedConfig struct {
+ Profile string
+
+ // Credentials values from the config file. Both aws_access_key_id
+ // and aws_secret_access_key must be provided together in the same file
+ // to be considered valid. The values will be ignored if not a complete group.
+ // aws_session_token is an optional field that can be provided if both of the
+ // other two fields are also provided.
+ //
+ // aws_access_key_id
+ // aws_secret_access_key
+ // aws_session_token
+ Credentials aws.Credentials
+
+ CredentialSource string
+ CredentialProcess string
+ WebIdentityTokenFile string
+
+ // SSO session options
+ SSOSessionName string
+ SSOSession *SSOSession
+
+ // Legacy SSO session options
+ SSORegion string
+ SSOStartURL string
+
+ // SSO fields not used
+ SSOAccountID string
+ SSORoleName string
+
+ RoleARN string
+ ExternalID string
+ MFASerial string
+ RoleSessionName string
+ RoleDurationSeconds *time.Duration
+
+ SourceProfileName string
+ Source *SharedConfig
+
+ // Region is the region the SDK should use for looking up AWS service endpoints
+ // and signing requests.
+ //
+ // region = us-west-2
+ Region string
+
+ // EnableEndpointDiscovery can be enabled or disabled in the shared config
+ // by setting endpoint_discovery_enabled to true, or false respectively.
+ //
+ // endpoint_discovery_enabled = true
+ EnableEndpointDiscovery aws.EndpointDiscoveryEnableState
+
+ // 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
+
+ // Specifies the EC2 Instance Metadata Service default endpoint selection
+ // mode (IPv4 or IPv6)
+ //
+ // ec2_metadata_service_endpoint_mode=IPv6
+ EC2IMDSEndpointMode imds.EndpointModeState
+
+ // Specifies the EC2 Instance Metadata Service endpoint to use. If
+ // specified it overrides EC2IMDSEndpointMode.
+ //
+ // ec2_metadata_service_endpoint=http://fd00:ec2::254
+ EC2IMDSEndpoint string
+
+ // Specifies if the S3 service should disable support for Multi-Region
+ // access-points
+ //
+ // s3_disable_multiregion_access_points=true
+ S3DisableMultiRegionAccessPoints *bool
+
+ // Specifies that SDK clients must resolve a dual-stack endpoint for
+ // services.
+ //
+ // use_dualstack_endpoint=true
+ UseDualStackEndpoint aws.DualStackEndpointState
+
+ // Specifies that SDK clients must resolve a FIPS endpoint for
+ // services.
+ //
+ // use_fips_endpoint=true
+ UseFIPSEndpoint aws.FIPSEndpointState
+
+ // Specifies which defaults mode should be used by services.
+ //
+ // defaults_mode=standard
+ DefaultsMode aws.DefaultsMode
+
+ // Specifies the maximum number attempts an API client will call an
+ // operation that fails with a retryable error.
+ //
+ // max_attempts=3
+ RetryMaxAttempts int
+
+ // Specifies the retry model the API client will be created with.
+ //
+ // retry_mode=standard
+ RetryMode aws.RetryMode
+
+ // Sets the path to a custom Credentials Authority (CA) Bundle PEM file
+ // that the SDK will use instead of the system's root CA bundle. Only use
+ // this if you want to configure the SDK to use a custom set of CAs.
+ //
+ // Enabling this option will attempt to merge the Transport into the SDK's
+ // HTTP client. If the client's Transport is not a http.Transport an error
+ // will be returned. If the Transport's TLS config is set this option will
+ // cause the SDK to overwrite the Transport's TLS config's RootCAs value.
+ //
+ // Setting a custom HTTPClient in the aws.Config options will override this
+ // setting. To use this option and custom HTTP client, the HTTP client
+ // needs to be provided when creating the config. Not the service client.
+ //
+ // ca_bundle=$HOME/my_custom_ca_bundle
+ CustomCABundle string
+}
+
+func (c SharedConfig) getDefaultsMode(ctx context.Context) (value aws.DefaultsMode, ok bool, err error) {
+ if len(c.DefaultsMode) == 0 {
+ return "", false, nil
+ }
+
+ return c.DefaultsMode, true, nil
+}
+
+// GetRetryMaxAttempts returns the maximum number of attempts an API client
+// created Retryer should attempt an operation call before failing.
+func (c SharedConfig) GetRetryMaxAttempts(ctx context.Context) (value int, ok bool, err error) {
+ if c.RetryMaxAttempts == 0 {
+ return 0, false, nil
+ }
+
+ return c.RetryMaxAttempts, true, nil
+}
+
+// GetRetryMode returns the model the API client should create its Retryer in.
+func (c SharedConfig) GetRetryMode(ctx context.Context) (value aws.RetryMode, ok bool, err error) {
+ if len(c.RetryMode) == 0 {
+ return "", false, nil
+ }
+
+ return c.RetryMode, true, nil
+}
+
+// GetS3UseARNRegion returns if the S3 service should allow ARNs to direct the region
+// the client's requests are sent to.
+func (c SharedConfig) GetS3UseARNRegion(ctx context.Context) (value, ok bool, err error) {
+ if c.S3UseARNRegion == nil {
+ return false, false, nil
+ }
+
+ return *c.S3UseARNRegion, true, nil
+}
+
+// GetEnableEndpointDiscovery returns if the enable_endpoint_discovery is set.
+func (c SharedConfig) GetEnableEndpointDiscovery(ctx context.Context) (value aws.EndpointDiscoveryEnableState, ok bool, err error) {
+ if c.EnableEndpointDiscovery == aws.EndpointDiscoveryUnset {
+ return aws.EndpointDiscoveryUnset, false, nil
+ }
+
+ return c.EnableEndpointDiscovery, true, nil
+}
+
+// GetS3DisableMultiRegionAccessPoints returns if the S3 service should disable support for Multi-Region
+// access-points.
+func (c SharedConfig) GetS3DisableMultiRegionAccessPoints(ctx context.Context) (value, ok bool, err error) {
+ if c.S3DisableMultiRegionAccessPoints == nil {
+ return false, false, nil
+ }
+
+ return *c.S3DisableMultiRegionAccessPoints, true, nil
+}
+
+// GetRegion returns the region for the profile if a region is set.
+func (c SharedConfig) getRegion(ctx context.Context) (string, bool, error) {
+ if len(c.Region) == 0 {
+ return "", false, nil
+ }
+ return c.Region, true, nil
+}
+
+// GetCredentialsProvider returns the credentials for a profile if they were set.
+func (c SharedConfig) getCredentialsProvider() (aws.Credentials, bool, error) {
+ return c.Credentials, true, nil
+}
+
+// GetEC2IMDSEndpointMode implements a EC2IMDSEndpointMode option resolver interface.
+func (c SharedConfig) GetEC2IMDSEndpointMode() (imds.EndpointModeState, bool, error) {
+ if c.EC2IMDSEndpointMode == imds.EndpointModeStateUnset {
+ return imds.EndpointModeStateUnset, false, nil
+ }
+
+ return c.EC2IMDSEndpointMode, true, nil
+}
+
+// GetEC2IMDSEndpoint implements a EC2IMDSEndpoint option resolver interface.
+func (c SharedConfig) GetEC2IMDSEndpoint() (string, bool, error) {
+ if len(c.EC2IMDSEndpoint) == 0 {
+ return "", false, nil
+ }
+
+ return c.EC2IMDSEndpoint, true, nil
+}
+
+// GetUseDualStackEndpoint returns whether the service's dual-stack endpoint should be
+// used for requests.
+func (c SharedConfig) GetUseDualStackEndpoint(ctx context.Context) (value aws.DualStackEndpointState, found bool, err error) {
+ if c.UseDualStackEndpoint == aws.DualStackEndpointStateUnset {
+ return aws.DualStackEndpointStateUnset, false, nil
+ }
+
+ return c.UseDualStackEndpoint, true, nil
+}
+
+// GetUseFIPSEndpoint returns whether the service's FIPS endpoint should be
+// used for requests.
+func (c SharedConfig) GetUseFIPSEndpoint(ctx context.Context) (value aws.FIPSEndpointState, found bool, err error) {
+ if c.UseFIPSEndpoint == aws.FIPSEndpointStateUnset {
+ return aws.FIPSEndpointStateUnset, false, nil
+ }
+
+ return c.UseFIPSEndpoint, true, nil
+}
+
+// GetCustomCABundle returns the custom CA bundle's PEM bytes if the file was
+func (c SharedConfig) getCustomCABundle(context.Context) (io.Reader, bool, error) {
+ if len(c.CustomCABundle) == 0 {
+ return nil, false, nil
+ }
+
+ b, err := ioutil.ReadFile(c.CustomCABundle)
+ if err != nil {
+ return nil, false, err
+ }
+ return bytes.NewReader(b), true, nil
+}
+
+// loadSharedConfigIgnoreNotExist is an alias for loadSharedConfig with the
+// addition of ignoring when none of the files exist or when the profile
+// is not found in any of the files.
+func loadSharedConfigIgnoreNotExist(ctx context.Context, configs configs) (Config, error) {
+ cfg, err := loadSharedConfig(ctx, configs)
+ if err != nil {
+ if _, ok := err.(SharedConfigProfileNotExistError); ok {
+ return SharedConfig{}, nil
+ }
+ return nil, err
+ }
+
+ return cfg, nil
+}
+
+// loadSharedConfig uses the configs passed in to load the SharedConfig from file
+// The file names and profile name are sourced from the configs.
+//
+// If profile name is not provided DefaultSharedConfigProfile (default) will
+// be used.
+//
+// If shared config filenames are not provided DefaultSharedConfigFiles will
+// be used.
+//
+// Config providers used:
+// * sharedConfigProfileProvider
+// * sharedConfigFilesProvider
+func loadSharedConfig(ctx context.Context, configs configs) (Config, error) {
+ var profile string
+ var configFiles []string
+ var credentialsFiles []string
+ var ok bool
+ var err error
+
+ profile, ok, err = getSharedConfigProfile(ctx, configs)
+ if err != nil {
+ return nil, err
+ }
+ if !ok {
+ profile = defaultSharedConfigProfile
+ }
+
+ configFiles, ok, err = getSharedConfigFiles(ctx, configs)
+ if err != nil {
+ return nil, err
+ }
+
+ credentialsFiles, ok, err = getSharedCredentialsFiles(ctx, configs)
+ if err != nil {
+ return nil, err
+ }
+
+ // setup logger if log configuration warning is seti
+ var logger logging.Logger
+ logWarnings, found, err := getLogConfigurationWarnings(ctx, configs)
+ if err != nil {
+ return SharedConfig{}, err
+ }
+ if found && logWarnings {
+ logger, found, err = getLogger(ctx, configs)
+ if err != nil {
+ return SharedConfig{}, err
+ }
+ if !found {
+ logger = logging.NewStandardLogger(os.Stderr)
+ }
+ }
+
+ return LoadSharedConfigProfile(ctx, profile,
+ func(o *LoadSharedConfigOptions) {
+ o.Logger = logger
+ o.ConfigFiles = configFiles
+ o.CredentialsFiles = credentialsFiles
+ },
+ )
+}
+
+// LoadSharedConfigOptions struct contains optional values that can be used to load the config.
+type LoadSharedConfigOptions struct {
+
+ // CredentialsFiles are the shared credentials files
+ CredentialsFiles []string
+
+ // ConfigFiles are the shared config files
+ ConfigFiles []string
+
+ // Logger is the logger used to log shared config behavior
+ Logger logging.Logger
+}
+
+// LoadSharedConfigProfile retrieves the configuration from the list of files
+// using the profile provided. The order the files are listed will determine
+// precedence. Values in subsequent files will overwrite values defined in
+// earlier files.
+//
+// For example, given two files A and B. Both define credentials. If the order
+// of the files are A then B, B's credential values will be used instead of A's.
+//
+// If config files are not set, SDK will default to using a file at location `.aws/config` if present.
+// If credentials files are not set, SDK will default to using a file at location `.aws/credentials` if present.
+// No default files are set, if files set to an empty slice.
+//
+// You can read more about shared config and credentials file location at
+// https://docs.aws.amazon.com/credref/latest/refdocs/file-location.html#file-location
+func LoadSharedConfigProfile(ctx context.Context, profile string, optFns ...func(*LoadSharedConfigOptions)) (SharedConfig, error) {
+ var option LoadSharedConfigOptions
+ for _, fn := range optFns {
+ fn(&option)
+ }
+
+ if option.ConfigFiles == nil {
+ option.ConfigFiles = DefaultSharedConfigFiles
+ }
+
+ if option.CredentialsFiles == nil {
+ option.CredentialsFiles = DefaultSharedCredentialsFiles
+ }
+
+ // load shared configuration sections from shared configuration INI options
+ configSections, err := loadIniFiles(option.ConfigFiles)
+ if err != nil {
+ return SharedConfig{}, err
+ }
+
+ // check for profile prefix and drop duplicates or invalid profiles
+ err = processConfigSections(ctx, &configSections, option.Logger)
+ if err != nil {
+ return SharedConfig{}, err
+ }
+
+ // load shared credentials sections from shared credentials INI options
+ credentialsSections, err := loadIniFiles(option.CredentialsFiles)
+ if err != nil {
+ return SharedConfig{}, err
+ }
+
+ // check for profile prefix and drop duplicates or invalid profiles
+ err = processCredentialsSections(ctx, &credentialsSections, option.Logger)
+ if err != nil {
+ return SharedConfig{}, err
+ }
+
+ err = mergeSections(&configSections, credentialsSections)
+ if err != nil {
+ return SharedConfig{}, err
+ }
+
+ cfg := SharedConfig{}
+ profiles := map[string]struct{}{}
+ if err = cfg.setFromIniSections(profiles, profile, configSections, option.Logger); err != nil {
+ return SharedConfig{}, err
+ }
+
+ return cfg, nil
+}
+
+func processConfigSections(ctx context.Context, sections *ini.Sections, logger logging.Logger) error {
+ skipSections := map[string]struct{}{}
+
+ for _, section := range sections.List() {
+ if _, ok := skipSections[section]; ok {
+ continue
+ }
+
+ // drop sections from config file that do not have expected prefixes.
+ switch {
+ case strings.HasPrefix(section, profilePrefix):
+ // Rename sections to remove "profile " prefixing to match with
+ // credentials file. If default is already present, it will be
+ // dropped.
+ newName, err := renameProfileSection(section, sections, logger)
+ if err != nil {
+ return fmt.Errorf("failed to rename profile section, %w", err)
+ }
+ skipSections[newName] = struct{}{}
+
+ case strings.HasPrefix(section, ssoSectionPrefix):
+ case strings.EqualFold(section, "default"):
+ default:
+ // drop this section, as invalid profile name
+ sections.DeleteSection(section)
+
+ if logger != nil {
+ logger.Logf(logging.Debug, "A profile defined with name `%v` is ignored. "+
+ "For use within a shared configuration file, "+
+ "a non-default profile must have `profile ` "+
+ "prefixed to the profile name.",
+ section,
+ )
+ }
+ }
+ }
+ return nil
+}
+
+func renameProfileSection(section string, sections *ini.Sections, logger logging.Logger) (string, error) {
+ v, ok := sections.GetSection(section)
+ if !ok {
+ return "", fmt.Errorf("error processing profiles within the shared configuration files")
+ }
+
+ // delete section with profile as prefix
+ sections.DeleteSection(section)
+
+ // set the value to non-prefixed name in sections.
+ section = strings.TrimPrefix(section, profilePrefix)
+ if sections.HasSection(section) {
+ oldSection, _ := sections.GetSection(section)
+ v.Logs = append(v.Logs,
+ fmt.Sprintf("A non-default profile not prefixed with `profile ` found in %s, "+
+ "overriding non-default profile from %s",
+ v.SourceFile, oldSection.SourceFile))
+ sections.DeleteSection(section)
+ }
+
+ // assign non-prefixed name to section
+ v.Name = section
+ sections.SetSection(section, v)
+
+ return section, nil
+}
+
+func processCredentialsSections(ctx context.Context, sections *ini.Sections, logger logging.Logger) error {
+ for _, section := range sections.List() {
+ // drop profiles with prefix for credential files
+ if strings.HasPrefix(section, profilePrefix) {
+ // drop this section, as invalid profile name
+ sections.DeleteSection(section)
+
+ if logger != nil {
+ logger.Logf(logging.Debug,
+ "The profile defined with name `%v` is ignored. A profile with the `profile ` prefix is invalid "+
+ "for the shared credentials file.\n",
+ section,
+ )
+ }
+ }
+ }
+ return nil
+}
+
+func loadIniFiles(filenames []string) (ini.Sections, error) {
+ mergedSections := ini.NewSections()
+
+ for _, filename := range filenames {
+ sections, err := ini.OpenFile(filename)
+ var v *ini.UnableToReadFile
+ if ok := errors.As(err, &v); ok {
+ // Skip files which can't be opened and read for whatever reason.
+ // We treat such files as empty, and do not fall back to other locations.
+ continue
+ } else if err != nil {
+ return ini.Sections{}, SharedConfigLoadError{Filename: filename, Err: err}
+ }
+
+ // mergeSections into mergedSections
+ err = mergeSections(&mergedSections, sections)
+ if err != nil {
+ return ini.Sections{}, SharedConfigLoadError{Filename: filename, Err: err}
+ }
+ }
+
+ return mergedSections, nil
+}
+
+// mergeSections merges source section properties into destination section properties
+func mergeSections(dst *ini.Sections, src ini.Sections) error {
+ for _, sectionName := range src.List() {
+ srcSection, _ := src.GetSection(sectionName)
+
+ if (!srcSection.Has(accessKeyIDKey) && srcSection.Has(secretAccessKey)) ||
+ (srcSection.Has(accessKeyIDKey) && !srcSection.Has(secretAccessKey)) {
+ srcSection.Errors = append(srcSection.Errors,
+ fmt.Errorf("partial credentials found for profile %v", sectionName))
+ }
+
+ if !dst.HasSection(sectionName) {
+ dst.SetSection(sectionName, srcSection)
+ continue
+ }
+
+ // merge with destination srcSection
+ dstSection, _ := dst.GetSection(sectionName)
+
+ // errors should be overriden if any
+ dstSection.Errors = srcSection.Errors
+
+ // Access key id update
+ if srcSection.Has(accessKeyIDKey) && srcSection.Has(secretAccessKey) {
+ accessKey := srcSection.String(accessKeyIDKey)
+ secretKey := srcSection.String(secretAccessKey)
+
+ if dstSection.Has(accessKeyIDKey) {
+ dstSection.Logs = append(dstSection.Logs, newMergeKeyLogMessage(sectionName, accessKeyIDKey,
+ dstSection.SourceFile[accessKeyIDKey], srcSection.SourceFile[accessKeyIDKey]))
+ }
+
+ // update access key
+ v, err := ini.NewStringValue(accessKey)
+ if err != nil {
+ return fmt.Errorf("error merging access key, %w", err)
+ }
+ dstSection.UpdateValue(accessKeyIDKey, v)
+
+ // update secret key
+ v, err = ini.NewStringValue(secretKey)
+ if err != nil {
+ return fmt.Errorf("error merging secret key, %w", err)
+ }
+ dstSection.UpdateValue(secretAccessKey, v)
+
+ // update session token
+ if err = mergeStringKey(&srcSection, &dstSection, sectionName, sessionTokenKey); err != nil {
+ return err
+ }
+
+ // update source file to reflect where the static creds came from
+ dstSection.UpdateSourceFile(accessKeyIDKey, srcSection.SourceFile[accessKeyIDKey])
+ dstSection.UpdateSourceFile(secretAccessKey, srcSection.SourceFile[secretAccessKey])
+ }
+
+ stringKeys := []string{
+ roleArnKey,
+ sourceProfileKey,
+ credentialSourceKey,
+ externalIDKey,
+ mfaSerialKey,
+ roleSessionNameKey,
+ regionKey,
+ enableEndpointDiscoveryKey,
+ credentialProcessKey,
+ webIdentityTokenFileKey,
+ s3UseARNRegionKey,
+ s3DisableMultiRegionAccessPointsKey,
+ ec2MetadataServiceEndpointModeKey,
+ ec2MetadataServiceEndpointKey,
+ useDualStackEndpoint,
+ useFIPSEndpointKey,
+ defaultsModeKey,
+ retryModeKey,
+ caBundleKey,
+
+ ssoSessionNameKey,
+ ssoAccountIDKey,
+ ssoRegionKey,
+ ssoRoleNameKey,
+ ssoStartURLKey,
+ }
+ for i := range stringKeys {
+ if err := mergeStringKey(&srcSection, &dstSection, sectionName, stringKeys[i]); err != nil {
+ return err
+ }
+ }
+
+ intKeys := []string{
+ roleDurationSecondsKey,
+ retryMaxAttemptsKey,
+ }
+ for i := range intKeys {
+ if err := mergeIntKey(&srcSection, &dstSection, sectionName, intKeys[i]); err != nil {
+ return err
+ }
+ }
+
+ // set srcSection on dst srcSection
+ *dst = dst.SetSection(sectionName, dstSection)
+ }
+
+ return nil
+}
+
+func mergeStringKey(srcSection *ini.Section, dstSection *ini.Section, sectionName, key string) error {
+ if srcSection.Has(key) {
+ srcValue := srcSection.String(key)
+ val, err := ini.NewStringValue(srcValue)
+ if err != nil {
+ return fmt.Errorf("error merging %s, %w", key, err)
+ }
+
+ if dstSection.Has(key) {
+ dstSection.Logs = append(dstSection.Logs, newMergeKeyLogMessage(sectionName, key,
+ dstSection.SourceFile[key], srcSection.SourceFile[key]))
+ }
+
+ dstSection.UpdateValue(key, val)
+ dstSection.UpdateSourceFile(key, srcSection.SourceFile[key])
+ }
+ return nil
+}
+
+func mergeIntKey(srcSection *ini.Section, dstSection *ini.Section, sectionName, key string) error {
+ if srcSection.Has(key) {
+ srcValue := srcSection.Int(key)
+ v, err := ini.NewIntValue(srcValue)
+ if err != nil {
+ return fmt.Errorf("error merging %s, %w", key, err)
+ }
+
+ if dstSection.Has(key) {
+ dstSection.Logs = append(dstSection.Logs, newMergeKeyLogMessage(sectionName, key,
+ dstSection.SourceFile[key], srcSection.SourceFile[key]))
+
+ }
+
+ dstSection.UpdateValue(key, v)
+ dstSection.UpdateSourceFile(key, srcSection.SourceFile[key])
+ }
+ return nil
+}
+
+func newMergeKeyLogMessage(sectionName, key, dstSourceFile, srcSourceFile string) string {
+ return fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+
+ "with a %v value found in a duplicate profile defined at file %v. \n",
+ sectionName, key, dstSourceFile, key, srcSourceFile)
+}
+
+// Returns an error if all of the files fail to load. If at least one file is
+// successfully loaded and contains the profile, no error will be returned.
+func (c *SharedConfig) setFromIniSections(profiles map[string]struct{}, profile string,
+ sections ini.Sections, logger logging.Logger) error {
+ c.Profile = profile
+
+ section, ok := sections.GetSection(profile)
+ if !ok {
+ return SharedConfigProfileNotExistError{
+ Profile: profile,
+ }
+ }
+
+ // if logs are appended to the section, log them
+ if section.Logs != nil && logger != nil {
+ for _, log := range section.Logs {
+ logger.Logf(logging.Debug, log)
+ }
+ }
+
+ // set config from the provided INI section
+ err := c.setFromIniSection(profile, section)
+ if err != nil {
+ return fmt.Errorf("error fetching config from profile, %v, %w", profile, err)
+ }
+
+ if _, ok := profiles[profile]; ok {
+ // if this is the second instance of the profile the Assume Role
+ // options must be cleared because they are only valid for the
+ // first reference of a profile. The self linked instance of the
+ // profile only have credential provider options.
+ c.clearAssumeRoleOptions()
+ } else {
+ // First time a profile has been seen, It must either be a assume role
+ // credentials, or SSO. Assert if the credential type requires a role ARN,
+ // the ARN is also set, or validate that the SSO configuration is complete.
+ if err := c.validateCredentialsConfig(profile); err != nil {
+ return err
+ }
+ }
+
+ // if not top level profile and has credentials, return with credentials.
+ if len(profiles) != 0 && c.Credentials.HasKeys() {
+ return nil
+ }
+
+ profiles[profile] = struct{}{}
+
+ // validate no colliding credentials type are present
+ if err := c.validateCredentialType(); err != nil {
+ return err
+ }
+
+ // Link source profiles for assume roles
+ if len(c.SourceProfileName) != 0 {
+ // Linked profile via source_profile ignore credential provider
+ // options, the source profile must provide the credentials.
+ c.clearCredentialOptions()
+
+ srcCfg := &SharedConfig{}
+ err := srcCfg.setFromIniSections(profiles, c.SourceProfileName, sections, logger)
+ if err != nil {
+ // SourceProfileName that doesn't exist is an error in configuration.
+ if _, ok := err.(SharedConfigProfileNotExistError); ok {
+ err = SharedConfigAssumeRoleError{
+ RoleARN: c.RoleARN,
+ Profile: c.SourceProfileName,
+ Err: err,
+ }
+ }
+ return err
+ }
+
+ if !srcCfg.hasCredentials() {
+ return SharedConfigAssumeRoleError{
+ RoleARN: c.RoleARN,
+ Profile: c.SourceProfileName,
+ }
+ }
+
+ c.Source = srcCfg
+ }
+
+ // If the profile contains an SSO session parameter, the session MUST exist
+ // as a section in the config file. Load the SSO session using the name
+ // provided. If the session section is not found or incomplete an error
+ // will be returned.
+ if c.SSOSessionName != "" {
+ c.SSOSession, err = getSSOSession(c.SSOSessionName, sections, logger)
+ if err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func getSSOSession(name string, sections ini.Sections, logger logging.Logger) (*SSOSession, error) {
+ section, ok := sections.GetSection(ssoSectionPrefix + strings.TrimSpace(name))
+ if !ok {
+ return nil, fmt.Errorf("failed to find SSO session section, %v", name)
+ }
+
+ var ssoSession SSOSession
+ if err := ssoSession.setFromIniSection(section); err != nil {
+ return nil, fmt.Errorf("failed to load SSO session %v, %w", name, err)
+ }
+ ssoSession.Name = name
+
+ return &ssoSession, nil
+}
+
+// setFromIniSection loads the configuration from the profile section defined in
+// the provided INI file. A SharedConfig pointer type value is used so that
+// multiple config file loadings can be chained.
+//
+// Only loads complete logically grouped values, and will not set fields in cfg
+// for incomplete grouped values in the config. Such as credentials. For example
+// if a config file only includes aws_access_key_id but no aws_secret_access_key
+// the aws_access_key_id will be ignored.
+func (c *SharedConfig) setFromIniSection(profile string, section ini.Section) error {
+ if len(section.Name) == 0 {
+ sources := make([]string, 0)
+ for _, v := range section.SourceFile {
+ sources = append(sources, v)
+ }
+
+ return fmt.Errorf("parsing error : could not find profile section name after processing files: %v", sources)
+ }
+
+ if len(section.Errors) != 0 {
+ var errStatement string
+ for i, e := range section.Errors {
+ errStatement = fmt.Sprintf("%d, %v\n", i+1, e.Error())
+ }
+ return fmt.Errorf("Error using profile: \n %v", errStatement)
+ }
+
+ // Assume Role
+ updateString(&c.RoleARN, section, roleArnKey)
+ updateString(&c.ExternalID, section, externalIDKey)
+ updateString(&c.MFASerial, section, mfaSerialKey)
+ updateString(&c.RoleSessionName, section, roleSessionNameKey)
+ updateString(&c.SourceProfileName, section, sourceProfileKey)
+ updateString(&c.CredentialSource, section, credentialSourceKey)
+ updateString(&c.Region, section, regionKey)
+
+ // AWS Single Sign-On (AWS SSO)
+ // SSO session options
+ updateString(&c.SSOSessionName, section, ssoSessionNameKey)
+
+ // Legacy SSO session options
+ updateString(&c.SSORegion, section, ssoRegionKey)
+ updateString(&c.SSOStartURL, section, ssoStartURLKey)
+
+ // SSO fields not used
+ updateString(&c.SSOAccountID, section, ssoAccountIDKey)
+ updateString(&c.SSORoleName, section, ssoRoleNameKey)
+
+ if section.Has(roleDurationSecondsKey) {
+ d := time.Duration(section.Int(roleDurationSecondsKey)) * time.Second
+ c.RoleDurationSeconds = &d
+ }
+
+ updateString(&c.CredentialProcess, section, credentialProcessKey)
+ updateString(&c.WebIdentityTokenFile, section, webIdentityTokenFileKey)
+
+ updateEndpointDiscoveryType(&c.EnableEndpointDiscovery, section, enableEndpointDiscoveryKey)
+ updateBoolPtr(&c.S3UseARNRegion, section, s3UseARNRegionKey)
+ updateBoolPtr(&c.S3DisableMultiRegionAccessPoints, section, s3DisableMultiRegionAccessPointsKey)
+
+ if err := updateEC2MetadataServiceEndpointMode(&c.EC2IMDSEndpointMode, section, ec2MetadataServiceEndpointModeKey); err != nil {
+ return fmt.Errorf("failed to load %s from shared config, %v", ec2MetadataServiceEndpointModeKey, err)
+ }
+ updateString(&c.EC2IMDSEndpoint, section, ec2MetadataServiceEndpointKey)
+
+ updateUseDualStackEndpoint(&c.UseDualStackEndpoint, section, useDualStackEndpoint)
+ updateUseFIPSEndpoint(&c.UseFIPSEndpoint, section, useFIPSEndpointKey)
+
+ if err := updateDefaultsMode(&c.DefaultsMode, section, defaultsModeKey); err != nil {
+ return fmt.Errorf("failed to load %s from shared config, %w", defaultsModeKey, err)
+ }
+
+ if err := updateInt(&c.RetryMaxAttempts, section, retryMaxAttemptsKey); err != nil {
+ return fmt.Errorf("failed to load %s from shared config, %w", retryMaxAttemptsKey, err)
+ }
+ if err := updateRetryMode(&c.RetryMode, section, retryModeKey); err != nil {
+ return fmt.Errorf("failed to load %s from shared config, %w", retryModeKey, err)
+ }
+
+ updateString(&c.CustomCABundle, section, caBundleKey)
+
+ // Shared Credentials
+ creds := aws.Credentials{
+ AccessKeyID: section.String(accessKeyIDKey),
+ SecretAccessKey: section.String(secretAccessKey),
+ SessionToken: section.String(sessionTokenKey),
+ Source: fmt.Sprintf("SharedConfigCredentials: %s", section.SourceFile[accessKeyIDKey]),
+ }
+
+ if creds.HasKeys() {
+ c.Credentials = creds
+ }
+
+ return nil
+}
+
+func updateDefaultsMode(mode *aws.DefaultsMode, section ini.Section, key string) error {
+ if !section.Has(key) {
+ return nil
+ }
+ value := section.String(key)
+ if ok := mode.SetFromString(value); !ok {
+ return fmt.Errorf("invalid value: %s", value)
+ }
+ return nil
+}
+
+func updateRetryMode(mode *aws.RetryMode, section ini.Section, key string) (err error) {
+ if !section.Has(key) {
+ return nil
+ }
+ value := section.String(key)
+ if *mode, err = aws.ParseRetryMode(value); err != nil {
+ return err
+ }
+ return nil
+}
+
+func updateEC2MetadataServiceEndpointMode(endpointMode *imds.EndpointModeState, section ini.Section, key string) error {
+ if !section.Has(key) {
+ return nil
+ }
+ value := section.String(key)
+ return endpointMode.SetFromString(value)
+}
+
+func (c *SharedConfig) validateCredentialsConfig(profile string) error {
+ if err := c.validateCredentialsRequireARN(profile); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (c *SharedConfig) validateCredentialsRequireARN(profile string) error {
+ var credSource string
+
+ switch {
+ case len(c.SourceProfileName) != 0:
+ credSource = sourceProfileKey
+ case len(c.CredentialSource) != 0:
+ credSource = credentialSourceKey
+ case len(c.WebIdentityTokenFile) != 0:
+ credSource = webIdentityTokenFileKey
+ }
+
+ if len(credSource) != 0 && len(c.RoleARN) == 0 {
+ return CredentialRequiresARNError{
+ Type: credSource,
+ Profile: profile,
+ }
+ }
+
+ return nil
+}
+
+func (c *SharedConfig) validateCredentialType() error {
+ // Only one or no credential type can be defined.
+ if !oneOrNone(
+ len(c.SourceProfileName) != 0,
+ len(c.CredentialSource) != 0,
+ len(c.CredentialProcess) != 0,
+ len(c.WebIdentityTokenFile) != 0,
+ ) {
+ return fmt.Errorf("only one credential type may be specified per profile: source profile, credential source, credential process, web identity token, or sso")
+ }
+
+ return nil
+}
+
+func (c *SharedConfig) validateSSOConfiguration() error {
+ if !c.hasSSOConfiguration() {
+ return nil
+ }
+
+ var missing []string
+
+ if len(c.SSORegion) == 0 {
+ missing = append(missing, ssoRegionKey)
+ }
+
+ if len(c.SSOStartURL) == 0 {
+ missing = append(missing, ssoStartURLKey)
+ }
+
+ if len(missing) > 0 {
+ return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s",
+ c.Profile, strings.Join(missing, ", "))
+ }
+
+ return nil
+}
+
+func (c *SharedConfig) hasCredentials() bool {
+ switch {
+ case len(c.SourceProfileName) != 0:
+ case len(c.CredentialSource) != 0:
+ case len(c.CredentialProcess) != 0:
+ case len(c.WebIdentityTokenFile) != 0:
+ case c.hasSSOConfiguration():
+ case c.Credentials.HasKeys():
+ default:
+ return false
+ }
+
+ return true
+}
+
+func (c *SharedConfig) hasSSOConfiguration() bool {
+ switch {
+ case len(c.SSOAccountID) != 0:
+ case len(c.SSORegion) != 0:
+ case len(c.SSORoleName) != 0:
+ case len(c.SSOStartURL) != 0:
+ default:
+ return false
+ }
+ return true
+}
+
+func (c *SharedConfig) clearAssumeRoleOptions() {
+ c.RoleARN = ""
+ c.ExternalID = ""
+ c.MFASerial = ""
+ c.RoleSessionName = ""
+ c.SourceProfileName = ""
+}
+
+func (c *SharedConfig) clearCredentialOptions() {
+ c.CredentialSource = ""
+ c.CredentialProcess = ""
+ c.WebIdentityTokenFile = ""
+ c.Credentials = aws.Credentials{}
+ c.SSOAccountID = ""
+ c.SSORegion = ""
+ c.SSORoleName = ""
+ c.SSOStartURL = ""
+}
+
+// SharedConfigLoadError is an error for the shared config file failed to load.
+type SharedConfigLoadError struct {
+ Filename string
+ Err error
+}
+
+// Unwrap returns the underlying error that caused the failure.
+func (e SharedConfigLoadError) Unwrap() error {
+ return e.Err
+}
+
+func (e SharedConfigLoadError) Error() string {
+ return fmt.Sprintf("failed to load shared config file, %s, %v", e.Filename, e.Err)
+}
+
+// SharedConfigProfileNotExistError is an error for the shared config when
+// the profile was not find in the config file.
+type SharedConfigProfileNotExistError struct {
+ Filename []string
+ Profile string
+ Err error
+}
+
+// Unwrap returns the underlying error that caused the failure.
+func (e SharedConfigProfileNotExistError) Unwrap() error {
+ return e.Err
+}
+
+func (e SharedConfigProfileNotExistError) Error() string {
+ return fmt.Sprintf("failed to get shared config profile, %s", e.Profile)
+}
+
+// SharedConfigAssumeRoleError is an error for the shared config when the
+// profile contains assume role information, but that information is invalid
+// or not complete.
+type SharedConfigAssumeRoleError struct {
+ Profile string
+ RoleARN string
+ Err error
+}
+
+// Unwrap returns the underlying error that caused the failure.
+func (e SharedConfigAssumeRoleError) Unwrap() error {
+ return e.Err
+}
+
+func (e SharedConfigAssumeRoleError) Error() string {
+ return fmt.Sprintf("failed to load assume role %s, of profile %s, %v",
+ e.RoleARN, e.Profile, e.Err)
+}
+
+// CredentialRequiresARNError provides the error for shared config credentials
+// that are incorrectly configured in the shared config or credentials file.
+type CredentialRequiresARNError struct {
+ // type of credentials that were configured.
+ Type string
+
+ // Profile name the credentials were in.
+ Profile string
+}
+
+// Error satisfies the error interface.
+func (e CredentialRequiresARNError) Error() string {
+ return fmt.Sprintf(
+ "credential type %s requires role_arn, profile %s",
+ e.Type, e.Profile,
+ )
+}
+
+func userHomeDir() string {
+ // Ignore errors since we only care about Windows and *nix.
+ home, _ := os.UserHomeDir()
+
+ if len(home) > 0 {
+ return home
+ }
+
+ currUser, _ := user.Current()
+ if currUser != nil {
+ home = currUser.HomeDir
+ }
+
+ return home
+}
+
+func oneOrNone(bs ...bool) bool {
+ var count int
+
+ for _, b := range bs {
+ if b {
+ count++
+ if count > 1 {
+ return false
+ }
+ }
+ }
+
+ return true
+}
+
+// updateString will only update the dst with the value in the section key, key
+// is present in the section.
+func updateString(dst *string, section ini.Section, key string) {
+ if !section.Has(key) {
+ return
+ }
+ *dst = section.String(key)
+}
+
+// updateInt will only update the dst with the value in the section key, key
+// is present in the section.
+//
+// Down casts the INI integer value from a int64 to an int, which could be
+// different bit size depending on platform.
+func updateInt(dst *int, section ini.Section, key string) error {
+ if !section.Has(key) {
+ return nil
+ }
+ if vt, _ := section.ValueType(key); vt != ini.IntegerType {
+ return fmt.Errorf("invalid value %s=%s, expect integer",
+ key, section.String(key))
+
+ }
+ *dst = int(section.Int(key))
+ return nil
+}
+
+// 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) {
+ if !section.Has(key) {
+ return
+ }
+ *dst = new(bool)
+ **dst = section.Bool(key)
+}
+
+// updateEndpointDiscoveryType will only update the dst with the value in the section, if
+// a valid key and corresponding EndpointDiscoveryType is found.
+func updateEndpointDiscoveryType(dst *aws.EndpointDiscoveryEnableState, section ini.Section, key string) {
+ if !section.Has(key) {
+ return
+ }
+
+ value := section.String(key)
+ if len(value) == 0 {
+ return
+ }
+
+ switch {
+ case strings.EqualFold(value, endpointDiscoveryDisabled):
+ *dst = aws.EndpointDiscoveryDisabled
+ case strings.EqualFold(value, endpointDiscoveryEnabled):
+ *dst = aws.EndpointDiscoveryEnabled
+ case strings.EqualFold(value, endpointDiscoveryAuto):
+ *dst = aws.EndpointDiscoveryAuto
+ }
+}
+
+// updateEndpointDiscoveryType will only update the dst with the value in the section, if
+// a valid key and corresponding EndpointDiscoveryType is found.
+func updateUseDualStackEndpoint(dst *aws.DualStackEndpointState, section ini.Section, key string) {
+ if !section.Has(key) {
+ return
+ }
+
+ if section.Bool(key) {
+ *dst = aws.DualStackEndpointStateEnabled
+ } else {
+ *dst = aws.DualStackEndpointStateDisabled
+ }
+
+ return
+}
+
+// updateEndpointDiscoveryType will only update the dst with the value in the section, if
+// a valid key and corresponding EndpointDiscoveryType is found.
+func updateUseFIPSEndpoint(dst *aws.FIPSEndpointState, section ini.Section, key string) {
+ if !section.Has(key) {
+ return
+ }
+
+ if section.Bool(key) {
+ *dst = aws.FIPSEndpointStateEnabled
+ } else {
+ *dst = aws.FIPSEndpointStateDisabled
+ }
+
+ return
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
new file mode 100644
index 000000000..e16d30c6f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
@@ -0,0 +1,197 @@
+# v1.12.20 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.19 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.18 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.17 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.16 (2022-08-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.15 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.14 (2022-08-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.13 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.12 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.11 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.10 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.9 (2022-07-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.8 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.7 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.6 (2022-06-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.5 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.4 (2022-05-26)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.3 (2022-05-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.2 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.1 (2022-05-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.0 (2022-04-25)
+
+* **Feature**: Adds Duration and Policy options that can be used when creating stscreds.WebIdentityRoleProvider credentials provider.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.2 (2022-03-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.1 (2022-03-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.0 (2022-03-23)
+
+* **Feature**: Update `ec2rolecreds` package's `Provider` to implememnt support for CredentialsCache new optional caching strategy interfaces, HandleFailRefreshCredentialsCacheStrategy and AdjustExpiresByCredentialsCacheStrategy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.0 (2022-03-08)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.0 (2022-02-24)
+
+* **Feature**: Adds support for `SourceIdentity` to `stscreds.AssumeRoleProvider` [#1588](https://github.com/aws/aws-sdk-go-v2/pull/1588). Fixes [#1575](https://github.com/aws/aws-sdk-go-v2/issues/1575)
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.0 (2022-01-14)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.0 (2022-01-07)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.5 (2021-12-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.4 (2021-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.3 (2021-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.2 (2021-11-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.1 (2021-11-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.0 (2021-11-06)
+
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.0 (2021-10-21)
+
+* **Feature**: Updated to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.3 (2021-10-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.2 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.1 (2021-09-10)
+
+* **Documentation**: Fixes the AssumeRoleProvider's documentation for using custom TokenProviders.
+
+# v1.4.0 (2021-08-27)
+
+* **Feature**: Adds support for Tags and TransitiveTagKeys to stscreds.AssumeRoleProvider. Closes https://github.com/aws/aws-sdk-go-v2/issues/723
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.3 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.2 (2021-08-04)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.1 (2021-07-15)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2021-06-25)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Bug Fix**: Fixed example usages of aws.CredentialsCache ([#1275](https://github.com/aws/aws-sdk-go-v2/pull/1275))
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.1 (2021-05-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/credentials/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/aws/aws-sdk-go-v2/credentials/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/doc.go
new file mode 100644
index 000000000..f6e2873ab
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/doc.go
@@ -0,0 +1,4 @@
+/*
+Package credentials provides types for retrieving credentials from credentials sources.
+*/
+package credentials
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go
new file mode 100644
index 000000000..72214bf40
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go
@@ -0,0 +1,58 @@
+// Package ec2rolecreds provides the credentials provider implementation for
+// retrieving AWS credentials from Amazon EC2 Instance Roles via Amazon EC2 IMDS.
+//
+// # Concurrency and caching
+//
+// The Provider is not safe to be used concurrently, and does not provide any
+// caching of credentials retrieved. You should wrap the Provider with a
+// `aws.CredentialsCache` to provide concurrency safety, and caching of
+// credentials.
+//
+// # Loading credentials with the SDK's AWS Config
+//
+// The EC2 Instance role credentials provider will automatically be the resolved
+// credential provider int he credential chain if no other credential provider is
+// resolved first.
+//
+// To explicitly instruct the SDK's credentials resolving to use the EC2 Instance
+// role for credentials, you specify a `credentials_source` property in the config
+// profile the SDK will load.
+//
+// [default]
+// credential_source = Ec2InstanceMetadata
+//
+// # Loading credentials with the Provider directly
+//
+// Another way to use the EC2 Instance role credentials provider is to create it
+// directly and assign it as the credentials provider for an API client.
+//
+// The following example creates a credentials provider for a command, and wraps
+// it with the CredentialsCache before assigning the provider to the Amazon S3 API
+// client's Credentials option.
+//
+// provider := imds.New(imds.Options{})
+//
+// // Create the service client value configured for credentials.
+// svc := s3.New(s3.Options{
+// Credentials: aws.NewCredentialsCache(provider),
+// })
+//
+// If you need more control, you can set the configuration options on the
+// credentials provider using the imds.Options type to configure the EC2 IMDS
+// API Client and ExpiryWindow of the retrieved credentials.
+//
+// provider := imds.New(imds.Options{
+// // See imds.Options type's documentation for more options available.
+// Client: imds.New(Options{
+// HTTPClient: customHTTPClient,
+// }),
+//
+// // Modify how soon credentials expire prior to their original expiry time.
+// ExpiryWindow: 5 * time.Minute,
+// })
+//
+// # EC2 IMDS API Client
+//
+// See the github.com/aws/aws-sdk-go-v2/feature/ec2/imds module for more details on
+// configuring the client, and options available.
+package ec2rolecreds
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go
new file mode 100644
index 000000000..5c699f166
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go
@@ -0,0 +1,229 @@
+package ec2rolecreds
+
+import (
+ "bufio"
+ "context"
+ "encoding/json"
+ "fmt"
+ "math"
+ "path"
+ "strings"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
+ sdkrand "github.com/aws/aws-sdk-go-v2/internal/rand"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// ProviderName provides a name of EC2Role provider
+const ProviderName = "EC2RoleProvider"
+
+// GetMetadataAPIClient provides the interface for an EC2 IMDS API client for the
+// GetMetadata operation.
+type GetMetadataAPIClient interface {
+ GetMetadata(context.Context, *imds.GetMetadataInput, ...func(*imds.Options)) (*imds.GetMetadataOutput, error)
+}
+
+// A Provider retrieves credentials from the EC2 service, and keeps track if
+// those credentials are expired.
+//
+// The New function must be used to create the with a custom EC2 IMDS client.
+//
+// p := &ec2rolecreds.New(func(o *ec2rolecreds.Options{
+// o.Client = imds.New(imds.Options{/* custom options */})
+// })
+type Provider struct {
+ options Options
+}
+
+// Options is a list of user settable options for setting the behavior of the Provider.
+type Options struct {
+ // The API client that will be used by the provider to make GetMetadata API
+ // calls to EC2 IMDS.
+ //
+ // If nil, the provider will default to the EC2 IMDS client.
+ Client GetMetadataAPIClient
+}
+
+// New returns an initialized Provider value configured to retrieve
+// credentials from EC2 Instance Metadata service.
+func New(optFns ...func(*Options)) *Provider {
+ options := Options{}
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.Client == nil {
+ options.Client = imds.New(imds.Options{})
+ }
+
+ return &Provider{
+ options: options,
+ }
+}
+
+// Retrieve retrieves credentials from the EC2 service. Error will be returned
+// if the request fails, or unable to extract the desired credentials.
+func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) {
+ credsList, err := requestCredList(ctx, p.options.Client)
+ if err != nil {
+ return aws.Credentials{Source: ProviderName}, err
+ }
+
+ if len(credsList) == 0 {
+ return aws.Credentials{Source: ProviderName},
+ fmt.Errorf("unexpected empty EC2 IMDS role list")
+ }
+ credsName := credsList[0]
+
+ roleCreds, err := requestCred(ctx, p.options.Client, credsName)
+ if err != nil {
+ return aws.Credentials{Source: ProviderName}, err
+ }
+
+ creds := aws.Credentials{
+ AccessKeyID: roleCreds.AccessKeyID,
+ SecretAccessKey: roleCreds.SecretAccessKey,
+ SessionToken: roleCreds.Token,
+ Source: ProviderName,
+
+ CanExpire: true,
+ Expires: roleCreds.Expiration,
+ }
+
+ // Cap role credentials Expires to 1 hour so they can be refreshed more
+ // often. Jitter will be applied credentials cache if being used.
+ if anHour := sdk.NowTime().Add(1 * time.Hour); creds.Expires.After(anHour) {
+ creds.Expires = anHour
+ }
+
+ return creds, nil
+}
+
+// HandleFailToRefresh will extend the credentials Expires time if it it is
+// expired. If the credentials will not expire within the minimum time, they
+// will be returned.
+//
+// If the credentials cannot expire, the original error will be returned.
+func (p *Provider) HandleFailToRefresh(ctx context.Context, prevCreds aws.Credentials, err error) (
+ aws.Credentials, error,
+) {
+ if !prevCreds.CanExpire {
+ return aws.Credentials{}, err
+ }
+
+ if prevCreds.Expires.After(sdk.NowTime().Add(5 * time.Minute)) {
+ return prevCreds, nil
+ }
+
+ newCreds := prevCreds
+ randFloat64, err := sdkrand.CryptoRandFloat64()
+ if err != nil {
+ return aws.Credentials{}, fmt.Errorf("failed to get random float, %w", err)
+ }
+
+ // Random distribution of [5,15) minutes.
+ expireOffset := time.Duration(randFloat64*float64(10*time.Minute)) + 5*time.Minute
+ newCreds.Expires = sdk.NowTime().Add(expireOffset)
+
+ logger := middleware.GetLogger(ctx)
+ logger.Logf(logging.Warn, "Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted again in %v minutes.", math.Floor(expireOffset.Minutes()))
+
+ return newCreds, nil
+}
+
+// AdjustExpiresBy will adds the passed in duration to the passed in
+// credential's Expires time, unless the time until Expires is less than 15
+// minutes. Returns the credentials, even if not updated.
+func (p *Provider) AdjustExpiresBy(creds aws.Credentials, dur time.Duration) (
+ aws.Credentials, error,
+) {
+ if !creds.CanExpire {
+ return creds, nil
+ }
+ if creds.Expires.Before(sdk.NowTime().Add(15 * time.Minute)) {
+ return creds, nil
+ }
+
+ creds.Expires = creds.Expires.Add(dur)
+ return creds, nil
+}
+
+// ec2RoleCredRespBody provides the shape for unmarshaling credential
+// request responses.
+type ec2RoleCredRespBody struct {
+ // Success State
+ Expiration time.Time
+ AccessKeyID string
+ SecretAccessKey string
+ Token string
+
+ // Error state
+ Code string
+ Message string
+}
+
+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(ctx context.Context, client GetMetadataAPIClient) ([]string, error) {
+ resp, err := client.GetMetadata(ctx, &imds.GetMetadataInput{
+ Path: iamSecurityCredsPath,
+ })
+ if err != nil {
+ return nil, fmt.Errorf("no EC2 IMDS role found, %w", err)
+ }
+ defer resp.Content.Close()
+
+ credsList := []string{}
+ s := bufio.NewScanner(resp.Content)
+ for s.Scan() {
+ credsList = append(credsList, s.Text())
+ }
+
+ if err := s.Err(); err != nil {
+ return nil, fmt.Errorf("failed to read EC2 IMDS role, %w", err)
+ }
+
+ return credsList, nil
+}
+
+// requestCred requests the credentials for a specific credentials from the EC2 service.
+//
+// If the credentials cannot be found, or there is an error reading the response
+// and error will be returned.
+func requestCred(ctx context.Context, client GetMetadataAPIClient, credsName string) (ec2RoleCredRespBody, error) {
+ resp, err := client.GetMetadata(ctx, &imds.GetMetadataInput{
+ Path: path.Join(iamSecurityCredsPath, credsName),
+ })
+ if err != nil {
+ return ec2RoleCredRespBody{},
+ fmt.Errorf("failed to get %s EC2 IMDS role credentials, %w",
+ credsName, err)
+ }
+ defer resp.Content.Close()
+
+ var respCreds ec2RoleCredRespBody
+ if err := json.NewDecoder(resp.Content).Decode(&respCreds); err != nil {
+ return ec2RoleCredRespBody{},
+ fmt.Errorf("failed to decode %s EC2 IMDS role credentials, %w",
+ credsName, err)
+ }
+
+ if !strings.EqualFold(respCreds.Code, "Success") {
+ // If an error code was returned something failed requesting the role.
+ return ec2RoleCredRespBody{},
+ fmt.Errorf("failed to get %s EC2 IMDS role credentials, %w",
+ credsName,
+ &smithy.GenericAPIError{Code: respCreds.Code, Message: respCreds.Message})
+ }
+
+ return respCreds, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go
new file mode 100644
index 000000000..60b8298f8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go
@@ -0,0 +1,148 @@
+package client
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ "github.com/aws/smithy-go"
+ smithymiddleware "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// ServiceID is the client identifer
+const ServiceID = "endpoint-credentials"
+
+// HTTPClient is a client for sending HTTP requests
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// Options is the endpoint client configurable options
+type Options struct {
+ // The endpoint to retrieve credentials from
+ Endpoint string
+
+ // The HTTP client to invoke API calls with. Defaults to client's default HTTP
+ // implementation if nil.
+ HTTPClient HTTPClient
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer.
+ Retryer aws.Retryer
+
+ // Set of options to modify how the credentials operation is invoked.
+ APIOptions []func(*smithymiddleware.Stack) error
+}
+
+// Copy creates a copy of the API options.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = make([]func(*smithymiddleware.Stack) error, len(o.APIOptions))
+ copy(to.APIOptions, o.APIOptions)
+ return to
+}
+
+// Client is an client for retrieving AWS credentials from an endpoint
+type Client struct {
+ options Options
+}
+
+// New constructs a new Client from the given options
+func New(options Options, optFns ...func(*Options)) *Client {
+ options = options.Copy()
+
+ if options.HTTPClient == nil {
+ options.HTTPClient = awshttp.NewBuildableClient()
+ }
+
+ if options.Retryer == nil {
+ options.Retryer = retry.NewStandard()
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ client := &Client{
+ options: options,
+ }
+
+ return client
+}
+
+// GetCredentialsInput is the input to send with the endpoint service to receive credentials.
+type GetCredentialsInput struct {
+ AuthorizationToken string
+}
+
+// GetCredentials retrieves credentials from credential endpoint
+func (c *Client) GetCredentials(ctx context.Context, params *GetCredentialsInput, optFns ...func(*Options)) (*GetCredentialsOutput, error) {
+ stack := smithymiddleware.NewStack("GetCredentials", smithyhttp.NewStackRequest)
+ options := c.options.Copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ stack.Serialize.Add(&serializeOpGetCredential{}, smithymiddleware.After)
+ stack.Build.Add(&buildEndpoint{Endpoint: options.Endpoint}, smithymiddleware.After)
+ stack.Deserialize.Add(&deserializeOpGetCredential{}, smithymiddleware.After)
+ retry.AddRetryMiddlewares(stack, retry.AddRetryMiddlewaresOptions{Retryer: options.Retryer})
+ middleware.AddSDKAgentKey(middleware.FeatureMetadata, ServiceID)
+ smithyhttp.AddErrorCloseResponseBodyMiddleware(stack)
+ smithyhttp.AddCloseResponseBodyMiddleware(stack)
+
+ for _, fn := range options.APIOptions {
+ if err := fn(stack); err != nil {
+ return nil, err
+ }
+ }
+
+ handler := smithymiddleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack)
+ result, _, err := handler.Handle(ctx, params)
+ if err != nil {
+ return nil, err
+ }
+
+ return result.(*GetCredentialsOutput), err
+}
+
+// GetCredentialsOutput is the response from the credential endpoint
+type GetCredentialsOutput struct {
+ Expiration *time.Time
+ AccessKeyID string
+ SecretAccessKey string
+ Token string
+}
+
+// EndpointError is an error returned from the endpoint service
+type EndpointError struct {
+ Code string `json:"code"`
+ Message string `json:"message"`
+ Fault smithy.ErrorFault `json:"-"`
+}
+
+// Error is the error mesage string
+func (e *EndpointError) Error() string {
+ return fmt.Sprintf("%s: %s", e.Code, e.Message)
+}
+
+// ErrorCode is the error code returned by the endpoint
+func (e *EndpointError) ErrorCode() string {
+ return e.Code
+}
+
+// ErrorMessage is the error message returned by the endpoint
+func (e *EndpointError) ErrorMessage() string {
+ return e.Message
+}
+
+// ErrorFault indicates error fault classification
+func (e *EndpointError) ErrorFault() smithy.ErrorFault {
+ return e.Fault
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go
new file mode 100644
index 000000000..40747a53c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go
@@ -0,0 +1,120 @@
+package client
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "net/url"
+
+ "github.com/aws/smithy-go"
+ smithymiddleware "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+type buildEndpoint struct {
+ Endpoint string
+}
+
+func (b *buildEndpoint) ID() string {
+ return "BuildEndpoint"
+}
+
+func (b *buildEndpoint) HandleBuild(ctx context.Context, in smithymiddleware.BuildInput, next smithymiddleware.BuildHandler) (
+ out smithymiddleware.BuildOutput, metadata smithymiddleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport, %T", in.Request)
+ }
+
+ if len(b.Endpoint) == 0 {
+ return out, metadata, fmt.Errorf("endpoint not provided")
+ }
+
+ parsed, err := url.Parse(b.Endpoint)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to parse endpoint, %w", err)
+ }
+
+ request.URL = parsed
+
+ return next.HandleBuild(ctx, in)
+}
+
+type serializeOpGetCredential struct{}
+
+func (s *serializeOpGetCredential) ID() string {
+ return "OperationSerializer"
+}
+
+func (s *serializeOpGetCredential) HandleSerialize(ctx context.Context, in smithymiddleware.SerializeInput, next smithymiddleware.SerializeHandler) (
+ out smithymiddleware.SerializeOutput, metadata smithymiddleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type, %T", in.Request)
+ }
+
+ params, ok := in.Parameters.(*GetCredentialsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters, %T", in.Parameters)
+ }
+
+ const acceptHeader = "Accept"
+ request.Header[acceptHeader] = append(request.Header[acceptHeader][:0], "application/json")
+
+ if len(params.AuthorizationToken) > 0 {
+ const authHeader = "Authorization"
+ request.Header[authHeader] = append(request.Header[authHeader][:0], params.AuthorizationToken)
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type deserializeOpGetCredential struct{}
+
+func (d *deserializeOpGetCredential) ID() string {
+ return "OperationDeserializer"
+}
+
+func (d *deserializeOpGetCredential) HandleDeserialize(ctx context.Context, in smithymiddleware.DeserializeInput, next smithymiddleware.DeserializeHandler) (
+ out smithymiddleware.DeserializeOutput, metadata smithymiddleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, deserializeError(response)
+ }
+
+ var shape *GetCredentialsOutput
+ if err = json.NewDecoder(response.Body).Decode(&shape); err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize json response, %w", err)}
+ }
+
+ out.Result = shape
+ return out, metadata, err
+}
+
+func deserializeError(response *smithyhttp.Response) error {
+ var errShape *EndpointError
+ err := json.NewDecoder(response.Body).Decode(&errShape)
+ if err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode error message, %w", err)}
+ }
+
+ if response.StatusCode >= 500 {
+ errShape.Fault = smithy.FaultServer
+ } else {
+ errShape.Fault = smithy.FaultClient
+ }
+
+ return errShape
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go
new file mode 100644
index 000000000..adc7fc6b0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go
@@ -0,0 +1,136 @@
+// Package endpointcreds provides support for retrieving credentials from an
+// arbitrary HTTP endpoint.
+//
+// The credentials endpoint Provider can receive both static and refreshable
+// credentials that will expire. Credentials are static when an "Expiration"
+// value is not provided in the endpoint's response.
+//
+// Static credentials will never expire once they have been retrieved. The format
+// of the static credentials response:
+//
+// {
+// "AccessKeyId" : "MUA...",
+// "SecretAccessKey" : "/7PC5om....",
+// }
+//
+// Refreshable credentials will expire within the "ExpiryWindow" of the Expiration
+// value in the response. The format of the refreshable credentials response:
+//
+// {
+// "AccessKeyId" : "MUA...",
+// "SecretAccessKey" : "/7PC5om....",
+// "Token" : "AQoDY....=",
+// "Expiration" : "2016-02-25T06:03:31Z"
+// }
+//
+// Errors should be returned in the following format and only returned with 400
+// or 500 HTTP status codes.
+//
+// {
+// "code": "ErrorCode",
+// "message": "Helpful error message."
+// }
+package endpointcreds
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// ProviderName is the name of the credentials provider.
+const ProviderName = `CredentialsEndpointProvider`
+
+type getCredentialsAPIClient interface {
+ GetCredentials(context.Context, *client.GetCredentialsInput, ...func(*client.Options)) (*client.GetCredentialsOutput, error)
+}
+
+// Provider satisfies the aws.CredentialsProvider interface, and is a client to
+// retrieve credentials from an arbitrary endpoint.
+type Provider struct {
+ // The AWS Client to make HTTP requests to the endpoint with. The endpoint
+ // the request will be made to is provided by the aws.Config's
+ // EndpointResolver.
+ client getCredentialsAPIClient
+
+ options Options
+}
+
+// HTTPClient is a client for sending HTTP requests
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// Options is structure of configurable options for Provider
+type Options struct {
+ // Endpoint to retrieve credentials from. Required
+ Endpoint string
+
+ // HTTPClient to handle sending HTTP requests to the target endpoint.
+ HTTPClient HTTPClient
+
+ // Set of options to modify how the credentials operation is invoked.
+ APIOptions []func(*middleware.Stack) error
+
+ // The Retryer to be used for determining whether a failed requested should be retried
+ Retryer aws.Retryer
+
+ // Optional authorization token value if set will be used as the value of
+ // the Authorization header of the endpoint credential request.
+ AuthorizationToken string
+}
+
+// New returns a credentials Provider for retrieving AWS credentials
+// from arbitrary endpoint.
+func New(endpoint string, optFns ...func(*Options)) *Provider {
+ o := Options{
+ Endpoint: endpoint,
+ }
+
+ for _, fn := range optFns {
+ fn(&o)
+ }
+
+ p := &Provider{
+ client: client.New(client.Options{
+ HTTPClient: o.HTTPClient,
+ Endpoint: o.Endpoint,
+ APIOptions: o.APIOptions,
+ Retryer: o.Retryer,
+ }),
+ options: o,
+ }
+
+ return p
+}
+
+// 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(ctx context.Context) (aws.Credentials, error) {
+ resp, err := p.getCredentials(ctx)
+ if err != nil {
+ return aws.Credentials{}, fmt.Errorf("failed to load credentials, %w", err)
+ }
+
+ creds := aws.Credentials{
+ AccessKeyID: resp.AccessKeyID,
+ SecretAccessKey: resp.SecretAccessKey,
+ SessionToken: resp.Token,
+ Source: ProviderName,
+ }
+
+ if resp.Expiration != nil {
+ creds.CanExpire = true
+ creds.Expires = *resp.Expiration
+ }
+
+ return creds, nil
+}
+
+func (p *Provider) getCredentials(ctx context.Context) (*client.GetCredentialsOutput, error) {
+ return p.client.GetCredentials(ctx, &client.GetCredentialsInput{AuthorizationToken: p.options.AuthorizationToken})
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
new file mode 100644
index 000000000..db136bfc4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package credentials
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.12.20"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go
new file mode 100644
index 000000000..a3137b8fa
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go
@@ -0,0 +1,92 @@
+// Package processcreds is a credentials provider to retrieve credentials from a
+// external CLI invoked process.
+//
+// WARNING: The following describes a method of sourcing credentials from an external
+// process. This can potentially be dangerous, so proceed with caution. Other
+// credential providers should be preferred if at all possible. If using this
+// option, you should make sure that the config file is as locked down as possible
+// using security best practices for your operating system.
+//
+// # Concurrency and caching
+//
+// The Provider is not safe to be used concurrently, and does not provide any
+// caching of credentials retrieved. You should wrap the Provider with a
+// `aws.CredentialsCache` to provide concurrency safety, and caching of
+// credentials.
+//
+// # Loading credentials with the SDKs AWS Config
+//
+// You can use credentials from a AWS shared config `credential_process` in a
+// variety of ways.
+//
+// One way is to setup your shared config file, located in the default
+// location, with the `credential_process` key and the command you want to be
+// called. You also need to set the AWS_SDK_LOAD_CONFIG environment variable
+// (e.g., `export AWS_SDK_LOAD_CONFIG=1`) to use the shared config file.
+//
+// [default]
+// credential_process = /command/to/call
+//
+// Loading configuration using external will use the credential process to
+// retrieve credentials. NOTE: If there are credentials in the profile you are
+// using, the credential process will not be used.
+//
+// // Initialize a session to load credentials.
+// cfg, _ := config.LoadDefaultConfig(context.TODO())
+//
+// // Create S3 service client to use the credentials.
+// svc := s3.NewFromConfig(cfg)
+//
+// # Loading credentials with the Provider directly
+//
+// Another way to use the credentials process provider is by using the
+// `NewProvider` constructor to create the provider and providing a it with a
+// command to be executed to retrieve credentials.
+//
+// The following example creates a credentials provider for a command, and wraps
+// it with the CredentialsCache before assigning the provider to the Amazon S3 API
+// client's Credentials option.
+//
+// // Create credentials using the Provider.
+// provider := processcreds.NewProvider("/path/to/command")
+//
+// // Create the service client value configured for credentials.
+// svc := s3.New(s3.Options{
+// Credentials: aws.NewCredentialsCache(provider),
+// })
+//
+// If you need more control, you can set any configurable options in the
+// credentials using one or more option functions.
+//
+// provider := processcreds.NewProvider("/path/to/command",
+// func(o *processcreds.Options) {
+// // Override the provider's default timeout
+// o.Timeout = 2 * time.Minute
+// })
+//
+// You can also use your own `exec.Cmd` value by satisfying a value that satisfies
+// the `NewCommandBuilder` interface and use the `NewProviderCommand` constructor.
+//
+// // Create an exec.Cmd
+// cmdBuilder := processcreds.NewCommandBuilderFunc(
+// func(ctx context.Context) (*exec.Cmd, error) {
+// cmd := exec.CommandContext(ctx,
+// "customCLICommand",
+// "-a", "argument",
+// )
+// cmd.Env = []string{
+// "ENV_VAR_FOO=value",
+// "ENV_VAR_BAR=other_value",
+// }
+//
+// return cmd, nil
+// },
+// )
+//
+// // Create credentials using your exec.Cmd and custom timeout
+// provider := processcreds.NewProviderCommand(cmdBuilder,
+// func(opt *processcreds.Provider) {
+// // optionally override the provider's default timeout
+// opt.Timeout = 1 * time.Second
+// })
+package processcreds
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go
new file mode 100644
index 000000000..3921da34c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go
@@ -0,0 +1,269 @@
+package processcreds
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "os"
+ "os/exec"
+ "runtime"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/internal/sdkio"
+)
+
+const (
+ // ProviderName is the name this credentials provider will label any
+ // returned credentials Value with.
+ ProviderName = `ProcessProvider`
+
+ // DefaultTimeout default limit on time a process can run.
+ DefaultTimeout = time.Duration(1) * time.Minute
+)
+
+// ProviderError is an error indicating failure initializing or executing the
+// process credentials provider
+type ProviderError struct {
+ Err error
+}
+
+// Error returns the error message.
+func (e *ProviderError) Error() string {
+ return fmt.Sprintf("process provider error: %v", e.Err)
+}
+
+// Unwrap returns the underlying error the provider error wraps.
+func (e *ProviderError) Unwrap() error {
+ return e.Err
+}
+
+// Provider satisfies the credentials.Provider interface, and is a
+// client to retrieve credentials from a process.
+type Provider struct {
+ // Provides a constructor for exec.Cmd that are invoked by the provider for
+ // retrieving credentials. Use this to provide custom creation of exec.Cmd
+ // with things like environment variables, or other configuration.
+ //
+ // The provider defaults to the DefaultNewCommand function.
+ commandBuilder NewCommandBuilder
+
+ options Options
+}
+
+// Options is the configuration options for configuring the Provider.
+type Options struct {
+ // Timeout limits the time a process can run.
+ Timeout time.Duration
+}
+
+// NewCommandBuilder provides the interface for specifying how command will be
+// created that the Provider will use to retrieve credentials with.
+type NewCommandBuilder interface {
+ NewCommand(context.Context) (*exec.Cmd, error)
+}
+
+// NewCommandBuilderFunc provides a wrapper type around a function pointer to
+// satisfy the NewCommandBuilder interface.
+type NewCommandBuilderFunc func(context.Context) (*exec.Cmd, error)
+
+// NewCommand calls the underlying function pointer the builder was initialized with.
+func (fn NewCommandBuilderFunc) NewCommand(ctx context.Context) (*exec.Cmd, error) {
+ return fn(ctx)
+}
+
+// DefaultNewCommandBuilder provides the default NewCommandBuilder
+// implementation used by the provider. It takes a command and arguments to
+// invoke. The command will also be initialized with the current process
+// environment variables, stderr, and stdin pipes.
+type DefaultNewCommandBuilder struct {
+ Args []string
+}
+
+// NewCommand returns an initialized exec.Cmd with the builder's initialized
+// Args. The command is also initialized current process environment variables,
+// stderr, and stdin pipes.
+func (b DefaultNewCommandBuilder) NewCommand(ctx context.Context) (*exec.Cmd, error) {
+ var cmdArgs []string
+ if runtime.GOOS == "windows" {
+ cmdArgs = []string{"cmd.exe", "/C"}
+ } else {
+ cmdArgs = []string{"sh", "-c"}
+ }
+
+ if len(b.Args) == 0 {
+ return nil, &ProviderError{
+ Err: fmt.Errorf("failed to prepare command: command must not be empty"),
+ }
+ }
+
+ cmdArgs = append(cmdArgs, b.Args...)
+ cmd := exec.CommandContext(ctx, cmdArgs[0], cmdArgs[1:]...)
+ cmd.Env = os.Environ()
+
+ cmd.Stderr = os.Stderr // display stderr on console for MFA
+ cmd.Stdin = os.Stdin // enable stdin for MFA
+
+ return cmd, nil
+}
+
+// NewProvider returns a pointer to a new Credentials object wrapping the
+// Provider.
+//
+// The provider defaults to the DefaultNewCommandBuilder for creating command
+// the Provider will use to retrieve credentials with.
+func NewProvider(command string, options ...func(*Options)) *Provider {
+ var args []string
+
+ // Ensure that the command arguments are not set if the provided command is
+ // empty. This will error out when the command is executed since no
+ // arguments are specified.
+ if len(command) > 0 {
+ args = []string{command}
+ }
+
+ commanBuilder := DefaultNewCommandBuilder{
+ Args: args,
+ }
+ return NewProviderCommand(commanBuilder, options...)
+}
+
+// NewProviderCommand returns a pointer to a new Credentials object with the
+// specified command, and default timeout duration. Use this to provide custom
+// creation of exec.Cmd for options like environment variables, or other
+// configuration.
+func NewProviderCommand(builder NewCommandBuilder, options ...func(*Options)) *Provider {
+ p := &Provider{
+ commandBuilder: builder,
+ options: Options{
+ Timeout: DefaultTimeout,
+ },
+ }
+
+ for _, option := range options {
+ option(&p.options)
+ }
+
+ return p
+}
+
+type credentialProcessResponse struct {
+ Version int
+ AccessKeyID string `json:"AccessKeyId"`
+ SecretAccessKey string
+ SessionToken string
+ Expiration *time.Time
+}
+
+// Retrieve executes the credential process command and returns the
+// credentials, or error if the command fails.
+func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) {
+ out, err := p.executeCredentialProcess(ctx)
+ if err != nil {
+ return aws.Credentials{Source: ProviderName}, err
+ }
+
+ // Serialize and validate response
+ resp := &credentialProcessResponse{}
+ if err = json.Unmarshal(out, resp); err != nil {
+ return aws.Credentials{Source: ProviderName}, &ProviderError{
+ Err: fmt.Errorf("parse failed of process output: %s, error: %w", out, err),
+ }
+ }
+
+ if resp.Version != 1 {
+ return aws.Credentials{Source: ProviderName}, &ProviderError{
+ Err: fmt.Errorf("wrong version in process output (not 1)"),
+ }
+ }
+
+ if len(resp.AccessKeyID) == 0 {
+ return aws.Credentials{Source: ProviderName}, &ProviderError{
+ Err: fmt.Errorf("missing AccessKeyId in process output"),
+ }
+ }
+
+ if len(resp.SecretAccessKey) == 0 {
+ return aws.Credentials{Source: ProviderName}, &ProviderError{
+ Err: fmt.Errorf("missing SecretAccessKey in process output"),
+ }
+ }
+
+ creds := aws.Credentials{
+ Source: ProviderName,
+ AccessKeyID: resp.AccessKeyID,
+ SecretAccessKey: resp.SecretAccessKey,
+ SessionToken: resp.SessionToken,
+ }
+
+ // Handle expiration
+ if resp.Expiration != nil {
+ creds.CanExpire = true
+ creds.Expires = *resp.Expiration
+ }
+
+ return creds, nil
+}
+
+// executeCredentialProcess starts the credential process on the OS and
+// returns the results or an error.
+func (p *Provider) executeCredentialProcess(ctx context.Context) ([]byte, error) {
+ if p.options.Timeout >= 0 {
+ var cancelFunc func()
+ ctx, cancelFunc = context.WithTimeout(ctx, p.options.Timeout)
+ defer cancelFunc()
+ }
+
+ cmd, err := p.commandBuilder.NewCommand(ctx)
+ if err != nil {
+ return nil, err
+ }
+
+ // get creds json on process's stdout
+ output := bytes.NewBuffer(make([]byte, 0, int(8*sdkio.KibiByte)))
+ if cmd.Stdout != nil {
+ cmd.Stdout = io.MultiWriter(cmd.Stdout, output)
+ } else {
+ cmd.Stdout = output
+ }
+
+ execCh := make(chan error, 1)
+ go executeCommand(cmd, execCh)
+
+ select {
+ case execError := <-execCh:
+ if execError == nil {
+ break
+ }
+ select {
+ case <-ctx.Done():
+ return output.Bytes(), &ProviderError{
+ Err: fmt.Errorf("credential process timed out: %w", execError),
+ }
+ default:
+ return output.Bytes(), &ProviderError{
+ Err: fmt.Errorf("error in credential_process: %w", execError),
+ }
+ }
+ }
+
+ out := output.Bytes()
+ if runtime.GOOS == "windows" {
+ // windows adds slashes to quotes
+ out = bytes.ReplaceAll(out, []byte(`\"`), []byte(`"`))
+ }
+
+ return out, nil
+}
+
+func executeCommand(cmd *exec.Cmd, exec chan error) {
+ // Start the command
+ err := cmd.Start()
+ if err == nil {
+ err = cmd.Wait()
+ }
+
+ exec <- err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go
new file mode 100644
index 000000000..43e5676d3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go
@@ -0,0 +1,71 @@
+// Package ssocreds provides a credential provider for retrieving temporary AWS
+// credentials using an SSO access token.
+//
+// IMPORTANT: The provider in this package does not initiate or perform the AWS
+// SSO login flow. The SDK provider expects that you have already performed the
+// SSO login flow using AWS CLI using the "aws sso login" command, or by some
+// other mechanism. The provider must find a valid non-expired access token for
+// the AWS SSO user portal URL in ~/.aws/sso/cache. If a cached token is not
+// found, it is expired, or the file is malformed an error will be returned.
+//
+// # Loading AWS SSO credentials with the AWS shared configuration file
+//
+// You can use configure AWS SSO credentials from the AWS shared configuration file by
+// providing the specifying the required keys in the profile:
+//
+// sso_account_id
+// sso_region
+// sso_role_name
+// sso_start_url
+//
+// For example, the following defines a profile "devsso" and specifies the AWS
+// SSO parameters that defines the target account, role, sign-on portal, and
+// the region where the user portal is located. Note: all SSO arguments must be
+// provided, or an error will be returned.
+//
+// [profile devsso]
+// sso_start_url = https://my-sso-portal.awsapps.com/start
+// sso_role_name = SSOReadOnlyRole
+// sso_region = us-east-1
+// sso_account_id = 123456789012
+//
+// Using the config module, you can load the AWS SDK shared configuration, and
+// specify that this profile be used to retrieve credentials. For example:
+//
+// config, err := config.LoadDefaultConfig(context.TODO(), config.WithSharedConfigProfile("devsso"))
+// if err != nil {
+// return err
+// }
+//
+// # Programmatically loading AWS SSO credentials directly
+//
+// You can programmatically construct the AWS SSO Provider in your application,
+// and provide the necessary information to load and retrieve temporary
+// credentials using an access token from ~/.aws/sso/cache.
+//
+// client := sso.NewFromConfig(cfg)
+//
+// var provider aws.CredentialsProvider
+// provider = ssocreds.New(client, "123456789012", "SSOReadOnlyRole", "us-east-1", "https://my-sso-portal.awsapps.com/start")
+//
+// // Wrap the provider with aws.CredentialsCache to cache the credentials until their expire time
+// provider = aws.NewCredentialsCache(provider)
+//
+// credentials, err := provider.Retrieve(context.TODO())
+// if err != nil {
+// return err
+// }
+//
+// It is important that you wrap the Provider with aws.CredentialsCache if you
+// are programmatically constructing the provider directly. This prevents your
+// application from accessing the cached access token and requesting new
+// credentials each time the credentials are used.
+//
+// # Additional Resources
+//
+// Configuring the AWS CLI to use AWS Single Sign-On:
+// https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
+//
+// AWS Single Sign-On User Guide:
+// https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html
+package ssocreds
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go
new file mode 100644
index 000000000..40743f0d7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go
@@ -0,0 +1,233 @@
+package ssocreds
+
+import (
+ "crypto/sha1"
+ "encoding/hex"
+ "encoding/json"
+ "fmt"
+ "io/ioutil"
+ "os"
+ "path/filepath"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+)
+
+var osUserHomeDur = os.UserHomeDir
+
+// StandardCachedTokenFilepath returns the filepath for the cached SSO token file, or
+// error if unable get derive the path. Key that will be used to compute a SHA1
+// value that is hex encoded.
+//
+// Derives the filepath using the Key as:
+//
+// ~/.aws/sso/cache/.json
+func StandardCachedTokenFilepath(key string) (string, error) {
+ homeDir, err := osUserHomeDur()
+ if err != nil {
+ return "", fmt.Errorf("unable to get USER's home directory for cached token, %w", err)
+ }
+
+ hash := sha1.New()
+ if _, err = hash.Write([]byte(key)); err != nil {
+ return "", fmt.Errorf("unable to compute cached token filepath key SHA1 hash, %w", err)
+ }
+
+ cacheFilename := strings.ToLower(hex.EncodeToString(hash.Sum(nil))) + ".json"
+
+ return filepath.Join(homeDir, ".aws", "sso", "cache", cacheFilename), nil
+}
+
+type tokenKnownFields struct {
+ AccessToken string `json:"accessToken,omitempty"`
+ ExpiresAt *rfc3339 `json:"expiresAt,omitempty"`
+
+ RefreshToken string `json:"refreshToken,omitempty"`
+ ClientID string `json:"clientId,omitempty"`
+ ClientSecret string `json:"clientSecret,omitempty"`
+}
+
+type token struct {
+ tokenKnownFields
+ UnknownFields map[string]interface{} `json:"-"`
+}
+
+func (t token) MarshalJSON() ([]byte, error) {
+ fields := map[string]interface{}{}
+
+ setTokenFieldString(fields, "accessToken", t.AccessToken)
+ setTokenFieldRFC3339(fields, "expiresAt", t.ExpiresAt)
+
+ setTokenFieldString(fields, "refreshToken", t.RefreshToken)
+ setTokenFieldString(fields, "clientId", t.ClientID)
+ setTokenFieldString(fields, "clientSecret", t.ClientSecret)
+
+ for k, v := range t.UnknownFields {
+ if _, ok := fields[k]; ok {
+ return nil, fmt.Errorf("unknown token field %v, duplicates known field", k)
+ }
+ fields[k] = v
+ }
+
+ return json.Marshal(fields)
+}
+
+func setTokenFieldString(fields map[string]interface{}, key, value string) {
+ if value == "" {
+ return
+ }
+ fields[key] = value
+}
+func setTokenFieldRFC3339(fields map[string]interface{}, key string, value *rfc3339) {
+ if value == nil {
+ return
+ }
+ fields[key] = value
+}
+
+func (t *token) UnmarshalJSON(b []byte) error {
+ var fields map[string]interface{}
+ if err := json.Unmarshal(b, &fields); err != nil {
+ return nil
+ }
+
+ t.UnknownFields = map[string]interface{}{}
+
+ for k, v := range fields {
+ var err error
+ switch k {
+ case "accessToken":
+ err = getTokenFieldString(v, &t.AccessToken)
+ case "expiresAt":
+ err = getTokenFieldRFC3339(v, &t.ExpiresAt)
+ case "refreshToken":
+ err = getTokenFieldString(v, &t.RefreshToken)
+ case "clientId":
+ err = getTokenFieldString(v, &t.ClientID)
+ case "clientSecret":
+ err = getTokenFieldString(v, &t.ClientSecret)
+ default:
+ t.UnknownFields[k] = v
+ }
+
+ if err != nil {
+ return fmt.Errorf("field %q, %w", k, err)
+ }
+ }
+
+ return nil
+}
+
+func getTokenFieldString(v interface{}, value *string) error {
+ var ok bool
+ *value, ok = v.(string)
+ if !ok {
+ return fmt.Errorf("expect value to be string, got %T", v)
+ }
+ return nil
+}
+
+func getTokenFieldRFC3339(v interface{}, value **rfc3339) error {
+ var stringValue string
+ if err := getTokenFieldString(v, &stringValue); err != nil {
+ return err
+ }
+
+ timeValue, err := parseRFC3339(stringValue)
+ if err != nil {
+ return err
+ }
+
+ *value = &timeValue
+ return nil
+}
+
+func loadCachedToken(filename string) (token, error) {
+ fileBytes, err := ioutil.ReadFile(filename)
+ if err != nil {
+ return token{}, fmt.Errorf("failed to read cached SSO token file, %w", err)
+ }
+
+ var t token
+ if err := json.Unmarshal(fileBytes, &t); err != nil {
+ return token{}, fmt.Errorf("failed to parse cached SSO token file, %w", err)
+ }
+
+ if len(t.AccessToken) == 0 || t.ExpiresAt == nil || time.Time(*t.ExpiresAt).IsZero() {
+ return token{}, fmt.Errorf(
+ "cached SSO token must contain accessToken and expiresAt fields")
+ }
+
+ return t, nil
+}
+
+func storeCachedToken(filename string, t token, fileMode os.FileMode) (err error) {
+ tmpFilename := filename + ".tmp-" + strconv.FormatInt(sdk.NowTime().UnixNano(), 10)
+ if err := writeCacheFile(tmpFilename, fileMode, t); err != nil {
+ return err
+ }
+
+ if err := os.Rename(tmpFilename, filename); err != nil {
+ return fmt.Errorf("failed to replace old cached SSO token file, %w", err)
+ }
+
+ return nil
+}
+
+func writeCacheFile(filename string, fileMode os.FileMode, t token) (err error) {
+ var f *os.File
+ f, err = os.OpenFile(filename, os.O_CREATE|os.O_TRUNC|os.O_RDWR, fileMode)
+ if err != nil {
+ return fmt.Errorf("failed to create cached SSO token file %w", err)
+ }
+
+ defer func() {
+ closeErr := f.Close()
+ if err == nil && closeErr != nil {
+ err = fmt.Errorf("failed to close cached SSO token file, %w", closeErr)
+ }
+ }()
+
+ encoder := json.NewEncoder(f)
+
+ if err = encoder.Encode(t); err != nil {
+ return fmt.Errorf("failed to serialize cached SSO token, %w", err)
+ }
+
+ return nil
+}
+
+type rfc3339 time.Time
+
+func parseRFC3339(v string) (rfc3339, error) {
+ parsed, err := time.Parse(time.RFC3339, v)
+ if err != nil {
+ return rfc3339{}, fmt.Errorf("expected RFC3339 timestamp: %w", err)
+ }
+
+ return rfc3339(parsed), nil
+}
+
+func (r *rfc3339) UnmarshalJSON(bytes []byte) (err error) {
+ var value string
+
+ // Use JSON unmarshal to unescape the quoted value making use of JSON's
+ // unquoting rules.
+ if err = json.Unmarshal(bytes, &value); err != nil {
+ return err
+ }
+
+ *r, err = parseRFC3339(value)
+
+ return nil
+}
+
+func (r *rfc3339) MarshalJSON() ([]byte, error) {
+ value := time.Time(*r).Format(time.RFC3339)
+
+ // Use JSON unmarshal to unescape the quoted value making use of JSON's
+ // quoting rules.
+ return json.Marshal(value)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go
new file mode 100644
index 000000000..bd7603bbc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go
@@ -0,0 +1,136 @@
+package ssocreds
+
+import (
+ "context"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/aws-sdk-go-v2/service/sso"
+)
+
+// ProviderName is the name of the provider used to specify the source of
+// credentials.
+const ProviderName = "SSOProvider"
+
+// GetRoleCredentialsAPIClient is a API client that implements the
+// GetRoleCredentials operation.
+type GetRoleCredentialsAPIClient interface {
+ GetRoleCredentials(context.Context, *sso.GetRoleCredentialsInput, ...func(*sso.Options)) (
+ *sso.GetRoleCredentialsOutput, error,
+ )
+}
+
+// Options is the Provider options structure.
+type Options struct {
+ // The Client which is configured for the AWS Region where the AWS SSO user
+ // portal is located.
+ Client GetRoleCredentialsAPIClient
+
+ // The AWS account that is assigned to the user.
+ AccountID string
+
+ // The role name that is assigned to the user.
+ RoleName string
+
+ // The URL that points to the organization's AWS Single Sign-On (AWS SSO)
+ // user portal.
+ StartURL string
+
+ // The filepath the cached token will be retrieved from. If unset Provider will
+ // use the startURL to determine the filepath at.
+ //
+ // ~/.aws/sso/cache/.json
+ //
+ // If custom cached token filepath is used, the Provider's startUrl
+ // parameter will be ignored.
+ CachedTokenFilepath string
+}
+
+// Provider is an AWS credential provider that retrieves temporary AWS
+// credentials by exchanging an SSO login token.
+type Provider struct {
+ options Options
+
+ cachedTokenFilepath string
+}
+
+// New returns a new AWS Single Sign-On (AWS SSO) credential provider. The
+// provided client is expected to be configured for the AWS Region where the
+// AWS SSO user portal is located.
+func New(client GetRoleCredentialsAPIClient, accountID, roleName, startURL string, optFns ...func(options *Options)) *Provider {
+ options := Options{
+ Client: client,
+ AccountID: accountID,
+ RoleName: roleName,
+ StartURL: startURL,
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &Provider{
+ options: options,
+ cachedTokenFilepath: options.CachedTokenFilepath,
+ }
+}
+
+// Retrieve retrieves temporary AWS credentials from the configured Amazon
+// Single Sign-On (AWS SSO) user portal by exchanging the accessToken present
+// in ~/.aws/sso/cache.
+func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) {
+ if p.cachedTokenFilepath == "" {
+ cachedTokenFilepath, err := StandardCachedTokenFilepath(p.options.StartURL)
+ if err != nil {
+ return aws.Credentials{}, &InvalidTokenError{Err: err}
+ }
+ p.cachedTokenFilepath = cachedTokenFilepath
+ }
+
+ tokenFile, err := loadCachedToken(p.cachedTokenFilepath)
+ if err != nil {
+ return aws.Credentials{}, &InvalidTokenError{Err: err}
+ }
+
+ if tokenFile.ExpiresAt == nil || sdk.NowTime().After(time.Time(*tokenFile.ExpiresAt)) {
+ return aws.Credentials{}, &InvalidTokenError{}
+ }
+
+ output, err := p.options.Client.GetRoleCredentials(ctx, &sso.GetRoleCredentialsInput{
+ AccessToken: &tokenFile.AccessToken,
+ AccountId: &p.options.AccountID,
+ RoleName: &p.options.RoleName,
+ })
+ if err != nil {
+ return aws.Credentials{}, err
+ }
+
+ return aws.Credentials{
+ AccessKeyID: aws.ToString(output.RoleCredentials.AccessKeyId),
+ SecretAccessKey: aws.ToString(output.RoleCredentials.SecretAccessKey),
+ SessionToken: aws.ToString(output.RoleCredentials.SessionToken),
+ CanExpire: true,
+ Expires: time.Unix(0, output.RoleCredentials.Expiration*int64(time.Millisecond)).UTC(),
+ Source: ProviderName,
+ }, nil
+}
+
+// InvalidTokenError is the error type that is returned if loaded token has
+// expired or is otherwise invalid. To refresh the SSO session run AWS SSO
+// login with the corresponding profile.
+type InvalidTokenError struct {
+ Err error
+}
+
+func (i *InvalidTokenError) Unwrap() error {
+ return i.Err
+}
+
+func (i *InvalidTokenError) Error() string {
+ const msg = "the SSO session has expired or is invalid"
+ if i.Err == nil {
+ return msg
+ }
+ return msg + ": " + i.Err.Error()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_token_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_token_provider.go
new file mode 100644
index 000000000..7f4fc5467
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_token_provider.go
@@ -0,0 +1,147 @@
+package ssocreds
+
+import (
+ "context"
+ "fmt"
+ "os"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/aws-sdk-go-v2/service/ssooidc"
+ "github.com/aws/smithy-go/auth/bearer"
+)
+
+// CreateTokenAPIClient provides the interface for the SSOTokenProvider's API
+// client for calling CreateToken operation to refresh the SSO token.
+type CreateTokenAPIClient interface {
+ CreateToken(context.Context, *ssooidc.CreateTokenInput, ...func(*ssooidc.Options)) (
+ *ssooidc.CreateTokenOutput, error,
+ )
+}
+
+// SSOTokenProviderOptions provides the options for configuring the
+// SSOTokenProvider.
+type SSOTokenProviderOptions struct {
+ // Client that can be overridden
+ Client CreateTokenAPIClient
+
+ // The set of API Client options to be applied when invoking the
+ // CreateToken operation.
+ ClientOptions []func(*ssooidc.Options)
+
+ // The path the file containing the cached SSO token will be read from.
+ // Initialized the NewSSOTokenProvider's cachedTokenFilepath parameter.
+ CachedTokenFilepath string
+}
+
+// SSOTokenProvider provides an utility for refreshing SSO AccessTokens for
+// Bearer Authentication. The SSOTokenProvider can only be used to refresh
+// already cached SSO Tokens. This utility cannot perform the initial SSO
+// create token.
+//
+// The SSOTokenProvider is not safe to use concurrently. It must be wrapped in
+// a utility such as smithy-go's auth/bearer#TokenCache. The SDK's
+// config.LoadDefaultConfig will automatically wrap the SSOTokenProvider with
+// the smithy-go TokenCache, if the external configuration loaded configured
+// for an SSO session.
+//
+// The initial SSO create token should be preformed with the AWS CLI before the
+// Go application using the SSOTokenProvider will need to retrieve the SSO
+// token. If the AWS CLI has not created the token cache file, this provider
+// will return an error when attempting to retrieve the cached token.
+//
+// This provider will attempt to refresh the cached SSO token periodically if
+// needed when RetrieveBearerToken is called.
+//
+// A utility such as the AWS CLI must be used to initially create the SSO
+// session and cached token file.
+// https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
+type SSOTokenProvider struct {
+ options SSOTokenProviderOptions
+}
+
+var _ bearer.TokenProvider = (*SSOTokenProvider)(nil)
+
+// NewSSOTokenProvider returns an initialized SSOTokenProvider that will
+// periodically refresh the SSO token cached stored in the cachedTokenFilepath.
+// The cachedTokenFilepath file's content will be rewritten by the token
+// provider when the token is refreshed.
+//
+// The client must be configured for the AWS region the SSO token was created for.
+func NewSSOTokenProvider(client CreateTokenAPIClient, cachedTokenFilepath string, optFns ...func(o *SSOTokenProviderOptions)) *SSOTokenProvider {
+ options := SSOTokenProviderOptions{
+ Client: client,
+ CachedTokenFilepath: cachedTokenFilepath,
+ }
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ provider := &SSOTokenProvider{
+ options: options,
+ }
+
+ return provider
+}
+
+// RetrieveBearerToken returns the SSO token stored in the cachedTokenFilepath
+// the SSOTokenProvider was created with. If the token has expired
+// RetrieveBearerToken will attempt to refresh it. If the token cannot be
+// refreshed or is not present an error will be returned.
+//
+// A utility such as the AWS CLI must be used to initially create the SSO
+// session and cached token file. https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
+func (p SSOTokenProvider) RetrieveBearerToken(ctx context.Context) (bearer.Token, error) {
+ cachedToken, err := loadCachedToken(p.options.CachedTokenFilepath)
+ if err != nil {
+ return bearer.Token{}, err
+ }
+
+ if cachedToken.ExpiresAt != nil && sdk.NowTime().After(time.Time(*cachedToken.ExpiresAt)) {
+ cachedToken, err = p.refreshToken(ctx, cachedToken)
+ if err != nil {
+ return bearer.Token{}, fmt.Errorf("refresh cached SSO token failed, %w", err)
+ }
+ }
+
+ expiresAt := aws.ToTime((*time.Time)(cachedToken.ExpiresAt))
+ return bearer.Token{
+ Value: cachedToken.AccessToken,
+ CanExpire: !expiresAt.IsZero(),
+ Expires: expiresAt,
+ }, nil
+}
+
+func (p SSOTokenProvider) refreshToken(ctx context.Context, cachedToken token) (token, error) {
+ if cachedToken.ClientSecret == "" || cachedToken.ClientID == "" || cachedToken.RefreshToken == "" {
+ return token{}, fmt.Errorf("cached SSO token is expired, or not present, and cannot be refreshed")
+ }
+
+ createResult, err := p.options.Client.CreateToken(ctx, &ssooidc.CreateTokenInput{
+ ClientId: &cachedToken.ClientID,
+ ClientSecret: &cachedToken.ClientSecret,
+ RefreshToken: &cachedToken.RefreshToken,
+ GrantType: aws.String("refresh_token"),
+ }, p.options.ClientOptions...)
+ if err != nil {
+ return token{}, fmt.Errorf("unable to refresh SSO token, %w", err)
+ }
+
+ expiresAt := sdk.NowTime().Add(time.Duration(createResult.ExpiresIn) * time.Second)
+
+ cachedToken.AccessToken = aws.ToString(createResult.AccessToken)
+ cachedToken.ExpiresAt = (*rfc3339)(&expiresAt)
+ cachedToken.RefreshToken = aws.ToString(createResult.RefreshToken)
+
+ fileInfo, err := os.Stat(p.options.CachedTokenFilepath)
+ if err != nil {
+ return token{}, fmt.Errorf("failed to stat cached SSO token file %w", err)
+ }
+
+ if err = storeCachedToken(p.options.CachedTokenFilepath, cachedToken, fileInfo.Mode()); err != nil {
+ return token{}, fmt.Errorf("unable to cache refreshed SSO token, %w", err)
+ }
+
+ return cachedToken, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/static_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/static_provider.go
new file mode 100644
index 000000000..d525cac09
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/static_provider.go
@@ -0,0 +1,53 @@
+package credentials
+
+import (
+ "context"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+const (
+ // StaticCredentialsName provides a name of Static provider
+ StaticCredentialsName = "StaticCredentials"
+)
+
+// StaticCredentialsEmptyError is emitted when static credentials are empty.
+type StaticCredentialsEmptyError struct{}
+
+func (*StaticCredentialsEmptyError) Error() string {
+ return "static credentials are empty"
+}
+
+// A StaticCredentialsProvider is a set of credentials which are set, and will
+// never expire.
+type StaticCredentialsProvider struct {
+ Value aws.Credentials
+}
+
+// NewStaticCredentialsProvider return a StaticCredentialsProvider initialized with the AWS
+// credentials passed in.
+func NewStaticCredentialsProvider(key, secret, session string) StaticCredentialsProvider {
+ return StaticCredentialsProvider{
+ Value: aws.Credentials{
+ AccessKeyID: key,
+ SecretAccessKey: secret,
+ SessionToken: session,
+ },
+ }
+}
+
+// Retrieve returns the credentials or error if the credentials are invalid.
+func (s StaticCredentialsProvider) Retrieve(_ context.Context) (aws.Credentials, error) {
+ v := s.Value
+ if v.AccessKeyID == "" || v.SecretAccessKey == "" {
+ return aws.Credentials{
+ Source: StaticCredentialsName,
+ }, &StaticCredentialsEmptyError{}
+ }
+
+ if len(v.Source) == 0 {
+ v.Source = StaticCredentialsName
+ }
+
+ return v, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go
new file mode 100644
index 000000000..289707b6d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go
@@ -0,0 +1,320 @@
+// Package stscreds are credential Providers to retrieve STS AWS credentials.
+//
+// STS provides multiple ways to retrieve credentials which can be used when making
+// future AWS service API operation calls.
+//
+// The SDK will ensure that per instance of credentials.Credentials all requests
+// to refresh the credentials will be synchronized. But, the SDK is unable to
+// ensure synchronous usage of the AssumeRoleProvider if the value is shared
+// between multiple Credentials or service clients.
+//
+// # Assume Role
+//
+// To assume an IAM role using STS with the SDK you can create a new Credentials
+// with the SDKs's stscreds package.
+//
+// // Initial credentials loaded from SDK's default credential chain. Such as
+// // the environment, shared credentials (~/.aws/credentials), or EC2 Instance
+// // Role. These credentials will be used to to make the STS Assume Role API.
+// cfg, err := config.LoadDefaultConfig(context.TODO())
+// if err != nil {
+// panic(err)
+// }
+//
+// // Create the credentials from AssumeRoleProvider to assume the role
+// // referenced by the "myRoleARN" ARN.
+// stsSvc := sts.NewFromConfig(cfg)
+// creds := stscreds.NewAssumeRoleProvider(stsSvc, "myRoleArn")
+//
+// cfg.Credentials = aws.NewCredentialsCache(creds)
+//
+// // Create service client value configured for credentials
+// // from assumed role.
+// svc := s3.NewFromConfig(cfg)
+//
+// # Assume Role with custom MFA Token provider
+//
+// To assume an IAM role with a MFA token you can either specify a custom MFA
+// token provider or use the SDK's built in StdinTokenProvider that will prompt
+// the user for a token code each time the credentials need to to be refreshed.
+// Specifying a custom token provider allows you to control where the token
+// code is retrieved from, and how it is refreshed.
+//
+// With a custom token provider, the provider is responsible for refreshing the
+// token code when called.
+//
+// cfg, err := config.LoadDefaultConfig(context.TODO())
+// if err != nil {
+// panic(err)
+// }
+//
+// staticTokenProvider := func() (string, error) {
+// return someTokenCode, nil
+// }
+//
+// // Create the credentials from AssumeRoleProvider to assume the role
+// // referenced by the "myRoleARN" ARN using the MFA token code provided.
+// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) {
+// o.SerialNumber = aws.String("myTokenSerialNumber")
+// o.TokenProvider = staticTokenProvider
+// })
+//
+// cfg.Credentials = aws.NewCredentialsCache(creds)
+//
+// // Create service client value configured for credentials
+// // from assumed role.
+// svc := s3.NewFromConfig(cfg)
+//
+// # Assume Role with MFA Token Provider
+//
+// To assume an IAM role with MFA for longer running tasks where the credentials
+// may need to be refreshed setting the TokenProvider field of AssumeRoleProvider
+// will allow the credential provider to prompt for new MFA token code when the
+// role's credentials need to be refreshed.
+//
+// The StdinTokenProvider function is available to prompt on stdin to retrieve
+// the MFA token code from the user. You can also implement custom prompts by
+// satisfying the TokenProvider function signature.
+//
+// Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will
+// have undesirable results as the StdinTokenProvider will not be synchronized. A
+// single Credentials with an AssumeRoleProvider can be shared safely.
+//
+// cfg, err := config.LoadDefaultConfig(context.TODO())
+// if err != nil {
+// panic(err)
+// }
+//
+// // Create the credentials from AssumeRoleProvider to assume the role
+// // referenced by the "myRoleARN" ARN using the MFA token code provided.
+// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) {
+// o.SerialNumber = aws.String("myTokenSerialNumber")
+// o.TokenProvider = stscreds.StdinTokenProvider
+// })
+//
+// cfg.Credentials = aws.NewCredentialsCache(creds)
+//
+// // Create service client value configured for credentials
+// // from assumed role.
+// svc := s3.NewFromConfig(cfg)
+package stscreds
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/service/sts"
+ "github.com/aws/aws-sdk-go-v2/service/sts/types"
+)
+
+// StdinTokenProvider will prompt on stdout and read from stdin for a string value.
+// An error is returned if reading from stdin fails.
+//
+// Use this function go read MFA tokens from stdin. The function makes no attempt
+// to make atomic prompts from stdin across multiple gorouties.
+//
+// Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will
+// have undesirable results as the StdinTokenProvider will not be synchronized. A
+// single Credentials with an AssumeRoleProvider can be shared safely
+//
+// Will wait forever until something is provided on the stdin.
+func StdinTokenProvider() (string, error) {
+ var v string
+ fmt.Printf("Assume Role MFA token code: ")
+ _, err := fmt.Scanln(&v)
+
+ return v, err
+}
+
+// ProviderName provides a name of AssumeRole provider
+const ProviderName = "AssumeRoleProvider"
+
+// AssumeRoleAPIClient is a client capable of the STS AssumeRole operation.
+type AssumeRoleAPIClient interface {
+ AssumeRole(ctx context.Context, params *sts.AssumeRoleInput, optFns ...func(*sts.Options)) (*sts.AssumeRoleOutput, error)
+}
+
+// DefaultDuration is the default amount of time in minutes that the
+// credentials will be valid for. This value is only used by AssumeRoleProvider
+// for specifying the default expiry duration of an assume role.
+//
+// Other providers such as WebIdentityRoleProvider do not use this value, and
+// instead rely on STS API's default parameter handing to assign a default
+// value.
+var DefaultDuration = time.Duration(15) * time.Minute
+
+// AssumeRoleProvider retrieves temporary credentials from the STS service, and
+// keeps track of their expiration time.
+//
+// This credential provider will be used by the SDKs default credential change
+// when shared configuration is enabled, and the shared config or shared credentials
+// file configure assume role. See Session docs for how to do this.
+//
+// AssumeRoleProvider does not provide any synchronization and it is not safe
+// to share this value across multiple Credentials, Sessions, or service clients
+// without also sharing the same Credentials instance.
+type AssumeRoleProvider struct {
+ options AssumeRoleOptions
+}
+
+// AssumeRoleOptions is the configurable options for AssumeRoleProvider
+type AssumeRoleOptions struct {
+ // Client implementation of the AssumeRole operation. Required
+ Client AssumeRoleAPIClient
+
+ // IAM Role ARN to be assumed. Required
+ RoleARN string
+
+ // Session name, if you wish to uniquely identify this session.
+ RoleSessionName string
+
+ // Expiry duration of the STS credentials. Defaults to 15 minutes if not set.
+ Duration time.Duration
+
+ // Optional ExternalID to pass along, defaults to nil if not set.
+ ExternalID *string
+
+ // The policy plain text must be 2048 bytes or shorter. However, an internal
+ // conversion compresses it into a packed binary format with a separate limit.
+ // The PackedPolicySize response element indicates by percentage how close to
+ // the upper size limit the policy is, with 100% equaling the maximum allowed
+ // 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 []types.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.
+ // The value is either the serial number for a hardware device (such as GAHT12345678)
+ // or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).
+ SerialNumber *string
+
+ // The source identity specified by the principal that is calling the AssumeRole
+ // operation. You can require users to specify a source identity when they assume a
+ // role. You do this by using the sts:SourceIdentity condition key in a role trust
+ // policy. You can use source identity information in CloudTrail logs to determine
+ // who took actions with a role. You can use the aws:SourceIdentity condition key
+ // to further control access to Amazon Web Services resources based on the value of
+ // source identity. For more information about using source identity, see Monitor
+ // and control actions taken with assumed roles
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
+ // in the IAM User Guide.
+ SourceIdentity *string
+
+ // Async method of providing MFA token code for assuming an IAM role with MFA.
+ // The value returned by the function will be used as the TokenCode in the Retrieve
+ // call. See StdinTokenProvider for a provider that prompts and reads from stdin.
+ //
+ // This token provider will be called when ever the assumed role's
+ // credentials need to be refreshed when SerialNumber is set.
+ TokenProvider func() (string, error)
+
+ // 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 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.
+ Tags []types.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. 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.
+ TransitiveTagKeys []string
+}
+
+// NewAssumeRoleProvider constructs and returns a credentials provider that
+// will retrieve credentials by assuming a IAM role using STS.
+func NewAssumeRoleProvider(client AssumeRoleAPIClient, roleARN string, optFns ...func(*AssumeRoleOptions)) *AssumeRoleProvider {
+ o := AssumeRoleOptions{
+ Client: client,
+ RoleARN: roleARN,
+ }
+
+ for _, fn := range optFns {
+ fn(&o)
+ }
+
+ return &AssumeRoleProvider{
+ options: o,
+ }
+}
+
+// Retrieve generates a new set of temporary credentials using STS.
+func (p *AssumeRoleProvider) Retrieve(ctx context.Context) (aws.Credentials, error) {
+ // Apply defaults where parameters are not set.
+ if len(p.options.RoleSessionName) == 0 {
+ // Try to work out a role name that will hopefully end up unique.
+ p.options.RoleSessionName = fmt.Sprintf("aws-go-sdk-%d", time.Now().UTC().UnixNano())
+ }
+ if p.options.Duration == 0 {
+ // Expire as often as AWS permits.
+ p.options.Duration = DefaultDuration
+ }
+ input := &sts.AssumeRoleInput{
+ DurationSeconds: aws.Int32(int32(p.options.Duration / time.Second)),
+ PolicyArns: p.options.PolicyARNs,
+ RoleArn: aws.String(p.options.RoleARN),
+ RoleSessionName: aws.String(p.options.RoleSessionName),
+ ExternalId: p.options.ExternalID,
+ SourceIdentity: p.options.SourceIdentity,
+ Tags: p.options.Tags,
+ TransitiveTagKeys: p.options.TransitiveTagKeys,
+ }
+ if p.options.Policy != nil {
+ input.Policy = p.options.Policy
+ }
+ if p.options.SerialNumber != nil {
+ if p.options.TokenProvider != nil {
+ input.SerialNumber = p.options.SerialNumber
+ code, err := p.options.TokenProvider()
+ if err != nil {
+ return aws.Credentials{}, err
+ }
+ input.TokenCode = aws.String(code)
+ } else {
+ return aws.Credentials{}, fmt.Errorf("assume role with MFA enabled, but TokenProvider is not set")
+ }
+ }
+
+ resp, err := p.options.Client.AssumeRole(ctx, input)
+ if err != nil {
+ return aws.Credentials{Source: ProviderName}, err
+ }
+
+ return aws.Credentials{
+ AccessKeyID: *resp.Credentials.AccessKeyId,
+ SecretAccessKey: *resp.Credentials.SecretAccessKey,
+ SessionToken: *resp.Credentials.SessionToken,
+ Source: ProviderName,
+
+ CanExpire: true,
+ Expires: *resp.Credentials.Expiration,
+ }, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go
new file mode 100644
index 000000000..ddaf6df6c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go
@@ -0,0 +1,150 @@
+package stscreds
+
+import (
+ "context"
+ "fmt"
+ "io/ioutil"
+ "strconv"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/aws-sdk-go-v2/service/sts"
+ "github.com/aws/aws-sdk-go-v2/service/sts/types"
+)
+
+var invalidIdentityTokenExceptionCode = (&types.InvalidIdentityTokenException{}).ErrorCode()
+
+const (
+ // WebIdentityProviderName is the web identity provider name
+ WebIdentityProviderName = "WebIdentityCredentials"
+)
+
+// AssumeRoleWithWebIdentityAPIClient is a client capable of the STS AssumeRoleWithWebIdentity operation.
+type AssumeRoleWithWebIdentityAPIClient interface {
+ AssumeRoleWithWebIdentity(ctx context.Context, params *sts.AssumeRoleWithWebIdentityInput, optFns ...func(*sts.Options)) (*sts.AssumeRoleWithWebIdentityOutput, error)
+}
+
+// WebIdentityRoleProvider is used to retrieve credentials using
+// an OIDC token.
+type WebIdentityRoleProvider struct {
+ options WebIdentityRoleOptions
+}
+
+// WebIdentityRoleOptions is a structure of configurable options for WebIdentityRoleProvider
+type WebIdentityRoleOptions struct {
+ // Client implementation of the AssumeRoleWithWebIdentity operation. Required
+ Client AssumeRoleWithWebIdentityAPIClient
+
+ // JWT Token Provider. Required
+ TokenRetriever IdentityTokenRetriever
+
+ // IAM Role ARN to assume. Required
+ RoleARN string
+
+ // Session name, if you wish to uniquely identify this session.
+ RoleSessionName string
+
+ // Expiry duration of the STS credentials. STS will assign a default expiry
+ // duration if this value is unset. This is different from the Duration
+ // option of AssumeRoleProvider, which automatically assigns 15 minutes if
+ // Duration is unset.
+ //
+ // See the STS AssumeRoleWithWebIdentity API reference guide for more
+ // information on defaults.
+ // https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html
+ Duration time.Duration
+
+ // An IAM policy in JSON format that you want to use as an inline session policy.
+ Policy *string
+
+ // The Amazon Resource Names (ARNs) of the IAM managed policies that you
+ // want to use as managed session policies. The policies must exist in the
+ // same account as the role.
+ PolicyARNs []types.PolicyDescriptorType
+}
+
+// IdentityTokenRetriever is an interface for retrieving a JWT
+type IdentityTokenRetriever interface {
+ GetIdentityToken() ([]byte, error)
+}
+
+// IdentityTokenFile is for retrieving an identity token from the given file name
+type IdentityTokenFile string
+
+// GetIdentityToken retrieves the JWT token from the file and returns the contents as a []byte
+func (j IdentityTokenFile) GetIdentityToken() ([]byte, error) {
+ b, err := ioutil.ReadFile(string(j))
+ if err != nil {
+ return nil, fmt.Errorf("unable to read file at %s: %v", string(j), err)
+ }
+
+ return b, nil
+}
+
+// NewWebIdentityRoleProvider will return a new WebIdentityRoleProvider with the
+// provided stsiface.ClientAPI
+func NewWebIdentityRoleProvider(client AssumeRoleWithWebIdentityAPIClient, roleARN string, tokenRetriever IdentityTokenRetriever, optFns ...func(*WebIdentityRoleOptions)) *WebIdentityRoleProvider {
+ o := WebIdentityRoleOptions{
+ Client: client,
+ RoleARN: roleARN,
+ TokenRetriever: tokenRetriever,
+ }
+
+ for _, fn := range optFns {
+ fn(&o)
+ }
+
+ return &WebIdentityRoleProvider{options: o}
+}
+
+// Retrieve 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) Retrieve(ctx context.Context) (aws.Credentials, error) {
+ b, err := p.options.TokenRetriever.GetIdentityToken()
+ if err != nil {
+ return aws.Credentials{}, fmt.Errorf("failed to retrieve jwt from provide source, %w", err)
+ }
+
+ sessionName := p.options.RoleSessionName
+ if len(sessionName) == 0 {
+ // session name is used to uniquely identify a session. This simply
+ // uses unix time in nanoseconds to uniquely identify sessions.
+ sessionName = strconv.FormatInt(sdk.NowTime().UnixNano(), 10)
+ }
+ input := &sts.AssumeRoleWithWebIdentityInput{
+ PolicyArns: p.options.PolicyARNs,
+ RoleArn: &p.options.RoleARN,
+ RoleSessionName: &sessionName,
+ WebIdentityToken: aws.String(string(b)),
+ }
+ if p.options.Duration != 0 {
+ // If set use the value, otherwise STS will assign a default expiration duration.
+ input.DurationSeconds = aws.Int32(int32(p.options.Duration / time.Second))
+ }
+ if p.options.Policy != nil {
+ input.Policy = p.options.Policy
+ }
+
+ resp, err := p.options.Client.AssumeRoleWithWebIdentity(ctx, input, func(options *sts.Options) {
+ options.Retryer = retry.AddWithErrorCodes(options.Retryer, invalidIdentityTokenExceptionCode)
+ })
+ if err != nil {
+ return aws.Credentials{}, fmt.Errorf("failed to retrieve credentials, %w", err)
+ }
+
+ // InvalidIdentityToken error is a temporary error that can occur
+ // when assuming an Role with a JWT web identity token.
+
+ value := aws.Credentials{
+ AccessKeyID: aws.ToString(resp.Credentials.AccessKeyId),
+ SecretAccessKey: aws.ToString(resp.Credentials.SecretAccessKey),
+ SessionToken: aws.ToString(resp.Credentials.SessionToken),
+ Source: WebIdentityProviderName,
+ CanExpire: true,
+ Expires: *resp.Credentials.Expiration,
+ }
+ return value, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/doc.go
new file mode 100644
index 000000000..944feac55
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/doc.go
@@ -0,0 +1,58 @@
+// Package sdk is the official AWS SDK v2 for the Go programming language.
+//
+// aws-sdk-go-v2 is the the v2 of the AWS SDK for the Go programming language.
+//
+// # Getting started
+//
+// The best way to get started working with the SDK is to use `go get` to add the
+// SDK and desired service clients to your Go dependencies explicitly.
+//
+// go get github.com/aws/aws-sdk-go-v2
+// go get github.com/aws/aws-sdk-go-v2/config
+// go get github.com/aws/aws-sdk-go-v2/service/dynamodb
+//
+// # Hello AWS
+//
+// This example shows how you can use the v2 SDK to make an API request using the
+// SDK's Amazon DynamoDB client.
+//
+// package main
+//
+// import (
+// "context"
+// "fmt"
+// "log"
+//
+// "github.com/aws/aws-sdk-go-v2/aws"
+// "github.com/aws/aws-sdk-go-v2/config"
+// "github.com/aws/aws-sdk-go-v2/service/dynamodb"
+// )
+//
+// func main() {
+// // Using the SDK's default configuration, loading additional config
+// // and credentials values from the environment variables, shared
+// // credentials, and shared configuration files
+// cfg, err := config.LoadDefaultConfig(context.TODO(),
+// config.WithRegion("us-west-2"),
+// )
+// if err != nil {
+// log.Fatalf("unable to load SDK config, %v", err)
+// }
+//
+// // Using the Config value, create the DynamoDB client
+// svc := dynamodb.NewFromConfig(cfg)
+//
+// // Build the request with its input parameters
+// resp, err := svc.ListTables(context.TODO(), &dynamodb.ListTablesInput{
+// Limit: aws.Int32(5),
+// })
+// if err != nil {
+// log.Fatalf("failed to list tables, %v", err)
+// }
+//
+// fmt.Println("Tables:")
+// for _, tableName := range resp.TableNames {
+// fmt.Println(tableName)
+// }
+// }
+package sdk
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
new file mode 100644
index 000000000..e8d4e2a5a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
@@ -0,0 +1,151 @@
+# v1.12.17 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.16 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.15 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.14 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.13 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.12 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.11 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.10 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.9 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.8 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.7 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.6 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.5 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.3 (2022-03-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.2 (2022-03-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.1 (2022-03-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.0 (2022-03-08)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.0 (2022-02-24)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.0 (2022-01-14)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.0 (2022-01-07)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.2 (2021-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.1 (2021-11-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.0 (2021-11-06)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.0 (2021-10-21)
+
+* **Feature**: Updated to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.0 (2021-10-11)
+
+* **Feature**: Respect passed in Context Deadline/Timeout. Updates the IMDS Client operations to not override the passed in Context's Deadline or Timeout options. If an Client operation is called with a Context with a Deadline or Timeout, the client will no longer override it with the client's default timeout.
+* **Bug Fix**: Fix IMDS client's response handling and operation timeout race. Fixes #1253
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.1 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.0 (2021-08-27)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.1 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2021-08-04)
+
+* **Feature**: adds error handling for defered close calls
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2021-07-15)
+
+* **Feature**: Support has been added for EC2 IPv6-enabled Instance Metadata Service Endpoints.
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2021-06-25)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.1 (2021-05-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/aws/aws-sdk-go-v2/feature/ec2/imds/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_client.go
new file mode 100644
index 000000000..53f3d3c78
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_client.go
@@ -0,0 +1,318 @@
+package imds
+
+import (
+ "context"
+ "fmt"
+ "net"
+ "net/http"
+ "os"
+ "strings"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ internalconfig "github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config"
+ "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// ServiceID provides the unique name of this API client
+const ServiceID = "ec2imds"
+
+// Client provides the API client for interacting with the Amazon EC2 Instance
+// Metadata Service API.
+type Client struct {
+ options Options
+}
+
+// ClientEnableState provides an enumeration if the client is enabled,
+// disabled, or default behavior.
+type ClientEnableState = internalconfig.ClientEnableState
+
+// Enumeration values for ClientEnableState
+const (
+ ClientDefaultEnableState ClientEnableState = internalconfig.ClientDefaultEnableState // default behavior
+ ClientDisabled ClientEnableState = internalconfig.ClientDisabled // client disabled
+ ClientEnabled ClientEnableState = internalconfig.ClientEnabled // client enabled
+)
+
+// EndpointModeState is an enum configuration variable describing the client endpoint mode.
+// Not configurable directly, but used when using the NewFromConfig.
+type EndpointModeState = internalconfig.EndpointModeState
+
+// Enumeration values for EndpointModeState
+const (
+ EndpointModeStateUnset EndpointModeState = internalconfig.EndpointModeStateUnset
+ EndpointModeStateIPv4 EndpointModeState = internalconfig.EndpointModeStateIPv4
+ EndpointModeStateIPv6 EndpointModeState = internalconfig.EndpointModeStateIPv6
+)
+
+const (
+ disableClientEnvVar = "AWS_EC2_METADATA_DISABLED"
+
+ // Client endpoint options
+ endpointEnvVar = "AWS_EC2_METADATA_SERVICE_ENDPOINT"
+
+ defaultIPv4Endpoint = "http://169.254.169.254"
+ defaultIPv6Endpoint = "http://[fd00:ec2::254]"
+)
+
+// New returns an initialized Client based on the functional options. Provide
+// additional functional options to further configure the behavior of the client,
+// such as changing the client's endpoint or adding custom middleware behavior.
+func New(options Options, optFns ...func(*Options)) *Client {
+ options = options.Copy()
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ options.HTTPClient = resolveHTTPClient(options.HTTPClient)
+
+ if options.Retryer == nil {
+ options.Retryer = retry.NewStandard()
+ }
+ options.Retryer = retry.AddWithMaxBackoffDelay(options.Retryer, 1*time.Second)
+
+ if options.ClientEnableState == ClientDefaultEnableState {
+ if v := os.Getenv(disableClientEnvVar); strings.EqualFold(v, "true") {
+ options.ClientEnableState = ClientDisabled
+ }
+ }
+
+ if len(options.Endpoint) == 0 {
+ if v := os.Getenv(endpointEnvVar); len(v) != 0 {
+ options.Endpoint = v
+ }
+ }
+
+ client := &Client{
+ options: options,
+ }
+
+ if client.options.tokenProvider == nil && !client.options.disableAPIToken {
+ client.options.tokenProvider = newTokenProvider(client, defaultTokenTTL)
+ }
+
+ return client
+}
+
+// NewFromConfig returns an initialized Client based the AWS SDK config, and
+// functional options. Provide additional functional options to further
+// configure the behavior of the client, such as changing the client's endpoint
+// or adding custom middleware behavior.
+func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
+ opts := Options{
+ APIOptions: append([]func(*middleware.Stack) error{}, cfg.APIOptions...),
+ HTTPClient: cfg.HTTPClient,
+ }
+
+ if cfg.Retryer != nil {
+ opts.Retryer = cfg.Retryer()
+ }
+
+ resolveClientEnableState(cfg, &opts)
+ resolveEndpointConfig(cfg, &opts)
+ resolveEndpointModeConfig(cfg, &opts)
+
+ return New(opts, optFns...)
+}
+
+// Options provides the fields for configuring the API client's behavior.
+type Options struct {
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation
+ // call to modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // The endpoint the client will use to retrieve EC2 instance metadata.
+ //
+ // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EndpointMode.
+ //
+ // If unset, and the environment variable AWS_EC2_METADATA_SERVICE_ENDPOINT
+ // has a value the client will use the value of the environment variable as
+ // the endpoint for operation calls.
+ //
+ // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://[::1]
+ Endpoint string
+
+ // The endpoint selection mode the client will use if no explicit endpoint is provided using the Endpoint field.
+ //
+ // Setting EndpointMode to EndpointModeStateIPv4 will configure the client to use the default EC2 IPv4 endpoint.
+ // Setting EndpointMode to EndpointModeStateIPv6 will configure the client to use the default EC2 IPv6 endpoint.
+ //
+ // By default if EndpointMode is not set (EndpointModeStateUnset) than the default endpoint selection mode EndpointModeStateIPv4.
+ EndpointMode EndpointModeState
+
+ // The HTTP client to invoke API calls with. Defaults to client's default
+ // HTTP implementation if nil.
+ HTTPClient HTTPClient
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer.
+ Retryer aws.Retryer
+
+ // Changes if the EC2 Instance Metadata client is enabled or not. Client
+ // will default to enabled if not set to ClientDisabled. When the client is
+ // disabled it will return an error for all operation calls.
+ //
+ // If ClientEnableState value is ClientDefaultEnableState (default value),
+ // and the environment variable "AWS_EC2_METADATA_DISABLED" is set to
+ // "true", the client will be disabled.
+ //
+ // AWS_EC2_METADATA_DISABLED=true
+ ClientEnableState ClientEnableState
+
+ // Configures the events that will be sent to the configured logger.
+ ClientLogMode aws.ClientLogMode
+
+ // The logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // provides the caching of API tokens used for operation calls. If unset,
+ // the API token will not be retrieved for the operation.
+ tokenProvider *tokenProvider
+
+ // option to disable the API token provider for testing.
+ disableAPIToken bool
+}
+
+// HTTPClient provides the interface for a client making HTTP requests with the
+// API.
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// Copy creates a copy of the API options.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = append([]func(*middleware.Stack) error{}, o.APIOptions...)
+ return to
+}
+
+// WithAPIOptions wraps the API middleware functions, as a functional option
+// for the API Client Options. Use this helper to add additional functional
+// options to the API client, or operation calls.
+func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, optFns...)
+ }
+}
+
+func (c *Client) invokeOperation(
+ ctx context.Context, opID string, params interface{}, optFns []func(*Options),
+ stackFns ...func(*middleware.Stack, Options) error,
+) (
+ result interface{}, metadata middleware.Metadata, err error,
+) {
+ stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
+ options := c.options.Copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.ClientEnableState == ClientDisabled {
+ return nil, metadata, &smithy.OperationError{
+ ServiceID: ServiceID,
+ OperationName: opID,
+ Err: fmt.Errorf(
+ "access disabled to EC2 IMDS via client option, or %q environment variable",
+ disableClientEnvVar),
+ }
+ }
+
+ for _, fn := range stackFns {
+ if err := fn(stack, options); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ for _, fn := range options.APIOptions {
+ if err := fn(stack); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack)
+ result, metadata, err = handler.Handle(ctx, params)
+ if err != nil {
+ return nil, metadata, &smithy.OperationError{
+ ServiceID: ServiceID,
+ OperationName: opID,
+ Err: err,
+ }
+ }
+
+ return result, metadata, err
+}
+
+const (
+ // HTTP client constants
+ defaultDialerTimeout = 250 * time.Millisecond
+ defaultResponseHeaderTimeout = 500 * time.Millisecond
+)
+
+func resolveHTTPClient(client HTTPClient) HTTPClient {
+ if client == nil {
+ client = awshttp.NewBuildableClient()
+ }
+
+ if c, ok := client.(*awshttp.BuildableClient); ok {
+ client = c.
+ WithDialerOptions(func(d *net.Dialer) {
+ // Use a custom Dial timeout for the EC2 Metadata service to account
+ // for the possibility the application might not be running in an
+ // environment with the service present. The client should fail fast in
+ // this case.
+ d.Timeout = defaultDialerTimeout
+ }).
+ WithTransportOptions(func(tr *http.Transport) {
+ // Use a custom Transport timeout for the EC2 Metadata service to
+ // account for the possibility that the application might be running in
+ // a container, and EC2Metadata service drops the connection after a
+ // single IP Hop. The client should fail fast in this case.
+ tr.ResponseHeaderTimeout = defaultResponseHeaderTimeout
+ })
+ }
+
+ return client
+}
+
+func resolveClientEnableState(cfg aws.Config, options *Options) error {
+ if options.ClientEnableState != ClientDefaultEnableState {
+ return nil
+ }
+ value, found, err := internalconfig.ResolveClientEnableState(cfg.ConfigSources)
+ if err != nil || !found {
+ return err
+ }
+ options.ClientEnableState = value
+ return nil
+}
+
+func resolveEndpointModeConfig(cfg aws.Config, options *Options) error {
+ if options.EndpointMode != EndpointModeStateUnset {
+ return nil
+ }
+ value, found, err := internalconfig.ResolveEndpointModeConfig(cfg.ConfigSources)
+ if err != nil || !found {
+ return err
+ }
+ options.EndpointMode = value
+ return nil
+}
+
+func resolveEndpointConfig(cfg aws.Config, options *Options) error {
+ if len(options.Endpoint) != 0 {
+ return nil
+ }
+ value, found, err := internalconfig.ResolveEndpointConfig(cfg.ConfigSources)
+ if err != nil || !found {
+ return err
+ }
+ options.Endpoint = value
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetDynamicData.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetDynamicData.go
new file mode 100644
index 000000000..9e3bdb0e6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetDynamicData.go
@@ -0,0 +1,76 @@
+package imds
+
+import (
+ "context"
+ "fmt"
+ "io"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const getDynamicDataPath = "/latest/dynamic"
+
+// GetDynamicData 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 *Client) GetDynamicData(ctx context.Context, params *GetDynamicDataInput, optFns ...func(*Options)) (*GetDynamicDataOutput, error) {
+ if params == nil {
+ params = &GetDynamicDataInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetDynamicData", params, optFns,
+ addGetDynamicDataMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetDynamicDataOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// GetDynamicDataInput provides the input parameters for the GetDynamicData
+// operation.
+type GetDynamicDataInput struct {
+ // The relative dynamic data path to retrieve. Can be empty string to
+ // retrieve a response containing a new line separated list of dynamic data
+ // resources available.
+ //
+ // Must not include the dynamic data base path.
+ //
+ // May include leading slash. If Path includes trailing slash the trailing
+ // slash will be included in the request for the resource.
+ Path string
+}
+
+// GetDynamicDataOutput provides the output parameters for the GetDynamicData
+// operation.
+type GetDynamicDataOutput struct {
+ Content io.ReadCloser
+
+ ResultMetadata middleware.Metadata
+}
+
+func addGetDynamicDataMiddleware(stack *middleware.Stack, options Options) error {
+ return addAPIRequestMiddleware(stack,
+ options,
+ buildGetDynamicDataPath,
+ buildGetDynamicDataOutput)
+}
+
+func buildGetDynamicDataPath(params interface{}) (string, error) {
+ p, ok := params.(*GetDynamicDataInput)
+ if !ok {
+ return "", fmt.Errorf("unknown parameter type %T", params)
+ }
+
+ return appendURIPath(getDynamicDataPath, p.Path), nil
+}
+
+func buildGetDynamicDataOutput(resp *smithyhttp.Response) (interface{}, error) {
+ return &GetDynamicDataOutput{
+ Content: resp.Body,
+ }, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetIAMInfo.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetIAMInfo.go
new file mode 100644
index 000000000..24845dccd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetIAMInfo.go
@@ -0,0 +1,102 @@
+package imds
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "strings"
+ "time"
+
+ "github.com/aws/smithy-go"
+ smithyio "github.com/aws/smithy-go/io"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const getIAMInfoPath = getMetadataPath + "/iam/info"
+
+// GetIAMInfo retrieves an identity document describing an
+// instance. Error is returned if the request fails or is unable to parse
+// the response.
+func (c *Client) GetIAMInfo(
+ ctx context.Context, params *GetIAMInfoInput, optFns ...func(*Options),
+) (
+ *GetIAMInfoOutput, error,
+) {
+ if params == nil {
+ params = &GetIAMInfoInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetIAMInfo", params, optFns,
+ addGetIAMInfoMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetIAMInfoOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// GetIAMInfoInput provides the input parameters for GetIAMInfo operation.
+type GetIAMInfoInput struct{}
+
+// GetIAMInfoOutput provides the output parameters for GetIAMInfo operation.
+type GetIAMInfoOutput struct {
+ IAMInfo
+
+ ResultMetadata middleware.Metadata
+}
+
+func addGetIAMInfoMiddleware(stack *middleware.Stack, options Options) error {
+ return addAPIRequestMiddleware(stack,
+ options,
+ buildGetIAMInfoPath,
+ buildGetIAMInfoOutput,
+ )
+}
+
+func buildGetIAMInfoPath(params interface{}) (string, error) {
+ return getIAMInfoPath, nil
+}
+
+func buildGetIAMInfoOutput(resp *smithyhttp.Response) (v interface{}, err error) {
+ defer func() {
+ closeErr := resp.Body.Close()
+ if err == nil {
+ err = closeErr
+ } else if closeErr != nil {
+ err = fmt.Errorf("response body close error: %v, original error: %w", closeErr, err)
+ }
+ }()
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(resp.Body, ringBuffer)
+
+ imdsResult := &GetIAMInfoOutput{}
+ if err = json.NewDecoder(body).Decode(&imdsResult.IAMInfo); err != nil {
+ return nil, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode instance identity document, %w", err),
+ Snapshot: ringBuffer.Bytes(),
+ }
+ }
+ // Any code other success is an error
+ if !strings.EqualFold(imdsResult.Code, "success") {
+ return nil, fmt.Errorf("failed to get EC2 IMDS IAM info, %s",
+ imdsResult.Code)
+ }
+
+ return imdsResult, nil
+}
+
+// IAMInfo provides the shape for unmarshaling an IAM info from the metadata
+// API.
+type IAMInfo struct {
+ Code string
+ LastUpdated time.Time
+ InstanceProfileArn string
+ InstanceProfileID string
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetInstanceIdentityDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetInstanceIdentityDocument.go
new file mode 100644
index 000000000..a87758ed3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetInstanceIdentityDocument.go
@@ -0,0 +1,109 @@
+package imds
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "time"
+
+ "github.com/aws/smithy-go"
+ smithyio "github.com/aws/smithy-go/io"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const getInstanceIdentityDocumentPath = getDynamicDataPath + "/instance-identity/document"
+
+// GetInstanceIdentityDocument retrieves an identity document describing an
+// instance. Error is returned if the request fails or is unable to parse
+// the response.
+func (c *Client) GetInstanceIdentityDocument(
+ ctx context.Context, params *GetInstanceIdentityDocumentInput, optFns ...func(*Options),
+) (
+ *GetInstanceIdentityDocumentOutput, error,
+) {
+ if params == nil {
+ params = &GetInstanceIdentityDocumentInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetInstanceIdentityDocument", params, optFns,
+ addGetInstanceIdentityDocumentMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetInstanceIdentityDocumentOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// GetInstanceIdentityDocumentInput provides the input parameters for
+// GetInstanceIdentityDocument operation.
+type GetInstanceIdentityDocumentInput struct{}
+
+// GetInstanceIdentityDocumentOutput provides the output parameters for
+// GetInstanceIdentityDocument operation.
+type GetInstanceIdentityDocumentOutput struct {
+ InstanceIdentityDocument
+
+ ResultMetadata middleware.Metadata
+}
+
+func addGetInstanceIdentityDocumentMiddleware(stack *middleware.Stack, options Options) error {
+ return addAPIRequestMiddleware(stack,
+ options,
+ buildGetInstanceIdentityDocumentPath,
+ buildGetInstanceIdentityDocumentOutput,
+ )
+}
+
+func buildGetInstanceIdentityDocumentPath(params interface{}) (string, error) {
+ return getInstanceIdentityDocumentPath, nil
+}
+
+func buildGetInstanceIdentityDocumentOutput(resp *smithyhttp.Response) (v interface{}, err error) {
+ defer func() {
+ closeErr := resp.Body.Close()
+ if err == nil {
+ err = closeErr
+ } else if closeErr != nil {
+ err = fmt.Errorf("response body close error: %v, original error: %w", closeErr, err)
+ }
+ }()
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(resp.Body, ringBuffer)
+
+ output := &GetInstanceIdentityDocumentOutput{}
+ if err = json.NewDecoder(body).Decode(&output.InstanceIdentityDocument); err != nil {
+ return nil, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode instance identity document, %w", err),
+ Snapshot: ringBuffer.Bytes(),
+ }
+ }
+
+ return output, nil
+}
+
+// InstanceIdentityDocument provides the shape for unmarshaling
+// an instance identity document
+type InstanceIdentityDocument struct {
+ DevpayProductCodes []string `json:"devpayProductCodes"`
+ MarketplaceProductCodes []string `json:"marketplaceProductCodes"`
+ AvailabilityZone string `json:"availabilityZone"`
+ PrivateIP string `json:"privateIp"`
+ Version string `json:"version"`
+ Region string `json:"region"`
+ InstanceID string `json:"instanceId"`
+ BillingProducts []string `json:"billingProducts"`
+ InstanceType string `json:"instanceType"`
+ AccountID string `json:"accountId"`
+ PendingTime time.Time `json:"pendingTime"`
+ ImageID string `json:"imageId"`
+ KernelID string `json:"kernelId"`
+ RamdiskID string `json:"ramdiskId"`
+ Architecture string `json:"architecture"`
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetMetadata.go
new file mode 100644
index 000000000..cb0ce4c00
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetMetadata.go
@@ -0,0 +1,76 @@
+package imds
+
+import (
+ "context"
+ "fmt"
+ "io"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const getMetadataPath = "/latest/meta-data"
+
+// GetMetadata uses the path provided to request information from the Amazon
+// EC2 Instance Metadata Service. The content will be returned as a string, or
+// error if the request failed.
+func (c *Client) GetMetadata(ctx context.Context, params *GetMetadataInput, optFns ...func(*Options)) (*GetMetadataOutput, error) {
+ if params == nil {
+ params = &GetMetadataInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetMetadata", params, optFns,
+ addGetMetadataMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetMetadataOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// GetMetadataInput provides the input parameters for the GetMetadata
+// operation.
+type GetMetadataInput struct {
+ // The relative metadata path to retrieve. Can be empty string to retrieve
+ // a response containing a new line separated list of metadata resources
+ // available.
+ //
+ // Must not include the metadata base path.
+ //
+ // May include leading slash. If Path includes trailing slash the trailing slash
+ // will be included in the request for the resource.
+ Path string
+}
+
+// GetMetadataOutput provides the output parameters for the GetMetadata
+// operation.
+type GetMetadataOutput struct {
+ Content io.ReadCloser
+
+ ResultMetadata middleware.Metadata
+}
+
+func addGetMetadataMiddleware(stack *middleware.Stack, options Options) error {
+ return addAPIRequestMiddleware(stack,
+ options,
+ buildGetMetadataPath,
+ buildGetMetadataOutput)
+}
+
+func buildGetMetadataPath(params interface{}) (string, error) {
+ p, ok := params.(*GetMetadataInput)
+ if !ok {
+ return "", fmt.Errorf("unknown parameter type %T", params)
+ }
+
+ return appendURIPath(getMetadataPath, p.Path), nil
+}
+
+func buildGetMetadataOutput(resp *smithyhttp.Response) (interface{}, error) {
+ return &GetMetadataOutput{
+ Content: resp.Body,
+ }, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetRegion.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetRegion.go
new file mode 100644
index 000000000..7b9b48912
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetRegion.go
@@ -0,0 +1,72 @@
+package imds
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// GetRegion retrieves an identity document describing an
+// instance. Error is returned if the request fails or is unable to parse
+// the response.
+func (c *Client) GetRegion(
+ ctx context.Context, params *GetRegionInput, optFns ...func(*Options),
+) (
+ *GetRegionOutput, error,
+) {
+ if params == nil {
+ params = &GetRegionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetRegion", params, optFns,
+ addGetRegionMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetRegionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// GetRegionInput provides the input parameters for GetRegion operation.
+type GetRegionInput struct{}
+
+// GetRegionOutput provides the output parameters for GetRegion operation.
+type GetRegionOutput struct {
+ Region string
+
+ ResultMetadata middleware.Metadata
+}
+
+func addGetRegionMiddleware(stack *middleware.Stack, options Options) error {
+ return addAPIRequestMiddleware(stack,
+ options,
+ buildGetInstanceIdentityDocumentPath,
+ buildGetRegionOutput,
+ )
+}
+
+func buildGetRegionOutput(resp *smithyhttp.Response) (interface{}, error) {
+ out, err := buildGetInstanceIdentityDocumentOutput(resp)
+ if err != nil {
+ return nil, err
+ }
+
+ result, ok := out.(*GetInstanceIdentityDocumentOutput)
+ if !ok {
+ return nil, fmt.Errorf("unexpected instance identity document type, %T", out)
+ }
+
+ region := result.Region
+ if len(region) == 0 {
+ return "", fmt.Errorf("instance metadata did not return a region value")
+ }
+
+ return &GetRegionOutput{
+ Region: region,
+ }, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetToken.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetToken.go
new file mode 100644
index 000000000..841f802c1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetToken.go
@@ -0,0 +1,118 @@
+package imds
+
+import (
+ "context"
+ "fmt"
+ "io"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const getTokenPath = "/latest/api/token"
+const tokenTTLHeader = "X-Aws-Ec2-Metadata-Token-Ttl-Seconds"
+
+// getToken uses the duration to return a token for EC2 IMDS, or an error if
+// the request failed.
+func (c *Client) getToken(ctx context.Context, params *getTokenInput, optFns ...func(*Options)) (*getTokenOutput, error) {
+ if params == nil {
+ params = &getTokenInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "getToken", params, optFns,
+ addGetTokenMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*getTokenOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type getTokenInput struct {
+ TokenTTL time.Duration
+}
+
+type getTokenOutput struct {
+ Token string
+ TokenTTL time.Duration
+
+ ResultMetadata middleware.Metadata
+}
+
+func addGetTokenMiddleware(stack *middleware.Stack, options Options) error {
+ err := addRequestMiddleware(stack,
+ options,
+ "PUT",
+ buildGetTokenPath,
+ buildGetTokenOutput)
+ if err != nil {
+ return err
+ }
+
+ err = stack.Serialize.Add(&tokenTTLRequestHeader{}, middleware.After)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func buildGetTokenPath(interface{}) (string, error) {
+ return getTokenPath, nil
+}
+
+func buildGetTokenOutput(resp *smithyhttp.Response) (v interface{}, err error) {
+ defer func() {
+ closeErr := resp.Body.Close()
+ if err == nil {
+ err = closeErr
+ } else if closeErr != nil {
+ err = fmt.Errorf("response body close error: %v, original error: %w", closeErr, err)
+ }
+ }()
+
+ ttlHeader := resp.Header.Get(tokenTTLHeader)
+ tokenTTL, err := strconv.ParseInt(ttlHeader, 10, 64)
+ if err != nil {
+ return nil, fmt.Errorf("unable to parse API token, %w", err)
+ }
+
+ var token strings.Builder
+ if _, err = io.Copy(&token, resp.Body); err != nil {
+ return nil, fmt.Errorf("unable to read API token, %w", err)
+ }
+
+ return &getTokenOutput{
+ Token: token.String(),
+ TokenTTL: time.Duration(tokenTTL) * time.Second,
+ }, nil
+}
+
+type tokenTTLRequestHeader struct{}
+
+func (*tokenTTLRequestHeader) ID() string { return "tokenTTLRequestHeader" }
+func (*tokenTTLRequestHeader) HandleSerialize(
+ ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("expect HTTP transport, got %T", in.Request)
+ }
+
+ input, ok := in.Parameters.(*getTokenInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("expect getTokenInput, got %T", in.Parameters)
+ }
+
+ req.Header.Set(tokenTTLHeader, strconv.Itoa(int(input.TokenTTL/time.Second)))
+
+ return next.HandleSerialize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetUserData.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetUserData.go
new file mode 100644
index 000000000..88aa61e9a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetUserData.go
@@ -0,0 +1,60 @@
+package imds
+
+import (
+ "context"
+ "io"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const getUserDataPath = "/latest/user-data"
+
+// GetUserData 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 *Client) GetUserData(ctx context.Context, params *GetUserDataInput, optFns ...func(*Options)) (*GetUserDataOutput, error) {
+ if params == nil {
+ params = &GetUserDataInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetUserData", params, optFns,
+ addGetUserDataMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetUserDataOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// GetUserDataInput provides the input parameters for the GetUserData
+// operation.
+type GetUserDataInput struct{}
+
+// GetUserDataOutput provides the output parameters for the GetUserData
+// operation.
+type GetUserDataOutput struct {
+ Content io.ReadCloser
+
+ ResultMetadata middleware.Metadata
+}
+
+func addGetUserDataMiddleware(stack *middleware.Stack, options Options) error {
+ return addAPIRequestMiddleware(stack,
+ options,
+ buildGetUserDataPath,
+ buildGetUserDataOutput)
+}
+
+func buildGetUserDataPath(params interface{}) (string, error) {
+ return getUserDataPath, nil
+}
+
+func buildGetUserDataOutput(resp *smithyhttp.Response) (interface{}, error) {
+ return &GetUserDataOutput{
+ Content: resp.Body,
+ }, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/doc.go
new file mode 100644
index 000000000..bacdb5d21
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/doc.go
@@ -0,0 +1,11 @@
+// Package imds provides the API client for interacting with the Amazon EC2
+// Instance Metadata Service.
+//
+// All Client operation calls have a default timeout. If the operation is not
+// completed before this timeout expires, the operation will be canceled. This
+// timeout can be overridden by providing Context with a timeout or deadline
+// with calling the client's operations.
+//
+// See the EC2 IMDS user guide for more information on using the API.
+// https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html
+package imds
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
new file mode 100644
index 000000000..caf7671ee
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package imds
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.12.17"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config/resolvers.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config/resolvers.go
new file mode 100644
index 000000000..d72fcb562
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config/resolvers.go
@@ -0,0 +1,98 @@
+package config
+
+import (
+ "fmt"
+ "strings"
+)
+
+// ClientEnableState provides an enumeration if the client is enabled,
+// disabled, or default behavior.
+type ClientEnableState uint
+
+// Enumeration values for ClientEnableState
+const (
+ ClientDefaultEnableState ClientEnableState = iota
+ ClientDisabled
+ ClientEnabled
+)
+
+// EndpointModeState is the EC2 IMDS Endpoint Configuration Mode
+type EndpointModeState uint
+
+// Enumeration values for ClientEnableState
+const (
+ EndpointModeStateUnset EndpointModeState = iota
+ EndpointModeStateIPv4
+ EndpointModeStateIPv6
+)
+
+// SetFromString sets the EndpointModeState based on the provided string value. Unknown values will default to EndpointModeStateUnset
+func (e *EndpointModeState) SetFromString(v string) error {
+ v = strings.TrimSpace(v)
+
+ switch {
+ case len(v) == 0:
+ *e = EndpointModeStateUnset
+ case strings.EqualFold(v, "IPv6"):
+ *e = EndpointModeStateIPv6
+ case strings.EqualFold(v, "IPv4"):
+ *e = EndpointModeStateIPv4
+ default:
+ return fmt.Errorf("unknown EC2 IMDS endpoint mode, must be either IPv6 or IPv4")
+ }
+ return nil
+}
+
+// ClientEnableStateResolver is a config resolver interface for retrieving whether the IMDS client is disabled.
+type ClientEnableStateResolver interface {
+ GetEC2IMDSClientEnableState() (ClientEnableState, bool, error)
+}
+
+// EndpointModeResolver is a config resolver interface for retrieving the EndpointModeState configuration.
+type EndpointModeResolver interface {
+ GetEC2IMDSEndpointMode() (EndpointModeState, bool, error)
+}
+
+// EndpointResolver is a config resolver interface for retrieving the endpoint.
+type EndpointResolver interface {
+ GetEC2IMDSEndpoint() (string, bool, error)
+}
+
+// ResolveClientEnableState resolves the ClientEnableState from a list of configuration sources.
+func ResolveClientEnableState(sources []interface{}) (value ClientEnableState, found bool, err error) {
+ for _, source := range sources {
+ if resolver, ok := source.(ClientEnableStateResolver); ok {
+ value, found, err = resolver.GetEC2IMDSClientEnableState()
+ if err != nil || found {
+ return value, found, err
+ }
+ }
+ }
+ return value, found, err
+}
+
+// ResolveEndpointModeConfig resolves the EndpointModeState from a list of configuration sources.
+func ResolveEndpointModeConfig(sources []interface{}) (value EndpointModeState, found bool, err error) {
+ for _, source := range sources {
+ if resolver, ok := source.(EndpointModeResolver); ok {
+ value, found, err = resolver.GetEC2IMDSEndpointMode()
+ if err != nil || found {
+ return value, found, err
+ }
+ }
+ }
+ return value, found, err
+}
+
+// ResolveEndpointConfig resolves the endpoint from a list of configuration sources.
+func ResolveEndpointConfig(sources []interface{}) (value string, found bool, err error) {
+ for _, source := range sources {
+ if resolver, ok := source.(EndpointResolver); ok {
+ value, found, err = resolver.GetEC2IMDSEndpoint()
+ if err != nil || found {
+ return value, found, err
+ }
+ }
+ }
+ return value, found, err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go
new file mode 100644
index 000000000..605cbd131
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go
@@ -0,0 +1,266 @@
+package imds
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "io/ioutil"
+ "net/url"
+ "path"
+ "time"
+
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+func addAPIRequestMiddleware(stack *middleware.Stack,
+ options Options,
+ getPath func(interface{}) (string, error),
+ getOutput func(*smithyhttp.Response) (interface{}, error),
+) (err error) {
+ err = addRequestMiddleware(stack, options, "GET", getPath, getOutput)
+ if err != nil {
+ return err
+ }
+
+ // Token Serializer build and state management.
+ if !options.disableAPIToken {
+ err = stack.Finalize.Insert(options.tokenProvider, (*retry.Attempt)(nil).ID(), middleware.After)
+ if err != nil {
+ return err
+ }
+
+ err = stack.Deserialize.Insert(options.tokenProvider, "OperationDeserializer", middleware.Before)
+ if err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func addRequestMiddleware(stack *middleware.Stack,
+ options Options,
+ method string,
+ getPath func(interface{}) (string, error),
+ getOutput func(*smithyhttp.Response) (interface{}, error),
+) (err error) {
+ err = awsmiddleware.AddSDKAgentKey(awsmiddleware.FeatureMetadata, "ec2-imds")(stack)
+ if err != nil {
+ return err
+ }
+
+ // Operation timeout
+ err = stack.Initialize.Add(&operationTimeout{
+ DefaultTimeout: defaultOperationTimeout,
+ }, middleware.Before)
+ if err != nil {
+ return err
+ }
+
+ // Operation Serializer
+ err = stack.Serialize.Add(&serializeRequest{
+ GetPath: getPath,
+ Method: method,
+ }, middleware.After)
+ if err != nil {
+ return err
+ }
+
+ // Operation endpoint resolver
+ err = stack.Serialize.Insert(&resolveEndpoint{
+ Endpoint: options.Endpoint,
+ EndpointMode: options.EndpointMode,
+ }, "OperationSerializer", middleware.Before)
+ if err != nil {
+ return err
+ }
+
+ // Operation Deserializer
+ err = stack.Deserialize.Add(&deserializeResponse{
+ GetOutput: getOutput,
+ }, middleware.After)
+ if err != nil {
+ return err
+ }
+
+ // Retry support
+ return retry.AddRetryMiddlewares(stack, retry.AddRetryMiddlewaresOptions{
+ Retryer: options.Retryer,
+ LogRetryAttempts: options.ClientLogMode.IsRetries(),
+ })
+}
+
+type serializeRequest struct {
+ GetPath func(interface{}) (string, error)
+ Method string
+}
+
+func (*serializeRequest) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *serializeRequest) HandleSerialize(
+ ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ reqPath, err := m.GetPath(in.Parameters)
+ if err != nil {
+ return out, metadata, fmt.Errorf("unable to get request URL path, %w", err)
+ }
+
+ request.Request.URL.Path = reqPath
+ request.Request.Method = m.Method
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type deserializeResponse struct {
+ GetOutput func(*smithyhttp.Response) (interface{}, error)
+}
+
+func (*deserializeResponse) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *deserializeResponse) HandleDeserialize(
+ ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler,
+) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ resp, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, fmt.Errorf(
+ "unexpected transport response type, %T, want %T", out.RawResponse, resp)
+ }
+ defer resp.Body.Close()
+
+ // read the full body so that any operation timeouts cleanup will not race
+ // the body being read.
+ body, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return out, metadata, fmt.Errorf("read response body failed, %w", err)
+ }
+ resp.Body = ioutil.NopCloser(bytes.NewReader(body))
+
+ // Anything that's not 200 |< 300 is error
+ if resp.StatusCode < 200 || resp.StatusCode >= 300 {
+ return out, metadata, &smithyhttp.ResponseError{
+ Response: resp,
+ Err: fmt.Errorf("request to EC2 IMDS failed"),
+ }
+ }
+
+ result, err := m.GetOutput(resp)
+ if err != nil {
+ return out, metadata, fmt.Errorf(
+ "unable to get deserialized result for response, %w", err,
+ )
+ }
+ out.Result = result
+
+ return out, metadata, err
+}
+
+type resolveEndpoint struct {
+ Endpoint string
+ EndpointMode EndpointModeState
+}
+
+func (*resolveEndpoint) ID() string {
+ return "ResolveEndpoint"
+}
+
+func (m *resolveEndpoint) HandleSerialize(
+ ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ var endpoint string
+ if len(m.Endpoint) > 0 {
+ endpoint = m.Endpoint
+ } else {
+ switch m.EndpointMode {
+ case EndpointModeStateIPv6:
+ endpoint = defaultIPv6Endpoint
+ case EndpointModeStateIPv4:
+ fallthrough
+ case EndpointModeStateUnset:
+ endpoint = defaultIPv4Endpoint
+ default:
+ return out, metadata, fmt.Errorf("unsupported IMDS endpoint mode")
+ }
+ }
+
+ req.URL, err = url.Parse(endpoint)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err)
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
+
+const (
+ defaultOperationTimeout = 5 * time.Second
+)
+
+// operationTimeout adds a timeout on the middleware stack if the Context the
+// stack was called with does not have a deadline. The next middleware must
+// complete before the timeout, or the context will be canceled.
+//
+// If DefaultTimeout is zero, no default timeout will be used if the Context
+// does not have a timeout.
+//
+// The next middleware must also ensure that any resources that are also
+// canceled by the stack's context are completely consumed before returning.
+// Otherwise the timeout cleanup will race the resource being consumed
+// upstream.
+type operationTimeout struct {
+ DefaultTimeout time.Duration
+}
+
+func (*operationTimeout) ID() string { return "OperationTimeout" }
+
+func (m *operationTimeout) HandleInitialize(
+ ctx context.Context, input middleware.InitializeInput, next middleware.InitializeHandler,
+) (
+ output middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if _, ok := ctx.Deadline(); !ok && m.DefaultTimeout != 0 {
+ var cancelFn func()
+ ctx, cancelFn = context.WithTimeout(ctx, m.DefaultTimeout)
+ defer cancelFn()
+ }
+
+ return next.HandleInitialize(ctx, input)
+}
+
+// appendURIPath joins a URI path component to the existing path with `/`
+// separators between the path components. If the path being added ends with a
+// trailing `/` that slash will be maintained.
+func appendURIPath(base, add string) string {
+ reqPath := path.Join(base, add)
+ if len(add) != 0 && add[len(add)-1] == '/' {
+ reqPath += "/"
+ }
+ return reqPath
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/token_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/token_provider.go
new file mode 100644
index 000000000..275fade48
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/token_provider.go
@@ -0,0 +1,237 @@
+package imds
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "net/http"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const (
+ // Headers for Token and TTL
+ tokenHeader = "x-aws-ec2-metadata-token"
+ defaultTokenTTL = 5 * time.Minute
+)
+
+type tokenProvider struct {
+ client *Client
+ tokenTTL time.Duration
+
+ token *apiToken
+ tokenMux sync.RWMutex
+
+ disabled uint32 // Atomic updated
+}
+
+func newTokenProvider(client *Client, ttl time.Duration) *tokenProvider {
+ return &tokenProvider{
+ client: client,
+ tokenTTL: ttl,
+ }
+}
+
+// apiToken provides the API token used by all operation calls for th EC2
+// Instance metadata service.
+type apiToken struct {
+ token string
+ expires time.Time
+}
+
+var timeNow = time.Now
+
+// Expired returns if the token is expired.
+func (t *apiToken) Expired() bool {
+ // Calling Round(0) on the current time will truncate the monotonic reading only. Ensures credential expiry
+ // time is always based on reported wall-clock time.
+ return timeNow().Round(0).After(t.expires)
+}
+
+func (t *tokenProvider) ID() string { return "APITokenProvider" }
+
+// HandleFinalize is the finalize stack middleware, that if the token provider is
+// enabled, will attempt to add the cached API token to the request. If the API
+// token is not cached, it will be retrieved in a separate API call, getToken.
+//
+// For retry attempts, handler must be added after attempt retryer.
+//
+// If request for getToken fails the token provider may be disabled from future
+// requests, depending on the response status code.
+func (t *tokenProvider) HandleFinalize(
+ ctx context.Context, input middleware.FinalizeInput, next middleware.FinalizeHandler,
+) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ if !t.enabled() {
+ // short-circuits to insecure data flow if token provider is disabled.
+ return next.HandleFinalize(ctx, input)
+ }
+
+ req, ok := input.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unexpected transport request type %T", input.Request)
+ }
+
+ tok, err := t.getToken(ctx)
+ if err != nil {
+ // If the error allows the token to downgrade to insecure flow allow that.
+ var bypassErr *bypassTokenRetrievalError
+ if errors.As(err, &bypassErr) {
+ return next.HandleFinalize(ctx, input)
+ }
+
+ return out, metadata, fmt.Errorf("failed to get API token, %w", err)
+ }
+
+ req.Header.Set(tokenHeader, tok.token)
+
+ return next.HandleFinalize(ctx, input)
+}
+
+// HandleDeserialize is the deserialize stack middleware for determining if the
+// operation the token provider is decorating failed because of a 401
+// unauthorized status code. If the operation failed for that reason the token
+// provider needs to be re-enabled so that it can start adding the API token to
+// operation calls.
+func (t *tokenProvider) HandleDeserialize(
+ ctx context.Context, input middleware.DeserializeInput, next middleware.DeserializeHandler,
+) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, input)
+ if err == nil {
+ return out, metadata, err
+ }
+
+ resp, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, fmt.Errorf("expect HTTP transport, got %T", out.RawResponse)
+ }
+
+ if resp.StatusCode == http.StatusUnauthorized { // unauthorized
+ err = &retryableError{Err: err}
+ t.enable()
+ }
+
+ return out, metadata, err
+}
+
+type retryableError struct {
+ Err error
+}
+
+func (*retryableError) RetryableError() bool { return true }
+
+func (e *retryableError) Error() string { return e.Err.Error() }
+
+func (t *tokenProvider) getToken(ctx context.Context) (tok *apiToken, err error) {
+ if !t.enabled() {
+ return nil, &bypassTokenRetrievalError{
+ Err: fmt.Errorf("cannot get API token, provider disabled"),
+ }
+ }
+
+ t.tokenMux.RLock()
+ tok = t.token
+ t.tokenMux.RUnlock()
+
+ if tok != nil && !tok.Expired() {
+ return tok, nil
+ }
+
+ tok, err = t.updateToken(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("cannot get API token, %w", err)
+ }
+
+ return tok, nil
+}
+
+func (t *tokenProvider) updateToken(ctx context.Context) (*apiToken, error) {
+ t.tokenMux.Lock()
+ defer t.tokenMux.Unlock()
+
+ // Prevent multiple requests to update retrieving the token.
+ if t.token != nil && !t.token.Expired() {
+ tok := t.token
+ return tok, nil
+ }
+
+ result, err := t.client.getToken(ctx, &getTokenInput{
+ TokenTTL: t.tokenTTL,
+ })
+ if err != nil {
+ // change the disabled flag on token provider to true, when error is request timeout error.
+ var statusErr interface{ HTTPStatusCode() int }
+ if errors.As(err, &statusErr) {
+ switch statusErr.HTTPStatusCode() {
+
+ // Disable get token if failed because of 403, 404, or 405
+ case http.StatusForbidden,
+ http.StatusNotFound,
+ http.StatusMethodNotAllowed:
+
+ t.disable()
+
+ // 400 errors are terminal, and need to be upstreamed
+ case http.StatusBadRequest:
+ return nil, err
+ }
+ }
+
+ // Disable if request send failed or timed out getting response
+ var re *smithyhttp.RequestSendError
+ var ce *smithy.CanceledError
+ if errors.As(err, &re) || errors.As(err, &ce) {
+ atomic.StoreUint32(&t.disabled, 1)
+ }
+
+ // Token couldn't be retrieved, but bypass this, and allow the
+ // request to continue.
+ return nil, &bypassTokenRetrievalError{Err: err}
+ }
+
+ tok := &apiToken{
+ token: result.Token,
+ expires: timeNow().Add(result.TokenTTL),
+ }
+ t.token = tok
+
+ return tok, nil
+}
+
+type bypassTokenRetrievalError struct {
+ Err error
+}
+
+func (e *bypassTokenRetrievalError) Error() string {
+ return fmt.Sprintf("bypass token retrieval, %v", e.Err)
+}
+
+func (e *bypassTokenRetrievalError) Unwrap() error { return e.Err }
+
+// enabled returns if the token provider is current enabled or not.
+func (t *tokenProvider) enabled() bool {
+ return atomic.LoadUint32(&t.disabled) == 0
+}
+
+// disable disables the token provider and it will no longer attempt to inject
+// the token, nor request updates.
+func (t *tokenProvider) disable() {
+ atomic.StoreUint32(&t.disabled, 1)
+}
+
+// enable enables the token provide to start refreshing tokens, and adding them
+// to the pending request.
+func (t *tokenProvider) enable() {
+ t.tokenMux.Lock()
+ t.token = nil
+ t.tokenMux.Unlock()
+ atomic.StoreUint32(&t.disabled, 0)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md
new file mode 100644
index 000000000..a0b905c02
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md
@@ -0,0 +1,77 @@
+# v1.7.1 (2021-11-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.0 (2021-11-06)
+
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.0 (2021-10-21)
+
+* **Feature**: Updated to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.4 (2021-10-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.3 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.2 (2021-09-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.1 (2021-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.0 (2021-08-27)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.1 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2021-08-04)
+
+* **Feature**: adds error handling for defered close calls
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.2 (2021-07-15)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.1 (2021-07-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2021-06-25)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.3 (2021-06-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.2 (2021-05-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.1 (2021-05-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/aws/aws-sdk-go-v2/feature/s3/manager/api.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/api.go
new file mode 100644
index 000000000..4059f9851
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/api.go
@@ -0,0 +1,37 @@
+package manager
+
+import (
+ "context"
+
+ "github.com/aws/aws-sdk-go-v2/service/s3"
+)
+
+// DeleteObjectsAPIClient is an S3 API client that can invoke the DeleteObjects operation.
+type DeleteObjectsAPIClient interface {
+ DeleteObjects(context.Context, *s3.DeleteObjectsInput, ...func(*s3.Options)) (*s3.DeleteObjectsOutput, error)
+}
+
+// DownloadAPIClient is an S3 API client that can invoke the GetObject operation.
+type DownloadAPIClient interface {
+ GetObject(context.Context, *s3.GetObjectInput, ...func(*s3.Options)) (*s3.GetObjectOutput, error)
+}
+
+// HeadBucketAPIClient is an S3 API client that can invoke the HeadBucket operation.
+type HeadBucketAPIClient interface {
+ HeadBucket(context.Context, *s3.HeadBucketInput, ...func(*s3.Options)) (*s3.HeadBucketOutput, error)
+}
+
+// ListObjectsV2APIClient is an S3 API client that can invoke the ListObjectV2 operation.
+type ListObjectsV2APIClient interface {
+ ListObjectsV2(context.Context, *s3.ListObjectsV2Input, ...func(*s3.Options)) (*s3.ListObjectsV2Output, error)
+}
+
+// UploadAPIClient is an S3 API client that can invoke PutObject, UploadPart, CreateMultipartUpload,
+// CompleteMultipartUpload, and AbortMultipartUpload operations.
+type UploadAPIClient interface {
+ PutObject(context.Context, *s3.PutObjectInput, ...func(*s3.Options)) (*s3.PutObjectOutput, error)
+ UploadPart(context.Context, *s3.UploadPartInput, ...func(*s3.Options)) (*s3.UploadPartOutput, error)
+ CreateMultipartUpload(context.Context, *s3.CreateMultipartUploadInput, ...func(*s3.Options)) (*s3.CreateMultipartUploadOutput, error)
+ CompleteMultipartUpload(context.Context, *s3.CompleteMultipartUploadInput, ...func(*s3.Options)) (*s3.CompleteMultipartUploadOutput, error)
+ AbortMultipartUpload(context.Context, *s3.AbortMultipartUploadInput, ...func(*s3.Options)) (*s3.AbortMultipartUploadOutput, error)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/arn.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/arn.go
similarity index 85%
rename from vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/arn.go
rename to vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/arn.go
index f0a7f9bfc..d3b828979 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/arn.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/arn.go
@@ -1,8 +1,8 @@
-package s3manager
+package manager
import (
"fmt"
- "github.com/aws/aws-sdk-go/aws/arn"
+ "github.com/aws/aws-sdk-go-v2/aws/arn"
)
func validateSupportedARNType(bucket string) error {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/bucket_region.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/bucket_region.go
new file mode 100644
index 000000000..2d8bd7e00
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/bucket_region.go
@@ -0,0 +1,139 @@
+package manager
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "net/http"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/service/s3"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const bucketRegionHeader = "X-Amz-Bucket-Region"
+
+// GetBucketRegion will attempt to get the region for a bucket using the
+// client's configured region to determine which AWS partition to perform the query on.
+//
+// The request will not be signed, and will not use your AWS credentials.
+//
+// A BucketNotFound error will be returned if the bucket does not exist in the
+// AWS partition the client region belongs to.
+//
+// For example to get the region of a bucket which exists in "eu-central-1"
+// you could provide a region hint of "us-west-2".
+//
+// cfg, err := config.LoadDefaultConfig(context.TODO())
+// if err != nil {
+// log.Println("error:", err)
+// return
+// }
+//
+// bucket := "my-bucket"
+// region, err := manager.GetBucketRegion(ctx, s3.NewFromConfig(cfg), bucket)
+// if err != nil {
+// var bnf manager.BucketNotFound
+// if errors.As(err, &bnf) {
+// fmt.Fprintf(os.Stderr, "unable to find bucket %s's region\n", bucket)
+// }
+// return
+// }
+// fmt.Printf("Bucket %s is in %s region\n", bucket, region)
+//
+// By default the request will be made to the Amazon S3 endpoint using the virtual-hosted-style addressing.
+//
+// bucketname.s3.us-west-2.amazonaws.com/
+//
+// To configure the GetBucketRegion to make a request via the Amazon
+// S3 FIPS endpoints directly when a FIPS region name is not available, (e.g.
+// fips-us-gov-west-1) set the EndpointResolver on the config or client the
+// utility is called with.
+//
+// cfg, err := config.LoadDefaultConfig(context.TODO(),
+// config.WithEndpointResolver(
+// aws.EndpointResolverFunc(func(service, region string) (aws.Endpoint, error) {
+// return aws.Endpoint{URL: "https://s3-fips.us-west-2.amazonaws.com"}, nil
+// }),
+// )
+// if err != nil {
+// panic(err)
+// }
+func GetBucketRegion(ctx context.Context, client HeadBucketAPIClient, bucket string, optFns ...func(*s3.Options)) (string, error) {
+ var captureBucketRegion deserializeBucketRegion
+
+ clientOptionFns := make([]func(*s3.Options), len(optFns)+1)
+ clientOptionFns[0] = func(options *s3.Options) {
+ options.Credentials = aws.AnonymousCredentials{}
+ options.APIOptions = append(options.APIOptions, captureBucketRegion.RegisterMiddleware)
+ }
+ copy(clientOptionFns[1:], optFns)
+
+ _, err := client.HeadBucket(ctx, &s3.HeadBucketInput{
+ Bucket: aws.String(bucket),
+ }, clientOptionFns...)
+ if len(captureBucketRegion.BucketRegion) == 0 && err != nil {
+ var httpStatusErr interface {
+ HTTPStatusCode() int
+ }
+ if !errors.As(err, &httpStatusErr) {
+ return "", err
+ }
+
+ if httpStatusErr.HTTPStatusCode() == http.StatusNotFound {
+ return "", &bucketNotFound{}
+ }
+
+ return "", err
+ }
+
+ return captureBucketRegion.BucketRegion, nil
+}
+
+type deserializeBucketRegion struct {
+ BucketRegion string
+}
+
+func (d *deserializeBucketRegion) RegisterMiddleware(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(d, middleware.After)
+}
+
+func (d *deserializeBucketRegion) ID() string {
+ return "DeserializeBucketRegion"
+}
+
+func (d *deserializeBucketRegion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ resp, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", out.RawResponse)
+ }
+
+ d.BucketRegion = resp.Header.Get(bucketRegionHeader)
+
+ return out, metadata, err
+}
+
+// BucketNotFound indicates the bucket was not found in the partition when calling GetBucketRegion.
+type BucketNotFound interface {
+ error
+
+ isBucketNotFound()
+}
+
+type bucketNotFound struct{}
+
+func (b *bucketNotFound) Error() string {
+ return "bucket not found"
+}
+
+func (b *bucketNotFound) isBucketNotFound() {}
+
+var _ BucketNotFound = (*bucketNotFound)(nil)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/buffered_read_seeker.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/buffered_read_seeker.go
similarity index 94%
rename from vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/buffered_read_seeker.go
rename to vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/buffered_read_seeker.go
index f1d9e85c7..e781aef61 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/buffered_read_seeker.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/buffered_read_seeker.go
@@ -1,9 +1,7 @@
-package s3manager
+package manager
import (
"io"
-
- "github.com/aws/aws-sdk-go/internal/sdkio"
)
// BufferedReadSeeker is buffered io.ReadSeeker
@@ -72,7 +70,7 @@ func (b *BufferedReadSeeker) Seek(offset int64, whence int) (int64, error) {
// ReadAt will read up to len(p) bytes at the given file offset.
// This will result in the buffer being cleared.
func (b *BufferedReadSeeker) ReadAt(p []byte, off int64) (int, error) {
- _, err := b.Seek(off, sdkio.SeekStart)
+ _, err := b.Seek(off, io.SeekStart)
if err != nil {
return 0, err
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/default_read_seeker_write_to.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/default_read_seeker_write_to.go
similarity index 86%
rename from vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/default_read_seeker_write_to.go
rename to vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/default_read_seeker_write_to.go
index e013be27e..e2ab143b6 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/default_read_seeker_write_to.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/default_read_seeker_write_to.go
@@ -1,7 +1,7 @@
//go:build !windows
// +build !windows
-package s3manager
+package manager
func defaultUploadBufferProvider() ReadSeekerWriteToProvider {
return nil
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/default_read_seeker_write_to_windows.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/default_read_seeker_write_to_windows.go
similarity index 86%
rename from vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/default_read_seeker_write_to_windows.go
rename to vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/default_read_seeker_write_to_windows.go
index 687082c30..1ae881c10 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/default_read_seeker_write_to_windows.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/default_read_seeker_write_to_windows.go
@@ -1,4 +1,4 @@
-package s3manager
+package manager
func defaultUploadBufferProvider() ReadSeekerWriteToProvider {
return NewBufferedReadSeekerWriteToPool(1024 * 1024)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/default_writer_read_from.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/default_writer_read_from.go
similarity index 86%
rename from vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/default_writer_read_from.go
rename to vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/default_writer_read_from.go
index 5583c30a4..179fe10f4 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/default_writer_read_from.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/default_writer_read_from.go
@@ -1,7 +1,7 @@
//go:build !windows
// +build !windows
-package s3manager
+package manager
func defaultDownloadBufferProvider() WriterReadFromProvider {
return nil
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/default_writer_read_from_windows.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/default_writer_read_from_windows.go
similarity index 87%
rename from vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/default_writer_read_from_windows.go
rename to vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/default_writer_read_from_windows.go
index 7e9d9579f..88887ff58 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/default_writer_read_from_windows.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/default_writer_read_from_windows.go
@@ -1,4 +1,4 @@
-package s3manager
+package manager
func defaultDownloadBufferProvider() WriterReadFromProvider {
return NewPooledBufferedWriterReadFromProvider(1024 * 1024)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/doc.go
new file mode 100644
index 000000000..31171a698
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/doc.go
@@ -0,0 +1,3 @@
+// Package manager provides utilities to upload and download objects from
+// S3 concurrently. Helpful for when working with large objects.
+package manager
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/download.go
similarity index 63%
rename from vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go
rename to vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/download.go
index 37eb7dd52..a1f3ceb11 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/download.go
@@ -1,6 +1,8 @@
-package s3manager
+package manager
import (
+ "context"
+ "errors"
"fmt"
"io"
"net/http"
@@ -8,15 +10,15 @@ import (
"strings"
"sync"
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "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/service/s3"
- "github.com/aws/aws-sdk-go/service/s3/s3iface"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/internal/awsutil"
+ "github.com/aws/aws-sdk-go-v2/service/s3"
+ "github.com/aws/smithy-go/logging"
)
+const userAgentKey = "s3-transfer"
+
// DefaultDownloadPartSize is the default range of bytes to get at a time when
// using Download().
const DefaultDownloadPartSize = 1024 * 1024 * 5
@@ -25,6 +27,9 @@ const DefaultDownloadPartSize = 1024 * 1024 * 5
// when using Download().
const DefaultDownloadConcurrency = 5
+// DefaultPartBodyMaxRetries is the default number of retries to make when a part fails to download.
+const DefaultPartBodyMaxRetries = 3
+
type errReadingBody struct {
err error
}
@@ -48,6 +53,15 @@ type Downloader struct {
// PartSize is ignored if the Range input parameter is provided.
PartSize int64
+ // PartBodyMaxRetries is the number of retry attempts to make for failed part downloads.
+ PartBodyMaxRetries int
+
+ // Logger to send logging messages to
+ Logger logging.Logger
+
+ // Enable Logging of part download retry attempts
+ LogInterruptedDownloads bool
+
// The number of goroutines to spin up in parallel when sending parts.
// If this is set to zero, the DefaultDownloadConcurrency value will be used.
//
@@ -57,11 +71,11 @@ type Downloader struct {
Concurrency int
// An S3 client to use when performing downloads.
- S3 s3iface.S3API
+ S3 DownloadAPIClient
- // List of request options that will be passed down to individual API
+ // List of client options that will be passed down to individual API
// operation requests made by the downloader.
- RequestOptions []request.Option
+ ClientOptions []func(*s3.Options)
// Defines the buffer strategy used when downloading a part.
//
@@ -72,10 +86,10 @@ type Downloader struct {
BufferProvider WriterReadFromProvider
}
-// WithDownloaderRequestOptions appends to the Downloader's API request options.
-func WithDownloaderRequestOptions(opts ...request.Option) func(*Downloader) {
+// WithDownloaderClientOptions appends to the Downloader's API request options.
+func WithDownloaderClientOptions(opts ...func(*s3.Options)) func(*Downloader) {
return func(d *Downloader) {
- d.RequestOptions = append(d.RequestOptions, opts...)
+ d.ClientOptions = append(d.ClientOptions, opts...)
}
}
@@ -86,27 +100,29 @@ func WithDownloaderRequestOptions(opts ...request.Option) func(*Downloader) {
// interface.
//
// Example:
+// // Load AWS Config
+// cfg, err := config.LoadDefaultConfig(context.TODO())
+// if err != nil {
+// panic(err)
+// }
//
-// // The session the S3 Downloader will use
-// sess := session.Must(session.NewSession())
+// // Create an S3 client using the loaded configuration
+// s3.NewFromConfig(cfg)
//
-// // Create a downloader with the session and default options
-// downloader := s3manager.NewDownloader(sess)
+// // Create a downloader passing it the S3 client
+// downloader := manager.NewDownloader(s3.NewFromConfig(cfg))
//
-// // Create a downloader with the session and custom options
-// downloader := s3manager.NewDownloader(sess, func(d *s3manager.Downloader) {
-// d.PartSize = 64 * 1024 * 1024 // 64MB per part
+// // Create a downloader with the client and custom downloader options
+// downloader := manager.NewDownloader(client, func(d *manager.Downloader) {
+// d.PartSize = 64 * 1024 * 1024 // 64MB per part
// })
-func NewDownloader(c client.ConfigProvider, options ...func(*Downloader)) *Downloader {
- return newDownloader(s3.New(c), options...)
-}
-
-func newDownloader(client s3iface.S3API, options ...func(*Downloader)) *Downloader {
+func NewDownloader(c DownloadAPIClient, options ...func(*Downloader)) *Downloader {
d := &Downloader{
- S3: client,
- PartSize: DefaultDownloadPartSize,
- Concurrency: DefaultDownloadConcurrency,
- BufferProvider: defaultDownloadBufferProvider(),
+ S3: c,
+ PartSize: DefaultDownloadPartSize,
+ PartBodyMaxRetries: DefaultPartBodyMaxRetries,
+ Concurrency: DefaultDownloadConcurrency,
+ BufferProvider: defaultDownloadBufferProvider(),
}
for _, option := range options {
option(d)
@@ -115,58 +131,7 @@ func newDownloader(client s3iface.S3API, options ...func(*Downloader)) *Download
return d
}
-// NewDownloaderWithClient creates a new Downloader instance to downloads
-// objects from S3 in concurrent chunks. Pass in additional functional
-// options to customize the downloader behavior. Requires a S3 service client
-// to make S3 API calls.
-//
-// Example:
-//
-// // The session the S3 Downloader will use
-// sess := session.Must(session.NewSession())
-//
-// // The S3 client the S3 Downloader will use
-// s3Svc := s3.New(sess)
-//
-// // Create a downloader with the s3 client and default options
-// downloader := s3manager.NewDownloaderWithClient(s3Svc)
-//
-// // Create a downloader with the s3 client and custom options
-// downloader := s3manager.NewDownloaderWithClient(s3Svc, func(d *s3manager.Downloader) {
-// d.PartSize = 64 * 1024 * 1024 // 64MB per part
-// })
-func NewDownloaderWithClient(svc s3iface.S3API, options ...func(*Downloader)) *Downloader {
- return newDownloader(svc, options...)
-}
-
-type maxRetrier interface {
- MaxRetries() int
-}
-
-// Download downloads an object in S3 and writes the payload into w using
-// concurrent GET requests. The n int64 returned is the size of the object downloaded
-// in bytes.
-//
-// Additional functional options can be provided to configure the individual
-// download. These options are copies of the Downloader instance Download is called from.
-// Modifying the options will not impact the original Downloader instance.
-//
-// It is safe to call this method concurrently across goroutines.
-//
-// The w io.WriterAt can be satisfied by an os.File to do multipart concurrent
-// downloads, or in memory []byte wrapper using aws.WriteAtBuffer.
-//
-// Specifying a Downloader.Concurrency of 1 will cause the Downloader to
-// download the parts from S3 sequentially.
-//
-// If the GetObjectInput's Range value is provided that will cause the downloader
-// to perform a single GetObjectInput request for that object's range. This will
-// caused the part size, and concurrency configurations to be ignored.
-func (d Downloader) Download(w io.WriterAt, input *s3.GetObjectInput, options ...func(*Downloader)) (n int64, err error) {
- return d.DownloadWithContext(aws.BackgroundContext(), w, input, options...)
-}
-
-// DownloadWithContext downloads an object in S3 and writes the payload into w
+// Download downloads an object in S3 and writes the payload into w
// using concurrent GET requests. The n int64 returned is the size of the object downloaded
// in bytes.
//
@@ -179,11 +144,24 @@ func (d Downloader) Download(w io.WriterAt, input *s3.GetObjectInput, options ..
// Additional functional options can be provided to configure the individual
// download. These options are copies of the Downloader instance Download is
// called from. Modifying the options will not impact the original Downloader
-// instance. Use the WithDownloaderRequestOptions helper function to pass in request
+// instance. Use the WithDownloaderClientOptions helper function to pass in request
// options that will be applied to all API operations made with this downloader.
//
// The w io.WriterAt can be satisfied by an os.File to do multipart concurrent
-// downloads, or in memory []byte wrapper using aws.WriteAtBuffer.
+// downloads, or in memory []byte wrapper using aws.WriteAtBuffer. In case you download
+// files into memory do not forget to pre-allocate memory to avoid additional allocations
+// and GC runs.
+//
+// Example:
+// // pre-allocate in memory buffer, where headObject type is *s3.HeadObjectOutput
+// buf := make([]byte, int(headObject.ContentLength))
+// // wrap with aws.WriteAtBuffer
+// w := s3manager.NewWriteAtBuffer(buf)
+// // download file into the memory
+// numBytesDownloaded, err := downloader.Download(ctx, w, &s3.GetObjectInput{
+// Bucket: aws.String(bucket),
+// Key: aws.String(item),
+// })
//
// Specifying a Downloader.Concurrency of 1 will cause the Downloader to
// download the parts from S3 sequentially.
@@ -193,21 +171,29 @@ func (d Downloader) Download(w io.WriterAt, input *s3.GetObjectInput, options ..
// If the GetObjectInput's Range value is provided that will cause the downloader
// to perform a single GetObjectInput request for that object's range. This will
// caused the part size, and concurrency configurations to be ignored.
-func (d Downloader) DownloadWithContext(ctx aws.Context, w io.WriterAt, input *s3.GetObjectInput, options ...func(*Downloader)) (n int64, err error) {
- if err := validateSupportedARNType(aws.StringValue(input.Bucket)); err != nil {
+func (d Downloader) Download(ctx context.Context, w io.WriterAt, input *s3.GetObjectInput, options ...func(*Downloader)) (n int64, err error) {
+ if err := validateSupportedARNType(aws.ToString(input.Bucket)); err != nil {
return 0, err
}
impl := downloader{w: w, in: input, cfg: d, ctx: ctx}
+ // Copy ClientOptions
+ clientOptions := make([]func(*s3.Options), 0, len(impl.cfg.ClientOptions)+1)
+ clientOptions = append(clientOptions, func(o *s3.Options) {
+ o.APIOptions = append(o.APIOptions, middleware.AddSDKAgentKey(middleware.FeatureMetadata, userAgentKey))
+ })
+ clientOptions = append(clientOptions, impl.cfg.ClientOptions...)
+ impl.cfg.ClientOptions = clientOptions
+
for _, option := range options {
option(&impl.cfg)
}
- impl.cfg.RequestOptions = append(impl.cfg.RequestOptions, request.WithAppendUserAgent("S3Manager"))
- if s, ok := d.S3.(maxRetrier); ok {
- impl.partBodyMaxRetries = s.MaxRetries()
- }
+ // Ensures we don't need nil checks later on
+ impl.cfg.Logger = logging.WithContext(ctx, impl.cfg.Logger)
+
+ impl.partBodyMaxRetries = d.PartBodyMaxRetries
impl.totalBytes = -1
if impl.cfg.Concurrency == 0 {
@@ -221,70 +207,9 @@ func (d Downloader) DownloadWithContext(ctx aws.Context, w io.WriterAt, input *s
return impl.download()
}
-// DownloadWithIterator will download a batched amount of objects in S3 and writes them
-// to the io.WriterAt specificed in the iterator.
-//
-// Example:
-//
-// svc := s3manager.NewDownloader(session)
-//
-// fooFile, err := os.Open("/tmp/foo.file")
-// if err != nil {
-// return err
-// }
-//
-// barFile, err := os.Open("/tmp/bar.file")
-// if err != nil {
-// return err
-// }
-//
-// objects := []s3manager.BatchDownloadObject {
-// {
-// Object: &s3.GetObjectInput {
-// Bucket: aws.String("bucket"),
-// Key: aws.String("foo"),
-// },
-// Writer: fooFile,
-// },
-// {
-// Object: &s3.GetObjectInput {
-// Bucket: aws.String("bucket"),
-// Key: aws.String("bar"),
-// },
-// Writer: barFile,
-// },
-// }
-//
-// iter := &s3manager.DownloadObjectsIterator{Objects: objects}
-// if err := svc.DownloadWithIterator(aws.BackgroundContext(), iter); err != nil {
-// return err
-// }
-func (d Downloader) DownloadWithIterator(ctx aws.Context, iter BatchDownloadIterator, opts ...func(*Downloader)) error {
- var errs []Error
- for iter.Next() {
- object := iter.DownloadObject()
- if _, err := d.DownloadWithContext(ctx, object.Writer, object.Object, opts...); err != nil {
- errs = append(errs, newError(err, object.Object.Bucket, object.Object.Key))
- }
-
- if object.After == nil {
- continue
- }
-
- if err := object.After(); err != nil {
- errs = append(errs, newError(err, object.Object.Bucket, object.Object.Key))
- }
- }
-
- if len(errs) > 0 {
- return NewBatchError("BatchedDownloadIncomplete", "some objects have failed to download.", errs)
- }
- return nil
-}
-
// downloader is the implementation structure used internally by Downloader.
type downloader struct {
- ctx aws.Context
+ ctx context.Context
cfg Downloader
in *s3.GetObjectInput
@@ -307,7 +232,7 @@ func (d *downloader) download() (n int64, err error) {
// If range is specified fall back to single download of that range
// this enables the functionality of ranged gets with the downloader but
// at the cost of no multipart downloads.
- if rng := aws.StringValue(d.in.Range); len(rng) > 0 {
+ if rng := aws.ToString(d.in.Range); len(rng) > 0 {
d.downloadRange(rng)
return d.written, d.err
}
@@ -349,9 +274,13 @@ func (d *downloader) download() (n int64, err error) {
// keep grabbing chunks of data until the range of bytes specified in
// the request is out of range of the content. Once, this happens, a
// 416 should occur.
- e, ok := d.err.(awserr.RequestFailure)
- if ok && e.StatusCode() == http.StatusRequestedRangeNotSatisfiable {
- d.err = nil
+ var responseError interface {
+ HTTPStatusCode() int
+ }
+ if errors.As(d.err, &responseError) {
+ if responseError.HTTPStatusCode() == http.StatusRequestedRangeNotSatisfiable {
+ d.err = nil
+ }
}
}
@@ -444,9 +373,9 @@ func (d *downloader) downloadChunk(chunk dlchunk) error {
}
chunk.cur = 0
- logMessage(d.cfg.S3, aws.LogDebugWithRequestRetries,
- fmt.Sprintf("DEBUG: object part body download interrupted %s, err, %v, retrying attempt %d",
- aws.StringValue(in.Key), err, retry))
+
+ d.cfg.Logger.Logf(logging.Debug, "object part body download interrupted %s, err, %v, retrying attempt %d",
+ aws.ToString(in.Key), err, retry)
}
d.incrWritten(n)
@@ -461,17 +390,13 @@ func (d *downloader) tryDownloadChunk(in *s3.GetObjectInput, w io.Writer) (int64
}
defer cleanup()
- resp, err := d.cfg.S3.GetObjectWithContext(d.ctx, in, d.cfg.RequestOptions...)
+ resp, err := d.cfg.S3.GetObject(d.ctx, in, d.cfg.ClientOptions...)
if err != nil {
return 0, err
}
d.setTotalBytes(resp) // Set total if not yet set.
- var src io.Reader = resp.Body
- if d.cfg.BufferProvider != nil {
- src = &suppressWriterAt{suppressed: src}
- }
- n, err := io.Copy(w, src)
+ n, err := io.Copy(w, resp.Body)
resp.Body.Close()
if err != nil {
return n, &errReadingBody{err: err}
@@ -480,21 +405,6 @@ func (d *downloader) tryDownloadChunk(in *s3.GetObjectInput, w io.Writer) (int64
return n, nil
}
-func logMessage(svc s3iface.S3API, level aws.LogLevelType, msg string) {
- s, ok := svc.(*s3.S3)
- if !ok {
- return
- }
-
- if s.Config.Logger == nil {
- return
- }
-
- if s.Config.LogLevel.Matches(level) {
- s.Config.Logger.Log(msg)
- }
-}
-
// getTotalBytes is a thread-safe getter for retrieving the total byte status.
func (d *downloader) getTotalBytes() int64 {
d.m.Lock()
@@ -519,8 +429,8 @@ func (d *downloader) setTotalBytes(resp *s3.GetObjectOutput) {
if resp.ContentRange == nil {
// ContentRange is nil when the full file contents is provided, and
// is not chunked. Use ContentLength instead.
- if resp.ContentLength != nil {
- d.totalBytes = *resp.ContentLength
+ if resp.ContentLength > 0 {
+ d.totalBytes = resp.ContentLength
return
}
} else {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go
new file mode 100644
index 000000000..dc4acbf3f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package manager
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.7.1"
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/pool.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/pool.go
similarity index 97%
rename from vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/pool.go
rename to vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/pool.go
index f6f27fc48..6b93a3bc4 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/pool.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/pool.go
@@ -1,14 +1,13 @@
-package s3manager
+package manager
import (
+ "context"
"fmt"
"sync"
-
- "github.com/aws/aws-sdk-go/aws"
)
type byteSlicePool interface {
- Get(aws.Context) (*[]byte, error)
+ Get(context.Context) (*[]byte, error)
Put(*[]byte)
ModifyCapacity(int)
SliceSize() int64
@@ -40,7 +39,7 @@ func newMaxSlicePool(sliceSize int64) *maxSlicePool {
var errZeroCapacity = fmt.Errorf("get called on zero capacity pool")
-func (p *maxSlicePool) Get(ctx aws.Context) (*[]byte, error) {
+func (p *maxSlicePool) Get(ctx context.Context) (*[]byte, error) {
// check if context is canceled before attempting to get a slice
// this ensures priority is given to the cancel case first
select {
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/read_seeker_write_to.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/read_seeker_write_to.go
similarity index 99%
rename from vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/read_seeker_write_to.go
rename to vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/read_seeker_write_to.go
index f62e1a45e..ce117c32a 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/read_seeker_write_to.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/read_seeker_write_to.go
@@ -1,4 +1,4 @@
-package s3manager
+package manager
import (
"io"
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/types.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/types.go
similarity index 59%
rename from vendor/github.com/aws/aws-sdk-go/aws/types.go
rename to vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/types.go
index 98751ee84..968f90732 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/types.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/types.go
@@ -1,27 +1,24 @@
-package aws
+package manager
import (
"io"
- "strings"
"sync"
-
- "github.com/aws/aws-sdk-go/internal/sdkio"
)
// ReadSeekCloser wraps a io.Reader returning a ReaderSeekerCloser. Allows the
// SDK to accept an io.Reader that is not also an io.Seeker for unsigned
// streaming payload API operations.
//
-// A ReadSeekCloser wrapping an nonseekable io.Reader used in an API
-// operation's input will prevent that operation being retried in the case of
-// network errors, and cause operation requests to fail if the operation
+// A readSeekCloser wrapping an nonseekable io.Reader used in an API operation's
+// input will prevent that operation being retried in the case of
+// network errors, and cause operation requests to fail if yhe operation
// requires payload signing.
//
-// Note: If using With S3 PutObject to stream an object upload The SDK's S3
-// Upload manager (s3manager.Uploader) provides support for streaming with the
-// ability to retry network errors.
-func ReadSeekCloser(r io.Reader) ReaderSeekerCloser {
- return ReaderSeekerCloser{r}
+// Note: If using with S3 PutObject to stream an object upload. The SDK's S3
+// Upload Manager(s3manager.Uploader) provides support for streaming
+// with the ability to retry network errors.
+func ReadSeekCloser(r io.Reader) *ReaderSeekerCloser {
+ return &ReaderSeekerCloser{r}
}
// ReaderSeekerCloser represents a reader that can also delegate io.Seeker and
@@ -30,20 +27,67 @@ type ReaderSeekerCloser struct {
r io.Reader
}
-// IsReaderSeekable returns if the underlying reader type can be seeked. A
-// io.Reader might not actually be seekable if it is the ReaderSeekerCloser
-// type.
-func IsReaderSeekable(r io.Reader) bool {
- switch v := r.(type) {
- case ReaderSeekerCloser:
- return v.IsSeeker()
+// seekerLen attempts to get the number of bytes remaining at the seeker's
+// current position. Returns the number of bytes remaining or error.
+func seekerLen(s io.Seeker) (int64, error) {
+ // Determine if the seeker is actually seekable. ReaderSeekerCloser
+ // hides the fact that a io.Readers might not actually be seekable.
+ switch v := s.(type) {
case *ReaderSeekerCloser:
- return v.IsSeeker()
- case io.ReadSeeker:
- return true
- default:
- return false
+ return v.GetLen()
}
+
+ return computeSeekerLength(s)
+}
+
+// GetLen returns the length of the bytes remaining in the underlying reader.
+// Checks first for Len(), then io.Seeker to determine the size of the
+// underlying reader.
+//
+// Will return -1 if the length cannot be determined.
+func (r *ReaderSeekerCloser) GetLen() (int64, error) {
+ if l, ok := r.HasLen(); ok {
+ return int64(l), nil
+ }
+
+ if s, ok := r.r.(io.Seeker); ok {
+ return computeSeekerLength(s)
+ }
+
+ return -1, nil
+}
+
+func computeSeekerLength(s io.Seeker) (int64, error) {
+ curOffset, err := s.Seek(0, io.SeekCurrent)
+ if err != nil {
+ return 0, err
+ }
+
+ endOffset, err := s.Seek(0, io.SeekEnd)
+ if err != nil {
+ return 0, err
+ }
+
+ _, err = s.Seek(curOffset, io.SeekStart)
+ if err != nil {
+ return 0, err
+ }
+
+ return endOffset - curOffset, nil
+}
+
+// HasLen returns the length of the underlying reader if the value implements
+// the Len() int method.
+func (r *ReaderSeekerCloser) HasLen() (int, bool) {
+ type lenner interface {
+ Len() int
+ }
+
+ if lr, ok := r.r.(lenner); ok {
+ return lr.Len(), true
+ }
+
+ return 0, false
}
// Read reads from the reader up to size of p. The number of bytes read, and
@@ -53,7 +97,7 @@ func IsReaderSeekable(r io.Reader) bool {
// returned.
//
// Performs the same functionality as io.Reader Read
-func (r ReaderSeekerCloser) Read(p []byte) (int, error) {
+func (r *ReaderSeekerCloser) Read(p []byte) (int, error) {
switch t := r.r.(type) {
case io.Reader:
return t.Read(p)
@@ -67,7 +111,7 @@ func (r ReaderSeekerCloser) Read(p []byte) (int, error) {
// and an error, if any.
//
// If the ReaderSeekerCloser is not an io.Seeker nothing will be done.
-func (r ReaderSeekerCloser) Seek(offset int64, whence int) (int64, error) {
+func (r *ReaderSeekerCloser) Seek(offset int64, whence int) (int64, error) {
switch t := r.r.(type) {
case io.Seeker:
return t.Seek(offset, whence)
@@ -76,80 +120,15 @@ func (r ReaderSeekerCloser) Seek(offset int64, whence int) (int64, error) {
}
// IsSeeker returns if the underlying reader is also a seeker.
-func (r ReaderSeekerCloser) IsSeeker() bool {
+func (r *ReaderSeekerCloser) IsSeeker() bool {
_, ok := r.r.(io.Seeker)
return ok
}
-// HasLen returns the length of the underlying reader if the value implements
-// the Len() int method.
-func (r ReaderSeekerCloser) HasLen() (int, bool) {
- type lenner interface {
- Len() int
- }
-
- if lr, ok := r.r.(lenner); ok {
- return lr.Len(), true
- }
-
- return 0, false
-}
-
-// GetLen returns the length of the bytes remaining in the underlying reader.
-// Checks first for Len(), then io.Seeker to determine the size of the
-// underlying reader.
-//
-// Will return -1 if the length cannot be determined.
-func (r ReaderSeekerCloser) GetLen() (int64, error) {
- if l, ok := r.HasLen(); ok {
- return int64(l), nil
- }
-
- if s, ok := r.r.(io.Seeker); ok {
- return seekerLen(s)
- }
-
- return -1, nil
-}
-
-// SeekerLen attempts to get the number of bytes remaining at the seeker's
-// current position. Returns the number of bytes remaining or error.
-func SeekerLen(s io.Seeker) (int64, error) {
- // Determine if the seeker is actually seekable. ReaderSeekerCloser
- // hides the fact that a io.Readers might not actually be seekable.
- switch v := s.(type) {
- case ReaderSeekerCloser:
- return v.GetLen()
- case *ReaderSeekerCloser:
- return v.GetLen()
- }
-
- return seekerLen(s)
-}
-
-func seekerLen(s io.Seeker) (int64, error) {
- curOffset, err := s.Seek(0, sdkio.SeekCurrent)
- if err != nil {
- return 0, err
- }
-
- endOffset, err := s.Seek(0, sdkio.SeekEnd)
- if err != nil {
- return 0, err
- }
-
- _, err = s.Seek(curOffset, sdkio.SeekStart)
- if err != nil {
- return 0, err
- }
-
- return endOffset - curOffset, nil
-}
-
// Close closes the ReaderSeekerCloser.
//
// If the ReaderSeekerCloser is not an io.Closer nothing will be done.
-func (r ReaderSeekerCloser) Close() error {
+func (r *ReaderSeekerCloser) Close() error {
switch t := r.r.(type) {
case io.Closer:
return t.Close()
@@ -206,59 +185,3 @@ 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/service/s3/s3manager/upload.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/upload.go
similarity index 61%
rename from vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload.go
rename to vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/upload.go
index da243a302..089109f1a 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/upload.go
@@ -1,25 +1,24 @@
-package s3manager
+package manager
import (
"bytes"
+ "context"
"fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
"io"
+ "net/http"
"sort"
"sync"
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "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/service/s3"
- "github.com/aws/aws-sdk-go/service/s3/s3iface"
+ "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/internal/awsutil"
+ "github.com/aws/aws-sdk-go-v2/service/s3"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
)
// MaxUploadParts is the maximum allowed number of parts in a multi-part upload
// on Amazon S3.
-const MaxUploadParts = 10000
+const MaxUploadParts int32 = 10000
// MinUploadPartSize is the minimum allowed part size when uploading a part to
// Amazon S3.
@@ -40,58 +39,56 @@ const DefaultUploadConcurrency = 5
//
// Example:
//
-// u := s3manager.NewUploader(opts)
-// output, err := u.upload(input)
+// u := manager.NewUploader(client)
+// output, err := u.upload(context.Background(), input)
// if err != nil {
-// if multierr, ok := err.(s3manager.MultiUploadFailure); ok {
-// // Process error and its associated uploadID
-// fmt.Println("Error:", multierr.Code(), multierr.Message(), multierr.UploadID())
-// } else {
-// // Process error generically
-// fmt.Println("Error:", err.Error())
-// }
+// var multierr manager.MultiUploadFailure
+// if errors.As(err, &multierr) {
+// fmt.Printf("upload failure UploadID=%s, %s\n", multierr.UploadID(), multierr.Error())
+// } else {
+// fmt.Printf("upload failure, %s\n", err.Error())
+// }
// }
+//
type MultiUploadFailure interface {
- awserr.Error
+ error
- // Returns the upload id for the S3 multipart upload that failed.
+ // UploadID returns the upload id for the S3 multipart upload that failed.
UploadID() string
}
-// So that the Error interface type can be included as an anonymous field
-// in the multiUploadError struct and not conflict with the error.Error() method.
-type awsError awserr.Error
-
// A multiUploadError wraps the upload ID of a failed s3 multipart upload.
// Composed of BaseError for code, message, and original error
//
// Should be used for an error that occurred failing a S3 multipart upload,
// and a upload ID is available. If an uploadID is not available a more relevant
type multiUploadError struct {
- awsError
+ err error
// ID for multipart upload which failed.
uploadID string
}
-// Error returns the string representation of the error.
+// batchItemError returns the string representation of the error.
//
-// # See apierr.BaseError ErrorWithExtra for output format
+// See apierr.BaseError ErrorWithExtra for output format
//
// Satisfies the error interface.
-func (m multiUploadError) Error() string {
- extra := fmt.Sprintf("upload id: %s", m.uploadID)
- return awserr.SprintError(m.Code(), m.Message(), extra, m.OrigErr())
+func (m *multiUploadError) Error() string {
+ var extra string
+ if m.err != nil {
+ extra = fmt.Sprintf(", cause: %s", m.err.Error())
+ }
+ return fmt.Sprintf("upload multipart failed, upload id: %s%s", m.uploadID, extra)
}
-// String returns the string representation of the error.
-// Alias for Error to satisfy the stringer interface.
-func (m multiUploadError) String() string {
- return m.Error()
+// Unwrap returns the underlying error that cause the upload failure
+func (m *multiUploadError) Unwrap() error {
+ return m.err
}
// UploadID returns the id of the S3 upload which failed.
-func (m multiUploadError) UploadID() string {
+func (m *multiUploadError) UploadID() string {
return m.uploadID
}
@@ -108,29 +105,18 @@ type UploadOutput struct {
// The ID for a multipart upload to S3. In the case of an error the error
// can be cast to the MultiUploadFailure interface to extract the upload ID.
UploadID string
-
- // Entity tag of the object.
- ETag *string
}
-// WithUploaderRequestOptions appends to the Uploader's API request options.
-func WithUploaderRequestOptions(opts ...request.Option) func(*Uploader) {
+// WithUploaderRequestOptions appends to the Uploader's API client options.
+func WithUploaderRequestOptions(opts ...func(*s3.Options)) func(*Uploader) {
return func(u *Uploader) {
- u.RequestOptions = append(u.RequestOptions, opts...)
+ u.ClientOptions = append(u.ClientOptions, opts...)
}
}
// The Uploader structure that calls Upload(). It is safe to call Upload()
// on this structure for multiple objects and across concurrent goroutines.
// Mutating the Uploader's properties is not safe to be done concurrently.
-//
-// The ContentMD5 member for pre-computed MD5 checksums will be ignored for
-// multipart uploads. Objects that will be uploaded in a single part, the
-// ContentMD5 will be used.
-//
-// The Checksum members for pre-computed checksums will be ignored for
-// multipart uploads. Objects that will be uploaded in a single part, will
-// include the checksum member in the request.
type Uploader struct {
// The buffer size (in bytes) to use when buffering data into chunks and
// sending them as parts to S3. The minimum allowed part size is 5MB, and
@@ -164,14 +150,14 @@ type Uploader struct {
// error must be used to signal end of stream.
//
// Defaults to package const's MaxUploadParts value.
- MaxUploadParts int
+ MaxUploadParts int32
// The client to use when uploading to S3.
- S3 s3iface.S3API
+ S3 UploadAPIClient
// List of request options that will be passed down to individual API
// operation requests made by the uploader.
- RequestOptions []request.Option
+ ClientOptions []func(*s3.Options)
// Defines the buffer strategy used when uploading a part
BufferProvider ReadSeekerWriteToProvider
@@ -186,22 +172,23 @@ type Uploader struct {
// satisfies the client.ConfigProvider interface.
//
// Example:
+// // Load AWS Config
+// cfg, err := config.LoadDefaultConfig(context.TODO())
+// if err != nil {
+// panic(err)
+// }
//
-// // The session the S3 Uploader will use
-// sess := session.Must(session.NewSession())
+// // Create an S3 Client with the config
+// client := s3.NewFromConfig(cfg)
//
-// // Create an uploader with the session and default options
-// uploader := s3manager.NewUploader(sess)
+// // Create an uploader passing it the client
+// uploader := manager.NewUploader(client)
//
-// // Create an uploader with the session and custom options
-// uploader := s3manager.NewUploader(session, func(u *s3manager.Uploader) {
-// u.PartSize = 64 * 1024 * 1024 // 64MB per part
+// // Create an uploader with the client and custom options
+// uploader := manager.NewUploader(client, func(u *manager.Uploader) {
+// u.PartSize = 64 * 1024 * 1024 // 64MB per part
// })
-func NewUploader(c client.ConfigProvider, options ...func(*Uploader)) *Uploader {
- return newUploader(s3.New(c), options...)
-}
-
-func newUploader(client s3iface.S3API, options ...func(*Uploader)) *Uploader {
+func NewUploader(client UploadAPIClient, options ...func(*Uploader)) *Uploader {
u := &Uploader{
S3: client,
PartSize: DefaultUploadPartSize,
@@ -220,72 +207,10 @@ func newUploader(client s3iface.S3API, options ...func(*Uploader)) *Uploader {
return u
}
-// NewUploaderWithClient creates a new Uploader instance to upload objects to S3. Pass in
-// additional functional options to customize the uploader's behavior. Requires
-// a S3 service client to make S3 API calls.
-//
-// Example:
-//
-// // The session the S3 Uploader will use
-// sess := session.Must(session.NewSession())
-//
-// // S3 service client the Upload manager will use.
-// s3Svc := s3.New(sess)
-//
-// // Create an uploader with S3 client and default options
-// uploader := s3manager.NewUploaderWithClient(s3Svc)
-//
-// // Create an uploader with S3 client and custom options
-// uploader := s3manager.NewUploaderWithClient(s3Svc, func(u *s3manager.Uploader) {
-// u.PartSize = 64 * 1024 * 1024 // 64MB per part
-// })
-func NewUploaderWithClient(svc s3iface.S3API, options ...func(*Uploader)) *Uploader {
- return newUploader(svc, options...)
-}
-
-// Upload uploads an object to S3, intelligently buffering large files into
-// smaller chunks and sending them in parallel across multiple goroutines. You
-// can configure the buffer size and concurrency through the Uploader's parameters.
-//
-// Additional functional options can be provided to configure the individual
-// upload. These options are copies of the Uploader instance Upload is called from.
-// Modifying the options will not impact the original Uploader instance.
-//
-// Use the WithUploaderRequestOptions helper function to pass in request
-// options that will be applied to all API operations made with this uploader.
-//
-// It is safe to call this method concurrently across goroutines.
-//
-// Example:
-//
-// // Upload input parameters
-// upParams := &s3manager.UploadInput{
-// Bucket: &bucketName,
-// Key: &keyName,
-// Body: file,
-// }
-//
-// // Perform an upload.
-// result, err := uploader.Upload(upParams)
-//
-// // Perform upload with options different than the those in the Uploader.
-// result, err := uploader.Upload(upParams, func(u *s3manager.Uploader) {
-// u.PartSize = 10 * 1024 * 1024 // 10MB part size
-// u.LeavePartsOnError = true // Don't delete the parts if the upload fails.
-// })
-func (u Uploader) Upload(input *UploadInput, options ...func(*Uploader)) (*UploadOutput, error) {
- return u.UploadWithContext(aws.BackgroundContext(), input, options...)
-}
-
-// UploadWithContext uploads an object to S3, intelligently buffering large
+// Upload uploads an object to S3, intelligently buffering large
// files into smaller chunks and sending them in parallel across multiple
// goroutines. You can configure the buffer size and concurrency through the
-// Uploader's parameters.
-//
-// UploadWithContext is the same as Upload with the additional support for
-// Context input parameters. The Context must not be nil. A nil Context will
-// cause a panic. Use the context to add deadlining, timeouts, etc. The
-// UploadWithContext may create sub-contexts for individual underlying requests.
+// Uploader parameters.
//
// Additional functional options can be provided to configure the individual
// upload. These options are copies of the Uploader instance Upload is called from.
@@ -295,80 +220,30 @@ func (u Uploader) Upload(input *UploadInput, options ...func(*Uploader)) (*Uploa
// options that will be applied to all API operations made with this uploader.
//
// It is safe to call this method concurrently across goroutines.
-func (u Uploader) UploadWithContext(ctx aws.Context, input *UploadInput, opts ...func(*Uploader)) (*UploadOutput, error) {
+func (u Uploader) Upload(ctx context.Context, input *s3.PutObjectInput, opts ...func(*Uploader)) (*UploadOutput, error) {
i := uploader{in: input, cfg: u, ctx: ctx}
+ // Copy ClientOptions
+ clientOptions := make([]func(*s3.Options), 0, len(i.cfg.ClientOptions)+1)
+ clientOptions = append(clientOptions, func(o *s3.Options) {
+ o.APIOptions = append(o.APIOptions, middleware.AddSDKAgentKey(middleware.FeatureMetadata, userAgentKey))
+ })
+ clientOptions = append(clientOptions, i.cfg.ClientOptions...)
+ i.cfg.ClientOptions = clientOptions
+
for _, opt := range opts {
opt(&i.cfg)
}
- i.cfg.RequestOptions = append(i.cfg.RequestOptions, request.WithAppendUserAgent("S3Manager"))
-
return i.upload()
}
-// UploadWithIterator will upload a batched amount of objects to S3. This operation uses
-// the iterator pattern to know which object to upload next. Since this is an interface this
-// allows for custom defined functionality.
-//
-// Example:
-//
-// svc:= s3manager.NewUploader(sess)
-//
-// objects := []BatchUploadObject{
-// {
-// Object: &s3manager.UploadInput {
-// Key: aws.String("key"),
-// Bucket: aws.String("bucket"),
-// },
-// },
-// }
-//
-// iter := &s3manager.UploadObjectsIterator{Objects: objects}
-// if err := svc.UploadWithIterator(aws.BackgroundContext(), iter); err != nil {
-// return err
-// }
-func (u Uploader) UploadWithIterator(ctx aws.Context, iter BatchUploadIterator, opts ...func(*Uploader)) error {
- var errs []Error
- for iter.Next() {
- object := iter.UploadObject()
- if _, err := u.UploadWithContext(ctx, object.Object, opts...); err != nil {
- s3Err := Error{
- OrigErr: err,
- Bucket: object.Object.Bucket,
- Key: object.Object.Key,
- }
-
- errs = append(errs, s3Err)
- }
-
- if object.After == nil {
- continue
- }
-
- if err := object.After(); err != nil {
- s3Err := Error{
- OrigErr: err,
- Bucket: object.Object.Bucket,
- Key: object.Object.Key,
- }
-
- errs = append(errs, s3Err)
- }
- }
-
- if len(errs) > 0 {
- return NewBatchError("BatchedUploadIncomplete", "some objects have failed to upload.", errs)
- }
- return nil
-}
-
// internal structure to manage an upload to S3.
type uploader struct {
- ctx aws.Context
+ ctx context.Context
cfg Uploader
- in *UploadInput
+ in *s3.PutObjectInput
readerPos int64 // current reader position
totalSize int64 // set to -1 if the size is not known
@@ -378,13 +253,12 @@ type uploader struct {
// multipart upload.
func (u *uploader) upload() (*UploadOutput, error) {
if err := u.init(); err != nil {
- return nil, awserr.New("ReadRequestBody", "unable to initialize upload", err)
+ return nil, fmt.Errorf("unable to initialize upload: %w", err)
}
defer u.cfg.partPool.Close()
if u.cfg.PartSize < MinUploadPartSize {
- msg := fmt.Sprintf("part size must be at least %d bytes", MinUploadPartSize)
- return nil, awserr.New("ConfigError", msg, nil)
+ return nil, fmt.Errorf("part size must be at least %d bytes", MinUploadPartSize)
}
// Do one read to determine if we have more than one part
@@ -393,7 +267,7 @@ func (u *uploader) upload() (*UploadOutput, error) {
return u.singlePart(reader, cleanup)
} else if err != nil {
cleanup()
- return nil, awserr.New("ReadRequestBody", "read upload data failed", err)
+ return nil, fmt.Errorf("read upload data failed: %w", err)
}
mu := multiuploader{uploader: u}
@@ -402,7 +276,7 @@ func (u *uploader) upload() (*UploadOutput, error) {
// init will initialize all default options.
func (u *uploader) init() error {
- if err := validateSupportedARNType(aws.StringValue(u.in.Bucket)); err != nil {
+ if err := validateSupportedARNType(aws.ToString(u.in.Bucket)); err != nil {
return err
}
@@ -442,7 +316,7 @@ func (u *uploader) initSize() error {
switch r := u.in.Body.(type) {
case io.Seeker:
- n, err := aws.SeekerLen(r)
+ n, err := seekerLen(r)
if err != nil {
return err
}
@@ -534,21 +408,50 @@ func (u *uploader) singlePart(r io.ReadSeeker, cleanup func()) (*UploadOutput, e
// Need to use request form because URL generated in request is
// used in return.
- req, out := u.cfg.S3.PutObjectRequest(params)
- req.SetContext(u.ctx)
- req.ApplyOptions(u.cfg.RequestOptions...)
- if err := req.Send(); err != nil {
+
+ var locationRecorder recordLocationClient
+ out, err := u.cfg.S3.PutObject(u.ctx, params, append(u.cfg.ClientOptions, locationRecorder.WrapClient())...)
+ if err != nil {
return nil, err
}
- url := req.HTTPRequest.URL.String()
return &UploadOutput{
- Location: url,
+ Location: locationRecorder.location,
VersionID: out.VersionId,
- ETag: out.ETag,
}, nil
}
+type httpClient interface {
+ Do(r *http.Request) (*http.Response, error)
+}
+
+type recordLocationClient struct {
+ httpClient
+ location string
+}
+
+func (c *recordLocationClient) WrapClient() func(o *s3.Options) {
+ return func(o *s3.Options) {
+ c.httpClient = o.HTTPClient
+ o.HTTPClient = c
+ }
+}
+
+func (c *recordLocationClient) Do(r *http.Request) (resp *http.Response, err error) {
+ resp, err = c.httpClient.Do(r)
+ if err != nil {
+ return resp, err
+ }
+
+ if resp.Request != nil && resp.Request.URL != nil {
+ url := *resp.Request.URL
+ url.RawQuery = ""
+ c.location = url.String()
+ }
+
+ return resp, err
+}
+
// internal structure to manage a specific multipart upload to S3.
type multiuploader struct {
*uploader
@@ -562,17 +465,17 @@ type multiuploader struct {
// keeps track of a single chunk of data being sent to S3.
type chunk struct {
buf io.ReadSeeker
- num int64
+ num int32
cleanup func()
}
// completedParts is a wrapper to make parts sortable by their part number,
// since S3 required this list to be sent in sorted order.
-type completedParts []*s3.CompletedPart
+type completedParts []types.CompletedPart
func (a completedParts) Len() int { return len(a) }
func (a completedParts) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
-func (a completedParts) Less(i, j int) bool { return *a[i].PartNumber < *a[j].PartNumber }
+func (a completedParts) Less(i, j int) bool { return a[i].PartNumber < a[j].PartNumber }
// upload will perform a multipart upload using the firstBuf buffer containing
// the first chunk of data.
@@ -581,7 +484,8 @@ func (u *multiuploader) upload(firstBuf io.ReadSeeker, cleanup func()) (*UploadO
awsutil.Copy(params, u.in)
// Create the multipart
- resp, err := u.cfg.S3.CreateMultipartUploadWithContext(u.ctx, params, u.cfg.RequestOptions...)
+ var locationRecorder recordLocationClient
+ resp, err := u.cfg.S3.CreateMultipartUpload(u.ctx, params, append(u.cfg.ClientOptions, locationRecorder.WrapClient())...)
if err != nil {
cleanup()
return nil, err
@@ -596,7 +500,7 @@ func (u *multiuploader) upload(firstBuf io.ReadSeeker, cleanup func()) (*UploadO
}
// Send part 1 to the workers
- var num int64 = 1
+ var num int32 = 1
ch <- chunk{buf: firstBuf, num: num, cleanup: cleanup}
// Read and queue the rest of the parts
@@ -629,35 +533,21 @@ func (u *multiuploader) upload(firstBuf io.ReadSeeker, cleanup func()) (*UploadO
if err := u.geterr(); err != nil {
return nil, &multiUploadError{
- awsError: awserr.New(
- "MultipartUpload",
- "upload multipart failed",
- err),
+ err: err,
uploadID: u.uploadID,
}
}
- // Create a presigned URL of the S3 Get Object in order to have parity with
- // single part upload.
- getReq, _ := u.cfg.S3.GetObjectRequest(&s3.GetObjectInput{
- Bucket: u.in.Bucket,
- Key: u.in.Key,
- })
- getReq.Config.Credentials = credentials.AnonymousCredentials
- getReq.SetContext(u.ctx)
- uploadLocation, _, _ := getReq.PresignRequest(1)
-
return &UploadOutput{
- Location: uploadLocation,
+ Location: locationRecorder.location,
VersionID: complete.VersionId,
UploadID: u.uploadID,
- ETag: complete.ETag,
}, nil
}
-func (u *multiuploader) shouldContinue(part int64, nextChunkLen int, err error) (bool, error) {
+func (u *multiuploader) shouldContinue(part int32, nextChunkLen int, err error) (bool, error) {
if err != nil && err != io.EOF {
- return false, awserr.New("ReadRequestBody", "read multipart upload data failed", err)
+ return false, fmt.Errorf("read multipart upload data failed, %w", err)
}
if nextChunkLen == 0 {
@@ -669,16 +559,16 @@ func (u *multiuploader) shouldContinue(part int64, nextChunkLen int, err error)
part++
// This upload exceeded maximum number of supported parts, error now.
- if part > int64(u.cfg.MaxUploadParts) || part > int64(MaxUploadParts) {
+ if part > u.cfg.MaxUploadParts || part > MaxUploadParts {
var msg string
- if part > int64(u.cfg.MaxUploadParts) {
+ if part > u.cfg.MaxUploadParts {
msg = fmt.Sprintf("exceeded total allowed configured MaxUploadParts (%d). Adjust PartSize to fit in this limit",
u.cfg.MaxUploadParts)
} else {
msg = fmt.Sprintf("exceeded total allowed S3 limit MaxUploadParts (%d). Adjust PartSize to fit in this limit",
MaxUploadParts)
}
- return false, awserr.New("TotalPartsExceeded", msg, nil)
+ return false, fmt.Errorf(msg)
}
return true, err
@@ -715,16 +605,16 @@ func (u *multiuploader) send(c chunk) error {
UploadId: &u.uploadID,
SSECustomerAlgorithm: u.in.SSECustomerAlgorithm,
SSECustomerKey: u.in.SSECustomerKey,
- PartNumber: &c.num,
+ PartNumber: c.num,
}
- resp, err := u.cfg.S3.UploadPartWithContext(u.ctx, params, u.cfg.RequestOptions...)
+ resp, err := u.cfg.S3.UploadPart(u.ctx, params, u.cfg.ClientOptions...)
if err != nil {
return err
}
n := c.num
- completed := &s3.CompletedPart{ETag: resp.ETag, PartNumber: &n}
+ completed := types.CompletedPart{ETag: resp.ETag, PartNumber: n}
u.m.Lock()
u.parts = append(u.parts, completed)
@@ -760,9 +650,11 @@ func (u *multiuploader) fail() {
Key: u.in.Key,
UploadId: &u.uploadID,
}
- _, err := u.cfg.S3.AbortMultipartUploadWithContext(u.ctx, params, u.cfg.RequestOptions...)
+ _, err := u.cfg.S3.AbortMultipartUpload(u.ctx, params, u.cfg.ClientOptions...)
if err != nil {
- logMessage(u.cfg.S3, aws.LogDebug, fmt.Sprintf("failed to abort multipart upload, %v", err))
+ // TODO: Add logging
+ //logMessage(u.cfg.S3, aws.LogDebug, fmt.Sprintf("failed to abort multipart upload, %v", err))
+ _ = err
}
}
@@ -780,9 +672,9 @@ func (u *multiuploader) complete() *s3.CompleteMultipartUploadOutput {
Bucket: u.in.Bucket,
Key: u.in.Key,
UploadId: &u.uploadID,
- MultipartUpload: &s3.CompletedMultipartUpload{Parts: u.parts},
+ MultipartUpload: &types.CompletedMultipartUpload{Parts: u.parts},
}
- resp, err := u.cfg.S3.CompleteMultipartUploadWithContext(u.ctx, params, u.cfg.RequestOptions...)
+ resp, err := u.cfg.S3.CompleteMultipartUpload(u.ctx, params, u.cfg.ClientOptions...)
if err != nil {
u.seterr(err)
u.fail()
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/writer_read_from.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/writer_read_from.go
similarity index 90%
rename from vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/writer_read_from.go
rename to vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/writer_read_from.go
index a74a02d93..3df983a65 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/writer_read_from.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/writer_read_from.go
@@ -1,11 +1,11 @@
-package s3manager
+package manager
import (
"bufio"
"io"
"sync"
- "github.com/aws/aws-sdk-go/internal/sdkio"
+ "github.com/aws/aws-sdk-go-v2/internal/sdkio"
)
// WriterReadFrom defines an interface implementing io.Writer and io.ReaderFrom
@@ -73,11 +73,3 @@ func (p *PooledBufferedReadFromProvider) GetReadFrom(writer io.Writer) (r Writer
}
return r, cleanup
}
-
-type suppressWriterAt struct {
- suppressed io.Reader
-}
-
-func (s *suppressWriterAt) Read(p []byte) (n int, err error) {
- return s.suppressed.Read(p)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/copy.go
similarity index 93%
rename from vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/copy.go
index 1a3d106d5..938cd14c1 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/copy.go
@@ -51,7 +51,11 @@ func rcopy(dst, src reflect.Value, root bool) {
e := src.Type().Elem()
if dst.CanSet() && !src.IsNil() {
if _, ok := src.Interface().(*time.Time); !ok {
- dst.Set(reflect.New(e))
+ if dst.Kind() == reflect.String {
+ dst.SetString(e.String())
+ } else {
+ dst.Set(reflect.New(e))
+ }
} else {
tempValue := reflect.New(e)
tempValue.Elem().Set(src.Elem())
@@ -59,7 +63,7 @@ func rcopy(dst, src reflect.Value, root bool) {
dst.Set(tempValue)
}
}
- if src.Elem().IsValid() {
+ if dst.Kind() != reflect.String && src.Elem().IsValid() {
// Keep the current root state since the depth hasn't changed
rcopy(dst.Elem(), src.Elem(), root)
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/equal.go
similarity index 75%
rename from vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/equal.go
index 142a7a01c..bcfe51a2b 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/equal.go
@@ -15,7 +15,7 @@ func DeepEqual(a, b interface{}) bool {
rb := reflect.Indirect(reflect.ValueOf(b))
if raValid, rbValid := ra.IsValid(), rb.IsValid(); !raValid && !rbValid {
- // If the elements are both nil, and of the same type they are equal
+ // If the elements are both nil, and of the same type the are equal
// If they are of different types they are not equal
return reflect.TypeOf(a) == reflect.TypeOf(b)
} else if raValid != rbValid {
@@ -23,5 +23,11 @@ func DeepEqual(a, b interface{}) bool {
return false
}
+ // Special casing for strings as typed enumerations are string aliases
+ // but are not deep equal.
+ if ra.Kind() == reflect.String && rb.Kind() == reflect.String {
+ return ra.String() == rb.String()
+ }
+
return reflect.DeepEqual(ra.Interface(), rb.Interface())
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/path_value.go
similarity index 92%
rename from vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/path_value.go
index a4eb6a7f4..7e69bd5eb 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/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.EqualFold(name, c) {
+ } else if !caseSensitive && strings.ToLower(name) == strings.ToLower(c) {
return true
}
return false
@@ -185,12 +185,13 @@ func ValuesAtPath(i interface{}, path string) ([]interface{}, error) {
// SetValueAtPath sets a value at the case insensitive lexical path inside
// of a structure.
func SetValueAtPath(i interface{}, path string, v interface{}) {
- rvals := rValuesAtPath(i, path, true, false, v == nil)
- for _, rval := range rvals {
- if rval.Kind() == reflect.Ptr && rval.IsNil() {
- continue
+ if rvals := rValuesAtPath(i, path, true, false, v == nil); rvals != nil {
+ for _, rval := range rvals {
+ if rval.Kind() == reflect.Ptr && rval.IsNil() {
+ continue
+ }
+ setValue(rval, v)
}
- setValue(rval, v)
}
}
@@ -215,7 +216,10 @@ func setValue(dstVal reflect.Value, src interface{}) {
}
dstVal.Set(srcVal)
} else {
- dstVal.Set(srcVal)
+ if dstVal.Kind() == reflect.String {
+ dstVal.SetString(srcVal.String())
+ } else {
+ dstVal.Set(srcVal)
+ }
}
-
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/prettify.go
similarity index 83%
rename from vendor/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/prettify.go
index 11d4240d6..1adecae6b 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/prettify.go
@@ -18,7 +18,9 @@ func Prettify(i interface{}) string {
// prettify will recursively walk value v to build a textual
// representation of the value.
func prettify(v reflect.Value, indent int, buf *bytes.Buffer) {
+ isPtr := false
for v.Kind() == reflect.Ptr {
+ isPtr = true
v = v.Elem()
}
@@ -33,6 +35,9 @@ func prettify(v reflect.Value, indent int, buf *bytes.Buffer) {
break
}
+ if isPtr {
+ buf.WriteRune('&')
+ }
buf.WriteString("{\n")
names := []string{}
@@ -50,19 +55,9 @@ func prettify(v reflect.Value, indent int, buf *bytes.Buffer) {
for i, n := range names {
val := v.FieldByName(n)
- ft, ok := v.Type().FieldByName(n)
- if !ok {
- panic(fmt.Sprintf("expected to find field %v on type %v, but was not found", n, v.Type()))
- }
-
buf.WriteString(strings.Repeat(" ", indent+2))
buf.WriteString(n + ": ")
-
- if tag := ft.Tag.Get("sensitive"); tag == "true" {
- buf.WriteString("")
- } else {
- prettify(val, indent+2, buf)
- }
+ prettify(val, indent+2, buf)
if i < len(names)-1 {
buf.WriteString(",\n")
@@ -77,9 +72,9 @@ func prettify(v reflect.Value, indent int, buf *bytes.Buffer) {
break
}
- nl, id, id2 := "", "", ""
- if v.Len() > 3 {
- nl, id, id2 = "\n", strings.Repeat(" ", indent), strings.Repeat(" ", indent+2)
+ nl, id, id2 := "\n", strings.Repeat(" ", indent), strings.Repeat(" ", indent+2)
+ if isPtr {
+ buf.WriteRune('&')
}
buf.WriteString("[" + nl)
for i := 0; i < v.Len(); i++ {
@@ -93,6 +88,9 @@ func prettify(v reflect.Value, indent int, buf *bytes.Buffer) {
buf.WriteString(nl + id + "]")
case reflect.Map:
+ if isPtr {
+ buf.WriteRune('&')
+ }
buf.WriteString("{\n")
for i, k := range v.MapKeys() {
@@ -111,6 +109,16 @@ func prettify(v reflect.Value, indent int, buf *bytes.Buffer) {
fmt.Fprint(buf, "")
return
}
+
+ for v.Kind() == reflect.Interface && !v.IsNil() {
+ v = v.Elem()
+ }
+
+ if v.Kind() == reflect.Ptr || v.Kind() == reflect.Struct || v.Kind() == reflect.Map || v.Kind() == reflect.Slice {
+ prettify(v, indent, buf)
+ return
+ }
+
format := "%v"
switch v.Interface().(type) {
case string:
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/string_value.go
similarity index 97%
rename from vendor/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/string_value.go
index 3f7cffd95..645df2450 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/awsutil/string_value.go
@@ -8,8 +8,6 @@ import (
)
// StringValue returns the string representation of a value.
-//
-// Deprecated: Use Prettify instead.
func StringValue(i interface{}) string {
var buf bytes.Buffer
stringValue(reflect.ValueOf(i), 0, &buf)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
new file mode 100644
index 000000000..56750f889
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
@@ -0,0 +1,130 @@
+# v1.1.23 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.22 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.21 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.20 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.19 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.18 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.17 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.16 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.15 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.14 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.13 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.12 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.11 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.10 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.9 (2022-03-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.8 (2022-03-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.7 (2022-03-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.6 (2022-03-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.5 (2022-02-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.4 (2022-01-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.3 (2022-01-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.2 (2021-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.1 (2021-11-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.0 (2021-11-06)
+
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.7 (2021-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.6 (2021-10-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.5 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.4 (2021-08-27)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.3 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.2 (2021-08-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.1 (2021-07-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.0 (2021-06-25)
+
+* **Release**: Release new modules
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/aws/aws-sdk-go-v2/internal/configsources/config.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go
new file mode 100644
index 000000000..cd4d19b89
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go
@@ -0,0 +1,65 @@
+package configsources
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+// EnableEndpointDiscoveryProvider is an interface for retrieving external configuration value
+// for Enable Endpoint Discovery
+type EnableEndpointDiscoveryProvider interface {
+ GetEnableEndpointDiscovery(ctx context.Context) (value aws.EndpointDiscoveryEnableState, found bool, err error)
+}
+
+// ResolveEnableEndpointDiscovery extracts the first instance of a EnableEndpointDiscoveryProvider from the config slice.
+// Additionally returns a aws.EndpointDiscoveryEnableState to indicate if the value was found in provided configs,
+// and error if one is encountered.
+func ResolveEnableEndpointDiscovery(ctx context.Context, configs []interface{}) (value aws.EndpointDiscoveryEnableState, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(EnableEndpointDiscoveryProvider); ok {
+ value, found, err = p.GetEnableEndpointDiscovery(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// UseDualStackEndpointProvider is an interface for retrieving external configuration values for UseDualStackEndpoint
+type UseDualStackEndpointProvider interface {
+ GetUseDualStackEndpoint(context.Context) (value aws.DualStackEndpointState, found bool, err error)
+}
+
+// ResolveUseDualStackEndpoint extracts the first instance of a UseDualStackEndpoint from the config slice.
+// Additionally returns a boolean to indicate if the value was found in provided configs, and error if one is encountered.
+func ResolveUseDualStackEndpoint(ctx context.Context, configs []interface{}) (value aws.DualStackEndpointState, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(UseDualStackEndpointProvider); ok {
+ value, found, err = p.GetUseDualStackEndpoint(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// UseFIPSEndpointProvider is an interface for retrieving external configuration values for UseFIPSEndpoint
+type UseFIPSEndpointProvider interface {
+ GetUseFIPSEndpoint(context.Context) (value aws.FIPSEndpointState, found bool, err error)
+}
+
+// ResolveUseFIPSEndpoint extracts the first instance of a UseFIPSEndpointProvider from the config slice.
+// Additionally, returns a boolean to indicate if the value was found in provided configs, and error if one is encountered.
+func ResolveUseFIPSEndpoint(ctx context.Context, configs []interface{}) (value aws.FIPSEndpointState, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(UseFIPSEndpointProvider); ok {
+ value, found, err = p.GetUseFIPSEndpoint(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
new file mode 100644
index 000000000..99eaea1b8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package configsources
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.1.23"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
new file mode 100644
index 000000000..f715bf166
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
@@ -0,0 +1,103 @@
+# v2.4.17 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.16 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.15 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.14 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.13 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.12 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.11 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.10 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.9 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.8 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.7 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.6 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.5 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.3 (2022-03-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.2 (2022-03-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.1 (2022-03-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.4.0 (2022-03-08)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.3.0 (2022-02-24)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.2.0 (2022-01-14)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.1.0 (2022-01-07)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.0.2 (2021-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.0.1 (2021-11-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.0.0 (2021-11-06)
+
+* **Release**: Endpoint Variant Model Support
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go
new file mode 100644
index 000000000..32251a7e3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go
@@ -0,0 +1,302 @@
+package endpoints
+
+import (
+ "fmt"
+ "github.com/aws/smithy-go/logging"
+ "regexp"
+ "strings"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+)
+
+// DefaultKey is a compound map key of a variant and other values.
+type DefaultKey struct {
+ Variant EndpointVariant
+ ServiceVariant ServiceVariant
+}
+
+// EndpointKey is a compound map key of a region and associated variant value.
+type EndpointKey struct {
+ Region string
+ Variant EndpointVariant
+ ServiceVariant ServiceVariant
+}
+
+// EndpointVariant is a bit field to describe the endpoints attributes.
+type EndpointVariant uint64
+
+const (
+ // FIPSVariant indicates that the endpoint is FIPS capable.
+ FIPSVariant EndpointVariant = 1 << (64 - 1 - iota)
+
+ // DualStackVariant indicates that the endpoint is DualStack capable.
+ DualStackVariant
+)
+
+// ServiceVariant is a bit field to describe the service endpoint attributes.
+type ServiceVariant uint64
+
+const (
+ defaultProtocol = "https"
+ defaultSigner = "v4"
+)
+
+var (
+ protocolPriority = []string{"https", "http"}
+ signerPriority = []string{"v4", "s3v4"}
+)
+
+// Options provide configuration needed to direct how endpoints are resolved.
+type Options struct {
+ // Logger is a logging implementation that log events should be sent to.
+ Logger logging.Logger
+
+ // LogDeprecated indicates that deprecated endpoints should be logged to the provided logger.
+ LogDeprecated bool
+
+ // ResolvedRegion is the resolved region string. If provided (non-zero length) it takes priority
+ // over the region name passed to the ResolveEndpoint call.
+ ResolvedRegion string
+
+ // Disable usage of HTTPS (TLS / SSL)
+ DisableHTTPS bool
+
+ // Instruct the resolver to use a service endpoint that supports dual-stack.
+ // If a service does not have a dual-stack endpoint an error will be returned by the resolver.
+ UseDualStackEndpoint aws.DualStackEndpointState
+
+ // Instruct the resolver to use a service endpoint that supports FIPS.
+ // If a service does not have a FIPS endpoint an error will be returned by the resolver.
+ UseFIPSEndpoint aws.FIPSEndpointState
+
+ // ServiceVariant is a bitfield of service specified endpoint variant data.
+ ServiceVariant ServiceVariant
+}
+
+// GetEndpointVariant returns the EndpointVariant for the variant associated options.
+func (o Options) GetEndpointVariant() (v EndpointVariant) {
+ if o.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled {
+ v |= DualStackVariant
+ }
+ if o.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled {
+ v |= FIPSVariant
+ }
+ return v
+}
+
+// Partitions is a slice of partition
+type Partitions []Partition
+
+// ResolveEndpoint resolves a service endpoint for the given region and options.
+func (ps Partitions) ResolveEndpoint(region string, opts Options) (aws.Endpoint, error) {
+ if len(ps) == 0 {
+ return aws.Endpoint{}, fmt.Errorf("no partitions found")
+ }
+
+ if opts.Logger == nil {
+ opts.Logger = logging.Nop{}
+ }
+
+ if len(opts.ResolvedRegion) > 0 {
+ region = opts.ResolvedRegion
+ }
+
+ for i := 0; i < len(ps); i++ {
+ if !ps[i].canResolveEndpoint(region, opts) {
+ continue
+ }
+
+ return ps[i].ResolveEndpoint(region, opts)
+ }
+
+ // fallback to first partition format to use when resolving the endpoint.
+ return ps[0].ResolveEndpoint(region, opts)
+}
+
+// Partition is an AWS partition description for a service and its' region endpoints.
+type Partition struct {
+ ID string
+ RegionRegex *regexp.Regexp
+ PartitionEndpoint string
+ IsRegionalized bool
+ Defaults map[DefaultKey]Endpoint
+ Endpoints Endpoints
+}
+
+func (p Partition) canResolveEndpoint(region string, opts Options) bool {
+ _, ok := p.Endpoints[EndpointKey{
+ Region: region,
+ Variant: opts.GetEndpointVariant(),
+ }]
+ return ok || p.RegionRegex.MatchString(region)
+}
+
+// ResolveEndpoint resolves and service endpoint for the given region and options.
+func (p Partition) ResolveEndpoint(region string, options Options) (resolved aws.Endpoint, err error) {
+ if len(region) == 0 && len(p.PartitionEndpoint) != 0 {
+ region = p.PartitionEndpoint
+ }
+
+ endpoints := p.Endpoints
+
+ variant := options.GetEndpointVariant()
+ serviceVariant := options.ServiceVariant
+
+ defaults := p.Defaults[DefaultKey{
+ Variant: variant,
+ ServiceVariant: serviceVariant,
+ }]
+
+ return p.endpointForRegion(region, variant, serviceVariant, endpoints).resolve(p.ID, region, defaults, options)
+}
+
+func (p Partition) endpointForRegion(region string, variant EndpointVariant, serviceVariant ServiceVariant, endpoints Endpoints) Endpoint {
+ key := EndpointKey{
+ Region: region,
+ Variant: variant,
+ }
+
+ if e, ok := endpoints[key]; ok {
+ return e
+ }
+
+ if !p.IsRegionalized {
+ return endpoints[EndpointKey{
+ Region: p.PartitionEndpoint,
+ Variant: variant,
+ ServiceVariant: serviceVariant,
+ }]
+ }
+
+ // Unable to find any matching endpoint, return
+ // blank that will be used for generic endpoint creation.
+ return Endpoint{}
+}
+
+// Endpoints is a map of service config regions to endpoints
+type Endpoints map[EndpointKey]Endpoint
+
+// CredentialScope is the credential scope of a region and service
+type CredentialScope struct {
+ Region string
+ Service string
+}
+
+// Endpoint is a service endpoint description
+type Endpoint struct {
+ // True if the endpoint cannot be resolved for this partition/region/service
+ Unresolveable aws.Ternary
+
+ Hostname string
+ Protocols []string
+
+ CredentialScope CredentialScope
+
+ SignatureVersions []string
+
+ // Indicates that this endpoint is deprecated.
+ Deprecated aws.Ternary
+}
+
+// IsZero returns whether the endpoint structure is an empty (zero) value.
+func (e Endpoint) IsZero() bool {
+ switch {
+ case e.Unresolveable != aws.UnknownTernary:
+ return false
+ case len(e.Hostname) != 0:
+ return false
+ case len(e.Protocols) != 0:
+ return false
+ case e.CredentialScope != (CredentialScope{}):
+ return false
+ case len(e.SignatureVersions) != 0:
+ return false
+ }
+ return true
+}
+
+func (e Endpoint) resolve(partition, region string, def Endpoint, options Options) (aws.Endpoint, error) {
+ var merged Endpoint
+ merged.mergeIn(def)
+ merged.mergeIn(e)
+ e = merged
+
+ if e.IsZero() {
+ return aws.Endpoint{}, fmt.Errorf("unable to resolve endpoint for region: %v", region)
+ }
+
+ var u string
+ if e.Unresolveable != aws.TrueTernary {
+ // Only attempt to resolve the endpoint if it can be resolved.
+ hostname := strings.Replace(e.Hostname, "{region}", region, 1)
+
+ scheme := getEndpointScheme(e.Protocols, options.DisableHTTPS)
+ u = scheme + "://" + hostname
+ }
+
+ signingRegion := e.CredentialScope.Region
+ if len(signingRegion) == 0 {
+ signingRegion = region
+ }
+ signingName := e.CredentialScope.Service
+
+ if e.Deprecated == aws.TrueTernary && options.LogDeprecated {
+ options.Logger.Logf(logging.Warn, "endpoint identifier %q, url %q marked as deprecated", region, u)
+ }
+
+ return aws.Endpoint{
+ URL: u,
+ PartitionID: partition,
+ SigningRegion: signingRegion,
+ SigningName: signingName,
+ SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner),
+ }, nil
+}
+
+func (e *Endpoint) mergeIn(other Endpoint) {
+ if other.Unresolveable != aws.UnknownTernary {
+ e.Unresolveable = other.Unresolveable
+ }
+ if len(other.Hostname) > 0 {
+ e.Hostname = other.Hostname
+ }
+ if len(other.Protocols) > 0 {
+ e.Protocols = other.Protocols
+ }
+ if len(other.CredentialScope.Region) > 0 {
+ e.CredentialScope.Region = other.CredentialScope.Region
+ }
+ if len(other.CredentialScope.Service) > 0 {
+ e.CredentialScope.Service = other.CredentialScope.Service
+ }
+ if len(other.SignatureVersions) > 0 {
+ e.SignatureVersions = other.SignatureVersions
+ }
+ if other.Deprecated != aws.UnknownTernary {
+ e.Deprecated = other.Deprecated
+ }
+}
+
+func getEndpointScheme(protocols []string, disableHTTPS bool) string {
+ if disableHTTPS {
+ return "http"
+ }
+
+ return getByPriority(protocols, protocolPriority, defaultProtocol)
+}
+
+func getByPriority(s []string, p []string, def string) string {
+ if len(s) == 0 {
+ return def
+ }
+
+ for i := 0; i < len(p); i++ {
+ for j := 0; j < len(s); j++ {
+ if s[j] == p[i] {
+ return s[j]
+ }
+ }
+ }
+
+ return s[0]
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
new file mode 100644
index 000000000..4c105f81e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package endpoints
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "2.4.17"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md
new file mode 100644
index 000000000..3c2ff160e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md
@@ -0,0 +1,144 @@
+# v1.3.24 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.23 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.22 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.21 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.20 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.19 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.18 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.17 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.16 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.15 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.14 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.13 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.12 (2022-05-17)
+
+* **Bug Fix**: Removes the fuzz testing files from the module, as they are invalid and not used.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.11 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.10 (2022-03-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.9 (2022-03-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.8 (2022-03-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.7 (2022-03-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.6 (2022-02-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.5 (2022-01-28)
+
+* **Bug Fix**: Fixes the SDK's handling of `duration_sections` in the shared credentials file or specified in multiple shared config and shared credentials files under the same profile. [#1568](https://github.com/aws/aws-sdk-go-v2/pull/1568). Thanks to [Amir Szekely](https://github.com/kichik) for help reproduce this bug.
+
+# v1.3.4 (2022-01-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.3 (2022-01-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.2 (2021-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.1 (2021-11-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2021-11-06)
+
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.5 (2021-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.4 (2021-10-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.3 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.2 (2021-08-27)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.1 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2021-08-04)
+
+* **Feature**: adds error handling for defered close calls
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.1 (2021-07-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.0 (2021-07-01)
+
+* **Feature**: Support for `:`, `=`, `[`, `]` being present in expression values.
+
+# v1.0.1 (2021-06-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.0.0 (2021-05-20)
+
+* **Release**: The `github.com/aws/aws-sdk-go-v2/internal/ini` package is now a Go Module.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/aws/aws-sdk-go/internal/ini/ast.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ast.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/ast.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ast.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/comma_token.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/comma_token.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/comment_token.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/comment_token.go
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/dependency.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/dependency.go
new file mode 100644
index 000000000..f5ebe52e1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/dependency.go
@@ -0,0 +1,6 @@
+package ini
+
+import (
+ // internal/ini module was carved out of this module
+ _ "github.com/aws/aws-sdk-go-v2"
+)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/doc.go
new file mode 100644
index 000000000..fdd5321b4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/doc.go
@@ -0,0 +1,43 @@
+// Package ini is an LL(1) parser for configuration files.
+//
+// Example:
+// sections, err := ini.OpenFile("/path/to/file")
+// if err != nil {
+// panic(err)
+// }
+//
+// profile := "foo"
+// section, ok := sections.GetSection(profile)
+// if !ok {
+// fmt.Printf("section %q could not be found", profile)
+// }
+//
+// Below is the BNF that describes this parser
+//
+// Grammar:
+// stmt -> section | stmt'
+// stmt' -> epsilon | expr
+// expr -> value (stmt)* | equal_expr (stmt)*
+// equal_expr -> value ( ':' | '=' ) equal_expr'
+// equal_expr' -> number | string | quoted_string
+// quoted_string -> " quoted_string'
+// quoted_string' -> string quoted_string_end
+// quoted_string_end -> "
+//
+// section -> [ section'
+// section' -> section_value section_close
+// section_value -> number | string_subset | boolean | quoted_string_subset
+// quoted_string_subset -> " quoted_string_subset'
+// quoted_string_subset' -> string_subset quoted_string_end
+// quoted_string_subset -> "
+// section_close -> ]
+//
+// value -> number | string_subset | boolean
+// string -> ? UTF-8 Code-Points except '\n' (U+000A) and '\r\n' (U+000D U+000A) ?
+// string_subset -> ? Code-points excepted by grammar except ':' (U+003A), '=' (U+003D), '[' (U+005B), and ']' (U+005D) ?
+//
+// SkipState will skip (NL WS)+
+//
+// comment -> # comment' | ; comment'
+// comment' -> epsilon | value
+package ini
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/empty_token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/empty_token.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/empty_token.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/empty_token.go
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/errors.go
new file mode 100644
index 000000000..0f278d55e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/errors.go
@@ -0,0 +1,22 @@
+package ini
+
+import "fmt"
+
+// UnableToReadFile is an error indicating that a ini file could not be read
+type UnableToReadFile struct {
+ Err error
+}
+
+// Error returns an error message and the underlying error message if present
+func (e *UnableToReadFile) Error() string {
+ base := "unable to read file"
+ if e.Err == nil {
+ return base
+ }
+ return fmt.Sprintf("%s: %v", base, e.Err)
+}
+
+// Unwrap returns the underlying error
+func (e *UnableToReadFile) Unwrap() error {
+ return e.Err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/expression.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/expression.go
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go
new file mode 100644
index 000000000..404ac6734
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package ini
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.3.24"
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini.go
similarity index 57%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini.go
index 3b0ca7afe..f74062313 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini.go
@@ -1,33 +1,40 @@
package ini
import (
+ "fmt"
"io"
"os"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
)
// OpenFile takes a path to a given file, and will open and parse
// that file.
-func OpenFile(path string) (Sections, error) {
- f, err := os.Open(path)
- if err != nil {
- return Sections{}, awserr.New(ErrCodeUnableToReadFile, "unable to open file", err)
+func OpenFile(path string) (sections Sections, err error) {
+ f, oerr := os.Open(path)
+ if oerr != nil {
+ return Sections{}, &UnableToReadFile{Err: oerr}
}
- defer f.Close()
- return Parse(f)
+ defer func() {
+ closeErr := f.Close()
+ if err == nil {
+ err = closeErr
+ } else if closeErr != nil {
+ err = fmt.Errorf("close error: %v, original error: %w", closeErr, err)
+ }
+ }()
+
+ return Parse(f, path)
}
// Parse will parse the given file using the shared config
// visitor.
-func Parse(f io.Reader) (Sections, error) {
+func Parse(f io.Reader, path string) (Sections, error) {
tree, err := ParseAST(f)
if err != nil {
return Sections{}, err
}
- v := NewDefaultVisitor()
+ v := NewDefaultVisitor(path)
if err = Walk(tree, v); err != nil {
return Sections{}, err
}
@@ -42,7 +49,7 @@ func ParseBytes(b []byte) (Sections, error) {
return Sections{}, err
}
- v := NewDefaultVisitor()
+ v := NewDefaultVisitor("")
if err = Walk(tree, v); err != nil {
return Sections{}, err
}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_lexer.go
similarity index 91%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_lexer.go
index 582c024ad..abf1fb036 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_lexer.go
@@ -4,14 +4,6 @@ import (
"bytes"
"io"
"io/ioutil"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-const (
- // ErrCodeUnableToReadFile is used when a file is failed to be
- // opened or read from.
- ErrCodeUnableToReadFile = "FailedRead"
)
// TokenType represents the various different tokens types
@@ -59,7 +51,7 @@ type iniLexer struct{}
func (l *iniLexer) Tokenize(r io.Reader) ([]Token, error) {
b, err := ioutil.ReadAll(r)
if err != nil {
- return nil, awserr.New(ErrCodeUnableToReadFile, "unable to read file", err)
+ return nil, &UnableToReadFile{Err: err}
}
return l.tokenize(b)
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_parser.go
similarity index 97%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_parser.go
index 0ba319491..12fc7d5aa 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini_parser.go
@@ -66,12 +66,11 @@ var parseTable = map[ASTKind]map[TokenType]ParseState{
TokenNone: MarkCompleteState,
},
ASTKindEqualExpr: {
- TokenLit: ValueState,
- TokenSep: ValueState,
- TokenOp: ValueState,
- TokenWS: SkipTokenState,
- TokenNL: SkipState,
- TokenNone: SkipState,
+ TokenLit: ValueState,
+ TokenSep: ValueState,
+ TokenOp: ValueState,
+ TokenWS: SkipTokenState,
+ TokenNL: SkipState,
},
ASTKindStatement: {
TokenLit: SectionState,
@@ -307,7 +306,7 @@ loop:
default:
return nil, NewParseError(
fmt.Sprintf("invalid state with ASTKind %v and TokenType %v",
- k, tok.Type()))
+ k.Kind, tok.Type()))
}
if len(tokens) > 0 {
@@ -320,7 +319,7 @@ loop:
return nil, NewParseError(fmt.Sprintf("incomplete ini expression"))
}
- // returns a sublist which excludes the start symbol
+ // returns a sublist which exludes the start symbol
return stack.List(), nil
}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/literal_tokens.go
similarity index 94%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/literal_tokens.go
index 34a481afb..eca42d1b2 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/literal_tokens.go
@@ -209,19 +209,15 @@ func newValue(t ValueType, base int, raw []rune) (Value, error) {
return v, err
}
-// Append will append values and change the type to a string
-// type.
-func (v *Value) Append(tok Token) {
- r := tok.Raw()
- if v.Type != QuotedStringType {
- v.Type = StringType
- r = tok.raw[1 : len(tok.raw)-1]
- }
- if tok.Type() != TokenLit {
- v.raw = append(v.raw, tok.Raw()...)
- } else {
- v.raw = append(v.raw, r...)
- }
+// NewStringValue returns a Value type generated using a string input.
+func NewStringValue(str string) (Value, error) {
+ return newValue(StringType, 10, []rune(str))
+}
+
+// NewIntValue returns a Value type generated using an int64 input.
+func NewIntValue(i int64) (Value, error) {
+ v := strconv.FormatInt(i, 10)
+ return newValue(IntegerType, 10, []rune(v))
}
func (v Value) String() string {
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/newline_token.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/newline_token.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/number_helper.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/number_helper.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/number_helper.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/number_helper.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/op_tokens.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/op_tokens.go
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_error.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_error.go
new file mode 100644
index 000000000..30ae0b8f2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_error.go
@@ -0,0 +1,19 @@
+package ini
+
+// ParseError is an error which is returned during any part of
+// the parsing process.
+type ParseError struct {
+ msg string
+}
+
+// NewParseError will return a new ParseError where message
+// is the description of the error.
+func NewParseError(message string) *ParseError {
+ return &ParseError{
+ msg: message,
+ }
+}
+
+func (err *ParseError) Error() string {
+ return err.msg
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_stack.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_stack.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/parse_stack.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse_stack.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/sep_tokens.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/sep_tokens.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/skipper.go
similarity index 91%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/skipper.go
index da7a4049c..07e90876a 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/skipper.go
@@ -30,6 +30,7 @@ func (s *skipper) ShouldSkip(tok Token) bool {
s.Continue()
return false
}
+
s.prevTok = tok
return s.shouldSkip
}
@@ -40,6 +41,5 @@ func (s *skipper) Skip() {
func (s *skipper) Continue() {
s.shouldSkip = false
- // empty token is assigned as we return to default state, when should skip is false
s.prevTok = emptyToken
}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/statement.go
similarity index 93%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/statement.go
index 18f3fe893..ba0af01b5 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/statement.go
@@ -15,7 +15,7 @@ func newExprStatement(ast AST) AST {
return newAST(ASTKindExprStatement, ast)
}
-// CommentStatement represents a comment in the ini definition.
+// CommentStatement represents a comment in the ini defintion.
//
// grammar:
// comment -> #comment' | ;comment'
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/value_util.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/value_util.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/visitor.go
similarity index 56%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/visitor.go
index 081cf4334..a07a63738 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/visitor.go
@@ -3,6 +3,7 @@ package ini
import (
"fmt"
"sort"
+ "strings"
)
// Visitor is an interface used by walkers that will
@@ -18,16 +19,25 @@ type Visitor interface {
// the Sections field which can be used to retrieve profile
// configuration.
type DefaultVisitor struct {
- scope string
+
+ // scope is the profile which is being visited
+ scope string
+
+ // path is the file path which the visitor is visiting
+ path string
+
+ // Sections defines list of the profile section
Sections Sections
}
-// NewDefaultVisitor return a DefaultVisitor
-func NewDefaultVisitor() *DefaultVisitor {
+// NewDefaultVisitor returns a DefaultVisitor. It takes in a filepath
+// which points to the file it is visiting.
+func NewDefaultVisitor(filepath string) *DefaultVisitor {
return &DefaultVisitor{
Sections: Sections{
container: map[string]Section{},
},
+ path: filepath,
}
}
@@ -37,6 +47,9 @@ func (v *DefaultVisitor) VisitExpr(expr AST) error {
if t.values == nil {
t.values = values{}
}
+ if t.SourceFile == nil {
+ t.SourceFile = make(map[string]string, 0)
+ }
switch expr.Kind {
case ASTKindExprStatement:
@@ -58,12 +71,26 @@ func (v *DefaultVisitor) VisitExpr(expr AST) error {
}
key := EqualExprKey(opExpr)
- v, err := newValue(rhs.Root.ValueType, rhs.Root.base, rhs.Root.Raw())
+ val, err := newValue(rhs.Root.ValueType, rhs.Root.base, rhs.Root.Raw())
if err != nil {
return err
}
- t.values[key] = v
+ // lower case key to standardize
+ k := strings.ToLower(key)
+
+ // identify if the section already had this key, append log on section
+ if t.Has(k) {
+ t.Logs = append(t.Logs,
+ fmt.Sprintf("For profile: %v, overriding %v value, "+
+ "with a %v value found in a duplicate profile defined later in the same file %v. \n",
+ t.Name, k, k, v.path))
+ }
+
+ // assign the value
+ t.values[k] = val
+ // update the source file path for region
+ t.SourceFile[k] = v.path
default:
return NewParseError(fmt.Sprintf("unsupported expression %v", expr))
}
@@ -85,7 +112,21 @@ func (v *DefaultVisitor) VisitStatement(stmt AST) error {
}
name := string(child.Root.Raw())
- v.Sections.container[name] = Section{}
+
+ // trim start and end space
+ name = strings.TrimSpace(name)
+
+ // if has prefix "profile " + [ws+] + "profile-name",
+ // we standardize by removing the [ws+] between prefix and profile-name.
+ if strings.HasPrefix(name, "profile ") {
+ names := strings.SplitN(name, " ", 2)
+ name = names[0] + " " + strings.TrimLeft(names[1], " ")
+ }
+
+ // attach profile name on section
+ if !v.Sections.HasSection(name) {
+ v.Sections.container[name] = NewSection(name)
+ }
v.scope = name
default:
return NewParseError(fmt.Sprintf("unsupported statement: %s", stmt.Kind))
@@ -100,6 +141,13 @@ type Sections struct {
container map[string]Section
}
+// NewSections returns empty ini Sections
+func NewSections() Sections {
+ return Sections{
+ container: make(map[string]Section, 0),
+ }
+}
+
// GetSection will return section p. If section p does not exist,
// false will be returned in the second parameter.
func (t Sections) GetSection(p string) (Section, bool) {
@@ -107,6 +155,24 @@ func (t Sections) GetSection(p string) (Section, bool) {
return v, ok
}
+// HasSection denotes if Sections consist of a section with
+// provided name.
+func (t Sections) HasSection(p string) bool {
+ _, ok := t.container[p]
+ return ok
+}
+
+// SetSection sets a section value for provided section name.
+func (t Sections) SetSection(p string, v Section) Sections {
+ t.container[p] = v
+ return t
+}
+
+// DeleteSection deletes a section entry/value for provided section name./
+func (t Sections) DeleteSection(p string) {
+ delete(t.container, p)
+}
+
// values represents a map of union values.
type values map[string]Value
@@ -127,8 +193,42 @@ func (t Sections) List() []string {
// Section contains a name and values. This represent
// a sectioned entry in a configuration file.
type Section struct {
- Name string
+ // Name is the Section profile name
+ Name string
+
+ // values are the values within parsed profile
values values
+
+ // Errors is the list of errors
+ Errors []error
+
+ // Logs is the list of logs
+ Logs []string
+
+ // SourceFile is the INI Source file from where this section
+ // was retrieved. They key is the property, value is the
+ // source file the property was retrieved from.
+ SourceFile map[string]string
+}
+
+// NewSection returns an initialize section for the name
+func NewSection(name string) Section {
+ return Section{
+ Name: name,
+ values: values{},
+ SourceFile: map[string]string{},
+ }
+}
+
+// UpdateSourceFile updates source file for a property to provided filepath.
+func (t Section) UpdateSourceFile(property string, filepath string) {
+ t.SourceFile[property] = filepath
+}
+
+// UpdateValue updates value for a provided key with provided value
+func (t Section) UpdateValue(k string, v Value) error {
+ t.values[k] = v
+ return nil
}
// Has will return whether or not an entry exists in a given section
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/walker.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/walker.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ws_token.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ws_token.go
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/rand/rand.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/rand/rand.go
new file mode 100644
index 000000000..c8484dcd7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/rand/rand.go
@@ -0,0 +1,33 @@
+package rand
+
+import (
+ "crypto/rand"
+ "fmt"
+ "io"
+ "math/big"
+)
+
+func init() {
+ Reader = rand.Reader
+}
+
+// Reader provides a random reader that can reset during testing.
+var Reader io.Reader
+
+var floatMaxBigInt = big.NewInt(1 << 53)
+
+// Float64 returns a float64 read from an io.Reader source. The returned float will be between [0.0, 1.0).
+func Float64(reader io.Reader) (float64, error) {
+ bi, err := rand.Int(reader, floatMaxBigInt)
+ if err != nil {
+ return 0, fmt.Errorf("failed to read random value, %v", err)
+ }
+
+ return float64(bi.Int64()) / (1 << 53), nil
+}
+
+// CryptoRandFloat64 returns a random float64 obtained from the crypto rand
+// source.
+func CryptoRandFloat64() (float64, error) {
+ return Float64(Reader)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/interfaces.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/interfaces.go
new file mode 100644
index 000000000..2b42cbe64
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/interfaces.go
@@ -0,0 +1,9 @@
+package sdk
+
+// Invalidator provides access to a type's invalidate method to make it
+// invalidate it cache.
+//
+// e.g aws.SafeCredentialsProvider's Invalidate method.
+type Invalidator interface {
+ Invalidate()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/time.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/time.go
new file mode 100644
index 000000000..8e8dabad5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/time.go
@@ -0,0 +1,74 @@
+package sdk
+
+import (
+ "context"
+ "time"
+)
+
+func init() {
+ NowTime = time.Now
+ Sleep = time.Sleep
+ SleepWithContext = sleepWithContext
+}
+
+// NowTime is a value for getting the current time. This value can be overridden
+// for testing mocking out current time.
+var NowTime func() time.Time
+
+// Sleep is a value for sleeping for a duration. This value can be overridden
+// for testing and mocking out sleep duration.
+var Sleep func(time.Duration)
+
+// SleepWithContext will wait for the timer duration to expire, or the context
+// is canceled. Which ever happens first. If the context is canceled the Context's
+// error will be returned.
+//
+// This value can be overridden for testing and mocking out sleep duration.
+var SleepWithContext func(context.Context, time.Duration) error
+
+// sleepWithContext will wait for the timer duration to expire, or the context
+// is canceled. Which ever happens first. If the context is canceled the
+// Context's error will be returned.
+func sleepWithContext(ctx context.Context, dur time.Duration) error {
+ t := time.NewTimer(dur)
+ defer t.Stop()
+
+ select {
+ case <-t.C:
+ break
+ case <-ctx.Done():
+ return ctx.Err()
+ }
+
+ return nil
+}
+
+// noOpSleepWithContext does nothing, returns immediately.
+func noOpSleepWithContext(context.Context, time.Duration) error {
+ return nil
+}
+
+func noOpSleep(time.Duration) {}
+
+// TestingUseNopSleep is a utility for disabling sleep across the SDK for
+// testing.
+func TestingUseNopSleep() func() {
+ SleepWithContext = noOpSleepWithContext
+ Sleep = noOpSleep
+
+ return func() {
+ SleepWithContext = sleepWithContext
+ Sleep = time.Sleep
+ }
+}
+
+// TestingUseReferenceTime is a utility for swapping the time function across the SDK to return a specific reference time
+// for testing purposes.
+func TestingUseReferenceTime(referenceTime time.Time) func() {
+ NowTime = func() time.Time {
+ return referenceTime
+ }
+ return func() {
+ NowTime = time.Now
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkio/byte.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sdkio/byte.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/sdkio/byte.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/sdkio/byte.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/strings/strings.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/strings/strings.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/strings/strings.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/strings/strings.go
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/LICENSE b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE
similarity index 95%
rename from vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/LICENSE
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE
index 6a66aea5e..fe6a62006 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/LICENSE
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE
@@ -14,7 +14,7 @@ distribution.
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
+THIS SOFTWARE IS PROVIDED BY THE COPYIGHT 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
@@ -25,3 +25,4 @@ 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/aws/aws-sdk-go-v2/internal/sync/singleflight/docs.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/docs.go
new file mode 100644
index 000000000..cb70616e8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/docs.go
@@ -0,0 +1,7 @@
+// Package singleflight provides a duplicate function call suppression
+// mechanism. This package is a fork of the Go golang.org/x/sync/singleflight
+// package. The package is forked, because the package a part of the unstable
+// and unversioned golang.org/x/sync module.
+//
+// https://github.com/golang/sync/tree/67f06af15bc961c363a7260195bcd53487529a21/singleflight
+package singleflight
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/singleflight.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go
similarity index 51%
rename from vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/singleflight.go
rename to vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go
index 14ad0c589..e8a1b17d5 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/singleflight.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go
@@ -2,11 +2,44 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Package singleflight provides a duplicate function call suppression
-// mechanism.
package singleflight
-import "sync"
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "runtime"
+ "runtime/debug"
+ "sync"
+)
+
+// errGoexit indicates the runtime.Goexit was called in
+// the user given function.
+var errGoexit = errors.New("runtime.Goexit was called")
+
+// A panicError is an arbitrary value recovered from a panic
+// with the stack trace during the execution of given function.
+type panicError struct {
+ value interface{}
+ stack []byte
+}
+
+// Error implements error interface.
+func (p *panicError) Error() string {
+ return fmt.Sprintf("%v\n\n%s", p.value, p.stack)
+}
+
+func newPanicError(v interface{}) error {
+ stack := debug.Stack()
+
+ // The first line of the stack trace is of the form "goroutine N [status]:"
+ // but by the time the panic reaches Do the goroutine may no longer exist
+ // and its status will have changed. Trim out the misleading line.
+ if line := bytes.IndexByte(stack[:], '\n'); line >= 0 {
+ stack = stack[line+1:]
+ }
+ return &panicError{value: v, stack: stack}
+}
// call is an in-flight or completed singleflight.Do call
type call struct {
@@ -57,6 +90,12 @@ func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, e
c.dups++
g.mu.Unlock()
c.wg.Wait()
+
+ if e, ok := c.err.(*panicError); ok {
+ panic(e)
+ } else if c.err == errGoexit {
+ runtime.Goexit()
+ }
return c.val, c.err, true
}
c := new(call)
@@ -70,6 +109,8 @@ func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, e
// DoChan is like Do but returns a channel that will receive the
// results when they are ready.
+//
+// The returned channel will not be closed.
func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result {
ch := make(chan Result, 1)
g.mu.Lock()
@@ -94,17 +135,66 @@ func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result
// doCall handles the single call for a key.
func (g *Group) doCall(c *call, key string, fn func() (interface{}, error)) {
- c.val, c.err = fn()
- c.wg.Done()
+ normalReturn := false
+ recovered := false
- g.mu.Lock()
- if !c.forgotten {
- delete(g.m, key)
+ // use double-defer to distinguish panic from runtime.Goexit,
+ // more details see https://golang.org/cl/134395
+ defer func() {
+ // the given function invoked runtime.Goexit
+ if !normalReturn && !recovered {
+ c.err = errGoexit
+ }
+
+ c.wg.Done()
+ g.mu.Lock()
+ defer g.mu.Unlock()
+ if !c.forgotten {
+ delete(g.m, key)
+ }
+
+ if e, ok := c.err.(*panicError); ok {
+ // In order to prevent the waiting channels from being blocked forever,
+ // needs to ensure that this panic cannot be recovered.
+ if len(c.chans) > 0 {
+ go panic(e)
+ select {} // Keep this goroutine around so that it will appear in the crash dump.
+ } else {
+ panic(e)
+ }
+ } else if c.err == errGoexit {
+ // Already in the process of goexit, no need to call again
+ } else {
+ // Normal return
+ for _, ch := range c.chans {
+ ch <- Result{c.val, c.err, c.dups > 0}
+ }
+ }
+ }()
+
+ func() {
+ defer func() {
+ if !normalReturn {
+ // Ideally, we would wait to take a stack trace until we've determined
+ // whether this is a panic or a runtime.Goexit.
+ //
+ // Unfortunately, the only way we can distinguish the two is to see
+ // whether the recover stopped the goroutine from terminating, and by
+ // the time we know that, the part of the stack trace relevant to the
+ // panic has been discarded.
+ if r := recover(); r != nil {
+ c.err = newPanicError(r)
+ }
+ }
+ }()
+
+ c.val, c.err = fn()
+ normalReturn = true
+ }()
+
+ if !normalReturn {
+ recovered = true
}
- for _, ch := range c.chans {
- ch <- Result{c.val, c.err, c.dups > 0}
- }
- g.mu.Unlock()
}
// Forget tells the singleflight to forget about a key. Future calls
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/timeconv/duration.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/timeconv/duration.go
new file mode 100644
index 000000000..5d69db5f2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/timeconv/duration.go
@@ -0,0 +1,13 @@
+package timeconv
+
+import "time"
+
+// FloatSecondsDur converts a fractional seconds to duration.
+func FloatSecondsDur(v float64) time.Duration {
+ return time.Duration(v * float64(time.Second))
+}
+
+// DurSecondsFloat converts a duration into fractional seconds.
+func DurSecondsFloat(d time.Duration) float64 {
+ return float64(d) / float64(time.Second)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/local-mod-replace.sh b/vendor/github.com/aws/aws-sdk-go-v2/local-mod-replace.sh
new file mode 100644
index 000000000..81a836127
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/local-mod-replace.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+
+PROJECT_DIR=""
+SDK_SOURCE_DIR=$(cd `dirname $0` && pwd)
+
+usage() {
+ echo "Usage: $0 [-s SDK_SOURCE_DIR] [-d PROJECT_DIR]" 1>&2
+ exit 1
+}
+
+while getopts "hs:d:" options; do
+ case "${options}" in
+ s)
+ SDK_SOURCE_DIR=${OPTARG}
+ if [ "$SDK_SOURCE_DIR" == "" ]; then
+ echo "path to SDK source directory is required" || exit
+ usage
+ fi
+ ;;
+ d)
+ PROJECT_DIR=${OPTARG}
+ ;;
+ h)
+ usage
+ ;;
+ *)
+ usage
+ ;;
+ esac
+done
+
+if [ "$PROJECT_DIR" != "" ]; then
+ cd "$PROJECT_DIR" || exit
+fi
+
+go mod graph | awk '{print $1}' | cut -d '@' -f 1 | sort | uniq | grep "github.com/aws/aws-sdk-go-v2" | while read x; do
+ repPath=${x/github.com\/aws\/aws-sdk-go-v2/${SDK_SOURCE_DIR}}
+ echo -replace $x=$repPath
+done | xargs go mod edit
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/modman.toml b/vendor/github.com/aws/aws-sdk-go-v2/modman.toml
new file mode 100644
index 000000000..969f0e467
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/modman.toml
@@ -0,0 +1,78 @@
+
+[dependencies]
+ "github.com/aws/aws-sdk-go" = "v1.44.28"
+ "github.com/aws/smithy-go" = "v1.13.3"
+ "github.com/google/go-cmp" = "v0.5.8"
+ "github.com/jmespath/go-jmespath" = "v0.4.0"
+ "golang.org/x/net" = "v0.0.0-20220127200216-cd36cc0744dd"
+
+[modules]
+
+ [modules."."]
+ metadata_package = "aws"
+
+ [modules.codegen]
+ no_tag = true
+
+ [modules."example/service/dynamodb/createTable"]
+ no_tag = true
+
+ [modules."example/service/dynamodb/scanItems"]
+ no_tag = true
+
+ [modules."example/service/s3/listObjects"]
+ no_tag = true
+
+ [modules."example/service/s3/usingPrivateLink"]
+ no_tag = true
+
+ [modules."feature/ec2/imds/internal/configtesting"]
+ no_tag = true
+
+ [modules."internal/codegen"]
+ no_tag = true
+
+ [modules."internal/configsources/configtesting"]
+ no_tag = true
+
+ [modules."internal/protocoltest/awsrestjson"]
+ no_tag = true
+
+ [modules."internal/protocoltest/ec2query"]
+ no_tag = true
+
+ [modules."internal/protocoltest/jsonrpc"]
+ no_tag = true
+
+ [modules."internal/protocoltest/jsonrpc10"]
+ no_tag = true
+
+ [modules."internal/protocoltest/query"]
+ no_tag = true
+
+ [modules."internal/protocoltest/restxml"]
+ no_tag = true
+
+ [modules."internal/protocoltest/restxmlwithnamespace"]
+ no_tag = true
+
+ [modules."internal/repotools"]
+ no_tag = true
+
+ [modules."internal/repotools/changes"]
+ no_tag = true
+
+ [modules."service/internal/benchmark"]
+ no_tag = true
+
+ [modules."service/internal/integrationtest"]
+ no_tag = true
+
+ [modules."service/kinesis/internal/testing"]
+ no_tag = true
+
+ [modules."service/s3/internal/configtesting"]
+ no_tag = true
+
+ [modules."service/transcribestreaming/internal/testing"]
+ no_tag = true
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
new file mode 100644
index 000000000..deb3783f5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
@@ -0,0 +1,28 @@
+# v1.5.0 (2021-11-06)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+
+# v1.4.0 (2021-10-21)
+
+* **Feature**: Updated to latest version
+
+# v1.3.0 (2021-08-27)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+
+# v1.2.2 (2021-08-04)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+
+# v1.2.1 (2021-07-15)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+
+# v1.2.0 (2021-06-25)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+
+# v1.1.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/aws/aws-sdk-go-v2/service/internal/accept-encoding/accept_encoding_gzip.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/accept_encoding_gzip.go
new file mode 100644
index 000000000..3f451fc9b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/accept_encoding_gzip.go
@@ -0,0 +1,176 @@
+package acceptencoding
+
+import (
+ "compress/gzip"
+ "context"
+ "fmt"
+ "io"
+
+ "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const acceptEncodingHeaderKey = "Accept-Encoding"
+const contentEncodingHeaderKey = "Content-Encoding"
+
+// AddAcceptEncodingGzipOptions provides the options for the
+// AddAcceptEncodingGzip middleware setup.
+type AddAcceptEncodingGzipOptions struct {
+ Enable bool
+}
+
+// AddAcceptEncodingGzip explicitly adds handling for accept-encoding GZIP
+// middleware to the operation stack. This allows checksums to be correctly
+// computed without disabling GZIP support.
+func AddAcceptEncodingGzip(stack *middleware.Stack, options AddAcceptEncodingGzipOptions) error {
+ if options.Enable {
+ if err := stack.Finalize.Add(&EnableGzip{}, middleware.Before); err != nil {
+ return err
+ }
+ if err := stack.Deserialize.Insert(&DecompressGzip{}, "OperationDeserializer", middleware.After); err != nil {
+ return err
+ }
+ return nil
+ }
+
+ return stack.Finalize.Add(&DisableGzip{}, middleware.Before)
+}
+
+// DisableGzip provides the middleware that will
+// disable the underlying http client automatically enabling for gzip
+// decompress content-encoding support.
+type DisableGzip struct{}
+
+// ID returns the id for the middleware.
+func (*DisableGzip) ID() string {
+ return "DisableAcceptEncodingGzip"
+}
+
+// HandleFinalize implements the FinalizeMiddleware interface.
+func (*DisableGzip) HandleFinalize(
+ ctx context.Context, input middleware.FinalizeInput, next middleware.FinalizeHandler,
+) (
+ output middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := input.Request.(*smithyhttp.Request)
+ if !ok {
+ return output, metadata, &smithy.SerializationError{
+ Err: fmt.Errorf("unknown request type %T", input.Request),
+ }
+ }
+
+ // Explicitly enable gzip support, this will prevent the http client from
+ // auto extracting the zipped content.
+ req.Header.Set(acceptEncodingHeaderKey, "identity")
+
+ return next.HandleFinalize(ctx, input)
+}
+
+// EnableGzip provides a middleware to enable support for
+// gzip responses, with manual decompression. This prevents the underlying HTTP
+// client from performing the gzip decompression automatically.
+type EnableGzip struct{}
+
+// ID returns the id for the middleware.
+func (*EnableGzip) ID() string {
+ return "AcceptEncodingGzip"
+}
+
+// HandleFinalize implements the FinalizeMiddleware interface.
+func (*EnableGzip) HandleFinalize(
+ ctx context.Context, input middleware.FinalizeInput, next middleware.FinalizeHandler,
+) (
+ output middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := input.Request.(*smithyhttp.Request)
+ if !ok {
+ return output, metadata, &smithy.SerializationError{
+ Err: fmt.Errorf("unknown request type %T", input.Request),
+ }
+ }
+
+ // Explicitly enable gzip support, this will prevent the http client from
+ // auto extracting the zipped content.
+ req.Header.Set(acceptEncodingHeaderKey, "gzip")
+
+ return next.HandleFinalize(ctx, input)
+}
+
+// DecompressGzip provides the middleware for decompressing a gzip
+// response from the service.
+type DecompressGzip struct{}
+
+// ID returns the id for the middleware.
+func (*DecompressGzip) ID() string {
+ return "DecompressGzip"
+}
+
+// HandleDeserialize implements the DeserializeMiddlware interface.
+func (*DecompressGzip) HandleDeserialize(
+ ctx context.Context, input middleware.DeserializeInput, next middleware.DeserializeHandler,
+) (
+ output middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ output, metadata, err = next.HandleDeserialize(ctx, input)
+ if err != nil {
+ return output, metadata, err
+ }
+
+ resp, ok := output.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return output, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("unknown response type %T", output.RawResponse),
+ }
+ }
+ if v := resp.Header.Get(contentEncodingHeaderKey); v != "gzip" {
+ return output, metadata, err
+ }
+
+ // Clear content length since it will no longer be valid once the response
+ // body is decompressed.
+ resp.Header.Del("Content-Length")
+ resp.ContentLength = -1
+
+ resp.Body = wrapGzipReader(resp.Body)
+
+ return output, metadata, err
+}
+
+type gzipReader struct {
+ reader io.ReadCloser
+ gzip *gzip.Reader
+}
+
+func wrapGzipReader(reader io.ReadCloser) *gzipReader {
+ return &gzipReader{
+ reader: reader,
+ }
+}
+
+// Read wraps the gzip reader around the underlying io.Reader to extract the
+// response bytes on the fly.
+func (g *gzipReader) Read(b []byte) (n int, err error) {
+ if g.gzip == nil {
+ g.gzip, err = gzip.NewReader(g.reader)
+ if err != nil {
+ g.gzip = nil // ensure uninitialized gzip value isn't used in close.
+ return 0, fmt.Errorf("failed to decompress gzip response, %w", err)
+ }
+ }
+
+ return g.gzip.Read(b)
+}
+
+func (g *gzipReader) Close() error {
+ if g.gzip == nil {
+ return nil
+ }
+
+ if err := g.gzip.Close(); err != nil {
+ g.reader.Close()
+ return fmt.Errorf("failed to decompress gzip response, %w", err)
+ }
+
+ return g.reader.Close()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go
new file mode 100644
index 000000000..3ffac0131
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go
@@ -0,0 +1,23 @@
+/*
+Package acceptencoding provides customizations associated with Accept Encoding Header.
+
+Accept encoding gzip
+
+The Go HTTP client automatically supports accept-encoding and content-encoding
+gzip by default. This default behavior is not desired by the SDK, and prevents
+validating the response body's checksum. To prevent this the SDK must manually
+control usage of content-encoding gzip.
+
+To control content-encoding, the SDK must always set the `Accept-Encoding`
+header to a value. This prevents the HTTP client from using gzip automatically.
+When gzip is enabled on the API client, the SDK's customization will control
+decompressing the gzip data in order to not break the checksum validation. When
+gzip is disabled, the API client will disable gzip, preventing the HTTP
+client's default behavior.
+
+An `EnableAcceptEncodingGzip` option may or may not be present depending on the client using
+the below middleware. The option if present can be used to enable auto decompressing
+gzip by the SDK.
+
+*/
+package acceptencoding
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go
new file mode 100644
index 000000000..1b54f6ea0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package acceptencoding
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.5.0"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
new file mode 100644
index 000000000..f19fdf9c3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
@@ -0,0 +1,147 @@
+# v1.9.17 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.16 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.15 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.14 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.13 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.12 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.11 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.10 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.9 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.8 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.7 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.6 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.5 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.3 (2022-03-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.2 (2022-03-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.1 (2022-03-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.0 (2022-03-08)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.0 (2022-02-24)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.0 (2022-01-14)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.0 (2022-01-07)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.2 (2021-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.1 (2021-11-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.0 (2021-11-06)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2021-10-21)
+
+* **Feature**: Updated to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.2 (2021-10-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.1 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2021-08-27)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.3 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.2 (2021-08-04)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.1 (2021-07-15)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2021-06-25)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.1 (2021-05-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.1.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go
new file mode 100644
index 000000000..cc919701a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go
@@ -0,0 +1,48 @@
+package presignedurl
+
+import (
+ "context"
+
+ "github.com/aws/smithy-go/middleware"
+)
+
+// WithIsPresigning adds the isPresigning sentinel value to a context to signal
+// that the middleware stack is using the presign flow.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func WithIsPresigning(ctx context.Context) context.Context {
+ return middleware.WithStackValue(ctx, isPresigningKey{}, true)
+}
+
+// GetIsPresigning returns if the context contains the isPresigning sentinel
+// value for presigning flows.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetIsPresigning(ctx context.Context) bool {
+ v, _ := middleware.GetStackValue(ctx, isPresigningKey{}).(bool)
+ return v
+}
+
+type isPresigningKey struct{}
+
+// AddAsIsPresigingMiddleware adds a middleware to the head of the stack that
+// will update the stack's context to be flagged as being invoked for the
+// purpose of presigning.
+func AddAsIsPresigingMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(asIsPresigningMiddleware{}, middleware.Before)
+}
+
+type asIsPresigningMiddleware struct{}
+
+func (asIsPresigningMiddleware) ID() string { return "AsIsPresigningMiddleware" }
+
+func (asIsPresigningMiddleware) HandleInitialize(
+ ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler,
+) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ ctx = WithIsPresigning(ctx)
+ return next.HandleInitialize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/doc.go
new file mode 100644
index 000000000..1b85375cf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/doc.go
@@ -0,0 +1,3 @@
+// Package presignedurl provides the customizations for API clients to fill in
+// presigned URLs into input parameters.
+package presignedurl
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
new file mode 100644
index 000000000..da09a149e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package presignedurl
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.9.17"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go
new file mode 100644
index 000000000..1e2f5c812
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go
@@ -0,0 +1,110 @@
+package presignedurl
+
+import (
+ "context"
+ "fmt"
+
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+
+ "github.com/aws/smithy-go/middleware"
+)
+
+// URLPresigner provides the interface to presign the input parameters in to a
+// presigned URL.
+type URLPresigner interface {
+ // PresignURL presigns a URL.
+ PresignURL(ctx context.Context, srcRegion string, params interface{}) (*v4.PresignedHTTPRequest, error)
+}
+
+// ParameterAccessor provides an collection of accessor to for retrieving and
+// setting the values needed to PresignedURL generation
+type ParameterAccessor struct {
+ // GetPresignedURL accessor points to a function that retrieves a presigned url if present
+ GetPresignedURL func(interface{}) (string, bool, error)
+
+ // GetSourceRegion accessor points to a function that retrieves source region for presigned url
+ GetSourceRegion func(interface{}) (string, bool, error)
+
+ // CopyInput accessor points to a function that takes in an input, and returns a copy.
+ CopyInput func(interface{}) (interface{}, error)
+
+ // SetDestinationRegion accessor points to a function that sets destination region on api input struct
+ SetDestinationRegion func(interface{}, string) error
+
+ // SetPresignedURL accessor points to a function that sets presigned url on api input struct
+ SetPresignedURL func(interface{}, string) error
+}
+
+// Options provides the set of options needed by the presigned URL middleware.
+type Options struct {
+ // Accessor are the parameter accessors used by this middleware
+ Accessor ParameterAccessor
+
+ // Presigner is the URLPresigner used by the middleware
+ Presigner URLPresigner
+}
+
+// AddMiddleware adds the Presign URL middleware to the middleware stack.
+func AddMiddleware(stack *middleware.Stack, opts Options) error {
+ return stack.Initialize.Add(&presign{options: opts}, middleware.Before)
+}
+
+// RemoveMiddleware removes the Presign URL middleware from the stack.
+func RemoveMiddleware(stack *middleware.Stack) error {
+ _, err := stack.Initialize.Remove((*presign)(nil).ID())
+ return err
+}
+
+type presign struct {
+ options Options
+}
+
+func (m *presign) ID() string { return "Presign" }
+
+func (m *presign) HandleInitialize(
+ ctx context.Context, input middleware.InitializeInput, next middleware.InitializeHandler,
+) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ // If PresignedURL is already set ignore middleware.
+ if _, ok, err := m.options.Accessor.GetPresignedURL(input.Parameters); err != nil {
+ return out, metadata, fmt.Errorf("presign middleware failed, %w", err)
+ } else if ok {
+ return next.HandleInitialize(ctx, input)
+ }
+
+ // If have source region is not set ignore middleware.
+ srcRegion, ok, err := m.options.Accessor.GetSourceRegion(input.Parameters)
+ if err != nil {
+ return out, metadata, fmt.Errorf("presign middleware failed, %w", err)
+ } else if !ok || len(srcRegion) == 0 {
+ return next.HandleInitialize(ctx, input)
+ }
+
+ // Create a copy of the original input so the destination region value can
+ // be added. This ensures that value does not leak into the original
+ // request parameters.
+ paramCpy, err := m.options.Accessor.CopyInput(input.Parameters)
+ if err != nil {
+ return out, metadata, fmt.Errorf("unable to create presigned URL, %w", err)
+ }
+
+ // Destination region is the API client's configured region.
+ dstRegion := awsmiddleware.GetRegion(ctx)
+ if err = m.options.Accessor.SetDestinationRegion(paramCpy, dstRegion); err != nil {
+ return out, metadata, fmt.Errorf("presign middleware failed, %w", err)
+ }
+
+ presignedReq, err := m.options.Presigner.PresignURL(ctx, srcRegion, paramCpy)
+ if err != nil {
+ return out, metadata, fmt.Errorf("unable to create presigned URL, %w", err)
+ }
+
+ // Update the original input with the presigned URL value.
+ if err = m.options.Accessor.SetPresignedURL(input.Parameters, presignedReq.URL); err != nil {
+ return out, metadata, fmt.Errorf("presign middleware failed, %w", err)
+ }
+
+ return next.HandleInitialize(ctx, input)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md
new file mode 100644
index 000000000..29c90ed09
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md
@@ -0,0 +1,60 @@
+# v1.9.0 (2021-11-06)
+
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.0 (2021-10-21)
+
+* **Feature**: Updated to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.2 (2021-10-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.1 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.0 (2021-09-02)
+
+* **Feature**: Add support for S3 Multi-Region Access Point ARNs.
+
+# v1.6.0 (2021-08-27)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.3 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.2 (2021-08-04)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.1 (2021-07-15)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.0 (2021-06-25)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2021-06-04)
+
+* **Feature**: The handling of AccessPoint and Outpost ARNs have been updated.
+
+# v1.3.1 (2021-05-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/aws/aws-sdk-go/internal/s3shared/arn/accesspoint_arn.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/accesspoint_arn.go
similarity index 77%
rename from vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/accesspoint_arn.go
rename to vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/accesspoint_arn.go
index bf18031a3..4f7017e84 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/accesspoint_arn.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/accesspoint_arn.go
@@ -3,7 +3,7 @@ package arn
import (
"strings"
- "github.com/aws/aws-sdk-go/aws/arn"
+ "github.com/aws/aws-sdk-go-v2/aws/arn"
)
// AccessPointARN provides representation
@@ -22,11 +22,11 @@ func (a AccessPointARN) GetARN() arn.ARN {
//
// Supported Access point resource format:
// - Access point format: arn:{partition}:s3:{region}:{accountId}:accesspoint/{accesspointName}
-// - example: arn.aws.s3.us-west-2.012345678901:accesspoint/myaccesspoint
+// - example: arn:aws:s3:us-west-2:012345678901:accesspoint/myaccesspoint
//
func ParseAccessPointResource(a arn.ARN, resParts []string) (AccessPointARN, error) {
- if len(a.Region) == 0 {
- return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "region not set"}
+ if isFIPS(a.Region) {
+ return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "FIPS region not allowed in ARN"}
}
if len(a.AccountID) == 0 {
return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "account-id not set"}
@@ -48,3 +48,7 @@ func ParseAccessPointResource(a arn.ARN, resParts []string) (AccessPointARN, err
AccessPointName: resID,
}, nil
}
+
+func isFIPS(region string) bool {
+ return strings.HasPrefix(region, "fips-") || strings.HasSuffix(region, "-fips")
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/arn.go
similarity index 83%
rename from vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go
rename to vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/arn.go
index 216c4baab..06e1a3add 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/arn.go
@@ -4,7 +4,7 @@ import (
"fmt"
"strings"
- "github.com/aws/aws-sdk-go/aws/arn"
+ "github.com/aws/aws-sdk-go-v2/aws/arn"
)
var supportedServiceARN = []string{
@@ -34,12 +34,7 @@ type Resource interface {
type ResourceParser func(arn.ARN) (Resource, error)
// ParseResource parses an AWS ARN into a typed resource for the S3 API.
-func ParseResource(s string, resParser ResourceParser) (resARN Resource, err error) {
- a, err := arn.Parse(s)
- if err != nil {
- return nil, err
- }
-
+func ParseResource(a arn.ARN, resParser ResourceParser) (resARN Resource, err error) {
if len(a.Partition) == 0 {
return nil, InvalidARNError{ARN: a, Reason: "partition not set"}
}
@@ -48,10 +43,6 @@ func ParseResource(s string, resParser ResourceParser) (resARN Resource, err err
return nil, InvalidARNError{ARN: a, Reason: "service is not supported"}
}
- if strings.HasPrefix(a.Region, "fips-") || strings.HasSuffix(a.Region, "-fips") {
- return nil, InvalidARNError{ARN: a, Reason: "FIPS region not allowed in ARN"}
- }
-
if len(a.Resource) == 0 {
return nil, InvalidARNError{ARN: a, Reason: "resource not set"}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/outpost_arn.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/outpost_arn.go
similarity index 96%
rename from vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/outpost_arn.go
rename to vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/outpost_arn.go
index 1e10f8de0..2b9bd6c21 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/outpost_arn.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/outpost_arn.go
@@ -3,7 +3,7 @@ package arn
import (
"strings"
- "github.com/aws/aws-sdk-go/aws/arn"
+ "github.com/aws/aws-sdk-go-v2/aws/arn"
)
// OutpostARN interface that should be satisfied by outpost ARNs
@@ -31,6 +31,10 @@ func ParseOutpostARNResource(a arn.ARN, resParts []string) (OutpostARN, error) {
return nil, InvalidARNError{ARN: a, Reason: "region not set"}
}
+ if isFIPS(a.Region) {
+ return nil, InvalidARNError{ARN: a, Reason: "FIPS region not allowed in ARN"}
+ }
+
if len(a.AccountID) == 0 {
return nil, InvalidARNError{ARN: a, Reason: "account-id not set"}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/s3_object_lambda_arn.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/s3_object_lambda_arn.go
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/s3_object_lambda_arn.go
rename to vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn/s3_object_lambda_arn.go
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn_lookup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn_lookup.go
new file mode 100644
index 000000000..b51532085
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn_lookup.go
@@ -0,0 +1,73 @@
+package s3shared
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/smithy-go/middleware"
+
+ "github.com/aws/aws-sdk-go-v2/aws/arn"
+)
+
+// ARNLookup is the initial middleware that looks up if an arn is provided.
+// This middleware is responsible for fetching ARN from a arnable field, and registering the ARN on
+// middleware context. This middleware must be executed before input validation step or any other
+// arn processing middleware.
+type ARNLookup struct {
+
+ // GetARNValue takes in a input interface and returns a ptr to string and a bool
+ GetARNValue func(interface{}) (*string, bool)
+}
+
+// ID for the middleware
+func (m *ARNLookup) ID() string {
+ return "S3Shared:ARNLookup"
+}
+
+// HandleInitialize handles the behavior of this initialize step
+func (m *ARNLookup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ // check if GetARNValue is supported
+ if m.GetARNValue == nil {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ // check is input resource is an ARN; if not go to next
+ v, ok := m.GetARNValue(in.Parameters)
+ if !ok || v == nil || !arn.IsARN(*v) {
+ return next.HandleInitialize(ctx, in)
+ }
+
+ // if ARN process ResourceRequest and put it on ctx
+ av, err := arn.Parse(*v)
+ if err != nil {
+ return out, metadata, fmt.Errorf("error parsing arn: %w", err)
+ }
+ // set parsed arn on context
+ ctx = setARNResourceOnContext(ctx, av)
+
+ return next.HandleInitialize(ctx, in)
+}
+
+// arnResourceKey is the key set on context used to identify, retrive an ARN resource
+// if present on the context.
+type arnResourceKey struct{}
+
+// SetARNResourceOnContext sets the S3 ARN on the context.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func setARNResourceOnContext(ctx context.Context, value arn.ARN) context.Context {
+ return middleware.WithStackValue(ctx, arnResourceKey{}, value)
+}
+
+// GetARNResourceFromContext returns an ARN from context and a bool indicating
+// presence of ARN on ctx.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetARNResourceFromContext(ctx context.Context) (arn.ARN, bool) {
+ v, ok := middleware.GetStackValue(ctx, arnResourceKey{}).(arn.ARN)
+ return v, ok
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config/config.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config/config.go
new file mode 100644
index 000000000..8926e5970
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config/config.go
@@ -0,0 +1,22 @@
+package config
+
+import "context"
+
+// UseARNRegionProvider is an interface for retrieving external configuration value for UseARNRegion
+type UseARNRegionProvider interface {
+ GetS3UseARNRegion(ctx context.Context) (value bool, found bool, err error)
+}
+
+// ResolveUseARNRegion extracts the first instance of a UseARNRegion from the config slice.
+// Additionally returns a boolean to indicate if the value was found in provided configs, and error if one is encountered.
+func ResolveUseARNRegion(ctx context.Context, configs []interface{}) (value bool, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(UseARNRegionProvider); ok {
+ value, found, err = p.GetS3UseARNRegion(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/endpoint_errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/endpoint_error.go
similarity index 83%
rename from vendor/github.com/aws/aws-sdk-go/internal/s3shared/endpoint_errors.go
rename to vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/endpoint_error.go
index 4290ff676..aa0c3714e 100644
--- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/endpoint_errors.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/endpoint_error.go
@@ -3,10 +3,11 @@ package s3shared
import (
"fmt"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/internal/s3shared/arn"
+ "github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn"
)
+// TODO: fix these error statements to be relevant to v2 sdk
+
const (
invalidARNErrorErrCode = "InvalidARNError"
configurationErrorErrCode = "ConfigurationError"
@@ -19,27 +20,22 @@ type InvalidARNError struct {
origErr error
}
-// Error returns the InvalidARNError
+// Error returns the InvalidARN error string
func (e InvalidARNError) Error() string {
var extra string
if e.resource != nil {
extra = "ARN: " + e.resource.String()
}
- return awserr.SprintError(e.Code(), e.Message(), extra, e.origErr)
-}
+ msg := invalidARNErrorErrCode + " : " + e.message
+ if extra != "" {
+ msg = msg + "\n\t" + extra
+ }
-// Code returns the invalid ARN error code
-func (e InvalidARNError) Code() string {
- return invalidARNErrorErrCode
-}
-
-// Message returns the message for Invalid ARN error
-func (e InvalidARNError) Message() string {
- return e.message
+ return msg
}
// OrigErr is the original error wrapped by Invalid ARN Error
-func (e InvalidARNError) OrigErr() error {
+func (e InvalidARNError) Unwrap() error {
return e.origErr
}
@@ -52,15 +48,6 @@ func NewInvalidARNError(resource arn.Resource, err error) InvalidARNError {
}
}
-// NewInvalidARNWithCustomEndpointError ARN not supported for custom clients endpoints
-func NewInvalidARNWithCustomEndpointError(resource arn.Resource, err error) InvalidARNError {
- return InvalidARNError{
- message: "resource ARN not supported with custom client endpoints",
- origErr: err,
- resource: resource,
- }
-}
-
// NewInvalidARNWithUnsupportedPartitionError ARN not supported for the target partition
func NewInvalidARNWithUnsupportedPartitionError(resource arn.Resource, err error) InvalidARNError {
return InvalidARNError{
@@ -95,21 +82,15 @@ func (e ConfigurationError) Error() string {
extra := fmt.Sprintf("ARN: %s, client partition: %s, client region: %s",
e.resource, e.clientPartitionID, e.clientRegion)
- return awserr.SprintError(e.Code(), e.Message(), extra, e.origErr)
-}
-
-// Code returns configuration error's error-code
-func (e ConfigurationError) Code() string {
- return configurationErrorErrCode
-}
-
-// Message returns the configuration error message
-func (e ConfigurationError) Message() string {
- return e.message
+ msg := configurationErrorErrCode + " : " + e.message
+ if extra != "" {
+ msg = msg + "\n\t" + extra
+ }
+ return msg
}
// OrigErr is the original error wrapped by Configuration Error
-func (e ConfigurationError) OrigErr() error {
+func (e ConfigurationError) Unwrap() error {
return e.origErr
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go
new file mode 100644
index 000000000..57e953d75
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package s3shared
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.9.0"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
new file mode 100644
index 000000000..85b60d2a1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/host_id.go
@@ -0,0 +1,29 @@
+package s3shared
+
+import (
+ "github.com/aws/smithy-go/middleware"
+)
+
+// hostID is used to retrieve host id from response metadata
+type hostID struct {
+}
+
+// SetHostIDMetadata sets the provided host id over middleware metadata
+func SetHostIDMetadata(metadata *middleware.Metadata, id string) {
+ metadata.Set(hostID{}, id)
+}
+
+// GetHostIDMetadata retrieves the host id from middleware metadata
+// returns host id as string along with a boolean indicating presence of
+// hostId on middleware metadata.
+func GetHostIDMetadata(metadata middleware.Metadata) (string, bool) {
+ if !metadata.Has(hostID{}) {
+ return "", false
+ }
+
+ v, ok := metadata.Get(hostID{}).(string)
+ if !ok {
+ return "", true
+ }
+ return v, true
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
new file mode 100644
index 000000000..f02604cb6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata.go
@@ -0,0 +1,28 @@
+package s3shared
+
+import (
+ "context"
+
+ "github.com/aws/smithy-go/middleware"
+)
+
+// clonedInputKey used to denote if request input was cloned.
+type clonedInputKey struct{}
+
+// SetClonedInputKey sets a key on context to denote input was cloned previously.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func SetClonedInputKey(ctx context.Context, value bool) context.Context {
+ return middleware.WithStackValue(ctx, clonedInputKey{}, value)
+}
+
+// IsClonedInput retrieves if context key for cloned input was set.
+// If set, we can infer that the reuqest input was cloned previously.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func IsClonedInput(ctx context.Context) bool {
+ v, _ := middleware.GetStackValue(ctx, clonedInputKey{}).(bool)
+ return v
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata_retriever.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata_retriever.go
new file mode 100644
index 000000000..f52f2f11e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/metadata_retriever.go
@@ -0,0 +1,52 @@
+package s3shared
+
+import (
+ "context"
+
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+const metadataRetrieverID = "S3MetadataRetriever"
+
+// AddMetadataRetrieverMiddleware adds request id, host id retriever middleware
+func AddMetadataRetrieverMiddleware(stack *middleware.Stack) error {
+ // add metadata retriever middleware before operation deserializers so that it can retrieve metadata such as
+ // host id, request id from response header returned by operation deserializers
+ return stack.Deserialize.Insert(&metadataRetriever{}, "OperationDeserializer", middleware.Before)
+}
+
+type metadataRetriever struct {
+}
+
+// ID returns the middleware identifier
+func (m *metadataRetriever) ID() string {
+ return metadataRetrieverID
+}
+
+func (m *metadataRetriever) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+
+ resp, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ // No raw response to wrap with.
+ return out, metadata, err
+ }
+
+ // check for header for Request id
+ if v := resp.Header.Get("X-Amz-Request-Id"); len(v) != 0 {
+ // set reqID on metadata for successful responses.
+ awsmiddleware.SetRequestIDMetadata(&metadata, v)
+ }
+
+ // look up host-id
+ if v := resp.Header.Get("X-Amz-Id-2"); len(v) != 0 {
+ // set reqID on metadata for successful responses.
+ SetHostIDMetadata(&metadata, v)
+ }
+
+ return out, metadata, err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/resource_request.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/resource_request.go
new file mode 100644
index 000000000..bee8da3fe
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/resource_request.go
@@ -0,0 +1,77 @@
+package s3shared
+
+import (
+ "fmt"
+ "strings"
+
+ awsarn "github.com/aws/aws-sdk-go-v2/aws/arn"
+ "github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn"
+)
+
+// ResourceRequest represents an ARN resource and api request metadata
+type ResourceRequest struct {
+ Resource arn.Resource
+ // RequestRegion is the region configured on the request config
+ RequestRegion string
+
+ // SigningRegion is the signing region resolved for the request
+ SigningRegion string
+
+ // PartitionID is the resolved partition id for the provided request region
+ PartitionID string
+
+ // UseARNRegion indicates if client should use the region provided in an ARN resource
+ UseARNRegion bool
+
+ // UseFIPS indicates if te client is configured for FIPS
+ UseFIPS bool
+}
+
+// ARN returns the resource ARN
+func (r ResourceRequest) ARN() awsarn.ARN {
+ return r.Resource.GetARN()
+}
+
+// ResourceConfiguredForFIPS returns true if resource ARNs region is FIPS
+//
+// Deprecated: FIPS will not be present in the ARN region
+func (r ResourceRequest) ResourceConfiguredForFIPS() bool {
+ return IsFIPS(r.ARN().Region)
+}
+
+// AllowCrossRegion returns a bool value to denote if S3UseARNRegion flag is set
+func (r ResourceRequest) AllowCrossRegion() bool {
+ return r.UseARNRegion
+}
+
+// IsCrossPartition returns true if request is configured for region of another partition, than
+// the partition that resource ARN region resolves to. IsCrossPartition will not return an error,
+// if request is not configured with a specific partition id. This might happen if customer provides
+// custom endpoint url, but does not associate a partition id with it.
+func (r ResourceRequest) IsCrossPartition() (bool, error) {
+ rv := r.PartitionID
+ if len(rv) == 0 {
+ return false, nil
+ }
+
+ av := r.Resource.GetARN().Partition
+ if len(av) == 0 {
+ return false, fmt.Errorf("no partition id for provided ARN")
+ }
+
+ return !strings.EqualFold(rv, av), nil
+}
+
+// IsCrossRegion returns true if request signing region is not same as arn region
+func (r ResourceRequest) IsCrossRegion() bool {
+ v := r.SigningRegion
+ return !strings.EqualFold(v, r.Resource.GetARN().Region)
+}
+
+// IsFIPS returns true if region is a fips pseudo-region
+//
+// Deprecated: FIPS should be specified via EndpointOptions.
+func IsFIPS(region string) bool {
+ return strings.HasPrefix(region, "fips-") ||
+ strings.HasSuffix(region, "-fips")
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/response_error.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/response_error.go
new file mode 100644
index 000000000..857336243
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/response_error.go
@@ -0,0 +1,33 @@
+package s3shared
+
+import (
+ "errors"
+ "fmt"
+
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+)
+
+// ResponseError provides the HTTP centric error type wrapping the underlying error
+// with the HTTP response value and the deserialized RequestID.
+type ResponseError struct {
+ *awshttp.ResponseError
+
+ // HostID associated with response error
+ HostID string
+}
+
+// ServiceHostID returns the host id associated with Response Error
+func (e *ResponseError) ServiceHostID() string { return e.HostID }
+
+// Error returns the formatted error
+func (e *ResponseError) Error() string {
+ return fmt.Sprintf(
+ "https response error StatusCode: %d, RequestID: %s, HostID: %s, %v",
+ e.Response.StatusCode, e.RequestID, e.HostID, e.Err)
+}
+
+// As populates target and returns true if the type of target is a error type that
+// the ResponseError embeds, (e.g.S3 HTTP ResponseError)
+func (e *ResponseError) As(target interface{}) bool {
+ return errors.As(e.ResponseError, target)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/response_error_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/response_error_middleware.go
new file mode 100644
index 000000000..543576245
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/response_error_middleware.go
@@ -0,0 +1,60 @@
+package s3shared
+
+import (
+ "context"
+
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// AddResponseErrorMiddleware adds response error wrapper middleware
+func AddResponseErrorMiddleware(stack *middleware.Stack) error {
+ // add error wrapper middleware before request id retriever middleware so that it can wrap the error response
+ // returned by operation deserializers
+ return stack.Deserialize.Insert(&errorWrapper{}, metadataRetrieverID, middleware.Before)
+}
+
+type errorWrapper struct {
+}
+
+// ID returns the middleware identifier
+func (m *errorWrapper) ID() string {
+ return "ResponseErrorWrapper"
+}
+
+func (m *errorWrapper) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err == nil {
+ // Nothing to do when there is no error.
+ return out, metadata, err
+ }
+
+ resp, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ // No raw response to wrap with.
+ return out, metadata, err
+ }
+
+ // look for request id in metadata
+ reqID, _ := awsmiddleware.GetRequestIDMetadata(metadata)
+ // look for host id in metadata
+ hostID, _ := GetHostIDMetadata(metadata)
+
+ // Wrap the returned smithy error with the request id retrieved from the metadata
+ err = &ResponseError{
+ ResponseError: &awshttp.ResponseError{
+ ResponseError: &smithyhttp.ResponseError{
+ Response: resp,
+ Err: err,
+ },
+ RequestID: reqID,
+ },
+ HostID: hostID,
+ }
+
+ return out, metadata, err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/update_endpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/update_endpoint.go
new file mode 100644
index 000000000..22773199f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/update_endpoint.go
@@ -0,0 +1,78 @@
+package s3shared
+
+import (
+ "context"
+ "fmt"
+ "strings"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+
+ awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware"
+)
+
+// EnableDualstack represents middleware struct for enabling dualstack support
+//
+// Deprecated: See EndpointResolverOptions' UseDualStackEndpoint support
+type EnableDualstack struct {
+ // UseDualstack indicates if dualstack endpoint resolving is to be enabled
+ UseDualstack bool
+
+ // DefaultServiceID is the service id prefix used in endpoint resolving
+ // by default service-id is 's3' and 's3-control' for service s3, s3control.
+ DefaultServiceID string
+}
+
+// ID returns the middleware ID.
+func (*EnableDualstack) ID() string {
+ return "EnableDualstack"
+}
+
+// HandleSerialize handles serializer middleware behavior when middleware is executed
+func (u *EnableDualstack) HandleSerialize(
+ ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+
+ // check for host name immutable property
+ if smithyhttp.GetHostnameImmutable(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ serviceID := awsmiddle.GetServiceID(ctx)
+
+ // s3-control may be represented as `S3 Control` as in model
+ if serviceID == "S3 Control" {
+ serviceID = "s3-control"
+ }
+
+ if len(serviceID) == 0 {
+ // default service id
+ serviceID = u.DefaultServiceID
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown request type %T", req)
+ }
+
+ if u.UseDualstack {
+ parts := strings.Split(req.URL.Host, ".")
+ if len(parts) < 3 {
+ return out, metadata, fmt.Errorf("unable to update endpoint host for dualstack, hostname invalid, %s", req.URL.Host)
+ }
+
+ for i := 0; i+1 < len(parts); i++ {
+ if strings.EqualFold(parts[i], serviceID) {
+ parts[i] = parts[i] + ".dualstack"
+ break
+ }
+ }
+
+ // construct the url host
+ req.URL.Host = strings.Join(parts, ".")
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/xml_utils.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/xml_utils.go
new file mode 100644
index 000000000..65fd07e00
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/xml_utils.go
@@ -0,0 +1,89 @@
+package s3shared
+
+import (
+ "encoding/xml"
+ "fmt"
+ "io"
+ "net/http"
+ "strings"
+)
+
+// ErrorComponents represents the error response fields
+// that will be deserialized from an xml error response body
+type ErrorComponents struct {
+ Code string `xml:"Code"`
+ Message string `xml:"Message"`
+ RequestID string `xml:"RequestId"`
+ HostID string `xml:"HostId"`
+}
+
+// GetUnwrappedErrorResponseComponents returns the error fields from an xml error response body
+func GetUnwrappedErrorResponseComponents(r io.Reader) (ErrorComponents, error) {
+ var errComponents ErrorComponents
+ if err := xml.NewDecoder(r).Decode(&errComponents); err != nil && err != io.EOF {
+ return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response : %w", err)
+ }
+ return errComponents, nil
+}
+
+// GetWrappedErrorResponseComponents returns the error fields from an xml error response body
+// in which error code, and message are wrapped by a tag
+func GetWrappedErrorResponseComponents(r io.Reader) (ErrorComponents, error) {
+ var errComponents struct {
+ Code string `xml:"Error>Code"`
+ Message string `xml:"Error>Message"`
+ RequestID string `xml:"RequestId"`
+ HostID string `xml:"HostId"`
+ }
+
+ if err := xml.NewDecoder(r).Decode(&errComponents); err != nil && err != io.EOF {
+ return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response : %w", err)
+ }
+
+ return ErrorComponents{
+ Code: errComponents.Code,
+ Message: errComponents.Message,
+ RequestID: errComponents.RequestID,
+ HostID: errComponents.HostID,
+ }, nil
+}
+
+// GetErrorResponseComponents retrieves error components according to passed in options
+func GetErrorResponseComponents(r io.Reader, options ErrorResponseDeserializerOptions) (ErrorComponents, error) {
+ var errComponents ErrorComponents
+ var err error
+
+ if options.IsWrappedWithErrorTag {
+ errComponents, err = GetWrappedErrorResponseComponents(r)
+ } else {
+ errComponents, err = GetUnwrappedErrorResponseComponents(r)
+ }
+
+ if err != nil {
+ return ErrorComponents{}, err
+ }
+
+ // If an error code or message is not retrieved, it is derived from the http status code
+ // eg, for S3 service, we derive err code and message, if none is found
+ if options.UseStatusCode && len(errComponents.Code) == 0 &&
+ len(errComponents.Message) == 0 {
+ // derive code and message from status code
+ statusText := http.StatusText(options.StatusCode)
+ errComponents.Code = strings.Replace(statusText, " ", "", -1)
+ errComponents.Message = statusText
+ }
+ return errComponents, nil
+}
+
+// ErrorResponseDeserializerOptions represents error response deserializer options for s3 and s3-control service
+type ErrorResponseDeserializerOptions struct {
+ // UseStatusCode denotes if status code should be used to retrieve error code, msg
+ UseStatusCode bool
+
+ // StatusCode is status code of error response
+ StatusCode int
+
+ //IsWrappedWithErrorTag represents if error response's code, msg is wrapped within an
+ // additional tag
+ IsWrappedWithErrorTag bool
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md
new file mode 100644
index 000000000..39d090192
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md
@@ -0,0 +1,85 @@
+# v1.19.0 (2021-11-12)
+
+* **Feature**: Waiters now have a `WaitForOutput` method, which can be used to retrieve the output of the successful wait operation. Thank you to [Andrew Haines](https://github.com/haines) for contributing this feature.
+
+# v1.18.0 (2021-11-06)
+
+* **Feature**: Support has been added for the SelectObjectContent API.
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Feature**: Updated service to latest API model.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.0 (2021-10-21)
+
+* **Feature**: Updated to latest version
+* **Feature**: Updates S3 streaming operations - PutObject, UploadPart, WriteGetObjectResponse to use unsigned payload signing auth when TLS is enabled.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.1 (2021-10-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.0 (2021-09-17)
+
+* **Feature**: Updated API client and endpoints to latest revision.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.1 (2021-09-10)
+
+* No change notes available for this release.
+
+# v1.15.0 (2021-09-02)
+
+* **Feature**: API client updated
+* **Feature**: Add support for S3 Multi-Region Access Point ARNs.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.0 (2021-08-27)
+
+* **Feature**: Updated API model to latest revision.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.0 (2021-08-19)
+
+* **Feature**: API client updated
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.0 (2021-08-04)
+
+* **Feature**: Add `HeadObject` presign support. ([#1346](https://github.com/aws/aws-sdk-go-v2/pull/1346))
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.1 (2021-07-15)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.0 (2021-06-25)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.0 (2021-06-04)
+
+* **Feature**: The handling of AccessPoint and Outpost ARNs have been updated.
+* **Feature**: Updated service client to latest API model.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.0 (2021-05-25)
+
+* **Feature**: API client updated
+
+# v1.8.0 (2021-05-20)
+
+* **Feature**: API client updated
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Feature**: Updated to latest service API model.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/aws/aws-sdk-go-v2/service/s3/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go
new file mode 100644
index 000000000..8764f4a8f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go
@@ -0,0 +1,580 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ acceptencodingcust "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding"
+ presignedurlcust "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url"
+ "github.com/aws/aws-sdk-go-v2/service/internal/s3shared"
+ s3sharedconfig "github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a"
+ smithy "github.com/aws/smithy-go"
+ smithydocument "github.com/aws/smithy-go/document"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
+ "time"
+)
+
+const ServiceID = "S3"
+const ServiceAPIVersion = "2006-03-01"
+
+// Client provides the API client to make operations call for Amazon Simple Storage
+// Service.
+type Client struct {
+ options Options
+}
+
+// New returns an initialized Client based on the functional options. Provide
+// additional functional options to further configure the behavior of the client,
+// such as changing the client's endpoint or adding custom middleware behavior.
+func New(options Options, optFns ...func(*Options)) *Client {
+ options = options.Copy()
+
+ resolveDefaultLogger(&options)
+
+ resolveRetryer(&options)
+
+ resolveHTTPClient(&options)
+
+ resolveHTTPSignerV4(&options)
+
+ resolveDefaultEndpointConfiguration(&options)
+
+ resolveHTTPSignerV4a(&options)
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ resolveCredentialProvider(&options)
+
+ client := &Client{
+ options: options,
+ }
+
+ return client
+}
+
+type Options struct {
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // Configures the events that will be sent to the configured logger.
+ ClientLogMode aws.ClientLogMode
+
+ // The credentials object to use when signing requests.
+ Credentials aws.CredentialsProvider
+
+ // Allows you to disable S3 Multi-Region access points feature.
+ DisableMultiRegionAccessPoints bool
+
+ // The endpoint options to be used when attempting to resolve an endpoint.
+ EndpointOptions EndpointResolverOptions
+
+ // The service endpoint resolver.
+ EndpointResolver EndpointResolver
+
+ // Signature Version 4 (SigV4) Signer
+ HTTPSignerV4 HTTPSignerV4
+
+ // The logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // The region to send requests to. (Required)
+ Region string
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer.
+ Retryer aws.Retryer
+
+ // Allows you to enable arn region support for the service.
+ UseARNRegion bool
+
+ // Allows you to enable S3 Accelerate feature. All operations compatible with S3
+ // Accelerate will use the accelerate endpoint for requests. Requests not
+ // compatible will fall back to normal S3 requests. The bucket must be enabled for
+ // accelerate to be used with S3 client with accelerate enabled. If the bucket is
+ // not enabled for accelerate an error will be returned. The bucket name must be
+ // DNS compatible to work with accelerate.
+ UseAccelerate bool
+
+ // Allows you to enable dual-stack endpoint support for the service.
+ //
+ // Deprecated: Set dual-stack by setting UseDualStackEndpoint on
+ // EndpointResolverOptions. When EndpointResolverOptions' UseDualStackEndpoint
+ // field is set it overrides this field value.
+ UseDualstack bool
+
+ // Allows you to enable the client to use path-style addressing, i.e.,
+ // https://s3.amazonaws.com/BUCKET/KEY. By default, the S3 client will use virtual
+ // hosted bucket addressing when possible(https://BUCKET.s3.amazonaws.com/KEY).
+ UsePathStyle bool
+
+ // Signature Version 4a (SigV4a) Signer
+ httpSignerV4a httpSignerV4a
+
+ // The HTTP client to invoke API calls with. Defaults to client's default HTTP
+ // implementation if nil.
+ HTTPClient HTTPClient
+}
+
+// WithAPIOptions returns a functional option for setting the Client's APIOptions
+// option.
+func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, optFns...)
+ }
+}
+
+// WithEndpointResolver returns a functional option for setting the Client's
+// EndpointResolver option.
+func WithEndpointResolver(v EndpointResolver) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolver = v
+ }
+}
+
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// Copy creates a clone where the APIOptions list is deep copied.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
+ copy(to.APIOptions, o.APIOptions)
+ return to
+}
+func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
+ ctx = middleware.ClearStackValues(ctx)
+ stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
+ options := c.options.Copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ setSafeEventStreamClientLogMode(&options, opID)
+
+ finalizeClientEndpointResolverOptions(&options)
+
+ resolveCredentialProvider(&options)
+
+ for _, fn := range stackFns {
+ if err := fn(stack, options); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ for _, fn := range options.APIOptions {
+ if err := fn(stack); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack)
+ result, metadata, err = handler.Handle(ctx, params)
+ if err != nil {
+ err = &smithy.OperationError{
+ ServiceID: ServiceID,
+ OperationName: opID,
+ Err: err,
+ }
+ }
+ return result, metadata, err
+}
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
+
+func resolveDefaultLogger(o *Options) {
+ if o.Logger != nil {
+ return
+ }
+ o.Logger = logging.Nop{}
+}
+
+func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
+ return middleware.AddSetLoggerMiddleware(stack, o.Logger)
+}
+
+// NewFromConfig returns a new client from the provided config.
+func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
+ opts := Options{
+ Region: cfg.Region,
+ HTTPClient: cfg.HTTPClient,
+ Credentials: cfg.Credentials,
+ APIOptions: cfg.APIOptions,
+ Logger: cfg.Logger,
+ ClientLogMode: cfg.ClientLogMode,
+ }
+ resolveAWSRetryerProvider(cfg, &opts)
+ resolveAWSEndpointResolver(cfg, &opts)
+ resolveUseARNRegion(cfg, &opts)
+ resolveUseDualStackEndpoint(cfg, &opts)
+ resolveUseFIPSEndpoint(cfg, &opts)
+ return New(opts, optFns...)
+}
+
+func resolveHTTPClient(o *Options) {
+ if o.HTTPClient != nil {
+ return
+ }
+ o.HTTPClient = awshttp.NewBuildableClient()
+}
+
+func resolveRetryer(o *Options) {
+ if o.Retryer != nil {
+ return
+ }
+ o.Retryer = retry.NewStandard()
+}
+
+func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
+ if cfg.Retryer == nil {
+ return
+ }
+ o.Retryer = cfg.Retryer()
+}
+
+func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
+ if cfg.EndpointResolver == nil {
+ return
+ }
+ o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver())
+}
+
+func addClientUserAgent(stack *middleware.Stack) error {
+ return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "s3", goModuleVersion)(stack)
+}
+
+func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error {
+ mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: o.Credentials,
+ Signer: o.HTTPSignerV4,
+ LogSigning: o.ClientLogMode.IsSigning(),
+ })
+ return stack.Finalize.Add(mw, middleware.After)
+}
+
+type HTTPSignerV4 interface {
+ SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
+}
+
+func resolveHTTPSignerV4(o *Options) {
+ if o.HTTPSignerV4 != nil {
+ return
+ }
+ o.HTTPSignerV4 = newDefaultV4Signer(*o)
+}
+
+func newDefaultV4Signer(o Options) *v4.Signer {
+ return v4.NewSigner(func(so *v4.SignerOptions) {
+ so.Logger = o.Logger
+ so.LogSigning = o.ClientLogMode.IsSigning()
+ so.DisableURIPathEscaping = true
+ })
+}
+
+func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
+ mo := retry.AddRetryMiddlewaresOptions{
+ Retryer: o.Retryer,
+ LogRetryAttempts: o.ClientLogMode.IsRetries(),
+ }
+ return retry.AddRetryMiddlewares(stack, mo)
+}
+
+// resolves UseARNRegion S3 configuration
+func resolveUseARNRegion(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := s3sharedconfig.ResolveUseARNRegion(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.UseARNRegion = value
+ }
+ return nil
+}
+
+// resolves dual-stack endpoint configuration
+func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseDualStackEndpoint = value
+ }
+ return nil
+}
+
+// resolves FIPS endpoint configuration
+func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseFIPSEndpoint = value
+ }
+ return nil
+}
+
+func resolveCredentialProvider(o *Options) {
+ if o.Credentials == nil {
+ return
+ }
+ if _, ok := o.Credentials.(v4a.CredentialsProvider); ok {
+ return
+ }
+
+ switch o.Credentials.(type) {
+ case aws.AnonymousCredentials, *aws.AnonymousCredentials:
+ return
+
+ }
+
+ o.Credentials = &v4a.SymmetricCredentialAdaptor{SymmetricProvider: o.Credentials}
+}
+func swapWithCustomHTTPSignerMiddleware(stack *middleware.Stack, o Options) error {
+ mw := s3cust.NewSignHTTPRequestMiddleware(s3cust.SignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: o.Credentials,
+ V4Signer: o.HTTPSignerV4,
+ V4aSigner: o.httpSignerV4a,
+ LogSigning: o.ClientLogMode.IsSigning(),
+ })
+ return s3cust.RegisterSigningMiddleware(stack, mw)
+}
+
+type httpSignerV4a interface {
+ SignHTTP(ctx context.Context, credentials v4a.Credentials, r *http.Request, payloadHash string, service string, regionSet []string, signingTime time.Time, optFns ...func(*v4a.SignerOptions)) error
+}
+
+func resolveHTTPSignerV4a(o *Options) {
+ if o.httpSignerV4a != nil {
+ return
+ }
+ o.httpSignerV4a = newDefaultV4aSigner(*o)
+}
+
+func newDefaultV4aSigner(o Options) *v4a.Signer {
+ return v4a.NewSigner(func(so *v4a.SignerOptions) {
+ so.Logger = o.Logger
+ so.LogSigning = o.ClientLogMode.IsSigning()
+ so.DisableURIPathEscaping = true
+ })
+}
+
+func addMetadataRetrieverMiddleware(stack *middleware.Stack) error {
+ return s3shared.AddMetadataRetrieverMiddleware(stack)
+}
+
+// nopGetBucketAccessor is no-op accessor for operation that don't support bucket
+// member as input
+func nopGetBucketAccessor(input interface{}) (*string, bool) {
+ return nil, false
+}
+
+func addResponseErrorMiddleware(stack *middleware.Stack) error {
+ return s3shared.AddResponseErrorMiddleware(stack)
+}
+
+func disableAcceptEncodingGzip(stack *middleware.Stack) error {
+ return acceptencodingcust.AddAcceptEncodingGzip(stack, acceptencodingcust.AddAcceptEncodingGzipOptions{})
+}
+
+// ResponseError provides the HTTP centric error type wrapping the underlying error
+// with the HTTP response value and the deserialized RequestID.
+type ResponseError interface {
+ error
+
+ ServiceHostID() string
+ ServiceRequestID() string
+}
+
+var _ ResponseError = (*s3shared.ResponseError)(nil)
+
+// GetHostIDMetadata retrieves the host id from middleware metadata returns host id
+// as string along with a boolean indicating presence of hostId on middleware
+// metadata.
+func GetHostIDMetadata(metadata middleware.Metadata) (string, bool) {
+ return s3shared.GetHostIDMetadata(metadata)
+}
+
+// HTTPPresignerV4 represents presigner interface used by presign url client
+type HTTPPresignerV4 interface {
+ PresignHTTP(
+ ctx context.Context, credentials aws.Credentials, r *http.Request,
+ payloadHash string, service string, region string, signingTime time.Time,
+ optFns ...func(*v4.SignerOptions),
+ ) (url string, signedHeader http.Header, err error)
+}
+
+// httpPresignerV4a represents sigv4a presigner interface used by presign url
+// client
+type httpPresignerV4a interface {
+ PresignHTTP(
+ ctx context.Context, credentials v4a.Credentials, r *http.Request,
+ payloadHash string, service string, regionSet []string, signingTime time.Time,
+ optFns ...func(*v4a.SignerOptions),
+ ) (url string, signedHeader http.Header, err error)
+}
+
+// PresignOptions represents the presign client options
+type PresignOptions struct {
+
+ // ClientOptions are list of functional options to mutate client options used by
+ // the presign client.
+ ClientOptions []func(*Options)
+
+ // Presigner is the presigner used by the presign url client
+ Presigner HTTPPresignerV4
+
+ // Expires sets the expiration duration for the generated presign url. This should
+ // be the duration in seconds the presigned URL should be considered valid for. If
+ // not set or set to zero, presign url would default to expire after 900 seconds.
+ Expires time.Duration
+
+ // presignerV4a is the presigner used by the presign url client
+ presignerV4a httpPresignerV4a
+}
+
+func (o PresignOptions) copy() PresignOptions {
+ clientOptions := make([]func(*Options), len(o.ClientOptions))
+ copy(clientOptions, o.ClientOptions)
+ o.ClientOptions = clientOptions
+ return o
+}
+
+// WithPresignClientFromClientOptions is a helper utility to retrieve a function
+// that takes PresignOption as input
+func WithPresignClientFromClientOptions(optFns ...func(*Options)) func(*PresignOptions) {
+ return withPresignClientFromClientOptions(optFns).options
+}
+
+type withPresignClientFromClientOptions []func(*Options)
+
+func (w withPresignClientFromClientOptions) options(o *PresignOptions) {
+ o.ClientOptions = append(o.ClientOptions, w...)
+}
+
+// WithPresignExpires is a helper utility to append Expires value on presign
+// options optional function
+func WithPresignExpires(dur time.Duration) func(*PresignOptions) {
+ return withPresignExpires(dur).options
+}
+
+type withPresignExpires time.Duration
+
+func (w withPresignExpires) options(o *PresignOptions) {
+ o.Expires = time.Duration(w)
+}
+
+// PresignClient represents the presign url client
+type PresignClient struct {
+ client *Client
+ options PresignOptions
+}
+
+// NewPresignClient generates a presign client using provided API Client and
+// presign options
+func NewPresignClient(c *Client, optFns ...func(*PresignOptions)) *PresignClient {
+ var options PresignOptions
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ if len(options.ClientOptions) != 0 {
+ c = New(c.options, options.ClientOptions...)
+ }
+
+ if options.Presigner == nil {
+ options.Presigner = newDefaultV4Signer(c.options)
+ }
+
+ if options.presignerV4a == nil {
+ options.presignerV4a = newDefaultV4aSigner(c.options)
+ }
+
+ return &PresignClient{
+ client: c,
+ options: options,
+ }
+}
+
+func withNopHTTPClientAPIOption(o *Options) {
+ o.HTTPClient = smithyhttp.NopClient{}
+}
+
+type presignConverter PresignOptions
+
+func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, options Options) (err error) {
+ stack.Finalize.Clear()
+ stack.Deserialize.Clear()
+ stack.Build.Remove((*awsmiddleware.ClientRequestID)(nil).ID())
+ stack.Build.Remove("UserAgent")
+ pmw := v4.NewPresignHTTPRequestMiddleware(v4.PresignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: options.Credentials,
+ Presigner: c.Presigner,
+ LogSigning: options.ClientLogMode.IsSigning(),
+ })
+ err = stack.Finalize.Add(pmw, middleware.After)
+ if err != nil {
+ return err
+ }
+
+ // add multi-region access point presigner
+ signermv := s3cust.NewPresignHTTPRequestMiddleware(s3cust.PresignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: options.Credentials,
+ V4Presigner: c.Presigner,
+ V4aPresigner: c.presignerV4a,
+ LogSigning: options.ClientLogMode.IsSigning(),
+ })
+ err = s3cust.RegisterPreSigningMiddleware(stack, signermv)
+ if err != nil {
+ return err
+ }
+
+ if c.Expires < 0 {
+ return fmt.Errorf("presign URL duration must be 0 or greater, %v", c.Expires)
+ }
+ // add middleware to set expiration for s3 presigned url, if expiration is set to
+ // 0, this middleware sets a default expiration of 900 seconds
+ err = stack.Build.Add(&s3cust.AddExpiresOnPresignedURL{Expires: c.Expires}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = presignedurlcust.AddAsIsPresigingMiddleware(stack)
+ if err != nil {
+ return err
+ }
+ return nil
+}
+
+func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
+ return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
+ LogRequest: o.ClientLogMode.IsRequest(),
+ LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(),
+ LogResponse: o.ClientLogMode.IsResponse(),
+ LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
+ }, middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go
new file mode 100644
index 000000000..25b0b762b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go
@@ -0,0 +1,231 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// This action 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 ListParts
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) action and
+// ensure that the parts list is empty. For information about permissions required
+// to use the multipart upload, see Multipart Upload and Permissions
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). The
+// following operations are related to AbortMultipartUpload:
+//
+// *
+// CreateMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+//
+// *
+// UploadPart
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+//
+// *
+// CompleteMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
+//
+// *
+// ListParts
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+//
+// *
+// ListMultipartUploads
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
+func (c *Client) AbortMultipartUpload(ctx context.Context, params *AbortMultipartUploadInput, optFns ...func(*Options)) (*AbortMultipartUploadOutput, error) {
+ if params == nil {
+ params = &AbortMultipartUploadInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AbortMultipartUpload", params, optFns, c.addOperationAbortMultipartUploadMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AbortMultipartUploadOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AbortMultipartUploadInput struct {
+
+ // The bucket name to which the upload was taking place. When using this action
+ // 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Key of the object for which the multipart upload was initiated.
+ //
+ // This member is required.
+ Key *string
+
+ // Upload ID that identifies the multipart upload.
+ //
+ // This member is required.
+ UploadId *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ noSmithyDocumentSerde
+}
+
+type AbortMultipartUploadOutput struct {
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAbortMultipartUploadMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpAbortMultipartUpload{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpAbortMultipartUpload{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpAbortMultipartUploadValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAbortMultipartUpload(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addAbortMultipartUploadUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opAbortMultipartUpload(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "AbortMultipartUpload",
+ }
+}
+
+// getAbortMultipartUploadBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getAbortMultipartUploadBucketMember(input interface{}) (*string, bool) {
+ in := input.(*AbortMultipartUploadInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addAbortMultipartUploadUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getAbortMultipartUploadBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go
new file mode 100644
index 000000000..5fc95403a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go
@@ -0,0 +1,344 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Completes a multipart upload by assembling previously uploaded parts. You first
+// initiate the multipart upload and then upload all parts using the UploadPart
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) operation.
+// After successfully uploading all relevant parts of an upload, you call this
+// action 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 action 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 and Permissions
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
+// CompleteMultipartUpload 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+//
+// *
+// UploadPart
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+//
+// *
+// AbortMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
+//
+// *
+// ListParts
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+//
+// *
+// ListMultipartUploads
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
+func (c *Client) CompleteMultipartUpload(ctx context.Context, params *CompleteMultipartUploadInput, optFns ...func(*Options)) (*CompleteMultipartUploadOutput, error) {
+ if params == nil {
+ params = &CompleteMultipartUploadInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CompleteMultipartUpload", params, optFns, c.addOperationCompleteMultipartUploadMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CompleteMultipartUploadOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CompleteMultipartUploadInput struct {
+
+ // Name of the bucket to which the multipart upload was initiated. When using this
+ // action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Object key for which the multipart upload was initiated.
+ //
+ // This member is required.
+ Key *string
+
+ // ID for the initiated multipart upload.
+ //
+ // This member is required.
+ UploadId *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // The container for the multipart upload request information.
+ MultipartUpload *types.CompletedMultipartUpload
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ noSmithyDocumentSerde
+}
+
+type CompleteMultipartUploadOutput struct {
+
+ // The name of the bucket that contains the newly created object. Does not return
+ // the access point ARN or access point alias if used. When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ Bucket *string
+
+ // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
+ // encryption with Amazon Web Services KMS (SSE-KMS).
+ BucketKeyEnabled bool
+
+ // 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
+
+ // 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
+
+ // The object key of the newly created object.
+ Key *string
+
+ // The URI that identifies the newly created object.
+ Location *string
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // If present, specifies the ID of the Amazon Web Services Key Management Service
+ // (Amazon Web Services KMS) symmetric customer managed key that was used for the
+ // object.
+ SSEKMSKeyId *string
+
+ // If you specified server-side encryption either with an Amazon S3-managed
+ // encryption key or an Amazon Web Services KMS key 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 types.ServerSideEncryption
+
+ // Version ID of the newly created object, in case the bucket has versioning turned
+ // on.
+ VersionId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCompleteMultipartUploadMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpCompleteMultipartUpload{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpCompleteMultipartUpload{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCompleteMultipartUploadValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCompleteMultipartUpload(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addCompleteMultipartUploadUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = s3cust.HandleResponseErrorWith200Status(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCompleteMultipartUpload(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "CompleteMultipartUpload",
+ }
+}
+
+// getCompleteMultipartUploadBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getCompleteMultipartUploadBucketMember(input interface{}) (*string, bool) {
+ in := input.(*CompleteMultipartUploadInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addCompleteMultipartUploadUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getCompleteMultipartUploadBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go
new file mode 100644
index 000000000..627c11a63
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go
@@ -0,0 +1,553 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// 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 action 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 action 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 (http://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 User 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. Server-side encryption When you perform a
+// CopyObject operation, you can optionally use the appropriate encryption-related
+// headers to encrypt the object using server-side encryption with Amazon Web
+// Services managed encryption keys (SSE-S3 or SSE-KMS) or 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.
+// For more information about server-side encryption, see Using Server-Side
+// Encryption
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html). If
+// a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object.
+// For more information, see Amazon S3 Bucket Keys
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) in the Amazon
+// S3 User Guide. 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 Amazon Web Services
+// 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 action 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 User 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 RestoreObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html). The
+// following operations are related to CopyObject:
+//
+// * PutObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+//
+// *
+// GetObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+//
+// For more
+// information, see Copying Objects
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html).
+func (c *Client) CopyObject(ctx context.Context, params *CopyObjectInput, optFns ...func(*Options)) (*CopyObjectOutput, error) {
+ if params == nil {
+ params = &CopyObjectInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CopyObject", params, optFns, c.addOperationCopyObjectMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CopyObjectOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CopyObjectInput struct {
+
+ // The name of the destination bucket. When using this action 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 action with an access point through the Amazon Web Services
+ // 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Specifies the source object for the copy operation. You specify the value in one
+ // of two formats, depending on whether you want to access the source object
+ // through an access point
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html):
+ //
+ // *
+ // For objects not accessed through an access point, specify the name of the source
+ // bucket and the key of the source object, separated by a slash (/). For example,
+ // to copy the object reports/january.pdf from the bucket awsexamplebucket, use
+ // awsexamplebucket/reports/january.pdf. The value must be URL encoded.
+ //
+ // * For
+ // objects accessed through access points, specify the Amazon Resource Name (ARN)
+ // of the object as accessed through the access point, in the format
+ // arn:aws:s3:::accesspoint//object/. For example, to copy the object
+ // reports/january.pdf through access point my-access-point owned by account
+ // 123456789012 in Region us-west-2, use the URL encoding of
+ // arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf.
+ // The value must be URL encoded. Amazon S3 supports copy operations using access
+ // points only when the source and destination buckets are in the same Amazon Web
+ // Services Region. Alternatively, for objects accessed through Amazon S3 on
+ // Outposts, specify the ARN of the object as accessed in the format
+ // arn:aws:s3-outposts:::outpost//object/. For example, to copy the object
+ // reports/january.pdf through outpost my-outpost owned by account 123456789012 in
+ // Region us-west-2, use the URL encoding of
+ // arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf.
+ // The value must be URL encoded.
+ //
+ // To copy a specific version of an object, append
+ // ?versionId= to the value (for example,
+ // awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).
+ // If you don't specify a version ID, Amazon S3 copies the latest version of the
+ // source object.
+ //
+ // This member is required.
+ CopySource *string
+
+ // The key of the destination object.
+ //
+ // This member is required.
+ Key *string
+
+ // The canned ACL to apply to the object. This action is not supported by Amazon S3
+ // on Outposts.
+ ACL types.ObjectCannedACL
+
+ // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
+ // with server-side encryption using AWS KMS (SSE-KMS). Setting this header to true
+ // causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
+ // Specifying this header with a COPY action doesn’t affect bucket-level settings
+ // for S3 Bucket Key.
+ BucketKeyEnabled bool
+
+ // Specifies caching behavior along the request/reply chain.
+ CacheControl *string
+
+ // Specifies presentational information for the object.
+ ContentDisposition *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.
+ ContentEncoding *string
+
+ // The language the content is in.
+ ContentLanguage *string
+
+ // A standard MIME type describing the format of the object data.
+ ContentType *string
+
+ // Copies the object if its entity tag (ETag) matches the specified tag.
+ CopySourceIfMatch *string
+
+ // Copies the object if it has been modified since the specified time.
+ CopySourceIfModifiedSince *time.Time
+
+ // Copies the object if its entity tag (ETag) is different than the specified ETag.
+ CopySourceIfNoneMatch *string
+
+ // Copies the object if it hasn't been modified since the specified time.
+ CopySourceIfUnmodifiedSince *time.Time
+
+ // Specifies the algorithm to use when decrypting the source object (for example,
+ // AES256).
+ CopySourceSSECustomerAlgorithm *string
+
+ // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
+ // the source object. The encryption key provided in this header must be one that
+ // was used when the source object was created.
+ CopySourceSSECustomerKey *string
+
+ // 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 that the
+ // encryption key was transmitted without error.
+ CopySourceSSECustomerKeyMD5 *string
+
+ // The account ID of the expected destination bucket owner. If the destination
+ // bucket is owned by a different account, the request will fail with an HTTP 403
+ // (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // The account ID of the expected source bucket owner. If the source bucket is
+ // owned by a different account, the request will fail with an HTTP 403 (Access
+ // Denied) error.
+ ExpectedSourceBucketOwner *string
+
+ // The date and time at which the object is no longer cacheable.
+ Expires *time.Time
+
+ // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. This
+ // action is not supported by Amazon S3 on Outposts.
+ GrantFullControl *string
+
+ // Allows grantee to read the object data and its metadata. This action is not
+ // supported by Amazon S3 on Outposts.
+ GrantRead *string
+
+ // Allows grantee to read the object ACL. This action is not supported by Amazon S3
+ // on Outposts.
+ GrantReadACP *string
+
+ // Allows grantee to write the ACL for the applicable object. This action is not
+ // supported by Amazon S3 on Outposts.
+ GrantWriteACP *string
+
+ // A map of metadata to store with the object in S3.
+ Metadata map[string]string
+
+ // Specifies whether the metadata is copied from the source object or replaced with
+ // metadata provided in the request.
+ MetadataDirective types.MetadataDirective
+
+ // Specifies whether you want to apply a Legal Hold to the copied object.
+ ObjectLockLegalHoldStatus types.ObjectLockLegalHoldStatus
+
+ // The Object Lock mode that you want to apply to the copied object.
+ ObjectLockMode types.ObjectLockMode
+
+ // The date and time when you want the copied object's Object Lock to expire.
+ ObjectLockRetainUntilDate *time.Time
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // Specifies the algorithm to use to when encrypting the object (for example,
+ // AES256).
+ SSECustomerAlgorithm *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 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
+
+ // 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 that the
+ // encryption key was transmitted without error.
+ SSECustomerKeyMD5 *string
+
+ // Specifies the Amazon Web Services KMS Encryption Context to use for object
+ // encryption. The value of this header is a base64-encoded UTF-8 string holding
+ // JSON with the encryption context key-value pairs.
+ SSEKMSEncryptionContext *string
+
+ // Specifies the Amazon Web Services KMS key ID to use for object encryption. All
+ // GET and PUT requests for an object protected by Amazon Web Services KMS will
+ // fail if not made via SSL or using SigV4. For information about configuring using
+ // any of the officially supported Amazon Web Services SDKs and Amazon Web Services
+ // 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 User Guide.
+ SSEKMSKeyId *string
+
+ // The server-side encryption algorithm used when storing this object in Amazon S3
+ // (for example, AES256, aws:kms).
+ ServerSideEncryption types.ServerSideEncryption
+
+ // 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. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For
+ // more information, see Storage Classes
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) in
+ // the Amazon S3 User Guide.
+ StorageClass types.StorageClass
+
+ // 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.
+ Tagging *string
+
+ // Specifies whether the object tag-set are copied from the source object or
+ // replaced with tag-set provided in the request.
+ TaggingDirective types.TaggingDirective
+
+ // 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.
+ WebsiteRedirectLocation *string
+
+ noSmithyDocumentSerde
+}
+
+type CopyObjectOutput struct {
+
+ // Indicates whether the copied object uses an S3 Bucket Key for server-side
+ // encryption with Amazon Web Services KMS (SSE-KMS).
+ BucketKeyEnabled bool
+
+ // Container for all response elements.
+ CopyObjectResult *types.CopyObjectResult
+
+ // Version of the copied object in the destination bucket.
+ CopySourceVersionId *string
+
+ // If the object expiration is configured, the response includes this header.
+ Expiration *string
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // If server-side encryption with a customer-provided encryption key was requested,
+ // the response will include this header confirming the encryption algorithm used.
+ SSECustomerAlgorithm *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
+ // verification of the customer-provided encryption key.
+ SSECustomerKeyMD5 *string
+
+ // If present, specifies the Amazon Web Services KMS Encryption Context to use for
+ // object encryption. The value of this header is a base64-encoded UTF-8 string
+ // holding JSON with the encryption context key-value pairs.
+ SSEKMSEncryptionContext *string
+
+ // If present, specifies the ID of the Amazon Web Services Key Management Service
+ // (Amazon Web Services KMS) symmetric customer managed key that was used for the
+ // object.
+ SSEKMSKeyId *string
+
+ // The server-side encryption algorithm used when storing this object in Amazon S3
+ // (for example, AES256, aws:kms).
+ ServerSideEncryption types.ServerSideEncryption
+
+ // Version ID of the newly created copy.
+ VersionId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCopyObjectMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpCopyObject{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpCopyObject{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCopyObjectValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCopyObject(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addCopyObjectUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = s3cust.HandleResponseErrorWith200Status(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCopyObject(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "CopyObject",
+ }
+}
+
+// getCopyObjectBucketMember returns a pointer to string denoting a provided bucket
+// member valueand a boolean indicating if the input has a modeled bucket name,
+func getCopyObjectBucketMember(input interface{}) (*string, bool) {
+ in := input.(*CopyObjectInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addCopyObjectUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getCopyObjectBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go
new file mode 100644
index 000000000..38ea2c5f0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go
@@ -0,0 +1,287 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a new S3 bucket. To create a bucket, you must register with Amazon S3
+// and have a valid Amazon Web Services 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 about bucket naming restrictions, see Bucket naming rules
+// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
+// If you want to create an Amazon S3 on Outposts bucket, see Create Bucket
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.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
+// Accessing a bucket
+// (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 Amazon Web Services
+// account
+//
+// * uri – if you are granting permissions to a predefined group
+//
+// *
+// emailAddress – if the value specified is the email address of an Amazon Web
+// Services account Using email addresses to specify a grantee is only supported in
+// the following Amazon Web Services 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
+// Amazon Web Services General Reference.
+//
+// For example, the following
+// x-amz-grant-read header grants the Amazon Web Services 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. Permissions If your
+// CreateBucket request specifies ACL permissions and the ACL is public-read,
+// public-read-write, authenticated-read, or if you specify access permissions
+// explicitly through any other ACL, both s3:CreateBucket and s3:PutBucketAcl
+// permissions are needed. If the ACL the CreateBucket request is private, only
+// s3:CreateBucket permission is needed. If ObjectLockEnabledForBucket is set to
+// true in your CreateBucket request, s3:PutBucketObjectLockConfiguration and
+// s3:PutBucketVersioning permissions are required. The following operations are
+// related to CreateBucket:
+//
+// * PutObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+//
+// *
+// DeleteBucket
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
+func (c *Client) CreateBucket(ctx context.Context, params *CreateBucketInput, optFns ...func(*Options)) (*CreateBucketOutput, error) {
+ if params == nil {
+ params = &CreateBucketInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateBucket", params, optFns, c.addOperationCreateBucketMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateBucketOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateBucketInput struct {
+
+ // The name of the bucket to create.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The canned ACL to apply to the bucket.
+ ACL types.BucketCannedACL
+
+ // The configuration information for the bucket.
+ CreateBucketConfiguration *types.CreateBucketConfiguration
+
+ // Allows grantee the read, write, read ACP, and write ACP permissions on the
+ // bucket.
+ GrantFullControl *string
+
+ // Allows grantee to list the objects in the bucket.
+ GrantRead *string
+
+ // Allows grantee to read the bucket ACL.
+ GrantReadACP *string
+
+ // Allows grantee to create new objects in the bucket. For the bucket and object
+ // owners of existing objects, also allows deletions and overwrites of those
+ // objects.
+ GrantWrite *string
+
+ // Allows grantee to write the ACL for the applicable bucket.
+ GrantWriteACP *string
+
+ // Specifies whether you want S3 Object Lock to be enabled for the new bucket.
+ ObjectLockEnabledForBucket bool
+
+ noSmithyDocumentSerde
+}
+
+type CreateBucketOutput struct {
+
+ // 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
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpCreateBucket{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateBucket{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateBucketValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateBucket(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addCreateBucketUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCreateBucket(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "CreateBucket",
+ }
+}
+
+// getCreateBucketBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getCreateBucketBucketMember(input interface{}) (*string, bool) {
+ in := input.(*CreateBucketInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addCreateBucketUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getCreateBucketBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: false,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go
new file mode 100644
index 000000000..9e3f7ed85
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go
@@ -0,0 +1,594 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// This action 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)). You also
+// include this upload ID in the final request to either complete or abort the
+// multipart upload request. 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 action 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 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 (Amazon Web Services 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 Amazon Web Services KMS keys or Amazon S3-managed
+// encryption keys. If you choose to provide your own encryption key, the request
+// headers you provide in UploadPart
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) and
+// UploadPartCopy
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
+// 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 Amazon Web Services KMS key, the requester must have permission to the
+// kms:Decrypt and kms:GenerateDataKey* 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. For more information, see
+// Multipart upload API and permissions
+// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions)
+// in the Amazon S3 User Guide. If your Identity and Access Management (IAM) user
+// or role is in the same Amazon Web Services account as the KMS key, 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 Amazon Web Services managed
+// encryption keys or provide your own encryption key.
+//
+// * Use encryption keys
+// managed by Amazon S3 or customer managed key stored in Amazon Web Services Key
+// Management Service (Amazon Web Services KMS) – If you want Amazon Web Services
+// 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 Amazon Web
+// Services managed key in Amazon Web Services KMS to protect the data. All GET and
+// PUT requests for an object protected by Amazon Web Services KMS fail if you
+// don't make them with SSL or by using SigV4. For more information about
+// server-side encryption with KMS key (SSE-KMS), see Protecting Data Using
+// Server-Side Encryption with KMS keys
+// (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 KMS keys (SSE-KMS), see Protecting Data Using
+// Server-Side Encryption with KMS keys
+// (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 Amazon Web Services 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 Amazon Web Services 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 Amazon
+// Web Services account
+//
+// * uri – if you are granting permissions to a predefined
+// group
+//
+// * emailAddress – if the value specified is the email address of an Amazon
+// Web Services account Using email addresses to specify a grantee is only
+// supported in the following Amazon Web Services 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
+// Amazon Web Services General Reference.
+//
+// For example, the following
+// x-amz-grant-read header grants the Amazon Web Services 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+//
+// *
+// CompleteMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
+//
+// *
+// AbortMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
+//
+// *
+// ListParts
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+//
+// *
+// ListMultipartUploads
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
+func (c *Client) CreateMultipartUpload(ctx context.Context, params *CreateMultipartUploadInput, optFns ...func(*Options)) (*CreateMultipartUploadOutput, error) {
+ if params == nil {
+ params = &CreateMultipartUploadInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateMultipartUpload", params, optFns, c.addOperationCreateMultipartUploadMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateMultipartUploadOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateMultipartUploadInput struct {
+
+ // The name of the bucket to which to initiate the upload When using this action
+ // 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Object key for which the multipart upload is to be initiated.
+ //
+ // This member is required.
+ Key *string
+
+ // The canned ACL to apply to the object. This action is not supported by Amazon S3
+ // on Outposts.
+ ACL types.ObjectCannedACL
+
+ // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
+ // with server-side encryption using AWS KMS (SSE-KMS). Setting this header to true
+ // causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
+ // Specifying this header with an object action doesn’t affect bucket-level
+ // settings for S3 Bucket Key.
+ BucketKeyEnabled bool
+
+ // Specifies caching behavior along the request/reply chain.
+ CacheControl *string
+
+ // Specifies presentational information for the object.
+ ContentDisposition *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.
+ ContentEncoding *string
+
+ // The language the content is in.
+ ContentLanguage *string
+
+ // A standard MIME type describing the format of the object data.
+ ContentType *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // The date and time at which the object is no longer cacheable.
+ Expires *time.Time
+
+ // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. This
+ // action is not supported by Amazon S3 on Outposts.
+ GrantFullControl *string
+
+ // Allows grantee to read the object data and its metadata. This action is not
+ // supported by Amazon S3 on Outposts.
+ GrantRead *string
+
+ // Allows grantee to read the object ACL. This action is not supported by Amazon S3
+ // on Outposts.
+ GrantReadACP *string
+
+ // Allows grantee to write the ACL for the applicable object. This action is not
+ // supported by Amazon S3 on Outposts.
+ GrantWriteACP *string
+
+ // A map of metadata to store with the object in S3.
+ Metadata map[string]string
+
+ // Specifies whether you want to apply a Legal Hold to the uploaded object.
+ ObjectLockLegalHoldStatus types.ObjectLockLegalHoldStatus
+
+ // Specifies the Object Lock mode that you want to apply to the uploaded object.
+ ObjectLockMode types.ObjectLockMode
+
+ // Specifies the date and time when you want the Object Lock to expire.
+ ObjectLockRetainUntilDate *time.Time
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // Specifies the algorithm to use to when encrypting the object (for example,
+ // AES256).
+ SSECustomerAlgorithm *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 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
+
+ // 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 that the
+ // encryption key was transmitted without error.
+ SSECustomerKeyMD5 *string
+
+ // Specifies the Amazon Web Services KMS Encryption Context to use for object
+ // encryption. The value of this header is a base64-encoded UTF-8 string holding
+ // JSON with the encryption context key-value pairs.
+ SSEKMSEncryptionContext *string
+
+ // Specifies the ID of the symmetric customer managed key to use for object
+ // encryption. All GET and PUT requests for an object protected by Amazon Web
+ // Services KMS will fail if not made via SSL or using SigV4. For information about
+ // configuring using any of the officially supported Amazon Web Services SDKs and
+ // Amazon Web Services 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 User Guide.
+ SSEKMSKeyId *string
+
+ // The server-side encryption algorithm used when storing this object in Amazon S3
+ // (for example, AES256, aws:kms).
+ ServerSideEncryption types.ServerSideEncryption
+
+ // 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. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For
+ // more information, see Storage Classes
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) in
+ // the Amazon S3 User Guide.
+ StorageClass types.StorageClass
+
+ // The tag-set for the object. The tag-set must be encoded as URL Query parameters.
+ Tagging *string
+
+ // 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.
+ WebsiteRedirectLocation *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateMultipartUploadOutput struct {
+
+ // 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
+
+ // 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
+
+ // The name of the bucket to which the multipart upload was initiated. Does not
+ // return the access point ARN or access point alias if used. When using this
+ // action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ Bucket *string
+
+ // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
+ // encryption with Amazon Web Services KMS (SSE-KMS).
+ BucketKeyEnabled bool
+
+ // Object key for which the multipart upload was initiated.
+ Key *string
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // If server-side encryption with a customer-provided encryption key was requested,
+ // the response will include this header confirming the encryption algorithm used.
+ SSECustomerAlgorithm *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
+ // verification of the customer-provided encryption key.
+ SSECustomerKeyMD5 *string
+
+ // If present, specifies the Amazon Web Services KMS Encryption Context to use for
+ // object encryption. The value of this header is a base64-encoded UTF-8 string
+ // holding JSON with the encryption context key-value pairs.
+ SSEKMSEncryptionContext *string
+
+ // If present, specifies the ID of the Amazon Web Services Key Management Service
+ // (Amazon Web Services KMS) symmetric customer managed key that was used for the
+ // object.
+ SSEKMSKeyId *string
+
+ // The server-side encryption algorithm used when storing this object in Amazon S3
+ // (for example, AES256, aws:kms).
+ ServerSideEncryption types.ServerSideEncryption
+
+ // ID for the initiated multipart upload.
+ UploadId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateMultipartUploadMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpCreateMultipartUpload{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateMultipartUpload{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateMultipartUploadValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateMultipartUpload(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addCreateMultipartUploadUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCreateMultipartUpload(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "CreateMultipartUpload",
+ }
+}
+
+// getCreateMultipartUploadBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getCreateMultipartUploadBucketMember(input interface{}) (*string, bool) {
+ in := input.(*CreateMultipartUploadInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addCreateMultipartUploadUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getCreateMultipartUploadBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go
new file mode 100644
index 000000000..bcbfc3590
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go
@@ -0,0 +1,168 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the S3 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
+//
+// * CreateBucket
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+//
+// *
+// DeleteObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
+func (c *Client) DeleteBucket(ctx context.Context, params *DeleteBucketInput, optFns ...func(*Options)) (*DeleteBucketOutput, error) {
+ if params == nil {
+ params = &DeleteBucketInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteBucket", params, optFns, c.addOperationDeleteBucketMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteBucketOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteBucketInput struct {
+
+ // Specifies the bucket being deleted.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteBucketOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucket{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteBucket{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteBucketValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBucket(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteBucketUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteBucket(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteBucket",
+ }
+}
+
+// getDeleteBucketBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getDeleteBucketBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteBucketInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteBucketUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteBucketBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: false,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go
new file mode 100644
index 000000000..6f7ab3ff7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go
@@ -0,0 +1,188 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes an analytics configuration for the bucket (specified by the analytics
+// configuration ID). 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/userguide/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/userguide/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:
+//
+// *
+// GetBucketAnalyticsConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
+//
+// *
+// ListBucketAnalyticsConfigurations
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
+//
+// *
+// PutBucketAnalyticsConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
+func (c *Client) DeleteBucketAnalyticsConfiguration(ctx context.Context, params *DeleteBucketAnalyticsConfigurationInput, optFns ...func(*Options)) (*DeleteBucketAnalyticsConfigurationOutput, error) {
+ if params == nil {
+ params = &DeleteBucketAnalyticsConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteBucketAnalyticsConfiguration", params, optFns, c.addOperationDeleteBucketAnalyticsConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteBucketAnalyticsConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteBucketAnalyticsConfigurationInput struct {
+
+ // The name of the bucket from which an analytics configuration is deleted.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The ID that identifies the analytics configuration.
+ //
+ // This member is required.
+ Id *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteBucketAnalyticsConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteBucketAnalyticsConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketAnalyticsConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteBucketAnalyticsConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteBucketAnalyticsConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBucketAnalyticsConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteBucketAnalyticsConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteBucketAnalyticsConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteBucketAnalyticsConfiguration",
+ }
+}
+
+// getDeleteBucketAnalyticsConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getDeleteBucketAnalyticsConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteBucketAnalyticsConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteBucketAnalyticsConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteBucketAnalyticsConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go
new file mode 100644
index 000000000..07fe6302f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go
@@ -0,0 +1,171 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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 S3
+// User Guide. Related Resources:
+//
+// * PutBucketCors
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html)
+//
+// *
+// RESTOPTIONSobject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html)
+func (c *Client) DeleteBucketCors(ctx context.Context, params *DeleteBucketCorsInput, optFns ...func(*Options)) (*DeleteBucketCorsOutput, error) {
+ if params == nil {
+ params = &DeleteBucketCorsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteBucketCors", params, optFns, c.addOperationDeleteBucketCorsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteBucketCorsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteBucketCorsInput struct {
+
+ // Specifies the bucket whose cors configuration is being deleted.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteBucketCorsOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteBucketCorsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketCors{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteBucketCors{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteBucketCorsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBucketCors(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteBucketCorsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteBucketCors(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteBucketCors",
+ }
+}
+
+// getDeleteBucketCorsBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getDeleteBucketCorsBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteBucketCorsInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteBucketCorsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteBucketCorsBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go
new file mode 100644
index 000000000..79f70860b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go
@@ -0,0 +1,179 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// This implementation of the DELETE action 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 S3 User 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/userguide/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/userguide/s3-access-control.html)
+// in the Amazon S3 User Guide. Related Resources
+//
+// * PutBucketEncryption
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html)
+//
+// *
+// GetBucketEncryption
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)
+func (c *Client) DeleteBucketEncryption(ctx context.Context, params *DeleteBucketEncryptionInput, optFns ...func(*Options)) (*DeleteBucketEncryptionOutput, error) {
+ if params == nil {
+ params = &DeleteBucketEncryptionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteBucketEncryption", params, optFns, c.addOperationDeleteBucketEncryptionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteBucketEncryptionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteBucketEncryptionInput struct {
+
+ // The name of the bucket containing the server-side encryption configuration to
+ // delete.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteBucketEncryptionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteBucketEncryptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketEncryption{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteBucketEncryption{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteBucketEncryptionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBucketEncryption(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteBucketEncryptionUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteBucketEncryption(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteBucketEncryption",
+ }
+}
+
+// getDeleteBucketEncryptionBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getDeleteBucketEncryptionBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteBucketEncryptionInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteBucketEncryptionUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteBucketEncryptionBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go
new file mode 100644
index 000000000..7a289f645
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go
@@ -0,0 +1,188 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the S3 Intelligent-Tiering configuration from the specified bucket. The
+// S3 Intelligent-Tiering storage class is designed to optimize storage costs by
+// automatically moving data to the most cost-effective storage access tier,
+// without performance impact or operational overhead. S3 Intelligent-Tiering
+// delivers automatic cost savings in two low latency and high throughput access
+// tiers. For data that can be accessed asynchronously, you can choose to activate
+// automatic archiving capabilities within the S3 Intelligent-Tiering storage
+// class. The S3 Intelligent-Tiering storage class is the ideal storage class for
+// data with unknown, changing, or unpredictable access patterns, independent of
+// object size or retention period. If the size of an object is less than 128 KB,
+// it is not eligible for auto-tiering. Smaller objects can be stored, but they are
+// always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering
+// storage class. For more information, see Storage class for automatically
+// optimizing frequently and infrequently accessed objects
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
+// Operations related to DeleteBucketIntelligentTieringConfiguration include:
+//
+// *
+// GetBucketIntelligentTieringConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
+//
+// *
+// PutBucketIntelligentTieringConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
+//
+// *
+// ListBucketIntelligentTieringConfigurations
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
+func (c *Client) DeleteBucketIntelligentTieringConfiguration(ctx context.Context, params *DeleteBucketIntelligentTieringConfigurationInput, optFns ...func(*Options)) (*DeleteBucketIntelligentTieringConfigurationOutput, error) {
+ if params == nil {
+ params = &DeleteBucketIntelligentTieringConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteBucketIntelligentTieringConfiguration", params, optFns, c.addOperationDeleteBucketIntelligentTieringConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteBucketIntelligentTieringConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteBucketIntelligentTieringConfigurationInput struct {
+
+ // The name of the Amazon S3 bucket whose configuration you want to modify or
+ // retrieve.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The ID used to identify the S3 Intelligent-Tiering configuration.
+ //
+ // This member is required.
+ Id *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteBucketIntelligentTieringConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteBucketIntelligentTieringConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketIntelligentTieringConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteBucketIntelligentTieringConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteBucketIntelligentTieringConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBucketIntelligentTieringConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteBucketIntelligentTieringConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteBucketIntelligentTieringConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteBucketIntelligentTieringConfiguration",
+ }
+}
+
+// getDeleteBucketIntelligentTieringConfigurationBucketMember returns a pointer to
+// string denoting a provided bucket member valueand a boolean indicating if the
+// input has a modeled bucket name,
+func getDeleteBucketIntelligentTieringConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteBucketIntelligentTieringConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteBucketIntelligentTieringConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteBucketIntelligentTieringConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go
new file mode 100644
index 000000000..9d0e6a8b8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go
@@ -0,0 +1,187 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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/userguide/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/userguide/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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
+//
+// *
+// PutBucketInventoryConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
+//
+// *
+// ListBucketInventoryConfigurations
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
+func (c *Client) DeleteBucketInventoryConfiguration(ctx context.Context, params *DeleteBucketInventoryConfigurationInput, optFns ...func(*Options)) (*DeleteBucketInventoryConfigurationOutput, error) {
+ if params == nil {
+ params = &DeleteBucketInventoryConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteBucketInventoryConfiguration", params, optFns, c.addOperationDeleteBucketInventoryConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteBucketInventoryConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteBucketInventoryConfigurationInput struct {
+
+ // The name of the bucket containing the inventory configuration to delete.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The ID used to identify the inventory configuration.
+ //
+ // This member is required.
+ Id *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteBucketInventoryConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteBucketInventoryConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketInventoryConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteBucketInventoryConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteBucketInventoryConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBucketInventoryConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteBucketInventoryConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteBucketInventoryConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteBucketInventoryConfiguration",
+ }
+}
+
+// getDeleteBucketInventoryConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getDeleteBucketInventoryConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteBucketInventoryConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteBucketInventoryConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteBucketInventoryConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go
new file mode 100644
index 000000000..f1c59da45
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go
@@ -0,0 +1,177 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
+//
+// *
+// GetBucketLifecycleConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
+func (c *Client) DeleteBucketLifecycle(ctx context.Context, params *DeleteBucketLifecycleInput, optFns ...func(*Options)) (*DeleteBucketLifecycleOutput, error) {
+ if params == nil {
+ params = &DeleteBucketLifecycleInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteBucketLifecycle", params, optFns, c.addOperationDeleteBucketLifecycleMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteBucketLifecycleOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteBucketLifecycleInput struct {
+
+ // The bucket name of the lifecycle to delete.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteBucketLifecycleOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteBucketLifecycleMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketLifecycle{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteBucketLifecycle{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteBucketLifecycleValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBucketLifecycle(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteBucketLifecycleUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteBucketLifecycle(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteBucketLifecycle",
+ }
+}
+
+// getDeleteBucketLifecycleBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getDeleteBucketLifecycleBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteBucketLifecycleInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteBucketLifecycleUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteBucketLifecycleBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go
new file mode 100644
index 000000000..c9d7e8c78
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go
@@ -0,0 +1,193 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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/userguide/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/userguide/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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
+//
+// *
+// PutBucketMetricsConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
+//
+// *
+// ListBucketMetricsConfigurations
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
+//
+// *
+// Monitoring Metrics with Amazon CloudWatch
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html)
+func (c *Client) DeleteBucketMetricsConfiguration(ctx context.Context, params *DeleteBucketMetricsConfigurationInput, optFns ...func(*Options)) (*DeleteBucketMetricsConfigurationOutput, error) {
+ if params == nil {
+ params = &DeleteBucketMetricsConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteBucketMetricsConfiguration", params, optFns, c.addOperationDeleteBucketMetricsConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteBucketMetricsConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteBucketMetricsConfigurationInput struct {
+
+ // The name of the bucket containing the metrics configuration to delete.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The ID used to identify the metrics configuration.
+ //
+ // This member is required.
+ Id *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteBucketMetricsConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteBucketMetricsConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketMetricsConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteBucketMetricsConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteBucketMetricsConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBucketMetricsConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteBucketMetricsConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteBucketMetricsConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteBucketMetricsConfiguration",
+ }
+}
+
+// getDeleteBucketMetricsConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getDeleteBucketMetricsConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteBucketMetricsConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteBucketMetricsConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteBucketMetricsConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go
new file mode 100644
index 000000000..2f3dc3319
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go
@@ -0,0 +1,170 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Removes OwnershipControls for an Amazon S3 bucket. To use this operation, you
+// must have the s3:PutBucketOwnershipControls 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 information about Amazon S3 Object Ownership, see Using Object Ownership
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html).
+// The following operations are related to DeleteBucketOwnershipControls:
+//
+// *
+// GetBucketOwnershipControls
+//
+// * PutBucketOwnershipControls
+func (c *Client) DeleteBucketOwnershipControls(ctx context.Context, params *DeleteBucketOwnershipControlsInput, optFns ...func(*Options)) (*DeleteBucketOwnershipControlsOutput, error) {
+ if params == nil {
+ params = &DeleteBucketOwnershipControlsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteBucketOwnershipControls", params, optFns, c.addOperationDeleteBucketOwnershipControlsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteBucketOwnershipControlsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteBucketOwnershipControlsInput struct {
+
+ // The Amazon S3 bucket whose OwnershipControls you want to delete.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteBucketOwnershipControlsOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteBucketOwnershipControlsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketOwnershipControls{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteBucketOwnershipControls{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteBucketOwnershipControlsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBucketOwnershipControls(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteBucketOwnershipControlsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteBucketOwnershipControls(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteBucketOwnershipControls",
+ }
+}
+
+// getDeleteBucketOwnershipControlsBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getDeleteBucketOwnershipControlsBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteBucketOwnershipControlsInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteBucketOwnershipControlsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteBucketOwnershipControlsBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go
new file mode 100644
index 000000000..815b5baab
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go
@@ -0,0 +1,180 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// This implementation of the DELETE action 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 Amazon Web Services 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 Amazon Web
+// Services 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+//
+// *
+// DeleteObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
+func (c *Client) DeleteBucketPolicy(ctx context.Context, params *DeleteBucketPolicyInput, optFns ...func(*Options)) (*DeleteBucketPolicyOutput, error) {
+ if params == nil {
+ params = &DeleteBucketPolicyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteBucketPolicy", params, optFns, c.addOperationDeleteBucketPolicyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteBucketPolicyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteBucketPolicyInput struct {
+
+ // The bucket name.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteBucketPolicyOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteBucketPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketPolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteBucketPolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteBucketPolicyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBucketPolicy(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteBucketPolicyUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteBucketPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteBucketPolicy",
+ }
+}
+
+// getDeleteBucketPolicyBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getDeleteBucketPolicyBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteBucketPolicyInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteBucketPolicyUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteBucketPolicyBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go
new file mode 100644
index 000000000..3489765b5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go
@@ -0,0 +1,178 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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/userguide/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/userguide/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 User Guide. The following operations are related to
+// DeleteBucketReplication:
+//
+// * PutBucketReplication
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html)
+//
+// *
+// GetBucketReplication
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html)
+func (c *Client) DeleteBucketReplication(ctx context.Context, params *DeleteBucketReplicationInput, optFns ...func(*Options)) (*DeleteBucketReplicationOutput, error) {
+ if params == nil {
+ params = &DeleteBucketReplicationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteBucketReplication", params, optFns, c.addOperationDeleteBucketReplicationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteBucketReplicationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteBucketReplicationInput struct {
+
+ // The bucket name.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteBucketReplicationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteBucketReplicationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketReplication{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteBucketReplication{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteBucketReplicationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBucketReplication(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteBucketReplicationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteBucketReplication(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteBucketReplication",
+ }
+}
+
+// getDeleteBucketReplicationBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getDeleteBucketReplicationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteBucketReplicationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteBucketReplicationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteBucketReplicationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go
new file mode 100644
index 000000000..e05f3d44d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go
@@ -0,0 +1,169 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html)
+//
+// *
+// PutBucketTagging
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html)
+func (c *Client) DeleteBucketTagging(ctx context.Context, params *DeleteBucketTaggingInput, optFns ...func(*Options)) (*DeleteBucketTaggingOutput, error) {
+ if params == nil {
+ params = &DeleteBucketTaggingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteBucketTagging", params, optFns, c.addOperationDeleteBucketTaggingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteBucketTaggingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteBucketTaggingInput struct {
+
+ // The bucket that has the tag set to be removed.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteBucketTaggingOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteBucketTaggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketTagging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteBucketTagging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteBucketTaggingValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBucketTagging(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteBucketTaggingUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteBucketTagging(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteBucketTagging",
+ }
+}
+
+// getDeleteBucketTaggingBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getDeleteBucketTaggingBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteBucketTaggingInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteBucketTaggingUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteBucketTaggingBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go
new file mode 100644
index 000000000..a1d22e9e9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go
@@ -0,0 +1,178 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// This action 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
+// action 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketWebsite.html)
+//
+// *
+// PutBucketWebsite
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html)
+func (c *Client) DeleteBucketWebsite(ctx context.Context, params *DeleteBucketWebsiteInput, optFns ...func(*Options)) (*DeleteBucketWebsiteOutput, error) {
+ if params == nil {
+ params = &DeleteBucketWebsiteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteBucketWebsite", params, optFns, c.addOperationDeleteBucketWebsiteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteBucketWebsiteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteBucketWebsiteInput struct {
+
+ // The bucket name for which you want to remove the website configuration.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteBucketWebsiteOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteBucketWebsiteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketWebsite{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteBucketWebsite{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteBucketWebsiteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBucketWebsite(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteBucketWebsiteUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteBucketWebsite(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteBucketWebsite",
+ }
+}
+
+// getDeleteBucketWebsiteBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getDeleteBucketWebsiteBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteBucketWebsiteInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteBucketWebsiteUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteBucketWebsiteBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go
new file mode 100644
index 000000000..54468e90a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go
@@ -0,0 +1,238 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Removes the null version (if there is one) of an object and inserts a delete
+// marker, which becomes the latest version of the object. If there isn't a null
+// version, Amazon S3 does not remove any objects but will still respond that the
+// command was successful. 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 DELETE Object or configure its
+// lifecycle (PutBucketLifecycle
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html))
+// 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 action is related to DeleteObject:
+//
+// * PutObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+func (c *Client) DeleteObject(ctx context.Context, params *DeleteObjectInput, optFns ...func(*Options)) (*DeleteObjectOutput, error) {
+ if params == nil {
+ params = &DeleteObjectInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteObject", params, optFns, c.addOperationDeleteObjectMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteObjectOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteObjectInput struct {
+
+ // The bucket name of the bucket containing the object. When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Key name of the object to delete.
+ //
+ // This member is required.
+ Key *string
+
+ // Indicates whether S3 Object Lock should bypass Governance-mode restrictions to
+ // process this operation. To use this header, you must have the
+ // s3:PutBucketPublicAccessBlock permission.
+ BypassGovernanceRetention bool
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // The concatenation of the authentication device's serial number, a space, 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
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // VersionId used to reference a specific version of the object.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteObjectOutput struct {
+
+ // Specifies whether the versioned object that was permanently deleted was (true)
+ // or was not (false) a delete marker.
+ DeleteMarker bool
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // Returns the version ID of the delete marker created as a result of the DELETE
+ // operation.
+ VersionId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteObject{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteObject{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteObjectValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteObject(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteObjectUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteObject(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteObject",
+ }
+}
+
+// getDeleteObjectBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getDeleteObjectBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteObjectInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteObjectUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteObjectBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go
new file mode 100644
index 000000000..81640f66f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go
@@ -0,0 +1,201 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html)
+//
+// *
+// GetObjectTagging
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
+func (c *Client) DeleteObjectTagging(ctx context.Context, params *DeleteObjectTaggingInput, optFns ...func(*Options)) (*DeleteObjectTaggingOutput, error) {
+ if params == nil {
+ params = &DeleteObjectTaggingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteObjectTagging", params, optFns, c.addOperationDeleteObjectTaggingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteObjectTaggingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteObjectTaggingInput struct {
+
+ // The bucket name containing the objects from which to remove the tags. When using
+ // this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The key that identifies the object in the bucket from which to remove all tags.
+ //
+ // This member is required.
+ Key *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // The versionId of the object that the tag-set will be removed from.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteObjectTaggingOutput struct {
+
+ // The versionId of the object the tag-set was removed from.
+ VersionId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteObjectTaggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteObjectTagging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteObjectTagging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteObjectTaggingValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteObjectTagging(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteObjectTaggingUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteObjectTagging(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteObjectTagging",
+ }
+}
+
+// getDeleteObjectTaggingBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getDeleteObjectTaggingBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteObjectTaggingInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteObjectTaggingUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteObjectTaggingBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go
new file mode 100644
index 000000000..7e439da48
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go
@@ -0,0 +1,259 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// This action enables you to delete multiple objects from a bucket using a single
+// HTTP request. If you know the object keys that you want to delete, then this
+// action 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
+// action 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 action supports two modes for the
+// response: verbose and quiet. By default, the action 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 action encountered
+// an error. For a successful deletion, the action does not return any information
+// about the delete in the response body. When performing this action 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+//
+// *
+// UploadPart
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+//
+// *
+// CompleteMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
+//
+// *
+// ListParts
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+//
+// *
+// AbortMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
+func (c *Client) DeleteObjects(ctx context.Context, params *DeleteObjectsInput, optFns ...func(*Options)) (*DeleteObjectsOutput, error) {
+ if params == nil {
+ params = &DeleteObjectsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteObjects", params, optFns, c.addOperationDeleteObjectsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteObjectsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteObjectsInput struct {
+
+ // The bucket name containing the objects to delete. When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Container for the request.
+ //
+ // This member is required.
+ Delete *types.Delete
+
+ // Specifies whether you want to delete this object even if it has a
+ // Governance-type Object Lock in place. To use this header, you must have the
+ // s3:PutBucketPublicAccessBlock permission.
+ BypassGovernanceRetention bool
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // The concatenation of the authentication device's serial number, a space, 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
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ noSmithyDocumentSerde
+}
+
+type DeleteObjectsOutput struct {
+
+ // Container element for a successful delete. It identifies the object that was
+ // successfully deleted.
+ Deleted []types.DeletedObject
+
+ // Container for a failed delete action that describes the object that Amazon S3
+ // attempted to delete and the error it encountered.
+ Errors []types.Error
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteObjects{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteObjects{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpDeleteObjectsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteObjects(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeleteObjectsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteObjects(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeleteObjects",
+ }
+}
+
+// getDeleteObjectsBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getDeleteObjectsBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteObjectsInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteObjectsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteObjectsBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go
new file mode 100644
index 000000000..04df4643e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go
@@ -0,0 +1,182 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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/userguide/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/userguide/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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
+//
+// *
+// PutPublicAccessBlock
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
+//
+// *
+// GetBucketPolicyStatus
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html)
+func (c *Client) DeletePublicAccessBlock(ctx context.Context, params *DeletePublicAccessBlockInput, optFns ...func(*Options)) (*DeletePublicAccessBlockOutput, error) {
+ if params == nil {
+ params = &DeletePublicAccessBlockInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeletePublicAccessBlock", params, optFns, c.addOperationDeletePublicAccessBlockMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeletePublicAccessBlockOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeletePublicAccessBlockInput struct {
+
+ // The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type DeletePublicAccessBlockOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeletePublicAccessBlockMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeletePublicAccessBlock{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeletePublicAccessBlock{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeletePublicAccessBlockValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePublicAccessBlock(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addDeletePublicAccessBlockUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeletePublicAccessBlock(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "DeletePublicAccessBlock",
+ }
+}
+
+// getDeletePublicAccessBlockBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getDeletePublicAccessBlockBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeletePublicAccessBlockInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeletePublicAccessBlockUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeletePublicAccessBlockBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go
new file mode 100644
index 000000000..d2dff759c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go
@@ -0,0 +1,187 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// This implementation of the GET action 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/userguide/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/userguide/s3-access-control.html)
+// in the Amazon S3 User Guide. You set the Transfer Acceleration state of an
+// existing bucket to Enabled or Suspended by using the
+// PutBucketAccelerateConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html)
+// 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 S3 User Guide. Related Resources
+//
+// * PutBucketAccelerateConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html)
+func (c *Client) GetBucketAccelerateConfiguration(ctx context.Context, params *GetBucketAccelerateConfigurationInput, optFns ...func(*Options)) (*GetBucketAccelerateConfigurationOutput, error) {
+ if params == nil {
+ params = &GetBucketAccelerateConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketAccelerateConfiguration", params, optFns, c.addOperationGetBucketAccelerateConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketAccelerateConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketAccelerateConfigurationInput struct {
+
+ // The name of the bucket for which the accelerate configuration is retrieved.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketAccelerateConfigurationOutput struct {
+
+ // The accelerate configuration of the bucket.
+ Status types.BucketAccelerateStatus
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketAccelerateConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketAccelerateConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketAccelerateConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketAccelerateConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketAccelerateConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketAccelerateConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketAccelerateConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketAccelerateConfiguration",
+ }
+}
+
+// getGetBucketAccelerateConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getGetBucketAccelerateConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketAccelerateConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketAccelerateConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketAccelerateConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go
new file mode 100644
index 000000000..96a504340
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go
@@ -0,0 +1,174 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// This implementation of the GET action 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
+//
+// * ListObjects
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
+func (c *Client) GetBucketAcl(ctx context.Context, params *GetBucketAclInput, optFns ...func(*Options)) (*GetBucketAclOutput, error) {
+ if params == nil {
+ params = &GetBucketAclInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketAcl", params, optFns, c.addOperationGetBucketAclMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketAclOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketAclInput struct {
+
+ // Specifies the S3 bucket whose ACL is being requested.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketAclOutput struct {
+
+ // A list of grants.
+ Grants []types.Grant
+
+ // Container for the bucket owner's display name and ID.
+ Owner *types.Owner
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketAclMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketAcl{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketAcl{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketAclValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketAcl(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketAclUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketAcl(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketAcl",
+ }
+}
+
+// getGetBucketAclBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getGetBucketAclBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketAclInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketAclUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketAclBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go
new file mode 100644
index 000000000..3f87c9811
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go
@@ -0,0 +1,193 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// This implementation of the GET action 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/userguide/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/userguide/s3-access-control.html)
+// in the Amazon S3 User 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 S3 User Guide. Related Resources
+//
+// *
+// DeleteBucketAnalyticsConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
+//
+// *
+// ListBucketAnalyticsConfigurations
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
+//
+// *
+// PutBucketAnalyticsConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
+func (c *Client) GetBucketAnalyticsConfiguration(ctx context.Context, params *GetBucketAnalyticsConfigurationInput, optFns ...func(*Options)) (*GetBucketAnalyticsConfigurationOutput, error) {
+ if params == nil {
+ params = &GetBucketAnalyticsConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketAnalyticsConfiguration", params, optFns, c.addOperationGetBucketAnalyticsConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketAnalyticsConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketAnalyticsConfigurationInput struct {
+
+ // The name of the bucket from which an analytics configuration is retrieved.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The ID that identifies the analytics configuration.
+ //
+ // This member is required.
+ Id *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketAnalyticsConfigurationOutput struct {
+
+ // The configuration and any analyses for the analytics filter.
+ AnalyticsConfiguration *types.AnalyticsConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketAnalyticsConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketAnalyticsConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketAnalyticsConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketAnalyticsConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketAnalyticsConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketAnalyticsConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketAnalyticsConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketAnalyticsConfiguration",
+ }
+}
+
+// getGetBucketAnalyticsConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getGetBucketAnalyticsConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketAnalyticsConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketAnalyticsConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketAnalyticsConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go
new file mode 100644
index 000000000..1f291ac05
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go
@@ -0,0 +1,177 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html)
+//
+// *
+// DeleteBucketCors
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html)
+func (c *Client) GetBucketCors(ctx context.Context, params *GetBucketCorsInput, optFns ...func(*Options)) (*GetBucketCorsOutput, error) {
+ if params == nil {
+ params = &GetBucketCorsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketCors", params, optFns, c.addOperationGetBucketCorsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketCorsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketCorsInput struct {
+
+ // The bucket name for which to get the cors configuration.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketCorsOutput struct {
+
+ // 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 []types.CORSRule
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketCorsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketCors{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketCors{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketCorsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketCors(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketCorsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketCors(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketCors",
+ }
+}
+
+// getGetBucketCorsBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getGetBucketCorsBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketCorsInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketCorsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketCorsBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go
new file mode 100644
index 000000000..12507c17b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go
@@ -0,0 +1,187 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns the default encryption configuration for an Amazon S3 bucket. If the
+// bucket does not have a default encryption configuration, GetBucketEncryption
+// returns ServerSideEncryptionConfigurationNotFoundError. 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/userguide/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/userguide/s3-access-control.html).
+// The following operations are related to GetBucketEncryption:
+//
+// *
+// PutBucketEncryption
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html)
+//
+// *
+// DeleteBucketEncryption
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html)
+func (c *Client) GetBucketEncryption(ctx context.Context, params *GetBucketEncryptionInput, optFns ...func(*Options)) (*GetBucketEncryptionOutput, error) {
+ if params == nil {
+ params = &GetBucketEncryptionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketEncryption", params, optFns, c.addOperationGetBucketEncryptionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketEncryptionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketEncryptionInput struct {
+
+ // The name of the bucket from which the server-side encryption configuration is
+ // retrieved.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketEncryptionOutput struct {
+
+ // Specifies the default server-side-encryption configuration.
+ ServerSideEncryptionConfiguration *types.ServerSideEncryptionConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketEncryptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketEncryption{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketEncryption{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketEncryptionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketEncryption(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketEncryptionUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketEncryption(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketEncryption",
+ }
+}
+
+// getGetBucketEncryptionBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getGetBucketEncryptionBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketEncryptionInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketEncryptionUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketEncryptionBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go
new file mode 100644
index 000000000..9c5c6abda
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go
@@ -0,0 +1,193 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets the S3 Intelligent-Tiering configuration from the specified bucket. The S3
+// Intelligent-Tiering storage class is designed to optimize storage costs by
+// automatically moving data to the most cost-effective storage access tier,
+// without performance impact or operational overhead. S3 Intelligent-Tiering
+// delivers automatic cost savings in two low latency and high throughput access
+// tiers. For data that can be accessed asynchronously, you can choose to activate
+// automatic archiving capabilities within the S3 Intelligent-Tiering storage
+// class. The S3 Intelligent-Tiering storage class is the ideal storage class for
+// data with unknown, changing, or unpredictable access patterns, independent of
+// object size or retention period. If the size of an object is less than 128 KB,
+// it is not eligible for auto-tiering. Smaller objects can be stored, but they are
+// always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering
+// storage class. For more information, see Storage class for automatically
+// optimizing frequently and infrequently accessed objects
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
+// Operations related to GetBucketIntelligentTieringConfiguration include:
+//
+// *
+// DeleteBucketIntelligentTieringConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
+//
+// *
+// PutBucketIntelligentTieringConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
+//
+// *
+// ListBucketIntelligentTieringConfigurations
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
+func (c *Client) GetBucketIntelligentTieringConfiguration(ctx context.Context, params *GetBucketIntelligentTieringConfigurationInput, optFns ...func(*Options)) (*GetBucketIntelligentTieringConfigurationOutput, error) {
+ if params == nil {
+ params = &GetBucketIntelligentTieringConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketIntelligentTieringConfiguration", params, optFns, c.addOperationGetBucketIntelligentTieringConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketIntelligentTieringConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketIntelligentTieringConfigurationInput struct {
+
+ // The name of the Amazon S3 bucket whose configuration you want to modify or
+ // retrieve.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The ID used to identify the S3 Intelligent-Tiering configuration.
+ //
+ // This member is required.
+ Id *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketIntelligentTieringConfigurationOutput struct {
+
+ // Container for S3 Intelligent-Tiering configuration.
+ IntelligentTieringConfiguration *types.IntelligentTieringConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketIntelligentTieringConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketIntelligentTieringConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketIntelligentTieringConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketIntelligentTieringConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketIntelligentTieringConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketIntelligentTieringConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketIntelligentTieringConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketIntelligentTieringConfiguration",
+ }
+}
+
+// getGetBucketIntelligentTieringConfigurationBucketMember returns a pointer to
+// string denoting a provided bucket member valueand a boolean indicating if the
+// input has a modeled bucket name,
+func getGetBucketIntelligentTieringConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketIntelligentTieringConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketIntelligentTieringConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketIntelligentTieringConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go
new file mode 100644
index 000000000..641147202
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go
@@ -0,0 +1,191 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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/userguide/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/userguide/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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
+//
+// *
+// ListBucketInventoryConfigurations
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
+//
+// *
+// PutBucketInventoryConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
+func (c *Client) GetBucketInventoryConfiguration(ctx context.Context, params *GetBucketInventoryConfigurationInput, optFns ...func(*Options)) (*GetBucketInventoryConfigurationOutput, error) {
+ if params == nil {
+ params = &GetBucketInventoryConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketInventoryConfiguration", params, optFns, c.addOperationGetBucketInventoryConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketInventoryConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketInventoryConfigurationInput struct {
+
+ // The name of the bucket containing the inventory configuration to retrieve.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The ID used to identify the inventory configuration.
+ //
+ // This member is required.
+ Id *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketInventoryConfigurationOutput struct {
+
+ // Specifies the inventory configuration.
+ InventoryConfiguration *types.InventoryConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketInventoryConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketInventoryConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketInventoryConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketInventoryConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketInventoryConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketInventoryConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketInventoryConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketInventoryConfiguration",
+ }
+}
+
+// getGetBucketInventoryConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getGetBucketInventoryConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketInventoryConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketInventoryConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketInventoryConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go
new file mode 100644
index 000000000..f64f14869
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go
@@ -0,0 +1,208 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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 using a previous version of the
+// lifecycle configuration, it still works. For the earlier action, see
+// GetBucketLifecycle
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html).
+// 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/userguide/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/userguide/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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html)
+//
+// *
+// PutBucketLifecycle
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)
+//
+// *
+// DeleteBucketLifecycle
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
+func (c *Client) GetBucketLifecycleConfiguration(ctx context.Context, params *GetBucketLifecycleConfigurationInput, optFns ...func(*Options)) (*GetBucketLifecycleConfigurationOutput, error) {
+ if params == nil {
+ params = &GetBucketLifecycleConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketLifecycleConfiguration", params, optFns, c.addOperationGetBucketLifecycleConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketLifecycleConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketLifecycleConfigurationInput struct {
+
+ // The name of the bucket for which to get the lifecycle information.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketLifecycleConfigurationOutput struct {
+
+ // Container for a lifecycle rule.
+ Rules []types.LifecycleRule
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketLifecycleConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketLifecycleConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketLifecycleConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketLifecycleConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketLifecycleConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketLifecycleConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketLifecycleConfiguration",
+ }
+}
+
+// getGetBucketLifecycleConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getGetBucketLifecycleConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketLifecycleConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketLifecycleConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketLifecycleConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go
new file mode 100644
index 000000000..7adda2097
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go
@@ -0,0 +1,247 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "bytes"
+ "context"
+ "encoding/xml"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ smithy "github.com/aws/smithy-go"
+ smithyxml "github.com/aws/smithy-go/encoding/xml"
+ smithyio "github.com/aws/smithy-go/io"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+)
+
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html). To use
+// this implementation of the operation, you must be the bucket owner. To use this
+// API against an access point, provide the alias of the access point in place of
+// the bucket name. The following operations are related to GetBucketLocation:
+//
+// *
+// GetObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+//
+// *
+// CreateBucket
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+func (c *Client) GetBucketLocation(ctx context.Context, params *GetBucketLocationInput, optFns ...func(*Options)) (*GetBucketLocationOutput, error) {
+ if params == nil {
+ params = &GetBucketLocationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketLocation", params, optFns, c.addOperationGetBucketLocationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketLocationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketLocationInput struct {
+
+ // The name of the bucket for which to get the location.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketLocationOutput struct {
+
+ // 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 types.BucketLocationConstraint
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketLocationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketLocation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketLocation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapDeserializerHelper(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketLocationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketLocation(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketLocationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketLocation_custom struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketLocation_custom) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketLocation_custom) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketLocation(response, &metadata)
+ }
+ output := &GetBucketLocationOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, xml.StartElement{})
+ err = awsRestxml_deserializeOpDocumentGetBucketLocationOutput(&output, decoder)
+ if err == io.EOF {
+ err = nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+// Helper to swap in a custom deserializer
+func swapDeserializerHelper(stack *middleware.Stack) error {
+ _, err := stack.Deserialize.Swap("OperationDeserializer", &awsRestxml_deserializeOpGetBucketLocation_custom{})
+ if err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketLocation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketLocation",
+ }
+}
+
+// getGetBucketLocationBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getGetBucketLocationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketLocationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketLocationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketLocationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go
new file mode 100644
index 000000000..2e43477b1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go
@@ -0,0 +1,176 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+//
+// *
+// PutBucketLogging
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLogging.html)
+func (c *Client) GetBucketLogging(ctx context.Context, params *GetBucketLoggingInput, optFns ...func(*Options)) (*GetBucketLoggingOutput, error) {
+ if params == nil {
+ params = &GetBucketLoggingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketLogging", params, optFns, c.addOperationGetBucketLoggingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketLoggingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketLoggingInput struct {
+
+ // The bucket name for which to get the logging information.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketLoggingOutput struct {
+
+ // Describes where logs are stored and the prefix that Amazon S3 assigns to all log
+ // object keys for a bucket. For more information, see PUT Bucket logging
+ // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html) in
+ // the Amazon S3 API Reference.
+ LoggingEnabled *types.LoggingEnabled
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketLoggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketLogging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketLogging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketLoggingValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketLogging(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketLoggingUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketLogging(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketLogging",
+ }
+}
+
+// getGetBucketLoggingBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getGetBucketLoggingBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketLoggingInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketLoggingUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketLoggingBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go
new file mode 100644
index 000000000..30025a668
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go
@@ -0,0 +1,198 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets a metrics configuration (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: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/userguide/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/userguide/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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
+//
+// *
+// DeleteBucketMetricsConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
+//
+// *
+// ListBucketMetricsConfigurations
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
+//
+// *
+// Monitoring Metrics with Amazon CloudWatch
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html)
+func (c *Client) GetBucketMetricsConfiguration(ctx context.Context, params *GetBucketMetricsConfigurationInput, optFns ...func(*Options)) (*GetBucketMetricsConfigurationOutput, error) {
+ if params == nil {
+ params = &GetBucketMetricsConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketMetricsConfiguration", params, optFns, c.addOperationGetBucketMetricsConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketMetricsConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketMetricsConfigurationInput struct {
+
+ // The name of the bucket containing the metrics configuration to retrieve.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The ID used to identify the metrics configuration.
+ //
+ // This member is required.
+ Id *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketMetricsConfigurationOutput struct {
+
+ // Specifies the metrics configuration.
+ MetricsConfiguration *types.MetricsConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketMetricsConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketMetricsConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketMetricsConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketMetricsConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketMetricsConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketMetricsConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketMetricsConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketMetricsConfiguration",
+ }
+}
+
+// getGetBucketMetricsConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getGetBucketMetricsConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketMetricsConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketMetricsConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketMetricsConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go
new file mode 100644
index 000000000..93edf8b6d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go
@@ -0,0 +1,189 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns the notification configuration of a bucket. If notifications are not
+// enabled on the bucket, the action 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 action is related to GetBucketNotification:
+//
+// * PutBucketNotification
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotification.html)
+func (c *Client) GetBucketNotificationConfiguration(ctx context.Context, params *GetBucketNotificationConfigurationInput, optFns ...func(*Options)) (*GetBucketNotificationConfigurationOutput, error) {
+ if params == nil {
+ params = &GetBucketNotificationConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketNotificationConfiguration", params, optFns, c.addOperationGetBucketNotificationConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketNotificationConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketNotificationConfigurationInput struct {
+
+ // The name of the bucket for which to get the notification configuration.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+// A container for specifying the notification configuration of the bucket. If this
+// element is empty, notifications are turned off for the bucket.
+type GetBucketNotificationConfigurationOutput struct {
+
+ // Describes the Lambda functions to invoke and the events for which to invoke
+ // them.
+ LambdaFunctionConfigurations []types.LambdaFunctionConfiguration
+
+ // The Amazon Simple Queue Service queues to publish messages to and the events for
+ // which to publish messages.
+ QueueConfigurations []types.QueueConfiguration
+
+ // The topic to which notifications are sent and the events for which notifications
+ // are generated.
+ TopicConfigurations []types.TopicConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketNotificationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketNotificationConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketNotificationConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketNotificationConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketNotificationConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketNotificationConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketNotificationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketNotificationConfiguration",
+ }
+}
+
+// getGetBucketNotificationConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getGetBucketNotificationConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketNotificationConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketNotificationConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketNotificationConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go
new file mode 100644
index 000000000..ca4144d22
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go
@@ -0,0 +1,176 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation, you
+// must have the s3:GetBucketOwnershipControls 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 information about Amazon S3 Object Ownership, see Using Object Ownership
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html).
+// The following operations are related to GetBucketOwnershipControls:
+//
+// *
+// PutBucketOwnershipControls
+//
+// * DeleteBucketOwnershipControls
+func (c *Client) GetBucketOwnershipControls(ctx context.Context, params *GetBucketOwnershipControlsInput, optFns ...func(*Options)) (*GetBucketOwnershipControlsOutput, error) {
+ if params == nil {
+ params = &GetBucketOwnershipControlsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketOwnershipControls", params, optFns, c.addOperationGetBucketOwnershipControlsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketOwnershipControlsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketOwnershipControlsInput struct {
+
+ // The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketOwnershipControlsOutput struct {
+
+ // The OwnershipControls (BucketOwnerPreferred or ObjectWriter) currently in effect
+ // for this Amazon S3 bucket.
+ OwnershipControls *types.OwnershipControls
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketOwnershipControlsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketOwnershipControls{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketOwnershipControls{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketOwnershipControlsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketOwnershipControls(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketOwnershipControlsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketOwnershipControls(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketOwnershipControls",
+ }
+}
+
+// getGetBucketOwnershipControlsBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getGetBucketOwnershipControlsBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketOwnershipControlsInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketOwnershipControlsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketOwnershipControlsBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go
new file mode 100644
index 000000000..4e0d1afa9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go
@@ -0,0 +1,179 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns the policy of a specified bucket. If you are using an identity other
+// than the root user of the Amazon Web Services 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 Amazon
+// Web Services 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 action is related to GetBucketPolicy:
+//
+// * GetObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+func (c *Client) GetBucketPolicy(ctx context.Context, params *GetBucketPolicyInput, optFns ...func(*Options)) (*GetBucketPolicyOutput, error) {
+ if params == nil {
+ params = &GetBucketPolicyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketPolicy", params, optFns, c.addOperationGetBucketPolicyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketPolicyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketPolicyInput struct {
+
+ // The bucket name for which to get the bucket policy.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketPolicyOutput struct {
+
+ // The bucket policy as a JSON document.
+ Policy *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketPolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketPolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketPolicyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketPolicy(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketPolicyUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketPolicy",
+ }
+}
+
+// getGetBucketPolicyBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getGetBucketPolicyBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketPolicyInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketPolicyUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketPolicyBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go
new file mode 100644
index 000000000..42b3b8012
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go
@@ -0,0 +1,188 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Retrieves the policy status for an Amazon S3 bucket, indicating whether the
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
+//
+// *
+// PutPublicAccessBlock
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
+//
+// *
+// DeletePublicAccessBlock
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
+func (c *Client) GetBucketPolicyStatus(ctx context.Context, params *GetBucketPolicyStatusInput, optFns ...func(*Options)) (*GetBucketPolicyStatusOutput, error) {
+ if params == nil {
+ params = &GetBucketPolicyStatusInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketPolicyStatus", params, optFns, c.addOperationGetBucketPolicyStatusMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketPolicyStatusOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketPolicyStatusInput struct {
+
+ // The name of the Amazon S3 bucket whose policy status you want to retrieve.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketPolicyStatusOutput struct {
+
+ // The policy status for the specified bucket.
+ PolicyStatus *types.PolicyStatus
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketPolicyStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketPolicyStatus{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketPolicyStatus{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketPolicyStatusValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketPolicyStatus(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketPolicyStatusUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketPolicyStatus(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketPolicyStatus",
+ }
+}
+
+// getGetBucketPolicyStatusBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getGetBucketPolicyStatusBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketPolicyStatusInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketPolicyStatusUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketPolicyStatusBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go
new file mode 100644
index 000000000..b03baf4d3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go
@@ -0,0 +1,187 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns the replication configuration of a bucket. It can take a while to
+// propagate the put or delete a replication configuration 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
+// S3 User Guide. This action 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
+// List of replication-related error codes
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList)
+// The following operations are related to GetBucketReplication:
+//
+// *
+// PutBucketReplication
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html)
+//
+// *
+// DeleteBucketReplication
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html)
+func (c *Client) GetBucketReplication(ctx context.Context, params *GetBucketReplicationInput, optFns ...func(*Options)) (*GetBucketReplicationOutput, error) {
+ if params == nil {
+ params = &GetBucketReplicationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketReplication", params, optFns, c.addOperationGetBucketReplicationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketReplicationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketReplicationInput struct {
+
+ // The bucket name for which to get the replication information.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketReplicationOutput struct {
+
+ // A container for replication rules. You can add up to 1,000 rules. The maximum
+ // size of a replication configuration is 2 MB.
+ ReplicationConfiguration *types.ReplicationConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketReplicationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketReplication{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketReplication{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketReplicationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketReplication(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketReplicationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketReplication(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketReplication",
+ }
+}
+
+// getGetBucketReplicationBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getGetBucketReplicationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketReplicationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketReplicationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketReplicationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go
new file mode 100644
index 000000000..18166d479
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go
@@ -0,0 +1,171 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
+func (c *Client) GetBucketRequestPayment(ctx context.Context, params *GetBucketRequestPaymentInput, optFns ...func(*Options)) (*GetBucketRequestPaymentOutput, error) {
+ if params == nil {
+ params = &GetBucketRequestPaymentInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketRequestPayment", params, optFns, c.addOperationGetBucketRequestPaymentMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketRequestPaymentOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketRequestPaymentInput struct {
+
+ // The name of the bucket for which to get the payment request configuration
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketRequestPaymentOutput struct {
+
+ // Specifies who pays for the download and request fees.
+ Payer types.Payer
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketRequestPaymentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketRequestPayment{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketRequestPayment{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketRequestPaymentValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketRequestPayment(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketRequestPaymentUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketRequestPayment(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketRequestPayment",
+ }
+}
+
+// getGetBucketRequestPaymentBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getGetBucketRequestPaymentBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketRequestPaymentInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketRequestPaymentUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketRequestPaymentBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go
new file mode 100644
index 000000000..707284408
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go
@@ -0,0 +1,185 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html)
+//
+// *
+// DeleteBucketTagging
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html)
+func (c *Client) GetBucketTagging(ctx context.Context, params *GetBucketTaggingInput, optFns ...func(*Options)) (*GetBucketTaggingOutput, error) {
+ if params == nil {
+ params = &GetBucketTaggingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketTagging", params, optFns, c.addOperationGetBucketTaggingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketTaggingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketTaggingInput struct {
+
+ // The name of the bucket for which to get the tagging information.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketTaggingOutput struct {
+
+ // Contains the tag set.
+ //
+ // This member is required.
+ TagSet []types.Tag
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketTaggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketTagging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketTagging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketTaggingValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketTagging(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketTaggingUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketTagging(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketTagging",
+ }
+}
+
+// getGetBucketTaggingBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getGetBucketTaggingBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketTaggingInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketTaggingUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketTaggingBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go
new file mode 100644
index 000000000..7de1f13b2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go
@@ -0,0 +1,185 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+//
+// *
+// PutObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+//
+// *
+// DeleteObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
+func (c *Client) GetBucketVersioning(ctx context.Context, params *GetBucketVersioningInput, optFns ...func(*Options)) (*GetBucketVersioningOutput, error) {
+ if params == nil {
+ params = &GetBucketVersioningInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketVersioning", params, optFns, c.addOperationGetBucketVersioningMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketVersioningOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketVersioningInput struct {
+
+ // The name of the bucket for which to get the versioning information.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketVersioningOutput struct {
+
+ // Specifies whether MFA delete is enabled in the bucket versioning configuration.
+ // This element is only returned if the bucket has been configured with MFA delete.
+ // If the bucket has never been so configured, this element is not returned.
+ MFADelete types.MFADeleteStatus
+
+ // The versioning state of the bucket.
+ Status types.BucketVersioningStatus
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketVersioningMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketVersioning{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketVersioning{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketVersioningValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketVersioning(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketVersioningUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketVersioning(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketVersioning",
+ }
+}
+
+// getGetBucketVersioningBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getGetBucketVersioningBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketVersioningInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketVersioningUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketVersioningBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go
new file mode 100644
index 000000000..5e994e391
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go
@@ -0,0 +1,189 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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
+// action 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketWebsite.html)
+//
+// *
+// PutBucketWebsite
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html)
+func (c *Client) GetBucketWebsite(ctx context.Context, params *GetBucketWebsiteInput, optFns ...func(*Options)) (*GetBucketWebsiteOutput, error) {
+ if params == nil {
+ params = &GetBucketWebsiteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketWebsite", params, optFns, c.addOperationGetBucketWebsiteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketWebsiteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketWebsiteInput struct {
+
+ // The bucket name for which to get the website configuration.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetBucketWebsiteOutput struct {
+
+ // The object key name of the website error document to use for 4XX class errors.
+ ErrorDocument *types.ErrorDocument
+
+ // The name of the index document for the website (for example index.html).
+ IndexDocument *types.IndexDocument
+
+ // Specifies the redirect behavior of all requests to a website endpoint of an
+ // Amazon S3 bucket.
+ RedirectAllRequestsTo *types.RedirectAllRequestsTo
+
+ // Rules that define when a redirect is applied and the redirect behavior.
+ RoutingRules []types.RoutingRule
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketWebsiteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketWebsite{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketWebsite{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetBucketWebsiteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketWebsite(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketWebsiteUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetBucketWebsite(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetBucketWebsite",
+ }
+}
+
+// getGetBucketWebsiteBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getGetBucketWebsiteBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketWebsiteInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketWebsiteUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketWebsiteBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go
new file mode 100644
index 000000000..812646331
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go
@@ -0,0 +1,533 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+ "time"
+)
+
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html). If the
+// object you are retrieving is stored in the S3 Glacier or S3 Glacier Deep Archive
+// storage class, or S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep
+// Archive tiers, before you can retrieve the object you must first restore a copy
+// using RestoreObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html).
+// Otherwise, this action 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 KMS keys
+// (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 the relevant permission to read object tags, 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html) to
+// retrieve the tag set associated with an object. Permissions You need the
+// relevant read object (or version) 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 action returns the current version of an
+// object. To return a different version, use the versionId subresource.
+//
+// * You
+// need the s3:GetObjectVersion permission to access a specific version of an
+// object.
+//
+// * 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html).
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
+//
+// *
+// GetObjectAcl
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
+func (c *Client) GetObject(ctx context.Context, params *GetObjectInput, optFns ...func(*Options)) (*GetObjectOutput, error) {
+ if params == nil {
+ params = &GetObjectInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetObject", params, optFns, c.addOperationGetObjectMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetObjectOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetObjectInput struct {
+
+ // The bucket name containing the object. When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using an Object Lambda access point the
+ // hostname takes the form
+ // AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com. When using this
+ // action with Amazon S3 on Outposts, you must direct requests to the S3 on
+ // Outposts hostname. The S3 on Outposts hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Key of the object to get.
+ //
+ // This member is required.
+ Key *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // Return the object only if its entity tag (ETag) is the same as the one
+ // specified, otherwise return a 412 (precondition failed).
+ IfMatch *string
+
+ // Return the object only if it has been modified since the specified time,
+ // otherwise return a 304 (not modified).
+ IfModifiedSince *time.Time
+
+ // Return the object only if its entity tag (ETag) is different from the one
+ // specified, otherwise return a 304 (not modified).
+ IfNoneMatch *string
+
+ // Return the object only if it has not been modified since the specified time,
+ // otherwise return a 412 (precondition failed).
+ IfUnmodifiedSince *time.Time
+
+ // Part number of the object being read. This is a positive integer between 1 and
+ // 10,000. Effectively performs a 'ranged' GET request for the part specified.
+ // Useful for downloading just a part of an object.
+ PartNumber int32
+
+ // Downloads the specified range bytes of an object. For more information about 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
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // Sets the Cache-Control header of the response.
+ ResponseCacheControl *string
+
+ // Sets the Content-Disposition header of the response
+ ResponseContentDisposition *string
+
+ // Sets the Content-Encoding header of the response.
+ ResponseContentEncoding *string
+
+ // Sets the Content-Language header of the response.
+ ResponseContentLanguage *string
+
+ // Sets the Content-Type header of the response.
+ ResponseContentType *string
+
+ // Sets the Expires header of the response.
+ ResponseExpires *time.Time
+
+ // Specifies the algorithm to use to when decrypting the object (for example,
+ // AES256).
+ SSECustomerAlgorithm *string
+
+ // Specifies the customer-provided encryption key for Amazon S3 used to encrypt the
+ // data. This value is used to decrypt the object when recovering it and must match
+ // the one used when storing the data. The key must be appropriate for use with the
+ // algorithm specified in the x-amz-server-side-encryption-customer-algorithm
+ // header.
+ SSECustomerKey *string
+
+ // 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 that the
+ // encryption key was transmitted without error.
+ SSECustomerKeyMD5 *string
+
+ // VersionId used to reference a specific version of the object.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+type GetObjectOutput struct {
+
+ // Indicates that a range of bytes was specified.
+ AcceptRanges *string
+
+ // Object data.
+ Body io.ReadCloser
+
+ // Indicates whether the object uses an S3 Bucket Key for server-side encryption
+ // with Amazon Web Services KMS (SSE-KMS).
+ BucketKeyEnabled bool
+
+ // Specifies caching behavior along the request/reply chain.
+ CacheControl *string
+
+ // Specifies presentational information for the object.
+ ContentDisposition *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.
+ ContentEncoding *string
+
+ // The language the content is in.
+ ContentLanguage *string
+
+ // Size of the body in bytes.
+ ContentLength int64
+
+ // The portion of the object returned in the response.
+ ContentRange *string
+
+ // A standard MIME type describing the format of the object data.
+ ContentType *string
+
+ // Specifies whether the object retrieved was (true) or was not (false) a Delete
+ // Marker. If false, this response header does not appear in the response.
+ DeleteMarker bool
+
+ // An ETag is an opaque identifier assigned by a web server to a specific version
+ // of a resource found at a URL.
+ ETag *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
+ // providing object expiration information. The value of the rule-id is URL
+ // encoded.
+ Expiration *string
+
+ // The date and time at which the object is no longer cacheable.
+ Expires *time.Time
+
+ // Creation date of the object.
+ LastModified *time.Time
+
+ // A map of metadata to store with the object in S3.
+ //
+ // Map keys will be normalized to lower-case.
+ Metadata map[string]string
+
+ // This is set to the number of metadata entries not returned in x-amz-meta
+ // headers. This can happen if you create metadata using an API like SOAP that
+ // supports more flexible metadata than the REST API. For example, using SOAP, you
+ // can create metadata whose values are not legal HTTP headers.
+ MissingMeta int32
+
+ // Indicates whether this object has an active legal hold. This field is only
+ // returned if you have permission to view an object's legal hold status.
+ ObjectLockLegalHoldStatus types.ObjectLockLegalHoldStatus
+
+ // The Object Lock mode currently in place for this object.
+ ObjectLockMode types.ObjectLockMode
+
+ // The date and time when this object's Object Lock will expire.
+ ObjectLockRetainUntilDate *time.Time
+
+ // The count of parts this object has.
+ PartsCount int32
+
+ // Amazon S3 can return this if your request involves a bucket that is either a
+ // source or destination in a replication rule.
+ ReplicationStatus types.ReplicationStatus
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // Provides information about object restoration action and expiration time of the
+ // restored object copy.
+ Restore *string
+
+ // If server-side encryption with a customer-provided encryption key was requested,
+ // the response will include this header confirming the encryption algorithm used.
+ SSECustomerAlgorithm *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
+ // verification of the customer-provided encryption key.
+ SSECustomerKeyMD5 *string
+
+ // If present, specifies the ID of the Amazon Web Services Key Management Service
+ // (Amazon Web Services KMS) symmetric customer managed key that was used for the
+ // object.
+ SSEKMSKeyId *string
+
+ // The server-side encryption algorithm used when storing this object in Amazon S3
+ // (for example, AES256, aws:kms).
+ ServerSideEncryption types.ServerSideEncryption
+
+ // Provides storage class information of the object. Amazon S3 returns this header
+ // for all objects except for S3 Standard storage class objects.
+ StorageClass types.StorageClass
+
+ // The number of tags, if any, on the object.
+ TagCount int32
+
+ // Version of the object.
+ VersionId *string
+
+ // 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.
+ WebsiteRedirectLocation *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetObjectMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetObject{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetObject{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetObjectValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetObject(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetObjectUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetObject(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetObject",
+ }
+}
+
+// getGetObjectBucketMember returns a pointer to string denoting a provided bucket
+// member valueand a boolean indicating if the input has a modeled bucket name,
+func getGetObjectBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetObjectInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetObjectUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetObjectBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
+
+// PresignGetObject is used to generate a presigned HTTP Request which contains
+// presigned URL, signed headers and HTTP method used.
+func (c *PresignClient) PresignGetObject(ctx context.Context, params *GetObjectInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) {
+ if params == nil {
+ params = &GetObjectInput{}
+ }
+ options := c.options.copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption)
+
+ result, _, err := c.client.invokeOperation(ctx, "GetObject", params, clientOptFns,
+ c.client.addOperationGetObjectMiddlewares,
+ presignConverter(options).convertToPresignMiddleware,
+ addGetObjectPayloadAsUnsigned,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*v4.PresignedHTTPRequest)
+ return out, nil
+}
+
+func addGetObjectPayloadAsUnsigned(stack *middleware.Stack, options Options) error {
+ v4.RemoveContentSHA256HeaderMiddleware(stack)
+ v4.RemoveComputePayloadSHA256Middleware(stack)
+ return v4.AddUnsignedPayloadMiddleware(stack)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go
new file mode 100644
index 000000000..b260a8da9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go
@@ -0,0 +1,210 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns the access control list (ACL) of an object. To use this operation, you
+// must have READ_ACP access to the object. This action is not supported by Amazon
+// S3 on Outposts. 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+//
+// *
+// DeleteObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
+//
+// *
+// PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+func (c *Client) GetObjectAcl(ctx context.Context, params *GetObjectAclInput, optFns ...func(*Options)) (*GetObjectAclOutput, error) {
+ if params == nil {
+ params = &GetObjectAclInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetObjectAcl", params, optFns, c.addOperationGetObjectAclMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetObjectAclOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetObjectAclInput struct {
+
+ // The bucket name that contains the object for which to get the ACL information.
+ // When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The key of the object for which to get the ACL information.
+ //
+ // This member is required.
+ Key *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // VersionId used to reference a specific version of the object.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+type GetObjectAclOutput struct {
+
+ // A list of grants.
+ Grants []types.Grant
+
+ // Container for the bucket owner's display name and ID.
+ Owner *types.Owner
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetObjectAclMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetObjectAcl{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetObjectAcl{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetObjectAclValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetObjectAcl(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetObjectAclUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetObjectAcl(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetObjectAcl",
+ }
+}
+
+// getGetObjectAclBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getGetObjectAclBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetObjectAclInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetObjectAclUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetObjectAclBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go
new file mode 100644
index 000000000..75a6cfb29
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go
@@ -0,0 +1,190 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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). This
+// action is not supported by Amazon S3 on Outposts.
+func (c *Client) GetObjectLegalHold(ctx context.Context, params *GetObjectLegalHoldInput, optFns ...func(*Options)) (*GetObjectLegalHoldOutput, error) {
+ if params == nil {
+ params = &GetObjectLegalHoldInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetObjectLegalHold", params, optFns, c.addOperationGetObjectLegalHoldMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetObjectLegalHoldOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetObjectLegalHoldInput struct {
+
+ // The bucket name containing the object whose Legal Hold status you want to
+ // retrieve. When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The key name for the object whose Legal Hold status you want to retrieve.
+ //
+ // This member is required.
+ Key *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // The version ID of the object whose Legal Hold status you want to retrieve.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+type GetObjectLegalHoldOutput struct {
+
+ // The current Legal Hold status for the specified object.
+ LegalHold *types.ObjectLockLegalHold
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetObjectLegalHoldMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetObjectLegalHold{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetObjectLegalHold{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetObjectLegalHoldValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetObjectLegalHold(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetObjectLegalHoldUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetObjectLegalHold(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetObjectLegalHold",
+ }
+}
+
+// getGetObjectLegalHoldBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getGetObjectLegalHoldBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetObjectLegalHoldInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetObjectLegalHoldUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetObjectLegalHoldBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go
new file mode 100644
index 000000000..34f4a62a7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go
@@ -0,0 +1,175 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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).
+func (c *Client) GetObjectLockConfiguration(ctx context.Context, params *GetObjectLockConfigurationInput, optFns ...func(*Options)) (*GetObjectLockConfigurationOutput, error) {
+ if params == nil {
+ params = &GetObjectLockConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetObjectLockConfiguration", params, optFns, c.addOperationGetObjectLockConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetObjectLockConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetObjectLockConfigurationInput struct {
+
+ // The bucket whose Object Lock configuration you want to retrieve. When using this
+ // action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetObjectLockConfigurationOutput struct {
+
+ // The specified bucket's Object Lock configuration.
+ ObjectLockConfiguration *types.ObjectLockConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetObjectLockConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetObjectLockConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetObjectLockConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetObjectLockConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetObjectLockConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetObjectLockConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetObjectLockConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetObjectLockConfiguration",
+ }
+}
+
+// getGetObjectLockConfigurationBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getGetObjectLockConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetObjectLockConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetObjectLockConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetObjectLockConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go
new file mode 100644
index 000000000..7c23c795e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go
@@ -0,0 +1,190 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Retrieves an object's retention settings. For more information, see Locking
+// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). This
+// action is not supported by Amazon S3 on Outposts.
+func (c *Client) GetObjectRetention(ctx context.Context, params *GetObjectRetentionInput, optFns ...func(*Options)) (*GetObjectRetentionOutput, error) {
+ if params == nil {
+ params = &GetObjectRetentionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetObjectRetention", params, optFns, c.addOperationGetObjectRetentionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetObjectRetentionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetObjectRetentionInput struct {
+
+ // The bucket name containing the object whose retention settings you want to
+ // retrieve. When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The key name for the object whose retention settings you want to retrieve.
+ //
+ // This member is required.
+ Key *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // The version ID for the object whose retention settings you want to retrieve.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+type GetObjectRetentionOutput struct {
+
+ // The container element for an object's retention settings.
+ Retention *types.ObjectLockRetention
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetObjectRetentionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetObjectRetention{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetObjectRetention{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetObjectRetentionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetObjectRetention(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetObjectRetentionUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetObjectRetention(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetObjectRetention",
+ }
+}
+
+// getGetObjectRetentionBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getGetObjectRetentionBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetObjectRetentionInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetObjectRetentionUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetObjectRetentionBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go
new file mode 100644
index 000000000..bad763693
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go
@@ -0,0 +1,218 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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 action
+// 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 action is related to GetObjectTagging:
+//
+// * PutObjectTagging
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html)
+//
+// *
+// DeleteObjectTagging
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html)
+func (c *Client) GetObjectTagging(ctx context.Context, params *GetObjectTaggingInput, optFns ...func(*Options)) (*GetObjectTaggingOutput, error) {
+ if params == nil {
+ params = &GetObjectTaggingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetObjectTagging", params, optFns, c.addOperationGetObjectTaggingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetObjectTaggingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetObjectTaggingInput struct {
+
+ // The bucket name containing the object for which to get the tagging information.
+ // When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Object key for which to get the tagging information.
+ //
+ // This member is required.
+ Key *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // The versionId of the object for which to get the tagging information.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+type GetObjectTaggingOutput struct {
+
+ // Contains the tag set.
+ //
+ // This member is required.
+ TagSet []types.Tag
+
+ // The versionId of the object for which you got the tagging information.
+ VersionId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetObjectTaggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetObjectTagging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetObjectTagging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetObjectTaggingValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetObjectTagging(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetObjectTaggingUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetObjectTagging(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetObjectTagging",
+ }
+}
+
+// getGetObjectTaggingBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getGetObjectTaggingBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetObjectTaggingInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetObjectTaggingUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetObjectTaggingBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go
new file mode 100644
index 000000000..a8c7cdd49
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go
@@ -0,0 +1,190 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+)
+
+// Returns torrent files from a bucket. BitTorrent can save you bandwidth when
+// you're distributing large files. For more information about BitTorrent, see
+// Using BitTorrent with Amazon S3
+// (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 a customer-provided encryption key.
+// To use GET, you must have READ access to the object. This action is not
+// supported by Amazon S3 on Outposts. The following action is related to
+// GetObjectTorrent:
+//
+// * GetObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+func (c *Client) GetObjectTorrent(ctx context.Context, params *GetObjectTorrentInput, optFns ...func(*Options)) (*GetObjectTorrentOutput, error) {
+ if params == nil {
+ params = &GetObjectTorrentInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetObjectTorrent", params, optFns, c.addOperationGetObjectTorrentMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetObjectTorrentOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetObjectTorrentInput struct {
+
+ // The name of the bucket containing the object for which to get the torrent files.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The object key for which to get the information.
+ //
+ // This member is required.
+ Key *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ noSmithyDocumentSerde
+}
+
+type GetObjectTorrentOutput struct {
+
+ // A Bencoded dictionary as defined by the BitTorrent specification
+ Body io.ReadCloser
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetObjectTorrentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetObjectTorrent{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetObjectTorrent{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetObjectTorrentValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetObjectTorrent(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetObjectTorrentUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetObjectTorrent(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetObjectTorrent",
+ }
+}
+
+// getGetObjectTorrentBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getGetObjectTorrentBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetObjectTorrentInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetObjectTorrentUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetObjectTorrentBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go
new file mode 100644
index 000000000..16b957aa5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go
@@ -0,0 +1,195 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
+//
+// *
+// GetPublicAccessBlock
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
+//
+// *
+// DeletePublicAccessBlock
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
+func (c *Client) GetPublicAccessBlock(ctx context.Context, params *GetPublicAccessBlockInput, optFns ...func(*Options)) (*GetPublicAccessBlockOutput, error) {
+ if params == nil {
+ params = &GetPublicAccessBlockInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetPublicAccessBlock", params, optFns, c.addOperationGetPublicAccessBlockMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetPublicAccessBlockOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetPublicAccessBlockInput struct {
+
+ // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want
+ // to retrieve.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type GetPublicAccessBlockOutput struct {
+
+ // The PublicAccessBlock configuration currently in effect for this Amazon S3
+ // bucket.
+ PublicAccessBlockConfiguration *types.PublicAccessBlockConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetPublicAccessBlockMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetPublicAccessBlock{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetPublicAccessBlock{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetPublicAccessBlockValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPublicAccessBlock(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addGetPublicAccessBlockUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetPublicAccessBlock(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "GetPublicAccessBlock",
+ }
+}
+
+// getGetPublicAccessBlockBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getGetPublicAccessBlockBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetPublicAccessBlockInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetPublicAccessBlockUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetPublicAccessBlockBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go
new file mode 100644
index 000000000..1623e3452
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go
@@ -0,0 +1,509 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithytime "github.com/aws/smithy-go/time"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ smithywaiter "github.com/aws/smithy-go/waiter"
+ "time"
+)
+
+// This action is useful to determine if a bucket exists and you have permission to
+// access it. The action returns a 200 OK if the bucket exists and you have
+// permission to access it. If the bucket does not exist or you do not have
+// permission to access it, the HEAD request returns a generic 404 Not Found or 403
+// Forbidden code. A message body is not included, so you cannot determine the
+// exception beyond these error codes. 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/userguide/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/userguide/s3-access-control.html).
+// To use this API against an access point, you must provide the alias of the
+// access point in place of the bucket name or specify the access point ARN. When
+// using the access point ARN, 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 the
+// Amazon Web Services SDKs, you provide the ARN in place of the bucket name. For
+// more information see, Using access points
+// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html).
+func (c *Client) HeadBucket(ctx context.Context, params *HeadBucketInput, optFns ...func(*Options)) (*HeadBucketOutput, error) {
+ if params == nil {
+ params = &HeadBucketInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "HeadBucket", params, optFns, c.addOperationHeadBucketMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*HeadBucketOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type HeadBucketInput struct {
+
+ // The bucket name. When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type HeadBucketOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationHeadBucketMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpHeadBucket{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpHeadBucket{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpHeadBucketValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHeadBucket(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addHeadBucketUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+// HeadBucketAPIClient is a client that implements the HeadBucket operation.
+type HeadBucketAPIClient interface {
+ HeadBucket(context.Context, *HeadBucketInput, ...func(*Options)) (*HeadBucketOutput, error)
+}
+
+var _ HeadBucketAPIClient = (*Client)(nil)
+
+// BucketExistsWaiterOptions are waiter options for BucketExistsWaiter
+type BucketExistsWaiterOptions struct {
+
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // MinDelay is the minimum amount of time to delay between retries. If unset,
+ // BucketExistsWaiter will use default minimum delay of 5 seconds. Note that
+ // MinDelay must resolve to a value lesser than or equal to the MaxDelay.
+ MinDelay time.Duration
+
+ // MaxDelay is the maximum amount of time to delay between retries. If unset or set
+ // to zero, BucketExistsWaiter will use default max delay of 120 seconds. Note that
+ // MaxDelay must resolve to value greater than or equal to the MinDelay.
+ MaxDelay time.Duration
+
+ // LogWaitAttempts is used to enable logging for waiter retry attempts
+ LogWaitAttempts bool
+
+ // Retryable is function that can be used to override the service defined
+ // waiter-behavior based on operation output, or returned error. This function is
+ // used by the waiter to decide if a state is retryable or a terminal state. By
+ // default service-modeled logic will populate this option. This option can thus be
+ // used to define a custom waiter state with fall-back to service-modeled waiter
+ // state mutators.The function returns an error in case of a failure state. In case
+ // of retry state, this function returns a bool value of true and nil error, while
+ // in case of success it returns a bool value of false and nil error.
+ Retryable func(context.Context, *HeadBucketInput, *HeadBucketOutput, error) (bool, error)
+}
+
+// BucketExistsWaiter defines the waiters for BucketExists
+type BucketExistsWaiter struct {
+ client HeadBucketAPIClient
+
+ options BucketExistsWaiterOptions
+}
+
+// NewBucketExistsWaiter constructs a BucketExistsWaiter.
+func NewBucketExistsWaiter(client HeadBucketAPIClient, optFns ...func(*BucketExistsWaiterOptions)) *BucketExistsWaiter {
+ options := BucketExistsWaiterOptions{}
+ options.MinDelay = 5 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = bucketExistsStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &BucketExistsWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for BucketExists waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *BucketExistsWaiter) Wait(ctx context.Context, params *HeadBucketInput, maxWaitDur time.Duration, optFns ...func(*BucketExistsWaiterOptions)) error {
+ _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
+ return err
+}
+
+// WaitForOutput calls the waiter function for BucketExists waiter and returns the
+// output of the successful operation. The maxWaitDur is the maximum wait duration
+// the waiter will wait. The maxWaitDur is required and must be greater than zero.
+func (w *BucketExistsWaiter) WaitForOutput(ctx context.Context, params *HeadBucketInput, maxWaitDur time.Duration, optFns ...func(*BucketExistsWaiterOptions)) (*HeadBucketOutput, error) {
+ if maxWaitDur <= 0 {
+ return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
+ }
+
+ options := w.options
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.MaxDelay <= 0 {
+ options.MaxDelay = 120 * time.Second
+ }
+
+ if options.MinDelay > options.MaxDelay {
+ return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
+ }
+
+ ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
+ defer cancelFn()
+
+ logger := smithywaiter.Logger{}
+ remainingTime := maxWaitDur
+
+ var attempt int64
+ for {
+
+ attempt++
+ apiOptions := options.APIOptions
+ start := time.Now()
+
+ if options.LogWaitAttempts {
+ logger.Attempt = attempt
+ apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
+ apiOptions = append(apiOptions, logger.AddLogger)
+ }
+
+ out, err := w.client.HeadBucket(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return nil, err
+ }
+ if !retryable {
+ return out, nil
+ }
+
+ remainingTime -= time.Since(start)
+ if remainingTime < options.MinDelay || remainingTime <= 0 {
+ break
+ }
+
+ // compute exponential backoff between waiter retries
+ delay, err := smithywaiter.ComputeDelay(
+ attempt, options.MinDelay, options.MaxDelay, remainingTime,
+ )
+ if err != nil {
+ return nil, fmt.Errorf("error computing waiter delay, %w", err)
+ }
+
+ remainingTime -= delay
+ // sleep for the delay amount before invoking a request
+ if err := smithytime.SleepWithContext(ctx, delay); err != nil {
+ return nil, fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return nil, fmt.Errorf("exceeded max wait time for BucketExists waiter")
+}
+
+func bucketExistsStateRetryable(ctx context.Context, input *HeadBucketInput, output *HeadBucketOutput, err error) (bool, error) {
+
+ if err == nil {
+ return false, nil
+ }
+
+ if err != nil {
+ var errorType *types.NotFound
+ if errors.As(err, &errorType) {
+ return true, nil
+ }
+ }
+
+ return true, nil
+}
+
+// BucketNotExistsWaiterOptions are waiter options for BucketNotExistsWaiter
+type BucketNotExistsWaiterOptions struct {
+
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // MinDelay is the minimum amount of time to delay between retries. If unset,
+ // BucketNotExistsWaiter will use default minimum delay of 5 seconds. Note that
+ // MinDelay must resolve to a value lesser than or equal to the MaxDelay.
+ MinDelay time.Duration
+
+ // MaxDelay is the maximum amount of time to delay between retries. If unset or set
+ // to zero, BucketNotExistsWaiter will use default max delay of 120 seconds. Note
+ // that MaxDelay must resolve to value greater than or equal to the MinDelay.
+ MaxDelay time.Duration
+
+ // LogWaitAttempts is used to enable logging for waiter retry attempts
+ LogWaitAttempts bool
+
+ // Retryable is function that can be used to override the service defined
+ // waiter-behavior based on operation output, or returned error. This function is
+ // used by the waiter to decide if a state is retryable or a terminal state. By
+ // default service-modeled logic will populate this option. This option can thus be
+ // used to define a custom waiter state with fall-back to service-modeled waiter
+ // state mutators.The function returns an error in case of a failure state. In case
+ // of retry state, this function returns a bool value of true and nil error, while
+ // in case of success it returns a bool value of false and nil error.
+ Retryable func(context.Context, *HeadBucketInput, *HeadBucketOutput, error) (bool, error)
+}
+
+// BucketNotExistsWaiter defines the waiters for BucketNotExists
+type BucketNotExistsWaiter struct {
+ client HeadBucketAPIClient
+
+ options BucketNotExistsWaiterOptions
+}
+
+// NewBucketNotExistsWaiter constructs a BucketNotExistsWaiter.
+func NewBucketNotExistsWaiter(client HeadBucketAPIClient, optFns ...func(*BucketNotExistsWaiterOptions)) *BucketNotExistsWaiter {
+ options := BucketNotExistsWaiterOptions{}
+ options.MinDelay = 5 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = bucketNotExistsStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &BucketNotExistsWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for BucketNotExists waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *BucketNotExistsWaiter) Wait(ctx context.Context, params *HeadBucketInput, maxWaitDur time.Duration, optFns ...func(*BucketNotExistsWaiterOptions)) error {
+ _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
+ return err
+}
+
+// WaitForOutput calls the waiter function for BucketNotExists waiter and returns
+// the output of the successful operation. The maxWaitDur is the maximum wait
+// duration the waiter will wait. The maxWaitDur is required and must be greater
+// than zero.
+func (w *BucketNotExistsWaiter) WaitForOutput(ctx context.Context, params *HeadBucketInput, maxWaitDur time.Duration, optFns ...func(*BucketNotExistsWaiterOptions)) (*HeadBucketOutput, error) {
+ if maxWaitDur <= 0 {
+ return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
+ }
+
+ options := w.options
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.MaxDelay <= 0 {
+ options.MaxDelay = 120 * time.Second
+ }
+
+ if options.MinDelay > options.MaxDelay {
+ return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
+ }
+
+ ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
+ defer cancelFn()
+
+ logger := smithywaiter.Logger{}
+ remainingTime := maxWaitDur
+
+ var attempt int64
+ for {
+
+ attempt++
+ apiOptions := options.APIOptions
+ start := time.Now()
+
+ if options.LogWaitAttempts {
+ logger.Attempt = attempt
+ apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
+ apiOptions = append(apiOptions, logger.AddLogger)
+ }
+
+ out, err := w.client.HeadBucket(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return nil, err
+ }
+ if !retryable {
+ return out, nil
+ }
+
+ remainingTime -= time.Since(start)
+ if remainingTime < options.MinDelay || remainingTime <= 0 {
+ break
+ }
+
+ // compute exponential backoff between waiter retries
+ delay, err := smithywaiter.ComputeDelay(
+ attempt, options.MinDelay, options.MaxDelay, remainingTime,
+ )
+ if err != nil {
+ return nil, fmt.Errorf("error computing waiter delay, %w", err)
+ }
+
+ remainingTime -= delay
+ // sleep for the delay amount before invoking a request
+ if err := smithytime.SleepWithContext(ctx, delay); err != nil {
+ return nil, fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return nil, fmt.Errorf("exceeded max wait time for BucketNotExists waiter")
+}
+
+func bucketNotExistsStateRetryable(ctx context.Context, input *HeadBucketInput, output *HeadBucketOutput, err error) (bool, error) {
+
+ if err != nil {
+ var errorType *types.NotFound
+ if errors.As(err, &errorType) {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opHeadBucket(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "HeadBucket",
+ }
+}
+
+// getHeadBucketBucketMember returns a pointer to string denoting a provided bucket
+// member valueand a boolean indicating if the input has a modeled bucket name,
+func getHeadBucketBucketMember(input interface{}) (*string, bool) {
+ in := input.(*HeadBucketInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addHeadBucketUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getHeadBucketBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go
new file mode 100644
index 000000000..875c5cc62
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go
@@ -0,0 +1,843 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+ smithytime "github.com/aws/smithy-go/time"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ smithywaiter "github.com/aws/smithy-go/waiter"
+ "time"
+)
+
+// The HEAD action retrieves metadata from an object without returning the object
+// itself. This action 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 action on an object. The response is identical to the GET
+// response except that there is no response body. Because of this, if the HEAD
+// request generates an error, it returns a generic 404 Not Found or 403 Forbidden
+// code. It is not possible to retrieve the exact exception beyond these error
+// codes. 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 KMS keys
+// (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.
+//
+// * The last modified property in this case is the creation
+// date of the object.
+//
+// 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 relevant read
+// object (or version) 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 action is related to HeadObject:
+//
+// * GetObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+func (c *Client) HeadObject(ctx context.Context, params *HeadObjectInput, optFns ...func(*Options)) (*HeadObjectOutput, error) {
+ if params == nil {
+ params = &HeadObjectInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "HeadObject", params, optFns, c.addOperationHeadObjectMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*HeadObjectOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type HeadObjectInput struct {
+
+ // The name of the bucket containing the object. When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The object key.
+ //
+ // This member is required.
+ Key *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // Return the object only if its entity tag (ETag) is the same as the one
+ // specified, otherwise return a 412 (precondition failed).
+ IfMatch *string
+
+ // Return the object only if it has been modified since the specified time,
+ // otherwise return a 304 (not modified).
+ IfModifiedSince *time.Time
+
+ // Return the object only if its entity tag (ETag) is different from the one
+ // specified, otherwise return a 304 (not modified).
+ IfNoneMatch *string
+
+ // Return the object only if it has not been modified since the specified time,
+ // otherwise return a 412 (precondition failed).
+ IfUnmodifiedSince *time.Time
+
+ // Part number of the object being read. This is a positive integer between 1 and
+ // 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
+ // Useful querying about the size of the part and the number of parts in this
+ // object.
+ PartNumber int32
+
+ // Downloads the specified range bytes of an object. For more information about the
+ // HTTP Range header, see
+ // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
+ // (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
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // Specifies the algorithm to use to when encrypting the object (for example,
+ // AES256).
+ SSECustomerAlgorithm *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 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
+
+ // 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 that the
+ // encryption key was transmitted without error.
+ SSECustomerKeyMD5 *string
+
+ // VersionId used to reference a specific version of the object.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+type HeadObjectOutput struct {
+
+ // Indicates that a range of bytes was specified.
+ AcceptRanges *string
+
+ // The archive state of the head object.
+ ArchiveStatus types.ArchiveStatus
+
+ // Indicates whether the object uses an S3 Bucket Key for server-side encryption
+ // with Amazon Web Services KMS (SSE-KMS).
+ BucketKeyEnabled bool
+
+ // Specifies caching behavior along the request/reply chain.
+ CacheControl *string
+
+ // Specifies presentational information for the object.
+ ContentDisposition *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.
+ ContentEncoding *string
+
+ // The language the content is in.
+ ContentLanguage *string
+
+ // Size of the body in bytes.
+ ContentLength int64
+
+ // A standard MIME type describing the format of the object data.
+ ContentType *string
+
+ // Specifies whether the object retrieved was (true) or was not (false) a Delete
+ // Marker. If false, this response header does not appear in the response.
+ DeleteMarker bool
+
+ // An ETag is an opaque identifier assigned by a web server to a specific version
+ // of a resource found at a URL.
+ ETag *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
+ // providing object expiration information. The value of the rule-id is URL
+ // encoded.
+ Expiration *string
+
+ // The date and time at which the object is no longer cacheable.
+ Expires *time.Time
+
+ // Creation date of the object.
+ LastModified *time.Time
+
+ // A map of metadata to store with the object in S3.
+ //
+ // Map keys will be normalized to lower-case.
+ Metadata map[string]string
+
+ // This is set to the number of metadata entries not returned in x-amz-meta
+ // headers. This can happen if you create metadata using an API like SOAP that
+ // supports more flexible metadata than the REST API. For example, using SOAP, you
+ // can create metadata whose values are not legal HTTP headers.
+ MissingMeta int32
+
+ // 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 types.ObjectLockLegalHoldStatus
+
+ // 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 types.ObjectLockMode
+
+ // 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
+
+ // The count of parts this object has.
+ PartsCount int32
+
+ // Amazon S3 can return this header if your request involves a bucket that is
+ // either a source or a destination in a replication rule. In replication, you have
+ // a source bucket on which you configure replication and destination bucket or
+ // buckets 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 a 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 and there is no replica modification
+ // replication in progress.
+ //
+ // * When replicating objects to multiple destination
+ // buckets the x-amz-replication-status header acts differently. The header of the
+ // source object will only return a value of COMPLETED when replication is
+ // successful to all destinations. The header will remain at value PENDING until
+ // replication has completed for all destinations. If one or more destinations
+ // fails replication the header will return FAILED.
+ //
+ // For more information, see
+ // Replication
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html).
+ ReplicationStatus types.ReplicationStatus
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // 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
+ // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html) 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, 21 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
+
+ // If server-side encryption with a customer-provided encryption key was requested,
+ // the response will include this header confirming the encryption algorithm used.
+ SSECustomerAlgorithm *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
+ // verification of the customer-provided encryption key.
+ SSECustomerKeyMD5 *string
+
+ // If present, specifies the ID of the Amazon Web Services Key Management Service
+ // (Amazon Web Services KMS) symmetric customer managed key that was used for the
+ // object.
+ SSEKMSKeyId *string
+
+ // If the object is stored using server-side encryption either with an Amazon Web
+ // Services KMS key 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 types.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 types.StorageClass
+
+ // Version of the object.
+ VersionId *string
+
+ // 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.
+ WebsiteRedirectLocation *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationHeadObjectMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpHeadObject{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpHeadObject{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpHeadObjectValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHeadObject(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addHeadObjectUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+// HeadObjectAPIClient is a client that implements the HeadObject operation.
+type HeadObjectAPIClient interface {
+ HeadObject(context.Context, *HeadObjectInput, ...func(*Options)) (*HeadObjectOutput, error)
+}
+
+var _ HeadObjectAPIClient = (*Client)(nil)
+
+// ObjectExistsWaiterOptions are waiter options for ObjectExistsWaiter
+type ObjectExistsWaiterOptions struct {
+
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // MinDelay is the minimum amount of time to delay between retries. If unset,
+ // ObjectExistsWaiter will use default minimum delay of 5 seconds. Note that
+ // MinDelay must resolve to a value lesser than or equal to the MaxDelay.
+ MinDelay time.Duration
+
+ // MaxDelay is the maximum amount of time to delay between retries. If unset or set
+ // to zero, ObjectExistsWaiter will use default max delay of 120 seconds. Note that
+ // MaxDelay must resolve to value greater than or equal to the MinDelay.
+ MaxDelay time.Duration
+
+ // LogWaitAttempts is used to enable logging for waiter retry attempts
+ LogWaitAttempts bool
+
+ // Retryable is function that can be used to override the service defined
+ // waiter-behavior based on operation output, or returned error. This function is
+ // used by the waiter to decide if a state is retryable or a terminal state. By
+ // default service-modeled logic will populate this option. This option can thus be
+ // used to define a custom waiter state with fall-back to service-modeled waiter
+ // state mutators.The function returns an error in case of a failure state. In case
+ // of retry state, this function returns a bool value of true and nil error, while
+ // in case of success it returns a bool value of false and nil error.
+ Retryable func(context.Context, *HeadObjectInput, *HeadObjectOutput, error) (bool, error)
+}
+
+// ObjectExistsWaiter defines the waiters for ObjectExists
+type ObjectExistsWaiter struct {
+ client HeadObjectAPIClient
+
+ options ObjectExistsWaiterOptions
+}
+
+// NewObjectExistsWaiter constructs a ObjectExistsWaiter.
+func NewObjectExistsWaiter(client HeadObjectAPIClient, optFns ...func(*ObjectExistsWaiterOptions)) *ObjectExistsWaiter {
+ options := ObjectExistsWaiterOptions{}
+ options.MinDelay = 5 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = objectExistsStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &ObjectExistsWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for ObjectExists waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *ObjectExistsWaiter) Wait(ctx context.Context, params *HeadObjectInput, maxWaitDur time.Duration, optFns ...func(*ObjectExistsWaiterOptions)) error {
+ _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
+ return err
+}
+
+// WaitForOutput calls the waiter function for ObjectExists waiter and returns the
+// output of the successful operation. The maxWaitDur is the maximum wait duration
+// the waiter will wait. The maxWaitDur is required and must be greater than zero.
+func (w *ObjectExistsWaiter) WaitForOutput(ctx context.Context, params *HeadObjectInput, maxWaitDur time.Duration, optFns ...func(*ObjectExistsWaiterOptions)) (*HeadObjectOutput, error) {
+ if maxWaitDur <= 0 {
+ return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
+ }
+
+ options := w.options
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.MaxDelay <= 0 {
+ options.MaxDelay = 120 * time.Second
+ }
+
+ if options.MinDelay > options.MaxDelay {
+ return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
+ }
+
+ ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
+ defer cancelFn()
+
+ logger := smithywaiter.Logger{}
+ remainingTime := maxWaitDur
+
+ var attempt int64
+ for {
+
+ attempt++
+ apiOptions := options.APIOptions
+ start := time.Now()
+
+ if options.LogWaitAttempts {
+ logger.Attempt = attempt
+ apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
+ apiOptions = append(apiOptions, logger.AddLogger)
+ }
+
+ out, err := w.client.HeadObject(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return nil, err
+ }
+ if !retryable {
+ return out, nil
+ }
+
+ remainingTime -= time.Since(start)
+ if remainingTime < options.MinDelay || remainingTime <= 0 {
+ break
+ }
+
+ // compute exponential backoff between waiter retries
+ delay, err := smithywaiter.ComputeDelay(
+ attempt, options.MinDelay, options.MaxDelay, remainingTime,
+ )
+ if err != nil {
+ return nil, fmt.Errorf("error computing waiter delay, %w", err)
+ }
+
+ remainingTime -= delay
+ // sleep for the delay amount before invoking a request
+ if err := smithytime.SleepWithContext(ctx, delay); err != nil {
+ return nil, fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return nil, fmt.Errorf("exceeded max wait time for ObjectExists waiter")
+}
+
+func objectExistsStateRetryable(ctx context.Context, input *HeadObjectInput, output *HeadObjectOutput, err error) (bool, error) {
+
+ if err == nil {
+ return false, nil
+ }
+
+ if err != nil {
+ var apiErr smithy.APIError
+ ok := errors.As(err, &apiErr)
+ if !ok {
+ return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
+ }
+
+ if "NotFound" == apiErr.ErrorCode() {
+ return true, nil
+ }
+ }
+
+ return true, nil
+}
+
+// ObjectNotExistsWaiterOptions are waiter options for ObjectNotExistsWaiter
+type ObjectNotExistsWaiterOptions struct {
+
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // MinDelay is the minimum amount of time to delay between retries. If unset,
+ // ObjectNotExistsWaiter will use default minimum delay of 5 seconds. Note that
+ // MinDelay must resolve to a value lesser than or equal to the MaxDelay.
+ MinDelay time.Duration
+
+ // MaxDelay is the maximum amount of time to delay between retries. If unset or set
+ // to zero, ObjectNotExistsWaiter will use default max delay of 120 seconds. Note
+ // that MaxDelay must resolve to value greater than or equal to the MinDelay.
+ MaxDelay time.Duration
+
+ // LogWaitAttempts is used to enable logging for waiter retry attempts
+ LogWaitAttempts bool
+
+ // Retryable is function that can be used to override the service defined
+ // waiter-behavior based on operation output, or returned error. This function is
+ // used by the waiter to decide if a state is retryable or a terminal state. By
+ // default service-modeled logic will populate this option. This option can thus be
+ // used to define a custom waiter state with fall-back to service-modeled waiter
+ // state mutators.The function returns an error in case of a failure state. In case
+ // of retry state, this function returns a bool value of true and nil error, while
+ // in case of success it returns a bool value of false and nil error.
+ Retryable func(context.Context, *HeadObjectInput, *HeadObjectOutput, error) (bool, error)
+}
+
+// ObjectNotExistsWaiter defines the waiters for ObjectNotExists
+type ObjectNotExistsWaiter struct {
+ client HeadObjectAPIClient
+
+ options ObjectNotExistsWaiterOptions
+}
+
+// NewObjectNotExistsWaiter constructs a ObjectNotExistsWaiter.
+func NewObjectNotExistsWaiter(client HeadObjectAPIClient, optFns ...func(*ObjectNotExistsWaiterOptions)) *ObjectNotExistsWaiter {
+ options := ObjectNotExistsWaiterOptions{}
+ options.MinDelay = 5 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = objectNotExistsStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &ObjectNotExistsWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for ObjectNotExists waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *ObjectNotExistsWaiter) Wait(ctx context.Context, params *HeadObjectInput, maxWaitDur time.Duration, optFns ...func(*ObjectNotExistsWaiterOptions)) error {
+ _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
+ return err
+}
+
+// WaitForOutput calls the waiter function for ObjectNotExists waiter and returns
+// the output of the successful operation. The maxWaitDur is the maximum wait
+// duration the waiter will wait. The maxWaitDur is required and must be greater
+// than zero.
+func (w *ObjectNotExistsWaiter) WaitForOutput(ctx context.Context, params *HeadObjectInput, maxWaitDur time.Duration, optFns ...func(*ObjectNotExistsWaiterOptions)) (*HeadObjectOutput, error) {
+ if maxWaitDur <= 0 {
+ return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
+ }
+
+ options := w.options
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.MaxDelay <= 0 {
+ options.MaxDelay = 120 * time.Second
+ }
+
+ if options.MinDelay > options.MaxDelay {
+ return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
+ }
+
+ ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
+ defer cancelFn()
+
+ logger := smithywaiter.Logger{}
+ remainingTime := maxWaitDur
+
+ var attempt int64
+ for {
+
+ attempt++
+ apiOptions := options.APIOptions
+ start := time.Now()
+
+ if options.LogWaitAttempts {
+ logger.Attempt = attempt
+ apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
+ apiOptions = append(apiOptions, logger.AddLogger)
+ }
+
+ out, err := w.client.HeadObject(ctx, params, func(o *Options) {
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return nil, err
+ }
+ if !retryable {
+ return out, nil
+ }
+
+ remainingTime -= time.Since(start)
+ if remainingTime < options.MinDelay || remainingTime <= 0 {
+ break
+ }
+
+ // compute exponential backoff between waiter retries
+ delay, err := smithywaiter.ComputeDelay(
+ attempt, options.MinDelay, options.MaxDelay, remainingTime,
+ )
+ if err != nil {
+ return nil, fmt.Errorf("error computing waiter delay, %w", err)
+ }
+
+ remainingTime -= delay
+ // sleep for the delay amount before invoking a request
+ if err := smithytime.SleepWithContext(ctx, delay); err != nil {
+ return nil, fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return nil, fmt.Errorf("exceeded max wait time for ObjectNotExists waiter")
+}
+
+func objectNotExistsStateRetryable(ctx context.Context, input *HeadObjectInput, output *HeadObjectOutput, err error) (bool, error) {
+
+ if err != nil {
+ var apiErr smithy.APIError
+ ok := errors.As(err, &apiErr)
+ if !ok {
+ return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err)
+ }
+
+ if "NotFound" == apiErr.ErrorCode() {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+func newServiceMetadataMiddleware_opHeadObject(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "HeadObject",
+ }
+}
+
+// getHeadObjectBucketMember returns a pointer to string denoting a provided bucket
+// member valueand a boolean indicating if the input has a modeled bucket name,
+func getHeadObjectBucketMember(input interface{}) (*string, bool) {
+ in := input.(*HeadObjectInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addHeadObjectUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getHeadObjectBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
+
+// PresignHeadObject is used to generate a presigned HTTP Request which contains
+// presigned URL, signed headers and HTTP method used.
+func (c *PresignClient) PresignHeadObject(ctx context.Context, params *HeadObjectInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) {
+ if params == nil {
+ params = &HeadObjectInput{}
+ }
+ options := c.options.copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption)
+
+ result, _, err := c.client.invokeOperation(ctx, "HeadObject", params, clientOptFns,
+ c.client.addOperationHeadObjectMiddlewares,
+ presignConverter(options).convertToPresignMiddleware,
+ addHeadObjectPayloadAsUnsigned,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*v4.PresignedHTTPRequest)
+ return out, nil
+}
+
+func addHeadObjectPayloadAsUnsigned(stack *middleware.Stack, options Options) error {
+ v4.RemoveContentSHA256HeaderMiddleware(stack)
+ v4.RemoveComputePayloadSHA256Middleware(stack)
+ return v4.AddUnsignedPayloadMiddleware(stack)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go
new file mode 100644
index 000000000..e2b24a91d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go
@@ -0,0 +1,213 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Lists the analytics configurations for the bucket. You can have up to 1,000
+// analytics configurations per bucket. This action 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/userguide/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/userguide/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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
+//
+// *
+// DeleteBucketAnalyticsConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
+//
+// *
+// PutBucketAnalyticsConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
+func (c *Client) ListBucketAnalyticsConfigurations(ctx context.Context, params *ListBucketAnalyticsConfigurationsInput, optFns ...func(*Options)) (*ListBucketAnalyticsConfigurationsOutput, error) {
+ if params == nil {
+ params = &ListBucketAnalyticsConfigurationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListBucketAnalyticsConfigurations", params, optFns, c.addOperationListBucketAnalyticsConfigurationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListBucketAnalyticsConfigurationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListBucketAnalyticsConfigurationsInput struct {
+
+ // The name of the bucket from which analytics configurations are retrieved.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The ContinuationToken that represents a placeholder from where this request
+ // should begin.
+ ContinuationToken *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type ListBucketAnalyticsConfigurationsOutput struct {
+
+ // The list of analytics configurations for a bucket.
+ AnalyticsConfigurationList []types.AnalyticsConfiguration
+
+ // 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
+
+ // Indicates whether the returned list of analytics configurations is complete. A
+ // value of true indicates that the list is not complete and the
+ // NextContinuationToken will be provided for a subsequent request.
+ IsTruncated bool
+
+ // NextContinuationToken is sent when isTruncated is true, which indicates that
+ // there are more analytics configurations to list. The next request must include
+ // this NextContinuationToken. The token is obfuscated and is not a usable value.
+ NextContinuationToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListBucketAnalyticsConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpListBucketAnalyticsConfigurations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpListBucketAnalyticsConfigurations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListBucketAnalyticsConfigurationsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBucketAnalyticsConfigurations(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addListBucketAnalyticsConfigurationsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opListBucketAnalyticsConfigurations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "ListBucketAnalyticsConfigurations",
+ }
+}
+
+// getListBucketAnalyticsConfigurationsBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getListBucketAnalyticsConfigurationsBucketMember(input interface{}) (*string, bool) {
+ in := input.(*ListBucketAnalyticsConfigurationsInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addListBucketAnalyticsConfigurationsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getListBucketAnalyticsConfigurationsBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go
new file mode 100644
index 000000000..9309e619d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go
@@ -0,0 +1,206 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Lists the S3 Intelligent-Tiering configuration from the specified bucket. The S3
+// Intelligent-Tiering storage class is designed to optimize storage costs by
+// automatically moving data to the most cost-effective storage access tier,
+// without performance impact or operational overhead. S3 Intelligent-Tiering
+// delivers automatic cost savings in two low latency and high throughput access
+// tiers. For data that can be accessed asynchronously, you can choose to activate
+// automatic archiving capabilities within the S3 Intelligent-Tiering storage
+// class. The S3 Intelligent-Tiering storage class is the ideal storage class for
+// data with unknown, changing, or unpredictable access patterns, independent of
+// object size or retention period. If the size of an object is less than 128 KB,
+// it is not eligible for auto-tiering. Smaller objects can be stored, but they are
+// always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering
+// storage class. For more information, see Storage class for automatically
+// optimizing frequently and infrequently accessed objects
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
+// Operations related to ListBucketIntelligentTieringConfigurations include:
+//
+// *
+// DeleteBucketIntelligentTieringConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
+//
+// *
+// PutBucketIntelligentTieringConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
+//
+// *
+// GetBucketIntelligentTieringConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
+func (c *Client) ListBucketIntelligentTieringConfigurations(ctx context.Context, params *ListBucketIntelligentTieringConfigurationsInput, optFns ...func(*Options)) (*ListBucketIntelligentTieringConfigurationsOutput, error) {
+ if params == nil {
+ params = &ListBucketIntelligentTieringConfigurationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListBucketIntelligentTieringConfigurations", params, optFns, c.addOperationListBucketIntelligentTieringConfigurationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListBucketIntelligentTieringConfigurationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListBucketIntelligentTieringConfigurationsInput struct {
+
+ // The name of the Amazon S3 bucket whose configuration you want to modify or
+ // retrieve.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The ContinuationToken that represents a placeholder from where this request
+ // should begin.
+ ContinuationToken *string
+
+ noSmithyDocumentSerde
+}
+
+type ListBucketIntelligentTieringConfigurationsOutput struct {
+
+ // The ContinuationToken that represents a placeholder from where this request
+ // should begin.
+ ContinuationToken *string
+
+ // The list of S3 Intelligent-Tiering configurations for a bucket.
+ IntelligentTieringConfigurationList []types.IntelligentTieringConfiguration
+
+ // Indicates whether the returned list of analytics configurations is complete. A
+ // value of true indicates that the list is not complete and the
+ // NextContinuationToken will be provided for a subsequent request.
+ IsTruncated bool
+
+ // The marker used to continue this inventory configuration listing. Use the
+ // NextContinuationToken from this response to continue the listing in a subsequent
+ // request. The continuation token is an opaque value that Amazon S3 understands.
+ NextContinuationToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListBucketIntelligentTieringConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpListBucketIntelligentTieringConfigurations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpListBucketIntelligentTieringConfigurations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListBucketIntelligentTieringConfigurationsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBucketIntelligentTieringConfigurations(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addListBucketIntelligentTieringConfigurationsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opListBucketIntelligentTieringConfigurations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "ListBucketIntelligentTieringConfigurations",
+ }
+}
+
+// getListBucketIntelligentTieringConfigurationsBucketMember returns a pointer to
+// string denoting a provided bucket member valueand a boolean indicating if the
+// input has a modeled bucket name,
+func getListBucketIntelligentTieringConfigurationsBucketMember(input interface{}) (*string, bool) {
+ in := input.(*ListBucketIntelligentTieringConfigurationsInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addListBucketIntelligentTieringConfigurationsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getListBucketIntelligentTieringConfigurationsBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go
new file mode 100644
index 000000000..8dc32152f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go
@@ -0,0 +1,214 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a list of inventory configurations for the bucket. You can have up to
+// 1,000 analytics configurations per bucket. This action 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/userguide/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/userguide/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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
+//
+// *
+// DeleteBucketInventoryConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
+//
+// *
+// PutBucketInventoryConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
+func (c *Client) ListBucketInventoryConfigurations(ctx context.Context, params *ListBucketInventoryConfigurationsInput, optFns ...func(*Options)) (*ListBucketInventoryConfigurationsOutput, error) {
+ if params == nil {
+ params = &ListBucketInventoryConfigurationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListBucketInventoryConfigurations", params, optFns, c.addOperationListBucketInventoryConfigurationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListBucketInventoryConfigurationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListBucketInventoryConfigurationsInput struct {
+
+ // The name of the bucket containing the inventory configurations to retrieve.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The marker used to continue an inventory configuration listing that has been
+ // truncated. Use the NextContinuationToken from a previously truncated list
+ // response to continue the listing. The continuation token is an opaque value that
+ // Amazon S3 understands.
+ ContinuationToken *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type ListBucketInventoryConfigurationsOutput struct {
+
+ // If sent in the request, the marker that is used as a starting point for this
+ // inventory configuration list response.
+ ContinuationToken *string
+
+ // The list of inventory configurations for a bucket.
+ InventoryConfigurationList []types.InventoryConfiguration
+
+ // 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
+
+ // The marker used to continue this inventory configuration listing. Use the
+ // NextContinuationToken from this response to continue the listing in a subsequent
+ // request. The continuation token is an opaque value that Amazon S3 understands.
+ NextContinuationToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListBucketInventoryConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpListBucketInventoryConfigurations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpListBucketInventoryConfigurations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListBucketInventoryConfigurationsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBucketInventoryConfigurations(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addListBucketInventoryConfigurationsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opListBucketInventoryConfigurations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "ListBucketInventoryConfigurations",
+ }
+}
+
+// getListBucketInventoryConfigurationsBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getListBucketInventoryConfigurationsBucketMember(input interface{}) (*string, bool) {
+ in := input.(*ListBucketInventoryConfigurationsInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addListBucketInventoryConfigurationsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getListBucketInventoryConfigurationsBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go
new file mode 100644
index 000000000..fdd73096d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go
@@ -0,0 +1,217 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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
+// action 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/userguide/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/userguide/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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
+//
+// *
+// GetBucketMetricsConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
+//
+// *
+// DeleteBucketMetricsConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
+func (c *Client) ListBucketMetricsConfigurations(ctx context.Context, params *ListBucketMetricsConfigurationsInput, optFns ...func(*Options)) (*ListBucketMetricsConfigurationsOutput, error) {
+ if params == nil {
+ params = &ListBucketMetricsConfigurationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListBucketMetricsConfigurations", params, optFns, c.addOperationListBucketMetricsConfigurationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListBucketMetricsConfigurationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListBucketMetricsConfigurationsInput struct {
+
+ // The name of the bucket containing the metrics configurations to retrieve.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The marker that is used to continue a metrics configuration listing that has
+ // been truncated. Use the NextContinuationToken from a previously truncated list
+ // response to continue the listing. The continuation token is an opaque value that
+ // Amazon S3 understands.
+ ContinuationToken *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type ListBucketMetricsConfigurationsOutput struct {
+
+ // The marker that is used as a starting point for this metrics configuration list
+ // response. This value is present if it was sent in the request.
+ ContinuationToken *string
+
+ // Indicates whether the returned list of metrics configurations is complete. A
+ // value of true indicates that the list is not complete and the
+ // NextContinuationToken will be provided for a subsequent request.
+ IsTruncated bool
+
+ // The list of metrics configurations for a bucket.
+ MetricsConfigurationList []types.MetricsConfiguration
+
+ // The marker used to continue a metrics configuration listing that has been
+ // truncated. Use the NextContinuationToken from a previously truncated list
+ // response to continue the listing. The continuation token is an opaque value that
+ // Amazon S3 understands.
+ NextContinuationToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListBucketMetricsConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpListBucketMetricsConfigurations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpListBucketMetricsConfigurations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListBucketMetricsConfigurationsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBucketMetricsConfigurations(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addListBucketMetricsConfigurationsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opListBucketMetricsConfigurations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "ListBucketMetricsConfigurations",
+ }
+}
+
+// getListBucketMetricsConfigurationsBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getListBucketMetricsConfigurationsBucketMember(input interface{}) (*string, bool) {
+ in := input.(*ListBucketMetricsConfigurationsInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addListBucketMetricsConfigurationsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getListBucketMetricsConfigurationsBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go
new file mode 100644
index 000000000..54abd9fdd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go
@@ -0,0 +1,144 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a list of all buckets owned by the authenticated sender of the request.
+func (c *Client) ListBuckets(ctx context.Context, params *ListBucketsInput, optFns ...func(*Options)) (*ListBucketsOutput, error) {
+ if params == nil {
+ params = &ListBucketsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListBuckets", params, optFns, c.addOperationListBucketsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListBucketsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListBucketsInput struct {
+ noSmithyDocumentSerde
+}
+
+type ListBucketsOutput struct {
+
+ // The list of buckets owned by the requestor.
+ Buckets []types.Bucket
+
+ // The owner of the buckets listed.
+ Owner *types.Owner
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListBucketsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpListBuckets{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpListBuckets{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBuckets(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addListBucketsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opListBuckets(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "ListBuckets",
+ }
+}
+
+func addListBucketsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: nopGetBucketAccessor,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: false,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go
new file mode 100644
index 000000000..9fff7280c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go
@@ -0,0 +1,309 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// This action 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 action 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 and Permissions
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). The
+// following operations are related to ListMultipartUploads:
+//
+// *
+// CreateMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+//
+// *
+// UploadPart
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+//
+// *
+// CompleteMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
+//
+// *
+// ListParts
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+//
+// *
+// AbortMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
+func (c *Client) ListMultipartUploads(ctx context.Context, params *ListMultipartUploadsInput, optFns ...func(*Options)) (*ListMultipartUploadsOutput, error) {
+ if params == nil {
+ params = &ListMultipartUploadsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListMultipartUploads", params, optFns, c.addOperationListMultipartUploadsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListMultipartUploadsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListMultipartUploadsInput struct {
+
+ // The name of the bucket to which the multipart upload was initiated. When using
+ // this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // 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
+
+ // Requests Amazon S3 to encode the object keys in the response and specifies the
+ // encoding method to use. An object key may contain any Unicode character;
+ // however, XML 1.0 parser cannot parse some characters, such as characters with an
+ // ASCII value from 0 to 10. For characters that are not supported in XML 1.0, you
+ // can add this parameter to request that Amazon S3 encode the keys in the
+ // response.
+ EncodingType types.EncodingType
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // 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
+
+ // Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the
+ // response body. 1,000 is the maximum number of uploads that can be returned in a
+ // response.
+ MaxUploads int32
+
+ // Lists in-progress uploads only for those keys that begin with the specified
+ // 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
+
+ // 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. 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
+
+ noSmithyDocumentSerde
+}
+
+type ListMultipartUploadsOutput struct {
+
+ // The name of the bucket to which the multipart upload was initiated. Does not
+ // return the access point ARN or access point alias if used.
+ Bucket *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 []types.CommonPrefix
+
+ // 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
+
+ // 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 types.EncodingType
+
+ // Indicates whether the returned list of multipart uploads is truncated. A value
+ // of true indicates that the list was truncated. The list can be truncated if the
+ // number of multipart uploads exceeds the limit allowed or specified by max
+ // uploads.
+ IsTruncated bool
+
+ // The key at or after which the listing began.
+ KeyMarker *string
+
+ // Maximum number of multipart uploads that could have been included in the
+ // response.
+ MaxUploads int32
+
+ // When a list is truncated, this element specifies the value that should be used
+ // for the key-marker request parameter in a subsequent request.
+ NextKeyMarker *string
+
+ // When a list is truncated, this element specifies the value that should be used
+ // for the upload-id-marker request parameter in a subsequent request.
+ NextUploadIdMarker *string
+
+ // When a prefix is provided in the request, this field contains the specified
+ // prefix. The result contains only keys starting with the specified prefix.
+ Prefix *string
+
+ // Upload ID after which listing began.
+ UploadIdMarker *string
+
+ // Container for elements related to a particular multipart upload. A response can
+ // contain zero or more Upload elements.
+ Uploads []types.MultipartUpload
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListMultipartUploadsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpListMultipartUploads{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpListMultipartUploads{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListMultipartUploadsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMultipartUploads(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addListMultipartUploadsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opListMultipartUploads(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "ListMultipartUploads",
+ }
+}
+
+// getListMultipartUploadsBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getListMultipartUploadsBucketMember(input interface{}) (*string, bool) {
+ in := input.(*ListMultipartUploadsInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addListMultipartUploadsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getListMultipartUploadsBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go
new file mode 100644
index 000000000..0013ad01b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go
@@ -0,0 +1,275 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns metadata about all versions of the objects in a bucket. You can also use
+// request parameters as selection criteria to return metadata about a subset of
+// all the object versions. To use this operation, you must have permissions to
+// perform the s3:ListBucketVersions action. Be aware of the name difference. 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. This action is
+// not supported by Amazon S3 on Outposts. The following operations are related to
+// ListObjectVersions:
+//
+// * ListObjectsV2
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
+//
+// *
+// GetObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+//
+// *
+// PutObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+//
+// *
+// DeleteObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
+func (c *Client) ListObjectVersions(ctx context.Context, params *ListObjectVersionsInput, optFns ...func(*Options)) (*ListObjectVersionsOutput, error) {
+ if params == nil {
+ params = &ListObjectVersionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListObjectVersions", params, optFns, c.addOperationListObjectVersionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListObjectVersionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListObjectVersionsInput struct {
+
+ // The bucket name that contains the objects.
+ //
+ // This member is required.
+ Bucket *string
+
+ // 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
+
+ // Requests Amazon S3 to encode the object keys in the response and specifies the
+ // encoding method to use. An object key may contain any Unicode character;
+ // however, XML 1.0 parser cannot parse some characters, such as characters with an
+ // ASCII value from 0 to 10. For characters that are not supported in XML 1.0, you
+ // can add this parameter to request that Amazon S3 encode the keys in the
+ // response.
+ EncodingType types.EncodingType
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // Specifies the key to start with when listing objects in a bucket.
+ KeyMarker *string
+
+ // Sets the maximum number of keys returned in the response. By default the action
+ // 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 int32
+
+ // 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
+
+ // Specifies the object version you want to start listing from.
+ VersionIdMarker *string
+
+ noSmithyDocumentSerde
+}
+
+type ListObjectVersionsOutput struct {
+
+ // All of the keys rolled up into a common prefix count as a single return when
+ // calculating the number of returns.
+ CommonPrefixes []types.CommonPrefix
+
+ // Container for an object that is a delete marker.
+ DeleteMarkers []types.DeleteMarkerEntry
+
+ // 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
+
+ // 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 types.EncodingType
+
+ // 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
+
+ // Marks the last key returned in a truncated response.
+ KeyMarker *string
+
+ // Specifies the maximum number of objects to return.
+ MaxKeys int32
+
+ // The bucket name.
+ Name *string
+
+ // 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
+
+ // 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
+
+ // Selects objects that start with the value supplied by this parameter.
+ Prefix *string
+
+ // Marks the last version of the key returned in a truncated response.
+ VersionIdMarker *string
+
+ // Container for version information.
+ Versions []types.ObjectVersion
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListObjectVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpListObjectVersions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpListObjectVersions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListObjectVersionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListObjectVersions(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addListObjectVersionsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opListObjectVersions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "ListObjectVersions",
+ }
+}
+
+// getListObjectVersionsBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getListObjectVersionsBucketMember(input interface{}) (*string, bool) {
+ in := input.(*ListObjectVersionsInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addListObjectVersionsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getListObjectVersionsBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go
new file mode 100644
index 000000000..37a467ea8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go
@@ -0,0 +1,283 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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. 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 action has been revised. We recommend that you use the newer
+// version, ListObjectsV2
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html), when
+// developing applications. For backward compatibility, Amazon S3 continues to
+// support ListObjects. The following operations are related to ListObjects:
+//
+// *
+// ListObjectsV2
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
+//
+// *
+// GetObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+//
+// *
+// PutObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+//
+// *
+// CreateBucket
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+//
+// *
+// ListBuckets
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
+func (c *Client) ListObjects(ctx context.Context, params *ListObjectsInput, optFns ...func(*Options)) (*ListObjectsOutput, error) {
+ if params == nil {
+ params = &ListObjectsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListObjects", params, optFns, c.addOperationListObjectsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListObjectsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListObjectsInput struct {
+
+ // The name of the bucket containing the objects. When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // A delimiter is a character you use to group keys.
+ Delimiter *string
+
+ // Requests Amazon S3 to encode the object keys in the response and specifies the
+ // encoding method to use. An object key may contain any Unicode character;
+ // however, XML 1.0 parser cannot parse some characters, such as characters with an
+ // ASCII value from 0 to 10. For characters that are not supported in XML 1.0, you
+ // can add this parameter to request that Amazon S3 encode the keys in the
+ // response.
+ EncodingType types.EncodingType
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // Marker is where you want Amazon S3 to start listing from. Amazon S3 starts
+ // listing after this specified key. Marker can be any key in the bucket.
+ Marker *string
+
+ // Sets the maximum number of keys returned in the response. By default the action
+ // returns up to 1,000 key names. The response might contain fewer keys but will
+ // never contain more.
+ MaxKeys int32
+
+ // Limits the response to keys that begin with the specified prefix.
+ Prefix *string
+
+ // Confirms that the requester knows that she or he will be charged for the list
+ // objects request. Bucket owners need not specify this parameter in their
+ // requests.
+ RequestPayer types.RequestPayer
+
+ noSmithyDocumentSerde
+}
+
+type ListObjectsOutput struct {
+
+ // All of the keys (up to 1,000) 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 []types.CommonPrefix
+
+ // Metadata about each object returned.
+ Contents []types.Object
+
+ // 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
+
+ // Encoding type used by Amazon S3 to encode object keys in the response.
+ EncodingType types.EncodingType
+
+ // A flag that indicates whether Amazon S3 returned all of the results that
+ // satisfied the search criteria.
+ IsTruncated bool
+
+ // Indicates where in the bucket listing begins. Marker is included in the response
+ // if it was sent with the request.
+ Marker *string
+
+ // The maximum number of keys returned in the response body.
+ MaxKeys int32
+
+ // The bucket name.
+ Name *string
+
+ // When response is truncated (the IsTruncated element value in the response is
+ // true), you can use the key name in this field as marker in the subsequent
+ // request to get next set of objects. Amazon S3 lists objects in alphabetical
+ // order Note: This element is returned only if you have delimiter request
+ // parameter specified. If response does not include the NextMarker and it is
+ // truncated, you can use the value of the last Key in the response as the marker
+ // in the subsequent request to get the next set of object keys.
+ NextMarker *string
+
+ // Keys that begin with the indicated prefix.
+ Prefix *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListObjectsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpListObjects{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpListObjects{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListObjectsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListObjects(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addListObjectsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opListObjects(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "ListObjects",
+ }
+}
+
+// getListObjectsBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getListObjectsBucketMember(input interface{}) (*string, bool) {
+ in := input.(*ListObjectsInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addListObjectsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getListObjectsBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go
new file mode 100644
index 000000000..3ebfee5ce
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go
@@ -0,0 +1,403 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns some or all (up to 1,000) of the objects in a bucket with each request.
+// You can use the request parameters as selection criteria to return a subset of
+// the objects 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. Objects are returned sorted in an ascending order of
+// the respective key names in the list. For more information about listing
+// objects, see Listing object keys programmatically
+// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html)
+// To use this operation, you must have READ access to the bucket. To use this
+// action in an 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/userguide/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/userguide/s3-access-control.html).
+// This section describes the latest revision of this action. 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html). To get a
+// list of your buckets, see ListBuckets
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html). The
+// following operations are related to ListObjectsV2:
+//
+// * GetObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+//
+// *
+// PutObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+//
+// *
+// CreateBucket
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+func (c *Client) ListObjectsV2(ctx context.Context, params *ListObjectsV2Input, optFns ...func(*Options)) (*ListObjectsV2Output, error) {
+ if params == nil {
+ params = &ListObjectsV2Input{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListObjectsV2", params, optFns, c.addOperationListObjectsV2Middlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListObjectsV2Output)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListObjectsV2Input struct {
+
+ // Bucket name to list. When using this action 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 action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // 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.
+ ContinuationToken *string
+
+ // A delimiter is a character you use to group keys.
+ Delimiter *string
+
+ // Encoding type used by Amazon S3 to encode object keys in the response.
+ EncodingType types.EncodingType
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // 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.
+ FetchOwner bool
+
+ // Sets the maximum number of keys returned in the response. By default the action
+ // returns up to 1,000 key names. The response might contain fewer keys but will
+ // never contain more.
+ MaxKeys int32
+
+ // Limits the response to keys that begin with the specified prefix.
+ Prefix *string
+
+ // Confirms that the requester knows that she or he will be charged for the list
+ // objects request in V2 style. Bucket owners need not specify this parameter in
+ // their requests.
+ RequestPayer types.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.
+ StartAfter *string
+
+ noSmithyDocumentSerde
+}
+
+type ListObjectsV2Output struct {
+
+ // All of the keys (up to 1,000) 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 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 []types.CommonPrefix
+
+ // Metadata about each object returned.
+ Contents []types.Object
+
+ // If ContinuationToken was sent with the request, it is included in the response.
+ ContinuationToken *string
+
+ // 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
+
+ // 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 types.EncodingType
+
+ // 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
+
+ // KeyCount is the number of keys returned with this request. KeyCount will always
+ // be less than or equals to MaxKeys field. Say you ask for 50 keys, your result
+ // will include less than equals 50 keys
+ KeyCount int32
+
+ // Sets the maximum number of keys returned in the response. By default the action
+ // returns up to 1,000 key names. The response might contain fewer keys but will
+ // never contain more.
+ MaxKeys int32
+
+ // The bucket name. When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ Name *string
+
+ // 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
+
+ // Keys that begin with the indicated prefix.
+ Prefix *string
+
+ // If StartAfter was sent with the request, it is included in the response.
+ StartAfter *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListObjectsV2Middlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpListObjectsV2{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpListObjectsV2{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListObjectsV2ValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListObjectsV2(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addListObjectsV2UpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListObjectsV2APIClient is a client that implements the ListObjectsV2 operation.
+type ListObjectsV2APIClient interface {
+ ListObjectsV2(context.Context, *ListObjectsV2Input, ...func(*Options)) (*ListObjectsV2Output, error)
+}
+
+var _ ListObjectsV2APIClient = (*Client)(nil)
+
+// ListObjectsV2PaginatorOptions is the paginator options for ListObjectsV2
+type ListObjectsV2PaginatorOptions struct {
+ // Sets the maximum number of keys returned in the response. By default the action
+ // returns up to 1,000 key names. The response might contain fewer keys but will
+ // never contain more.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListObjectsV2Paginator is a paginator for ListObjectsV2
+type ListObjectsV2Paginator struct {
+ options ListObjectsV2PaginatorOptions
+ client ListObjectsV2APIClient
+ params *ListObjectsV2Input
+ nextToken *string
+ firstPage bool
+}
+
+// NewListObjectsV2Paginator returns a new ListObjectsV2Paginator
+func NewListObjectsV2Paginator(client ListObjectsV2APIClient, params *ListObjectsV2Input, optFns ...func(*ListObjectsV2PaginatorOptions)) *ListObjectsV2Paginator {
+ if params == nil {
+ params = &ListObjectsV2Input{}
+ }
+
+ options := ListObjectsV2PaginatorOptions{}
+ if params.MaxKeys != 0 {
+ options.Limit = params.MaxKeys
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListObjectsV2Paginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListObjectsV2Paginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next ListObjectsV2 page.
+func (p *ListObjectsV2Paginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListObjectsV2Output, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.ContinuationToken = p.nextToken
+
+ params.MaxKeys = p.options.Limit
+
+ result, err := p.client.ListObjectsV2(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = nil
+ if result.IsTruncated {
+ p.nextToken = result.NextContinuationToken
+ }
+
+ if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+func newServiceMetadataMiddleware_opListObjectsV2(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "ListObjectsV2",
+ }
+}
+
+// getListObjectsV2BucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getListObjectsV2BucketMember(input interface{}) (*string, bool) {
+ in := input.(*ListObjectsV2Input)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addListObjectsV2UpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getListObjectsV2BucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go
new file mode 100644
index 000000000..6e0df29ec
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go
@@ -0,0 +1,389 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)).
+// 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 and Permissions
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html). The
+// following operations are related to ListParts:
+//
+// * CreateMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+//
+// *
+// UploadPart
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+//
+// *
+// CompleteMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
+//
+// *
+// AbortMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
+//
+// *
+// ListMultipartUploads
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
+func (c *Client) ListParts(ctx context.Context, params *ListPartsInput, optFns ...func(*Options)) (*ListPartsOutput, error) {
+ if params == nil {
+ params = &ListPartsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListParts", params, optFns, c.addOperationListPartsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListPartsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListPartsInput struct {
+
+ // The name of the bucket to which the parts are being uploaded. When using this
+ // action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Object key for which the multipart upload was initiated.
+ //
+ // This member is required.
+ Key *string
+
+ // Upload ID identifying the multipart upload whose parts are being listed.
+ //
+ // This member is required.
+ UploadId *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // Sets the maximum number of parts to return.
+ MaxParts int32
+
+ // Specifies the part after which listing should begin. Only parts with higher part
+ // numbers will be listed.
+ PartNumberMarker *string
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ noSmithyDocumentSerde
+}
+
+type ListPartsOutput struct {
+
+ // 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
+
+ // 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
+
+ // The name of the bucket to which the multipart upload was initiated. Does not
+ // return the access point ARN or access point alias if used.
+ Bucket *string
+
+ // Container element that identifies who initiated the multipart upload. If the
+ // initiator is an Amazon Web Services 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 *types.Initiator
+
+ // 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
+
+ // Object key for which the multipart upload was initiated.
+ Key *string
+
+ // Maximum number of parts that were allowed in the response.
+ MaxParts int32
+
+ // 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.
+ NextPartNumberMarker *string
+
+ // 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 *types.Owner
+
+ // 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 *string
+
+ // Container for elements related to a particular part. A response can contain zero
+ // or more Part elements.
+ Parts []types.Part
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // Class of storage (STANDARD or REDUCED_REDUNDANCY) used to store the uploaded
+ // object.
+ StorageClass types.StorageClass
+
+ // Upload ID identifying the multipart upload whose parts are being listed.
+ UploadId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListPartsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpListParts{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpListParts{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListPartsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListParts(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addListPartsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListPartsAPIClient is a client that implements the ListParts operation.
+type ListPartsAPIClient interface {
+ ListParts(context.Context, *ListPartsInput, ...func(*Options)) (*ListPartsOutput, error)
+}
+
+var _ ListPartsAPIClient = (*Client)(nil)
+
+// ListPartsPaginatorOptions is the paginator options for ListParts
+type ListPartsPaginatorOptions struct {
+ // Sets the maximum number of parts to return.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListPartsPaginator is a paginator for ListParts
+type ListPartsPaginator struct {
+ options ListPartsPaginatorOptions
+ client ListPartsAPIClient
+ params *ListPartsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListPartsPaginator returns a new ListPartsPaginator
+func NewListPartsPaginator(client ListPartsAPIClient, params *ListPartsInput, optFns ...func(*ListPartsPaginatorOptions)) *ListPartsPaginator {
+ if params == nil {
+ params = &ListPartsInput{}
+ }
+
+ options := ListPartsPaginatorOptions{}
+ if params.MaxParts != 0 {
+ options.Limit = params.MaxParts
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListPartsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListPartsPaginator) HasMorePages() bool {
+ return p.firstPage || p.nextToken != nil
+}
+
+// NextPage retrieves the next ListParts page.
+func (p *ListPartsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPartsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.PartNumberMarker = p.nextToken
+
+ params.MaxParts = p.options.Limit
+
+ result, err := p.client.ListParts(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = nil
+ if result.IsTruncated {
+ p.nextToken = result.NextPartNumberMarker
+ }
+
+ if p.options.StopOnDuplicateToken && prevToken != nil && p.nextToken != nil && *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+func newServiceMetadataMiddleware_opListParts(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "ListParts",
+ }
+}
+
+// getListPartsBucketMember returns a pointer to string denoting a provided bucket
+// member valueand a boolean indicating if the input has a modeled bucket name,
+func getListPartsBucketMember(input interface{}) (*string, bool) {
+ in := input.(*ListPartsInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addListPartsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getListPartsBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go
new file mode 100644
index 000000000..d8da69659
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go
@@ -0,0 +1,201 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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/userguide/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/userguide/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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html)
+// action 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html)
+//
+// *
+// CreateBucket
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+func (c *Client) PutBucketAccelerateConfiguration(ctx context.Context, params *PutBucketAccelerateConfigurationInput, optFns ...func(*Options)) (*PutBucketAccelerateConfigurationOutput, error) {
+ if params == nil {
+ params = &PutBucketAccelerateConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketAccelerateConfiguration", params, optFns, c.addOperationPutBucketAccelerateConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketAccelerateConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketAccelerateConfigurationInput struct {
+
+ // Container for setting the transfer acceleration state.
+ //
+ // This member is required.
+ AccelerateConfiguration *types.AccelerateConfiguration
+
+ // The name of the bucket for which the accelerate configuration is set.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketAccelerateConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketAccelerateConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketAccelerateConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketAccelerateConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPutBucketAccelerateConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketAccelerateConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketAccelerateConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketAccelerateConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketAccelerateConfiguration",
+ }
+}
+
+// getPutBucketAccelerateConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getPutBucketAccelerateConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketAccelerateConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketAccelerateConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketAccelerateConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go
new file mode 100644
index 000000000..8f619e8dd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go
@@ -0,0 +1,328 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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 (Amazon Web Services 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 Amazon Web Services
+// account
+//
+// * uri – if you are granting permissions to a predefined group
+//
+// *
+// emailAddress – if the value specified is the email address of an Amazon Web
+// Services account Using email addresses to specify a grantee is only supported in
+// the following Amazon Web Services 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
+// Amazon Web Services 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 Amazon Web Services
+// 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 Amazon Web Services 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
+// Amazon Web Services General Reference.
+//
+// Related Resources
+//
+// * CreateBucket
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+//
+// *
+// DeleteBucket
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
+//
+// *
+// GetObjectAcl
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
+func (c *Client) PutBucketAcl(ctx context.Context, params *PutBucketAclInput, optFns ...func(*Options)) (*PutBucketAclOutput, error) {
+ if params == nil {
+ params = &PutBucketAclInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketAcl", params, optFns, c.addOperationPutBucketAclMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketAclOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketAclInput struct {
+
+ // The bucket to which to apply the ACL.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The canned ACL to apply to the bucket.
+ ACL types.BucketCannedACL
+
+ // Contains the elements that set the ACL permissions for an object per grantee.
+ AccessControlPolicy *types.AccessControlPolicy
+
+ // The base64-encoded 128-bit MD5 digest of the data. This header must be used as a
+ // message integrity check to verify that the request body was not corrupted in
+ // transit. For more information, go to RFC 1864.
+ // (http://www.ietf.org/rfc/rfc1864.txt) For requests made using the Amazon Web
+ // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
+ // calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // Allows grantee the read, write, read ACP, and write ACP permissions on the
+ // bucket.
+ GrantFullControl *string
+
+ // Allows grantee to list the objects in the bucket.
+ GrantRead *string
+
+ // Allows grantee to read the bucket ACL.
+ GrantReadACP *string
+
+ // Allows grantee to create new objects in the bucket. For the bucket and object
+ // owners of existing objects, also allows deletions and overwrites of those
+ // objects.
+ GrantWrite *string
+
+ // Allows grantee to write the ACL for the applicable bucket.
+ GrantWriteACP *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketAclOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketAclMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketAcl{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketAcl{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutBucketAclValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketAcl(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketAclUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketAcl(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketAcl",
+ }
+}
+
+// getPutBucketAclBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getPutBucketAclBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketAclInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketAclUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketAclBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go
new file mode 100644
index 000000000..dc78a41ac
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go
@@ -0,0 +1,233 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Sets an analytics configuration for the bucket (specified by the analytics
+// 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/userguide/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/userguide/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
+//
+// *
+// GetBucketAnalyticsConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
+//
+// *
+// DeleteBucketAnalyticsConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
+//
+// *
+// ListBucketAnalyticsConfigurations
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
+func (c *Client) PutBucketAnalyticsConfiguration(ctx context.Context, params *PutBucketAnalyticsConfigurationInput, optFns ...func(*Options)) (*PutBucketAnalyticsConfigurationOutput, error) {
+ if params == nil {
+ params = &PutBucketAnalyticsConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketAnalyticsConfiguration", params, optFns, c.addOperationPutBucketAnalyticsConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketAnalyticsConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketAnalyticsConfigurationInput struct {
+
+ // The configuration and any analyses for the analytics filter.
+ //
+ // This member is required.
+ AnalyticsConfiguration *types.AnalyticsConfiguration
+
+ // The name of the bucket to which an analytics configuration is stored.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The ID that identifies the analytics configuration.
+ //
+ // This member is required.
+ Id *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketAnalyticsConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketAnalyticsConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketAnalyticsConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketAnalyticsConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPutBucketAnalyticsConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketAnalyticsConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketAnalyticsConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketAnalyticsConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketAnalyticsConfiguration",
+ }
+}
+
+// getPutBucketAnalyticsConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getPutBucketAnalyticsConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketAnalyticsConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketAnalyticsConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketAnalyticsConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go
new file mode 100644
index 000000000..038d9799d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go
@@ -0,0 +1,220 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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 S3
+// User Guide. Related Resources
+//
+// * GetBucketCors
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketCors.html)
+//
+// *
+// DeleteBucketCors
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html)
+//
+// *
+// RESTOPTIONSobject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html)
+func (c *Client) PutBucketCors(ctx context.Context, params *PutBucketCorsInput, optFns ...func(*Options)) (*PutBucketCorsOutput, error) {
+ if params == nil {
+ params = &PutBucketCorsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketCors", params, optFns, c.addOperationPutBucketCorsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketCorsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketCorsInput struct {
+
+ // Specifies the bucket impacted by the corsconfiguration.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Describes the cross-origin access configuration for objects in an Amazon S3
+ // bucket. For more information, see Enabling Cross-Origin Resource Sharing
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon S3
+ // User Guide.
+ //
+ // This member is required.
+ CORSConfiguration *types.CORSConfiguration
+
+ // The base64-encoded 128-bit MD5 digest of the data. This header must be used as a
+ // message integrity check to verify that the request body was not corrupted in
+ // transit. For more information, go to RFC 1864.
+ // (http://www.ietf.org/rfc/rfc1864.txt) For requests made using the Amazon Web
+ // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
+ // calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketCorsOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketCorsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketCors{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketCors{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutBucketCorsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketCors(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketCorsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketCors(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketCors",
+ }
+}
+
+// getPutBucketCorsBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getPutBucketCorsBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketCorsInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketCorsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketCorsBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go
new file mode 100644
index 000000000..7e6006b2e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go
@@ -0,0 +1,207 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// This action uses the encryption subresource to configure default encryption and
+// Amazon S3 Bucket Key for an existing bucket. Default encryption for a bucket can
+// use server-side encryption with Amazon S3-managed keys (SSE-S3) or customer
+// managed keys (SSE-KMS). If you specify default encryption using SSE-KMS, you can
+// also configure Amazon S3 Bucket Key. For information about default encryption,
+// see Amazon S3 default bucket encryption
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) in the
+// Amazon S3 User Guide. For more information about S3 Bucket Keys, see Amazon S3
+// Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) in
+// the Amazon S3 User Guide. This action requires Amazon Web Services Signature
+// Version 4. For more information, see Authenticating Requests (Amazon Web
+// Services Signature Version 4)
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/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/userguide/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/userguide/s3-access-control.html)
+// in the Amazon S3 User Guide. Related Resources
+//
+// * GetBucketEncryption
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)
+//
+// *
+// DeleteBucketEncryption
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html)
+func (c *Client) PutBucketEncryption(ctx context.Context, params *PutBucketEncryptionInput, optFns ...func(*Options)) (*PutBucketEncryptionOutput, error) {
+ if params == nil {
+ params = &PutBucketEncryptionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketEncryption", params, optFns, c.addOperationPutBucketEncryptionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketEncryptionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketEncryptionInput struct {
+
+ // Specifies default encryption for a bucket using server-side encryption with
+ // Amazon S3-managed keys (SSE-S3) or customer 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) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Specifies the default server-side-encryption configuration.
+ //
+ // This member is required.
+ ServerSideEncryptionConfiguration *types.ServerSideEncryptionConfiguration
+
+ // The base64-encoded 128-bit MD5 digest of the server-side encryption
+ // configuration. For requests made using the Amazon Web Services Command Line
+ // Interface (CLI) or Amazon Web Services SDKs, this field is calculated
+ // automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketEncryptionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketEncryptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketEncryption{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketEncryption{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutBucketEncryptionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketEncryption(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketEncryptionUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketEncryption(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketEncryption",
+ }
+}
+
+// getPutBucketEncryptionBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getPutBucketEncryptionBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketEncryptionInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketEncryptionUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketEncryptionBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go
new file mode 100644
index 000000000..4ae3a8186
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go
@@ -0,0 +1,225 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can
+// have up to 1,000 S3 Intelligent-Tiering configurations per bucket. The S3
+// Intelligent-Tiering storage class is designed to optimize storage costs by
+// automatically moving data to the most cost-effective storage access tier,
+// without performance impact or operational overhead. S3 Intelligent-Tiering
+// delivers automatic cost savings in two low latency and high throughput access
+// tiers. For data that can be accessed asynchronously, you can choose to activate
+// automatic archiving capabilities within the S3 Intelligent-Tiering storage
+// class. The S3 Intelligent-Tiering storage class is the ideal storage class for
+// data with unknown, changing, or unpredictable access patterns, independent of
+// object size or retention period. If the size of an object is less than 128 KB,
+// it is not eligible for auto-tiering. Smaller objects can be stored, but they are
+// always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering
+// storage class. For more information, see Storage class for automatically
+// optimizing frequently and infrequently accessed objects
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
+// Operations related to PutBucketIntelligentTieringConfiguration include:
+//
+// *
+// DeleteBucketIntelligentTieringConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
+//
+// *
+// GetBucketIntelligentTieringConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
+//
+// *
+// ListBucketIntelligentTieringConfigurations
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
+//
+// You
+// only need S3 Intelligent-Tiering enabled on a bucket if you want to
+// automatically move objects stored in the S3 Intelligent-Tiering storage class to
+// the Archive Access or Deep Archive Access tier. 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:PutIntelligentTieringConfiguration bucket permission to set the configuration
+// on the bucket.
+func (c *Client) PutBucketIntelligentTieringConfiguration(ctx context.Context, params *PutBucketIntelligentTieringConfigurationInput, optFns ...func(*Options)) (*PutBucketIntelligentTieringConfigurationOutput, error) {
+ if params == nil {
+ params = &PutBucketIntelligentTieringConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketIntelligentTieringConfiguration", params, optFns, c.addOperationPutBucketIntelligentTieringConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketIntelligentTieringConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketIntelligentTieringConfigurationInput struct {
+
+ // The name of the Amazon S3 bucket whose configuration you want to modify or
+ // retrieve.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The ID used to identify the S3 Intelligent-Tiering configuration.
+ //
+ // This member is required.
+ Id *string
+
+ // Container for S3 Intelligent-Tiering configuration.
+ //
+ // This member is required.
+ IntelligentTieringConfiguration *types.IntelligentTieringConfiguration
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketIntelligentTieringConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketIntelligentTieringConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketIntelligentTieringConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketIntelligentTieringConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPutBucketIntelligentTieringConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketIntelligentTieringConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketIntelligentTieringConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketIntelligentTieringConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketIntelligentTieringConfiguration",
+ }
+}
+
+// getPutBucketIntelligentTieringConfigurationBucketMember returns a pointer to
+// string denoting a provided bucket member valueand a boolean indicating if the
+// input has a modeled bucket name,
+func getPutBucketIntelligentTieringConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketIntelligentTieringConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketIntelligentTieringConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketIntelligentTieringConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go
new file mode 100644
index 000000000..239235c4b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go
@@ -0,0 +1,234 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// This implementation of the PUT action 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 Amazon Web
+// Services 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 S3 User 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/userguide/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/userguide/s3-access-control.html)
+// in the Amazon S3 User 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
+//
+// *
+// DeleteBucketInventoryConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
+//
+// *
+// ListBucketInventoryConfigurations
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
+func (c *Client) PutBucketInventoryConfiguration(ctx context.Context, params *PutBucketInventoryConfigurationInput, optFns ...func(*Options)) (*PutBucketInventoryConfigurationOutput, error) {
+ if params == nil {
+ params = &PutBucketInventoryConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketInventoryConfiguration", params, optFns, c.addOperationPutBucketInventoryConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketInventoryConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketInventoryConfigurationInput struct {
+
+ // The name of the bucket where the inventory configuration will be stored.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The ID used to identify the inventory configuration.
+ //
+ // This member is required.
+ Id *string
+
+ // Specifies the inventory configuration.
+ //
+ // This member is required.
+ InventoryConfiguration *types.InventoryConfiguration
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketInventoryConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketInventoryConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketInventoryConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketInventoryConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPutBucketInventoryConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketInventoryConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketInventoryConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketInventoryConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketInventoryConfiguration",
+ }
+}
+
+// getPutBucketInventoryConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getPutBucketInventoryConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketInventoryConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketInventoryConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketInventoryConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go
new file mode 100644
index 000000000..13c5955f4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go
@@ -0,0 +1,232 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a new lifecycle configuration for the bucket or replaces an existing
+// lifecycle configuration. For information about lifecycle configuration, see
+// Managing your storage lifecycle
+// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html).
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html).
+// 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 Amazon Web
+// Services 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/userguide/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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
+//
+// *
+// DeleteBucketLifecycle
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
+func (c *Client) PutBucketLifecycleConfiguration(ctx context.Context, params *PutBucketLifecycleConfigurationInput, optFns ...func(*Options)) (*PutBucketLifecycleConfigurationOutput, error) {
+ if params == nil {
+ params = &PutBucketLifecycleConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketLifecycleConfiguration", params, optFns, c.addOperationPutBucketLifecycleConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketLifecycleConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketLifecycleConfigurationInput struct {
+
+ // The name of the bucket for which to set the configuration.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // Container for lifecycle rules. You can add as many as 1,000 rules.
+ LifecycleConfiguration *types.BucketLifecycleConfiguration
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketLifecycleConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketLifecycleConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketLifecycleConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketLifecycleConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutBucketLifecycleConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketLifecycleConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketLifecycleConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketLifecycleConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketLifecycleConfiguration",
+ }
+}
+
+// getPutBucketLifecycleConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getPutBucketLifecycleConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketLifecycleConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketLifecycleConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketLifecycleConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go
new file mode 100644
index 000000000..b4f2f00a7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go
@@ -0,0 +1,218 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Set the logging parameters for a bucket and to specify permissions for who can
+// view and modify the logging parameters. All logs are saved to buckets in the
+// same Amazon Web Services 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html). For
+// more information about returning the logging status of a bucket, see
+// GetBucketLogging
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html). The
+// following operations are related to PutBucketLogging:
+//
+// * PutObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+//
+// *
+// DeleteBucket
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
+//
+// *
+// CreateBucket
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+//
+// *
+// GetBucketLogging
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html)
+func (c *Client) PutBucketLogging(ctx context.Context, params *PutBucketLoggingInput, optFns ...func(*Options)) (*PutBucketLoggingOutput, error) {
+ if params == nil {
+ params = &PutBucketLoggingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketLogging", params, optFns, c.addOperationPutBucketLoggingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketLoggingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketLoggingInput struct {
+
+ // The name of the bucket for which to set the logging parameters.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Container for logging status information.
+ //
+ // This member is required.
+ BucketLoggingStatus *types.BucketLoggingStatus
+
+ // The MD5 hash of the PutBucketLogging request body. For requests made using the
+ // Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs,
+ // this field is calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketLoggingOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketLoggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketLogging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketLogging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutBucketLoggingValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketLogging(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketLoggingUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketLogging(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketLogging",
+ }
+}
+
+// getPutBucketLoggingBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getPutBucketLoggingBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketLoggingInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketLoggingUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketLoggingBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go
new file mode 100644
index 000000000..d42a6dfdf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go
@@ -0,0 +1,208 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Sets a metrics configuration (specified by the metrics configuration ID) 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/userguide/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/userguide/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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
+//
+// *
+// GetBucketMetricsConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
+//
+// *
+// ListBucketMetricsConfigurations
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
+//
+// 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
+func (c *Client) PutBucketMetricsConfiguration(ctx context.Context, params *PutBucketMetricsConfigurationInput, optFns ...func(*Options)) (*PutBucketMetricsConfigurationOutput, error) {
+ if params == nil {
+ params = &PutBucketMetricsConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketMetricsConfiguration", params, optFns, c.addOperationPutBucketMetricsConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketMetricsConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketMetricsConfigurationInput struct {
+
+ // The name of the bucket for which the metrics configuration is set.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The ID used to identify the metrics configuration.
+ //
+ // This member is required.
+ Id *string
+
+ // Specifies the metrics configuration.
+ //
+ // This member is required.
+ MetricsConfiguration *types.MetricsConfiguration
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketMetricsConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketMetricsConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketMetricsConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketMetricsConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPutBucketMetricsConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketMetricsConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketMetricsConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketMetricsConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketMetricsConfiguration",
+ }
+}
+
+// getPutBucketMetricsConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getPutBucketMetricsConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketMetricsConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketMetricsConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketMetricsConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go
new file mode 100644
index 000000000..6322b1081
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go
@@ -0,0 +1,200 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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 action 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
+// 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 action 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 action is related to
+// PutBucketNotificationConfiguration:
+//
+// * GetBucketNotificationConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html)
+func (c *Client) PutBucketNotificationConfiguration(ctx context.Context, params *PutBucketNotificationConfigurationInput, optFns ...func(*Options)) (*PutBucketNotificationConfigurationOutput, error) {
+ if params == nil {
+ params = &PutBucketNotificationConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketNotificationConfiguration", params, optFns, c.addOperationPutBucketNotificationConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketNotificationConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketNotificationConfigurationInput struct {
+
+ // The name of the bucket.
+ //
+ // This member is required.
+ Bucket *string
+
+ // A container for specifying the notification configuration of the bucket. If this
+ // element is empty, notifications are turned off for the bucket.
+ //
+ // This member is required.
+ NotificationConfiguration *types.NotificationConfiguration
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketNotificationConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketNotificationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketNotificationConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketNotificationConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPutBucketNotificationConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketNotificationConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketNotificationConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketNotificationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketNotificationConfiguration",
+ }
+}
+
+// getPutBucketNotificationConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getPutBucketNotificationConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketNotificationConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketNotificationConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketNotificationConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go
new file mode 100644
index 000000000..394f17d1a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go
@@ -0,0 +1,185 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this
+// operation, you must have the s3:PutBucketOwnershipControls 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 information about Amazon S3 Object Ownership, see Using Object Ownership
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html).
+// The following operations are related to PutBucketOwnershipControls:
+//
+// *
+// GetBucketOwnershipControls
+//
+// * DeleteBucketOwnershipControls
+func (c *Client) PutBucketOwnershipControls(ctx context.Context, params *PutBucketOwnershipControlsInput, optFns ...func(*Options)) (*PutBucketOwnershipControlsOutput, error) {
+ if params == nil {
+ params = &PutBucketOwnershipControlsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketOwnershipControls", params, optFns, c.addOperationPutBucketOwnershipControlsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketOwnershipControlsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketOwnershipControlsInput struct {
+
+ // The name of the Amazon S3 bucket whose OwnershipControls you want to set.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The OwnershipControls (BucketOwnerPreferred or ObjectWriter) that you want to
+ // apply to this Amazon S3 bucket.
+ //
+ // This member is required.
+ OwnershipControls *types.OwnershipControls
+
+ // The MD5 hash of the OwnershipControls request body. For requests made using the
+ // Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs,
+ // this field is calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketOwnershipControlsOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketOwnershipControlsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketOwnershipControls{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketOwnershipControls{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutBucketOwnershipControlsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketOwnershipControls(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketOwnershipControlsUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketOwnershipControls(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketOwnershipControls",
+ }
+}
+
+// getPutBucketOwnershipControlsBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getPutBucketOwnershipControlsBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketOwnershipControlsInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketOwnershipControlsUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketOwnershipControlsBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go
new file mode 100644
index 000000000..090459944
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go
@@ -0,0 +1,195 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. If you are using an
+// identity other than the root user of the Amazon Web Services 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
+// Amazon Web Services 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, see Bucket policy examples
+// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html).
+// The following operations are related to PutBucketPolicy:
+//
+// * CreateBucket
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+//
+// *
+// DeleteBucket
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
+func (c *Client) PutBucketPolicy(ctx context.Context, params *PutBucketPolicyInput, optFns ...func(*Options)) (*PutBucketPolicyOutput, error) {
+ if params == nil {
+ params = &PutBucketPolicyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketPolicy", params, optFns, c.addOperationPutBucketPolicyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketPolicyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketPolicyInput struct {
+
+ // The name of the bucket.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The bucket policy as a JSON document.
+ //
+ // This member is required.
+ Policy *string
+
+ // Set this parameter to true to confirm that you want to remove your permissions
+ // to change this bucket policy in the future.
+ ConfirmRemoveSelfBucketAccess bool
+
+ // The MD5 hash of the request body. For requests made using the Amazon Web
+ // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
+ // calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketPolicyOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketPolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketPolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutBucketPolicyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketPolicy(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketPolicyUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketPolicy",
+ }
+}
+
+// getPutBucketPolicyBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getPutBucketPolicyBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketPolicyInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketPolicyUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketPolicyBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go
new file mode 100644
index 000000000..691c08aa3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go
@@ -0,0 +1,231 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a replication configuration or replaces an existing one. For more
+// information, see Replication
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) in the Amazon
+// S3 User Guide. Specify the replication configuration in the request body. In the
+// replication configuration, you provide the name of the destination bucket or
+// buckets 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. 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. If you are using an earlier
+// version of the replication configuration, Amazon S3 handles 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).
+// For information about enabling versioning on a bucket, see Using Versioning
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html). Handling
+// Replication of Encrypted Objects By default, Amazon S3 doesn't replicate objects
+// that are stored at rest using server-side encryption with KMS keys. To replicate
+// Amazon Web Services KMS-encrypted objects, add the following:
+// SourceSelectionCriteria, SseKmsEncryptedObjects, Status,
+// EncryptionConfiguration, and ReplicaKmsKeyID. For information about replication
+// configuration, see Replicating Objects Created with SSE Using KMS keys
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-config-for-kms-objects.html).
+// For information on PutBucketReplication errors, see List of replication-related
+// error codes
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList)
+// Permissions To create a PutBucketReplication request, you must have
+// s3:PutReplicationConfiguration permissions for the bucket. By default, a
+// resource owner, in this case the Amazon Web Services 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/userguide/s3-access-control.html).
+// To perform this operation, the user or role performing the action must have the
+// iam:PassRole
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html)
+// permission. The following operations are related to PutBucketReplication:
+//
+// *
+// GetBucketReplication
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html)
+//
+// *
+// DeleteBucketReplication
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html)
+func (c *Client) PutBucketReplication(ctx context.Context, params *PutBucketReplicationInput, optFns ...func(*Options)) (*PutBucketReplicationOutput, error) {
+ if params == nil {
+ params = &PutBucketReplicationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketReplication", params, optFns, c.addOperationPutBucketReplicationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketReplicationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketReplicationInput struct {
+
+ // The name of the bucket
+ //
+ // This member is required.
+ Bucket *string
+
+ // A container for replication rules. You can add up to 1,000 rules. The maximum
+ // size of a replication configuration is 2 MB.
+ //
+ // This member is required.
+ ReplicationConfiguration *types.ReplicationConfiguration
+
+ // The base64-encoded 128-bit MD5 digest of the data. You must use this header as a
+ // message integrity check to verify that the request body was not corrupted in
+ // transit. For more information, see RFC 1864
+ // (http://www.ietf.org/rfc/rfc1864.txt). For requests made using the Amazon Web
+ // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
+ // calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // A token to allow Object Lock to be enabled for an existing bucket.
+ Token *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketReplicationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketReplicationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketReplication{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketReplication{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutBucketReplicationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketReplication(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketReplicationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketReplication(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketReplication",
+ }
+}
+
+// getPutBucketReplicationBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getPutBucketReplicationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketReplicationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketReplicationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketReplicationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go
new file mode 100644
index 000000000..36f4b5dd9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go
@@ -0,0 +1,188 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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. 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+//
+// *
+// GetBucketRequestPayment
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketRequestPayment.html)
+func (c *Client) PutBucketRequestPayment(ctx context.Context, params *PutBucketRequestPaymentInput, optFns ...func(*Options)) (*PutBucketRequestPaymentOutput, error) {
+ if params == nil {
+ params = &PutBucketRequestPaymentInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketRequestPayment", params, optFns, c.addOperationPutBucketRequestPaymentMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketRequestPaymentOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketRequestPaymentInput struct {
+
+ // The bucket name.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Container for Payer.
+ //
+ // This member is required.
+ RequestPaymentConfiguration *types.RequestPaymentConfiguration
+
+ // The base64-encoded 128-bit MD5 digest of the data. You must use this header as a
+ // message integrity check to verify that the request body was not corrupted in
+ // transit. For more information, see RFC 1864
+ // (http://www.ietf.org/rfc/rfc1864.txt). For requests made using the Amazon Web
+ // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
+ // calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketRequestPaymentOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketRequestPaymentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketRequestPayment{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketRequestPayment{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutBucketRequestPaymentValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketRequestPayment(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketRequestPaymentUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketRequestPayment(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketRequestPayment",
+ }
+}
+
+// getPutBucketRequestPaymentBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getPutBucketRequestPaymentBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketRequestPaymentInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketRequestPaymentUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketRequestPaymentBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go
new file mode 100644
index 000000000..0803795c7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go
@@ -0,0 +1,233 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Sets the tags for a bucket. Use tags to organize your Amazon Web Services bill
+// to reflect your own cost structure. To do this, sign up to get your Amazon Web
+// Services 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)
+// and Using Cost Allocation in Amazon S3 Bucket Tags
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/CostAllocTagging.html). When
+// this operation sets the tags for a bucket, it will overwrite any current tags
+// the bucket already has. You cannot use this operation to add tags to an existing
+// list of tags. 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/userguide/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/userguide/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 Amazon Web Services-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 action 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html)
+//
+// *
+// DeleteBucketTagging
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html)
+func (c *Client) PutBucketTagging(ctx context.Context, params *PutBucketTaggingInput, optFns ...func(*Options)) (*PutBucketTaggingOutput, error) {
+ if params == nil {
+ params = &PutBucketTaggingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketTagging", params, optFns, c.addOperationPutBucketTaggingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketTaggingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketTaggingInput struct {
+
+ // The bucket name.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Container for the TagSet and Tag elements.
+ //
+ // This member is required.
+ Tagging *types.Tagging
+
+ // The base64-encoded 128-bit MD5 digest of the data. You must use this header as a
+ // message integrity check to verify that the request body was not corrupted in
+ // transit. For more information, see RFC 1864
+ // (http://www.ietf.org/rfc/rfc1864.txt). For requests made using the Amazon Web
+ // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
+ // calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketTaggingOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketTaggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketTagging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketTagging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutBucketTaggingValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketTagging(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketTaggingUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketTagging(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketTagging",
+ }
+}
+
+// getPutBucketTaggingBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getPutBucketTaggingBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketTaggingInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketTaggingUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketTaggingBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go
new file mode 100644
index 000000000..1f87c2db7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go
@@ -0,0 +1,210 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html)
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
+//
+// *
+// DeleteBucket
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
+//
+// *
+// GetBucketVersioning
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html)
+func (c *Client) PutBucketVersioning(ctx context.Context, params *PutBucketVersioningInput, optFns ...func(*Options)) (*PutBucketVersioningOutput, error) {
+ if params == nil {
+ params = &PutBucketVersioningInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketVersioning", params, optFns, c.addOperationPutBucketVersioningMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketVersioningOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketVersioningInput struct {
+
+ // The bucket name.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Container for setting the versioning state.
+ //
+ // This member is required.
+ VersioningConfiguration *types.VersioningConfiguration
+
+ // >The base64-encoded 128-bit MD5 digest of the data. You must use this header as
+ // a message integrity check to verify that the request body was not corrupted in
+ // transit. For more information, see RFC 1864
+ // (http://www.ietf.org/rfc/rfc1864.txt). For requests made using the Amazon Web
+ // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
+ // calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // The concatenation of the authentication device's serial number, a space, and the
+ // value that is displayed on your authentication device.
+ MFA *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketVersioningOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketVersioningMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketVersioning{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketVersioning{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutBucketVersioningValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketVersioning(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketVersioningUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketVersioning(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketVersioning",
+ }
+}
+
+// getPutBucketVersioningBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getPutBucketVersioningBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketVersioningInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketVersioningUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketVersioningBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go
new file mode 100644
index 000000000..0e1db51fb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go
@@ -0,0 +1,246 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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
+// action 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 S3 User Guide.
+func (c *Client) PutBucketWebsite(ctx context.Context, params *PutBucketWebsiteInput, optFns ...func(*Options)) (*PutBucketWebsiteOutput, error) {
+ if params == nil {
+ params = &PutBucketWebsiteInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutBucketWebsite", params, optFns, c.addOperationPutBucketWebsiteMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutBucketWebsiteOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutBucketWebsiteInput struct {
+
+ // The bucket name.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Container for the request.
+ //
+ // This member is required.
+ WebsiteConfiguration *types.WebsiteConfiguration
+
+ // The base64-encoded 128-bit MD5 digest of the data. You must use this header as a
+ // message integrity check to verify that the request body was not corrupted in
+ // transit. For more information, see RFC 1864
+ // (http://www.ietf.org/rfc/rfc1864.txt). For requests made using the Amazon Web
+ // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
+ // calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type PutBucketWebsiteOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutBucketWebsiteMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutBucketWebsite{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutBucketWebsite{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutBucketWebsiteValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBucketWebsite(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketWebsiteUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutBucketWebsite(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutBucketWebsite",
+ }
+}
+
+// getPutBucketWebsiteBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getPutBucketWebsiteBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutBucketWebsiteInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutBucketWebsiteUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutBucketWebsiteBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go
new file mode 100644
index 000000000..bbe52778e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go
@@ -0,0 +1,500 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+ "time"
+)
+
+// 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.
+//
+// * To successfully complete the PutObject request, you must have the
+// s3:PutObject in your IAM permissions.
+//
+// * To successfully change the objects acl
+// of your PutObject request, you must have the s3:PutObjectAcl in your IAM
+// permissions.
+//
+// * 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 S3 User 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 Amazon
+// Web Services managed encryption keys (SSE-S3 or SSE-KMS). For more information,
+// see Using Server-Side Encryption
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html).
+// If you request server-side encryption using Amazon Web Services Key Management
+// Service (SSE-KMS), you can enable an S3 Bucket Key at the object-level. For more
+// information, see Amazon S3 Bucket Keys
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) in the Amazon
+// S3 User Guide. 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 Amazon Web Services 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. Amazon S3 on Outposts only uses the OUTPOSTS Storage
+// Class. For more information, see Storage Classes
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) in
+// the Amazon S3 User 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html).
+// Related Resources
+//
+// * CopyObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
+//
+// *
+// DeleteObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
+func (c *Client) PutObject(ctx context.Context, params *PutObjectInput, optFns ...func(*Options)) (*PutObjectOutput, error) {
+ if params == nil {
+ params = &PutObjectInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutObject", params, optFns, c.addOperationPutObjectMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutObjectOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutObjectInput struct {
+
+ // The bucket name to which the PUT action was initiated. When using this action
+ // 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Object key for which the PUT action was initiated.
+ //
+ // This member is required.
+ Key *string
+
+ // 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).
+ // This action is not supported by Amazon S3 on Outposts.
+ ACL types.ObjectCannedACL
+
+ // Object data.
+ Body io.Reader
+
+ // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
+ // with server-side encryption using AWS KMS (SSE-KMS). Setting this header to true
+ // causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
+ // Specifying this header with a PUT action doesn’t affect bucket-level settings
+ // for S3 Bucket Key.
+ BucketKeyEnabled bool
+
+ // 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
+
+ // 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
+
+ // 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. 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
+
+ // The language the content is in.
+ ContentLanguage *string
+
+ // Size of the body in bytes. This parameter is useful when the size of the 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
+
+ // 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
+
+ // 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
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // 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
+
+ // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. This
+ // action is not supported by Amazon S3 on Outposts.
+ GrantFullControl *string
+
+ // Allows grantee to read the object data and its metadata. This action is not
+ // supported by Amazon S3 on Outposts.
+ GrantRead *string
+
+ // Allows grantee to read the object ACL. This action is not supported by Amazon S3
+ // on Outposts.
+ GrantReadACP *string
+
+ // Allows grantee to write the ACL for the applicable object. This action is not
+ // supported by Amazon S3 on Outposts.
+ GrantWriteACP *string
+
+ // A map of metadata to store with the object in S3.
+ Metadata map[string]string
+
+ // 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 types.ObjectLockLegalHoldStatus
+
+ // The Object Lock mode that you want to apply to this object.
+ ObjectLockMode types.ObjectLockMode
+
+ // The date and time when you want this object's Object Lock to expire. Must be
+ // formatted as a timestamp parameter.
+ ObjectLockRetainUntilDate *time.Time
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // Specifies the algorithm to use to when encrypting the object (for example,
+ // AES256).
+ SSECustomerAlgorithm *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 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
+
+ // 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 that the
+ // encryption key was transmitted without error.
+ SSECustomerKeyMD5 *string
+
+ // Specifies the Amazon Web Services KMS Encryption Context to use for object
+ // encryption. The value of this header is a base64-encoded UTF-8 string holding
+ // JSON with the encryption context key-value pairs.
+ SSEKMSEncryptionContext *string
+
+ // If x-amz-server-side-encryption is present and has the value of aws:kms, this
+ // header specifies the ID of the Amazon Web Services Key Management Service
+ // (Amazon Web Services KMS) symmetrical customer managed key that was used for the
+ // object. If you specify x-amz-server-side-encryption:aws:kms, but do not provide
+ // x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web
+ // Services managed key to protect the data. If the KMS key does not exist in the
+ // same account issuing the command, you must use the full ARN and not just the ID.
+ SSEKMSKeyId *string
+
+ // The server-side encryption algorithm used when storing this object in Amazon S3
+ // (for example, AES256, aws:kms).
+ ServerSideEncryption types.ServerSideEncryption
+
+ // 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. Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For
+ // more information, see Storage Classes
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) in
+ // the Amazon S3 User Guide.
+ StorageClass types.StorageClass
+
+ // The tag-set for the object. The tag-set must be encoded as URL Query parameters.
+ // (For example, "Key1=Value1")
+ Tagging *string
+
+ // 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. 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
+
+ noSmithyDocumentSerde
+}
+
+type PutObjectOutput struct {
+
+ // Indicates whether the uploaded object uses an S3 Bucket Key for server-side
+ // encryption with Amazon Web Services KMS (SSE-KMS).
+ BucketKeyEnabled bool
+
+ // Entity tag for the uploaded object.
+ ETag *string
+
+ // If the expiration is configured for the object (see
+ // PutBucketLifecycleConfiguration
+ // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)),
+ // 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
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // If server-side encryption with a customer-provided encryption key was requested,
+ // the response will include this header confirming the encryption algorithm used.
+ SSECustomerAlgorithm *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
+ // verification of the customer-provided encryption key.
+ SSECustomerKeyMD5 *string
+
+ // If present, specifies the Amazon Web Services KMS Encryption Context to use for
+ // object encryption. The value of this header is a base64-encoded UTF-8 string
+ // holding JSON with the encryption context key-value pairs.
+ SSEKMSEncryptionContext *string
+
+ // If x-amz-server-side-encryption is present and has the value of aws:kms, this
+ // header specifies the ID of the Amazon Web Services Key Management Service
+ // (Amazon Web Services KMS) symmetric customer managed key that was used for the
+ // object.
+ SSEKMSKeyId *string
+
+ // If you specified server-side encryption either with an Amazon Web Services KMS
+ // key 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 types.ServerSideEncryption
+
+ // Version of the object.
+ VersionId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutObjectMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutObject{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutObject{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPutObjectValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutObject(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutObjectUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.UseDynamicPayloadSigningMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutObject(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutObject",
+ }
+}
+
+// getPutObjectBucketMember returns a pointer to string denoting a provided bucket
+// member valueand a boolean indicating if the input has a modeled bucket name,
+func getPutObjectBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutObjectInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutObjectUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutObjectBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
+
+// PresignPutObject is used to generate a presigned HTTP Request which contains
+// presigned URL, signed headers and HTTP method used.
+func (c *PresignClient) PresignPutObject(ctx context.Context, params *PutObjectInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) {
+ if params == nil {
+ params = &PutObjectInput{}
+ }
+ options := c.options.copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption)
+
+ result, _, err := c.client.invokeOperation(ctx, "PutObject", params, clientOptFns,
+ c.client.addOperationPutObjectMiddlewares,
+ presignConverter(options).convertToPresignMiddleware,
+ func(stack *middleware.Stack, options Options) error {
+ return awshttp.RemoveContentTypeHeader(stack)
+ },
+ addPutObjectPayloadAsUnsigned,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*v4.PresignedHTTPRequest)
+ return out, nil
+}
+
+func addPutObjectPayloadAsUnsigned(stack *middleware.Stack, options Options) error {
+ v4.RemoveContentSHA256HeaderMiddleware(stack)
+ v4.RemoveComputePayloadSHA256Middleware(stack)
+ return v4.AddUnsignedPayloadMiddleware(stack)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go
new file mode 100644
index 000000000..957aa5663
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go
@@ -0,0 +1,370 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Uses the acl subresource to set the access control list (ACL) permissions for a
+// new or existing object in an S3 bucket. You must have WRITE_ACP permission to
+// set the ACL of an object. For more information, see What permissions can I
+// grant?
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#permissions)
+// in the Amazon S3 User Guide. This action is not supported by Amazon S3 on
+// Outposts. 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 User 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 (Amazon Web Services 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 Amazon Web Services
+// account
+//
+// * uri – if you are granting permissions to a predefined group
+//
+// *
+// emailAddress – if the value specified is the email address of an Amazon Web
+// Services account Using email addresses to specify a grantee is only supported in
+// the following Amazon Web Services 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
+// Amazon Web Services General Reference.
+//
+// For example, the following
+// x-amz-grant-read header grants list objects permission to the two Amazon Web
+// Services 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 Amazon Web Services 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
+// Amazon Web Services 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
+//
+// *
+// GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+func (c *Client) PutObjectAcl(ctx context.Context, params *PutObjectAclInput, optFns ...func(*Options)) (*PutObjectAclOutput, error) {
+ if params == nil {
+ params = &PutObjectAclInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutObjectAcl", params, optFns, c.addOperationPutObjectAclMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutObjectAclOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutObjectAclInput struct {
+
+ // The bucket name that contains the object to which you want to attach the ACL.
+ // When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Key for which the PUT action was initiated. When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Key *string
+
+ // 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 types.ObjectCannedACL
+
+ // Contains the elements that set the ACL permissions for an object per grantee.
+ AccessControlPolicy *types.AccessControlPolicy
+
+ // The base64-encoded 128-bit MD5 digest of the data. This header must be used as a
+ // message integrity check to verify that the request body was not corrupted in
+ // transit. For more information, go to RFC 1864.>
+ // (http://www.ietf.org/rfc/rfc1864.txt) For requests made using the Amazon Web
+ // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
+ // calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // Allows grantee the read, write, read ACP, and write ACP permissions on the
+ // bucket. This action is not supported by Amazon S3 on Outposts.
+ GrantFullControl *string
+
+ // Allows grantee to list the objects in the bucket. This action is not supported
+ // by Amazon S3 on Outposts.
+ GrantRead *string
+
+ // Allows grantee to read the bucket ACL. This action is not supported by Amazon S3
+ // on Outposts.
+ GrantReadACP *string
+
+ // Allows grantee to create new objects in the bucket. For the bucket and object
+ // owners of existing objects, also allows deletions and overwrites of those
+ // objects.
+ GrantWrite *string
+
+ // Allows grantee to write the ACL for the applicable bucket. This action is not
+ // supported by Amazon S3 on Outposts.
+ GrantWriteACP *string
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // VersionId used to reference a specific version of the object.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+type PutObjectAclOutput struct {
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutObjectAclMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutObjectAcl{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutObjectAcl{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutObjectAclValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutObjectAcl(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutObjectAclUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutObjectAcl(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutObjectAcl",
+ }
+}
+
+// getPutObjectAclBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getPutObjectAclBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutObjectAclInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutObjectAclUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutObjectAclBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go
new file mode 100644
index 000000000..f7d85b064
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go
@@ -0,0 +1,204 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Applies a Legal Hold configuration to the specified object. For more
+// information, see Locking Objects
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). This action
+// is not supported by Amazon S3 on Outposts.
+func (c *Client) PutObjectLegalHold(ctx context.Context, params *PutObjectLegalHoldInput, optFns ...func(*Options)) (*PutObjectLegalHoldOutput, error) {
+ if params == nil {
+ params = &PutObjectLegalHoldInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutObjectLegalHold", params, optFns, c.addOperationPutObjectLegalHoldMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutObjectLegalHoldOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutObjectLegalHoldInput struct {
+
+ // The bucket name containing the object that you want to place a Legal Hold on.
+ // When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The key name for the object that you want to place a Legal Hold on.
+ //
+ // This member is required.
+ Key *string
+
+ // The MD5 hash for the request body. For requests made using the Amazon Web
+ // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
+ // calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // Container element for the Legal Hold configuration you want to apply to the
+ // specified object.
+ LegalHold *types.ObjectLockLegalHold
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // The version ID of the object that you want to place a Legal Hold on.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+type PutObjectLegalHoldOutput struct {
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutObjectLegalHoldMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutObjectLegalHold{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutObjectLegalHold{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutObjectLegalHoldValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutObjectLegalHold(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutObjectLegalHoldUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutObjectLegalHold(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutObjectLegalHold",
+ }
+}
+
+// getPutObjectLegalHoldBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getPutObjectLegalHoldBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutObjectLegalHoldInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutObjectLegalHoldUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutObjectLegalHoldBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go
new file mode 100644
index 000000000..461c9b818
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go
@@ -0,0 +1,201 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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. For more information, see Locking Objects
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
+//
+// * The
+// DefaultRetention settings require both a mode and a period.
+//
+// * The
+// DefaultRetention period can be either Days or Years but you must select one. You
+// cannot specify Days and Years at the same time.
+//
+// * You can only enable Object
+// Lock for new buckets. If you want to turn on Object Lock for an existing bucket,
+// contact Amazon Web Services Support.
+func (c *Client) PutObjectLockConfiguration(ctx context.Context, params *PutObjectLockConfigurationInput, optFns ...func(*Options)) (*PutObjectLockConfigurationOutput, error) {
+ if params == nil {
+ params = &PutObjectLockConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutObjectLockConfiguration", params, optFns, c.addOperationPutObjectLockConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutObjectLockConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutObjectLockConfigurationInput struct {
+
+ // The bucket whose Object Lock configuration you want to create or replace.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The MD5 hash for the request body. For requests made using the Amazon Web
+ // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
+ // calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // The Object Lock configuration that you want to apply to the specified bucket.
+ ObjectLockConfiguration *types.ObjectLockConfiguration
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // A token to allow Object Lock to be enabled for an existing bucket.
+ Token *string
+
+ noSmithyDocumentSerde
+}
+
+type PutObjectLockConfigurationOutput struct {
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutObjectLockConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutObjectLockConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutObjectLockConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutObjectLockConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutObjectLockConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutObjectLockConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutObjectLockConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutObjectLockConfiguration",
+ }
+}
+
+// getPutObjectLockConfigurationBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getPutObjectLockConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutObjectLockConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutObjectLockConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutObjectLockConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go
new file mode 100644
index 000000000..4be8b901d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go
@@ -0,0 +1,214 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Places an Object Retention configuration on an object. For more information, see
+// Locking Objects
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). Users or
+// accounts require the s3:PutObjectRetention permission in order to place an
+// Object Retention configuration on objects. Bypassing a Governance Retention
+// configuration requires the s3:BypassGovernanceRetention permission. This action
+// is not supported by Amazon S3 on Outposts. Permissions When the Object Lock
+// retention mode is set to compliance, you need s3:PutObjectRetention and
+// s3:BypassGovernanceRetention permissions. For other requests to
+// PutObjectRetention, only s3:PutObjectRetention permissions are required.
+func (c *Client) PutObjectRetention(ctx context.Context, params *PutObjectRetentionInput, optFns ...func(*Options)) (*PutObjectRetentionOutput, error) {
+ if params == nil {
+ params = &PutObjectRetentionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutObjectRetention", params, optFns, c.addOperationPutObjectRetentionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutObjectRetentionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutObjectRetentionInput struct {
+
+ // The bucket name that contains the object you want to apply this Object Retention
+ // configuration to. When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The key name for the object that you want to apply this Object Retention
+ // configuration to.
+ //
+ // This member is required.
+ Key *string
+
+ // Indicates whether this action should bypass Governance-mode restrictions.
+ BypassGovernanceRetention bool
+
+ // The MD5 hash for the request body. For requests made using the Amazon Web
+ // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
+ // calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // The container element for the Object Retention configuration.
+ Retention *types.ObjectLockRetention
+
+ // The version ID for the object that you want to apply this Object Retention
+ // configuration to.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+type PutObjectRetentionOutput struct {
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutObjectRetentionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutObjectRetention{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutObjectRetention{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutObjectRetentionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutObjectRetention(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutObjectRetentionUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutObjectRetention(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutObjectRetention",
+ }
+}
+
+// getPutObjectRetentionBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getPutObjectRetentionBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutObjectRetentionInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutObjectRetentionUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutObjectRetentionBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go
new file mode 100644
index 000000000..d496008a0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go
@@ -0,0 +1,258 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html). 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 action 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
+//
+// *
+// DeleteObjectTagging
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html)
+func (c *Client) PutObjectTagging(ctx context.Context, params *PutObjectTaggingInput, optFns ...func(*Options)) (*PutObjectTaggingOutput, error) {
+ if params == nil {
+ params = &PutObjectTaggingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutObjectTagging", params, optFns, c.addOperationPutObjectTaggingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutObjectTaggingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutObjectTaggingInput struct {
+
+ // The bucket name containing the object. When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Name of the object key.
+ //
+ // This member is required.
+ Key *string
+
+ // Container for the TagSet and Tag elements
+ //
+ // This member is required.
+ Tagging *types.Tagging
+
+ // The MD5 hash for the request body. For requests made using the Amazon Web
+ // Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is
+ // calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // The versionId of the object that the tag-set will be added to.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+type PutObjectTaggingOutput struct {
+
+ // The versionId of the object the tag-set was added to.
+ VersionId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutObjectTaggingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutObjectTagging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutObjectTagging{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutObjectTaggingValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutObjectTagging(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutObjectTaggingUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutObjectTagging(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutObjectTagging",
+ }
+}
+
+// getPutObjectTaggingBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getPutObjectTaggingBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutObjectTaggingInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutObjectTaggingUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutObjectTaggingBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go
new file mode 100644
index 000000000..301ebbf55
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go
@@ -0,0 +1,207 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates or modifies the PublicAccessBlock configuration for an Amazon S3 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
+//
+// *
+// DeletePublicAccessBlock
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
+//
+// *
+// GetBucketPolicyStatus
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html)
+//
+// *
+// Using Amazon S3 Block Public Access
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
+func (c *Client) PutPublicAccessBlock(ctx context.Context, params *PutPublicAccessBlockInput, optFns ...func(*Options)) (*PutPublicAccessBlockOutput, error) {
+ if params == nil {
+ params = &PutPublicAccessBlockInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutPublicAccessBlock", params, optFns, c.addOperationPutPublicAccessBlockMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutPublicAccessBlockOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutPublicAccessBlockInput struct {
+
+ // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want
+ // to set.
+ //
+ // This member is required.
+ Bucket *string
+
+ // 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 S3 User Guide.
+ //
+ // This member is required.
+ PublicAccessBlockConfiguration *types.PublicAccessBlockConfiguration
+
+ // The MD5 hash of the PutPublicAccessBlock request body. For requests made using
+ // the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services
+ // SDKs, this field is calculated automatically.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+type PutPublicAccessBlockOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutPublicAccessBlockMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpPutPublicAccessBlock{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpPutPublicAccessBlock{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpPutPublicAccessBlockValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutPublicAccessBlock(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutPublicAccessBlockUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutPublicAccessBlock(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "PutPublicAccessBlock",
+ }
+}
+
+// getPutPublicAccessBlockBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getPutPublicAccessBlockBucketMember(input interface{}) (*string, bool) {
+ in := input.(*PutPublicAccessBlockInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addPutPublicAccessBlockUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getPutPublicAccessBlockBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go
new file mode 100644
index 000000000..754bbb6b7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go
@@ -0,0 +1,421 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Restores an archived copy of an object back into Amazon S3 This action is not
+// supported by Amazon S3 on Outposts. This action 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/userguide/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/userguide/s3-access-control.html)
+// in the Amazon S3 User 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 S3 User 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 Amazon Web Services Region as the bucket that contains the
+// archive object that is being queried. The Amazon Web Services 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 S3 User Guide. For more information about the S3 structure in the
+// request body, see the following:
+//
+// * PutObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
+//
+// * Managing
+// Access with ACLs
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html) in the
+// Amazon S3 User Guide
+//
+// * Protecting Data Using Server-Side Encryption
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html) in
+// the Amazon S3 User 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 S3 User 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 objects Objects that you archive to the S3 Glacier or S3 Glacier
+// Deep Archive storage class, and S3 Intelligent-Tiering Archive or S3
+// Intelligent-Tiering Deep Archive tiers are not accessible in real time. For
+// objects in Archive Access or Deep Archive Access tiers you must first initiate a
+// restore request, and then wait until the object is moved into the Frequent
+// Access tier. For objects in S3 Glacier or S3 Glacier Deep Archive storage
+// classes you must first initiate a restore request, and then wait until a
+// temporary copy of the object is available. To access an archived object, you
+// must restore the object for the duration (number of days) that you specify. 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. 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 S3 Glacier storage class or S3 Intelligent-Tiering Archive tier 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
+// is 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 objects
+// stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering
+// Deep Archive tier.
+//
+// * Standard - Standard retrievals allow you to access any of
+// your archived objects within several hours. This is the default option for
+// retrieval requests that do not specify the retrieval option. Standard retrievals
+// typically finish within 3–5 hours for objects stored in the S3 Glacier storage
+// class or S3 Intelligent-Tiering Archive tier. They typically finish within 12
+// hours for objects stored in the S3 Glacier Deep Archive storage class or S3
+// Intelligent-Tiering Deep Archive tier. Standard retrievals are free for objects
+// stored in S3 Intelligent-Tiering.
+//
+// * Bulk - Bulk retrievals are the lowest-cost
+// retrieval option in S3 Glacier, enabling you to retrieve large amounts, even
+// petabytes, of data inexpensively. Bulk retrievals typically finish within 5–12
+// hours for objects stored in the S3 Glacier storage class or S3
+// Intelligent-Tiering Archive tier. They typically finish within 48 hours for
+// objects stored in the S3 Glacier Deep Archive storage class or S3
+// Intelligent-Tiering Deep Archive tier. Bulk retrievals are free for objects
+// stored in S3 Intelligent-Tiering.
+//
+// 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 S3 User Guide. You can use Amazon S3 restore speed upgrade to change the
+// restore speed to a faster speed while it is in progress. 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 S3 User 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 S3 User 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
+// and Object Lifecycle Management
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) in
+// Amazon S3 User Guide. Responses A successful action returns either the 200 OK or
+// 202 Accepted status code.
+//
+// * If the object is not previously restored, then
+// Amazon S3 returns 202 Accepted in the response.
+//
+// * If the object 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: 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
+//
+// *
+// GetBucketNotificationConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html)
+//
+// *
+// 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 S3 User Guide
+func (c *Client) RestoreObject(ctx context.Context, params *RestoreObjectInput, optFns ...func(*Options)) (*RestoreObjectOutput, error) {
+ if params == nil {
+ params = &RestoreObjectInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RestoreObject", params, optFns, c.addOperationRestoreObjectMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RestoreObjectOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RestoreObjectInput struct {
+
+ // The bucket name containing the object to restore. When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Object key for which the action was initiated.
+ //
+ // This member is required.
+ Key *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // Container for restore job parameters.
+ RestoreRequest *types.RestoreRequest
+
+ // VersionId used to reference a specific version of the object.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+type RestoreObjectOutput struct {
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // Indicates the path in the provided S3 output location where Select results will
+ // be restored to.
+ RestoreOutputPath *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRestoreObjectMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpRestoreObject{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpRestoreObject{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpRestoreObjectValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreObject(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRestoreObjectUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opRestoreObject(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "RestoreObject",
+ }
+}
+
+// getRestoreObjectBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getRestoreObjectBucketMember(input interface{}) (*string, bool) {
+ in := input.(*RestoreObjectInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addRestoreObjectUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getRestoreObjectBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go
new file mode 100644
index 000000000..272e72cef
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go
@@ -0,0 +1,417 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithysync "github.com/aws/smithy-go/sync"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "sync"
+)
+
+// This action 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, 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. This
+// action is not supported by Amazon S3 on Outposts. 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 S3 User 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 S3 User 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 S3 User 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html). 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 S3 User Guide. For objects that are encrypted with Amazon S3
+// managed encryption keys (SSE-S3) and Amazon Web Services KMS keys (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 S3 User 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 Appendix: SelectObjectContent Response
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html).
+// GetObject Support The SelectObjectContent action does not support the following
+// GetObject functionality. For more information, see GetObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html).
+//
+// * Range:
+// Although you can specify a scan range for an Amazon S3 Select request (see
+// SelectObjectContentRequest - ScanRange
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html#AmazonS3-SelectObjectContent-request-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 S3 User Guide.
+//
+// Special Errors For a list of special errors for
+// this operation, see List of SELECT Object Content Error Codes
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#SelectObjectContentErrorCodeList)
+// Related Resources
+//
+// * GetObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
+//
+// *
+// GetBucketLifecycleConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
+//
+// *
+// PutBucketLifecycleConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
+func (c *Client) SelectObjectContent(ctx context.Context, params *SelectObjectContentInput, optFns ...func(*Options)) (*SelectObjectContentOutput, error) {
+ if params == nil {
+ params = &SelectObjectContentInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "SelectObjectContent", params, optFns, c.addOperationSelectObjectContentMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*SelectObjectContentOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+// Request to filter 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 specify a data serialization format (JSON or CSV) of the
+// object. Amazon S3 uses this to parse object data into records. It returns only
+// records that match the specified SQL expression. You must also specify the data
+// serialization format for the response. For more information, see S3Select API
+// Documentation
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html).
+type SelectObjectContentInput struct {
+
+ // The S3 bucket.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The expression that is used to query the object.
+ //
+ // This member is required.
+ Expression *string
+
+ // The type of the provided expression (for example, SQL).
+ //
+ // This member is required.
+ ExpressionType types.ExpressionType
+
+ // Describes the format of the data in the object that is being queried.
+ //
+ // This member is required.
+ InputSerialization *types.InputSerialization
+
+ // The object key.
+ //
+ // This member is required.
+ Key *string
+
+ // Describes the format of the data that you want Amazon S3 to return in response.
+ //
+ // This member is required.
+ OutputSerialization *types.OutputSerialization
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // Specifies if periodic request progress information should be enabled.
+ RequestProgress *types.RequestProgress
+
+ // The SSE Algorithm used to encrypt the object. For more information, see
+ // Server-Side Encryption (Using Customer-Provided Encryption Keys
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
+ SSECustomerAlgorithm *string
+
+ // The SSE Customer Key. For more information, see Server-Side Encryption (Using
+ // Customer-Provided Encryption Keys
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
+ SSECustomerKey *string
+
+ // 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
+
+ // 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 *types.ScanRange
+
+ noSmithyDocumentSerde
+}
+
+type SelectObjectContentOutput struct {
+ eventStream *SelectObjectContentEventStream
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+// GetStream returns the type to interact with the event stream.
+func (o *SelectObjectContentOutput) GetStream() *SelectObjectContentEventStream {
+ return o.eventStream
+}
+
+func (c *Client) addOperationSelectObjectContentMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpSelectObjectContent{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpSelectObjectContent{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addEventStreamSelectObjectContentMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpSelectObjectContentValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSelectObjectContent(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSelectObjectContentUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opSelectObjectContent(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "SelectObjectContent",
+ }
+}
+
+// getSelectObjectContentBucketMember returns a pointer to string denoting a
+// provided bucket member valueand a boolean indicating if the input has a modeled
+// bucket name,
+func getSelectObjectContentBucketMember(input interface{}) (*string, bool) {
+ in := input.(*SelectObjectContentInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addSelectObjectContentUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getSelectObjectContentBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
+
+// SelectObjectContentEventStream provides the event stream handling for the SelectObjectContent operation.
+//
+// For testing and mocking the event stream this type should be initialized via
+// the NewSelectObjectContentEventStream constructor function. Using the functional options
+// to pass in nested mock behavior.
+type SelectObjectContentEventStream struct {
+ // SelectObjectContentEventStreamReader 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
+
+ done chan struct{}
+ closeOnce sync.Once
+ err *smithysync.OnceErr
+}
+
+// NewSelectObjectContentEventStream initializes an SelectObjectContentEventStream.
+// This function should only be used for testing and mocking the SelectObjectContentEventStream
+// stream within your application.
+//
+// The Reader member must be set before reading events from the stream.
+func NewSelectObjectContentEventStream(optFns ...func(*SelectObjectContentEventStream)) *SelectObjectContentEventStream {
+ es := &SelectObjectContentEventStream{
+ done: make(chan struct{}),
+ err: smithysync.NewOnceErr(),
+ }
+ for _, fn := range optFns {
+ fn(es)
+ }
+ return es
+}
+
+// Events returns a channel to read events from.
+func (es *SelectObjectContentEventStream) Events() <-chan types.SelectObjectContentEventStream {
+ return es.Reader.Events()
+}
+
+// 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.
+//
+// Will close the underlying EventStream writer and reader, and no more events can be
+// sent or received.
+func (es *SelectObjectContentEventStream) Close() error {
+ es.closeOnce.Do(es.safeClose)
+ return es.Err()
+}
+
+func (es *SelectObjectContentEventStream) safeClose() {
+ close(es.done)
+
+ es.Reader.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
+}
+
+func (es *SelectObjectContentEventStream) waitStreamClose() {
+ type errorSet interface {
+ ErrorSet() <-chan struct{}
+ }
+
+ var outputErrCh <-chan struct{}
+ if v, ok := es.Reader.(errorSet); 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()
+
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go
new file mode 100644
index 000000000..430aa644c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go
@@ -0,0 +1,392 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+)
+
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
+// operation. You must initiate a multipart upload (see CreateMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html))
+// 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. If the upload request is signed with
+// Signature Version 4, then Amazon Web Services S3 uses the x-amz-content-sha256
+// header as a checksum instead of Content-MD5. For more information see
+// Authenticating Requests: Using the Authorization Header (Amazon Web Services
+// Signature Version 4)
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html).
+// 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 S3 User Guide . For information on the permissions required to use
+// the multipart upload API, go to Multipart Upload and Permissions
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) in the
+// Amazon S3 User 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 Amazon Web Services 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html).
+// For more information, go to Using Server-Side Encryption
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html)
+// in the Amazon S3 User 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html).
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+//
+// *
+// CompleteMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
+//
+// *
+// AbortMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
+//
+// *
+// ListParts
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+//
+// *
+// ListMultipartUploads
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
+func (c *Client) UploadPart(ctx context.Context, params *UploadPartInput, optFns ...func(*Options)) (*UploadPartOutput, error) {
+ if params == nil {
+ params = &UploadPartInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UploadPart", params, optFns, c.addOperationUploadPartMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UploadPartOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UploadPartInput struct {
+
+ // The name of the bucket to which the multipart upload was initiated. When using
+ // this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Object key for which the multipart upload was initiated.
+ //
+ // This member is required.
+ Key *string
+
+ // Part number of part being uploaded. This is a positive integer between 1 and
+ // 10,000.
+ //
+ // This member is required.
+ PartNumber int32
+
+ // Upload ID identifying the multipart upload whose part is being uploaded.
+ //
+ // This member is required.
+ UploadId *string
+
+ // Object data.
+ Body io.Reader
+
+ // Size of the body in bytes. This parameter is useful when the size of the body
+ // cannot be determined automatically.
+ ContentLength int64
+
+ // The base64-encoded 128-bit MD5 digest of the part data. This parameter is
+ // auto-populated when using the command from the CLI. This parameter is required
+ // if object lock parameters are specified.
+ ContentMD5 *string
+
+ // The account ID of the expected bucket owner. If the bucket is owned by a
+ // different account, the request will fail with an HTTP 403 (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // Specifies the algorithm to use to when encrypting the object (for example,
+ // AES256).
+ SSECustomerAlgorithm *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 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
+
+ // 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 that the
+ // encryption key was transmitted without error.
+ SSECustomerKeyMD5 *string
+
+ noSmithyDocumentSerde
+}
+
+type UploadPartOutput struct {
+
+ // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
+ // encryption with Amazon Web Services KMS (SSE-KMS).
+ BucketKeyEnabled bool
+
+ // Entity tag for the uploaded object.
+ ETag *string
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // If server-side encryption with a customer-provided encryption key was requested,
+ // the response will include this header confirming the encryption algorithm used.
+ SSECustomerAlgorithm *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
+ // verification of the customer-provided encryption key.
+ SSECustomerKeyMD5 *string
+
+ // If present, specifies the ID of the Amazon Web Services Key Management Service
+ // (Amazon Web Services KMS) symmetric customer managed key was used for the
+ // object.
+ SSEKMSKeyId *string
+
+ // The server-side encryption algorithm used when storing this object in Amazon S3
+ // (for example, AES256, aws:kms).
+ ServerSideEncryption types.ServerSideEncryption
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUploadPartMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpUploadPart{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpUploadPart{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpUploadPartValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUploadPart(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addUploadPartUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.UseDynamicPayloadSigningMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opUploadPart(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "UploadPart",
+ }
+}
+
+// getUploadPartBucketMember returns a pointer to string denoting a provided bucket
+// member valueand a boolean indicating if the input has a modeled bucket name,
+func getUploadPartBucketMember(input interface{}) (*string, bool) {
+ in := input.(*UploadPartInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addUploadPartUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getUploadPartBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
+
+// PresignUploadPart is used to generate a presigned HTTP Request which contains
+// presigned URL, signed headers and HTTP method used.
+func (c *PresignClient) PresignUploadPart(ctx context.Context, params *UploadPartInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) {
+ if params == nil {
+ params = &UploadPartInput{}
+ }
+ options := c.options.copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption)
+
+ result, _, err := c.client.invokeOperation(ctx, "UploadPart", params, clientOptFns,
+ c.client.addOperationUploadPartMiddlewares,
+ presignConverter(options).convertToPresignMiddleware,
+ func(stack *middleware.Stack, options Options) error {
+ return awshttp.RemoveContentTypeHeader(stack)
+ },
+ addUploadPartPayloadAsUnsigned,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*v4.PresignedHTTPRequest)
+ return out, nil
+}
+
+func addUploadPartPayloadAsUnsigned(stack *middleware.Stack, options Options) error {
+ v4.RemoveContentSHA256HeaderMiddleware(stack)
+ v4.RemoveComputePayloadSHA256Middleware(stack)
+ return v4.AddUnsignedPayloadMiddleware(stack)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go
new file mode 100644
index 000000000..b4c89d3cc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go
@@ -0,0 +1,436 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// 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 S3
+// User Guide. Instead of using an existing object as part data, you might use the
+// UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+// action 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 S3 User Guide.
+//
+// * For information about permissions required to use the
+// multipart upload API, see Multipart Upload and Permissions
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) in the
+// Amazon S3 User Guide.
+//
+// * For information about copying objects using a single
+// atomic action vs. the multipart upload, see Operations on Objects
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html) in the
+// Amazon S3 User Guide.
+//
+// * For information about using server-side encryption with
+// customer-provided encryption keys with the UploadPartCopy operation, see
+// CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
+// and UploadPart
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html).
+//
+// 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
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
+//
+// *
+// UploadPart
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
+//
+// *
+// CompleteMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
+//
+// *
+// AbortMultipartUpload
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
+//
+// *
+// ListParts
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
+//
+// *
+// ListMultipartUploads
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
+func (c *Client) UploadPartCopy(ctx context.Context, params *UploadPartCopyInput, optFns ...func(*Options)) (*UploadPartCopyOutput, error) {
+ if params == nil {
+ params = &UploadPartCopyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UploadPartCopy", params, optFns, c.addOperationUploadPartCopyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UploadPartCopyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UploadPartCopyInput struct {
+
+ // The bucket name. When using this action 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
+ // action with an access point through the Amazon Web Services 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/userguide/using-access-points.html)
+ // in the Amazon S3 User Guide. When using this action with Amazon S3 on Outposts,
+ // you must direct requests to the S3 on Outposts hostname. The S3 on Outposts
+ // hostname takes the form
+ // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using
+ // this action using S3 on Outposts through the Amazon Web Services SDKs, you
+ // provide the Outposts bucket ARN in place of the bucket name. For more
+ // information about S3 on Outposts ARNs, see Using S3 on Outposts
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Specifies the source object for the copy operation. You specify the value in one
+ // of two formats, depending on whether you want to access the source object
+ // through an access point
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html):
+ //
+ // *
+ // For objects not accessed through an access point, specify the name of the source
+ // bucket and key of the source object, separated by a slash (/). For example, to
+ // copy the object reports/january.pdf from the bucket awsexamplebucket, use
+ // awsexamplebucket/reports/january.pdf. The value must be URL encoded.
+ //
+ // * For
+ // objects accessed through access points, specify the Amazon Resource Name (ARN)
+ // of the object as accessed through the access point, in the format
+ // arn:aws:s3:::accesspoint//object/. For example, to copy the object
+ // reports/january.pdf through access point my-access-point owned by account
+ // 123456789012 in Region us-west-2, use the URL encoding of
+ // arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf.
+ // The value must be URL encoded. Amazon S3 supports copy operations using access
+ // points only when the source and destination buckets are in the same Amazon Web
+ // Services Region. Alternatively, for objects accessed through Amazon S3 on
+ // Outposts, specify the ARN of the object as accessed in the format
+ // arn:aws:s3-outposts:::outpost//object/. For example, to copy the object
+ // reports/january.pdf through outpost my-outpost owned by account 123456789012 in
+ // Region us-west-2, use the URL encoding of
+ // arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf.
+ // The value must be URL encoded.
+ //
+ // To copy a specific version of an object, append
+ // ?versionId= to the value (for example,
+ // awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).
+ // If you don't specify a version ID, Amazon S3 copies the latest version of the
+ // source object.
+ //
+ // This member is required.
+ CopySource *string
+
+ // Object key for which the multipart upload was initiated.
+ //
+ // This member is required.
+ Key *string
+
+ // Part number of part being copied. This is a positive integer between 1 and
+ // 10,000.
+ //
+ // This member is required.
+ PartNumber int32
+
+ // Upload ID identifying the multipart upload whose part is being copied.
+ //
+ // This member is required.
+ UploadId *string
+
+ // Copies the object if its entity tag (ETag) matches the specified tag.
+ CopySourceIfMatch *string
+
+ // Copies the object if it has been modified since the specified time.
+ CopySourceIfModifiedSince *time.Time
+
+ // Copies the object if its entity tag (ETag) is different than the specified ETag.
+ CopySourceIfNoneMatch *string
+
+ // Copies the object if it hasn't been modified since the specified time.
+ CopySourceIfUnmodifiedSince *time.Time
+
+ // 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 10
+ // bytes of the source. You can copy a range only if the source object is greater
+ // than 5 MB.
+ CopySourceRange *string
+
+ // Specifies the algorithm to use when decrypting the source object (for example,
+ // AES256).
+ CopySourceSSECustomerAlgorithm *string
+
+ // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
+ // the source object. The encryption key provided in this header must be one that
+ // was used when the source object was created.
+ CopySourceSSECustomerKey *string
+
+ // 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 that the
+ // encryption key was transmitted without error.
+ CopySourceSSECustomerKeyMD5 *string
+
+ // The account ID of the expected destination bucket owner. If the destination
+ // bucket is owned by a different account, the request will fail with an HTTP 403
+ // (Access Denied) error.
+ ExpectedBucketOwner *string
+
+ // The account ID of the expected source bucket owner. If the source bucket is
+ // owned by a different account, the request will fail with an HTTP 403 (Access
+ // Denied) error.
+ ExpectedSourceBucketOwner *string
+
+ // 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 User Guide.
+ RequestPayer types.RequestPayer
+
+ // Specifies the algorithm to use to when encrypting the object (for example,
+ // AES256).
+ SSECustomerAlgorithm *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 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
+
+ // 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 that the
+ // encryption key was transmitted without error.
+ SSECustomerKeyMD5 *string
+
+ noSmithyDocumentSerde
+}
+
+type UploadPartCopyOutput struct {
+
+ // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
+ // encryption with Amazon Web Services KMS (SSE-KMS).
+ BucketKeyEnabled bool
+
+ // Container for all response elements.
+ CopyPartResult *types.CopyPartResult
+
+ // The version of the source object that was copied, if you have enabled versioning
+ // on the source bucket.
+ CopySourceVersionId *string
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // If server-side encryption with a customer-provided encryption key was requested,
+ // the response will include this header confirming the encryption algorithm used.
+ SSECustomerAlgorithm *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
+ // verification of the customer-provided encryption key.
+ SSECustomerKeyMD5 *string
+
+ // If present, specifies the ID of the Amazon Web Services Key Management Service
+ // (Amazon Web Services KMS) symmetric customer managed key that was used for the
+ // object.
+ SSEKMSKeyId *string
+
+ // The server-side encryption algorithm used when storing this object in Amazon S3
+ // (for example, AES256, aws:kms).
+ ServerSideEncryption types.ServerSideEncryption
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUploadPartCopyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpUploadPartCopy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpUploadPartCopy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addOpUploadPartCopyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUploadPartCopy(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addUploadPartCopyUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = s3cust.HandleResponseErrorWith200Status(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opUploadPartCopy(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "UploadPartCopy",
+ }
+}
+
+// getUploadPartCopyBucketMember returns a pointer to string denoting a provided
+// bucket member valueand a boolean indicating if the input has a modeled bucket
+// name,
+func getUploadPartCopyBucketMember(input interface{}) (*string, bool) {
+ in := input.(*UploadPartCopyInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addUploadPartCopyUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getUploadPartCopyBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go
new file mode 100644
index 000000000..0da1d94fb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go
@@ -0,0 +1,405 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+ "strings"
+ "time"
+)
+
+// Passes transformed objects to a GetObject operation when using Object Lambda
+// access points. For information about Object Lambda access points, see
+// Transforming objects with Object Lambda access points
+// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html)
+// in the Amazon S3 User Guide. This operation supports metadata that can be
+// returned by GetObject
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html), in
+// addition to RequestRoute, RequestToken, StatusCode, ErrorCode, and ErrorMessage.
+// The GetObject response metadata is supported so that the WriteGetObjectResponse
+// caller, typically an Lambda function, can provide the same metadata when it
+// internally invokes GetObject. When WriteGetObjectResponse is called by a
+// customer-owned Lambda function, the metadata returned to the end user GetObject
+// call might differ from what Amazon S3 would normally return. You can include any
+// number of metadata headers. When including a metadata header, it should be
+// prefaced with x-amz-meta. For example, x-amz-meta-my-custom-header:
+// MyCustomValue. The primary use case for this is to forward GetObject metadata.
+// Amazon Web Services provides some prebuilt Lambda functions that you can use
+// with S3 Object Lambda to detect and redact personally identifiable information
+// (PII) and decompress S3 objects. These Lambda functions are available in the
+// Amazon Web Services Serverless Application Repository, and can be selected
+// through the Amazon Web Services Management Console when you create your Object
+// Lambda access point. Example 1: PII Access Control - This Lambda function uses
+// Amazon Comprehend, a natural language processing (NLP) service using machine
+// learning to find insights and relationships in text. It automatically detects
+// personally identifiable information (PII) such as names, addresses, dates,
+// credit card numbers, and social security numbers from documents in your Amazon
+// S3 bucket. Example 2: PII Redaction - This Lambda function uses Amazon
+// Comprehend, a natural language processing (NLP) service using machine learning
+// to find insights and relationships in text. It automatically redacts personally
+// identifiable information (PII) such as names, addresses, dates, credit card
+// numbers, and social security numbers from documents in your Amazon S3 bucket.
+// Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression, is
+// equipped to decompress objects stored in S3 in one of six compressed file
+// formats including bzip2, gzip, snappy, zlib, zstandard and ZIP. For information
+// on how to view and use these functions, see Using Amazon Web Services built
+// Lambda functions
+// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/olap-examples.html) in
+// the Amazon S3 User Guide.
+func (c *Client) WriteGetObjectResponse(ctx context.Context, params *WriteGetObjectResponseInput, optFns ...func(*Options)) (*WriteGetObjectResponseOutput, error) {
+ if params == nil {
+ params = &WriteGetObjectResponseInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "WriteGetObjectResponse", params, optFns, c.addOperationWriteGetObjectResponseMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*WriteGetObjectResponseOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type WriteGetObjectResponseInput struct {
+
+ // Route prefix to the HTTP URL generated.
+ //
+ // This member is required.
+ RequestRoute *string
+
+ // A single use encrypted token that maps WriteGetObjectResponse to the end user
+ // GetObject request.
+ //
+ // This member is required.
+ RequestToken *string
+
+ // Indicates that a range of bytes was specified.
+ AcceptRanges *string
+
+ // The object data.
+ Body io.Reader
+
+ // Indicates whether the object stored in Amazon S3 uses an S3 bucket key for
+ // server-side encryption with Amazon Web Services KMS (SSE-KMS).
+ BucketKeyEnabled bool
+
+ // Specifies caching behavior along the request/reply chain.
+ CacheControl *string
+
+ // Specifies presentational information for the object.
+ ContentDisposition *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.
+ ContentEncoding *string
+
+ // The language the content is in.
+ ContentLanguage *string
+
+ // The size of the content body in bytes.
+ ContentLength int64
+
+ // The portion of the object returned in the response.
+ ContentRange *string
+
+ // A standard MIME type describing the format of the object data.
+ ContentType *string
+
+ // Specifies whether an object stored in Amazon S3 is (true) or is not (false) a
+ // delete marker.
+ DeleteMarker bool
+
+ // An opaque identifier assigned by a web server to a specific version of a
+ // resource found at a URL.
+ ETag *string
+
+ // A string that uniquely identifies an error condition. Returned in the tag of
+ // the error XML response for a corresponding GetObject call. Cannot be used with a
+ // successful StatusCode header or when the transformed object is provided in the
+ // body. All error codes from S3 are sentence-cased. Regex value is
+ // "^[A-Z][a-zA-Z]+$".
+ ErrorCode *string
+
+ // Contains a generic description of the error condition. Returned in the tag of
+ // the error XML response for a corresponding GetObject call. Cannot be used with a
+ // successful StatusCode header or when the transformed object is provided in body.
+ ErrorMessage *string
+
+ // If object stored in Amazon S3 expiration is configured (see PUT Bucket
+ // lifecycle) it includes expiry-date and rule-id key-value pairs providing object
+ // expiration information. The value of the rule-id is URL encoded.
+ Expiration *string
+
+ // The date and time at which the object is no longer cacheable.
+ Expires *time.Time
+
+ // The date and time that the object was last modified.
+ LastModified *time.Time
+
+ // A map of metadata to store with the object in S3.
+ Metadata map[string]string
+
+ // Set to the number of metadata entries not returned in x-amz-meta headers. This
+ // can happen if you create metadata using an API like SOAP that supports more
+ // flexible metadata than the REST API. For example, using SOAP, you can create
+ // metadata whose values are not legal HTTP headers.
+ MissingMeta int32
+
+ // Indicates whether an object stored in Amazon S3 has an active legal hold.
+ ObjectLockLegalHoldStatus types.ObjectLockLegalHoldStatus
+
+ // Indicates whether an object stored in Amazon S3 has Object Lock enabled. For
+ // more information about S3 Object Lock, see Object Lock
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html).
+ ObjectLockMode types.ObjectLockMode
+
+ // The date and time when Object Lock is configured to expire.
+ ObjectLockRetainUntilDate *time.Time
+
+ // The count of parts this object has.
+ PartsCount int32
+
+ // Indicates if request involves bucket that is either a source or destination in a
+ // Replication rule. For more information about S3 Replication, see Replication
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html).
+ ReplicationStatus types.ReplicationStatus
+
+ // If present, indicates that the requester was successfully charged for the
+ // request.
+ RequestCharged types.RequestCharged
+
+ // Provides information about object restoration operation and expiration time of
+ // the restored object copy.
+ Restore *string
+
+ // Encryption algorithm used if server-side encryption with a customer-provided
+ // encryption key was specified for object stored in Amazon S3.
+ SSECustomerAlgorithm *string
+
+ // 128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to
+ // encrypt data stored in S3. For more information, see Protecting data using
+ // server-side encryption with customer-provided encryption keys (SSE-C)
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html).
+ SSECustomerKeyMD5 *string
+
+ // If present, specifies the ID of the Amazon Web Services Key Management Service
+ // (Amazon Web Services KMS) symmetric customer managed key that was used for
+ // stored in Amazon S3 object.
+ SSEKMSKeyId *string
+
+ // The server-side encryption algorithm used when storing requested object in
+ // Amazon S3 (for example, AES256, aws:kms).
+ ServerSideEncryption types.ServerSideEncryption
+
+ // The integer status code for an HTTP response of a corresponding GetObject
+ // request. Status Codes
+ //
+ // * 200 - OK
+ //
+ // * 206 - Partial Content
+ //
+ // * 304 - Not
+ // Modified
+ //
+ // * 400 - Bad Request
+ //
+ // * 401 - Unauthorized
+ //
+ // * 403 - Forbidden
+ //
+ // * 404 -
+ // Not Found
+ //
+ // * 405 - Method Not Allowed
+ //
+ // * 409 - Conflict
+ //
+ // * 411 - Length
+ // Required
+ //
+ // * 412 - Precondition Failed
+ //
+ // * 416 - Range Not Satisfiable
+ //
+ // * 500 -
+ // Internal Server Error
+ //
+ // * 503 - Service Unavailable
+ StatusCode int32
+
+ // The class of storage used to store object in Amazon S3.
+ StorageClass types.StorageClass
+
+ // The number of tags, if any, on the object.
+ TagCount int32
+
+ // An ID used to reference a specific version of the object.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+type WriteGetObjectResponseOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationWriteGetObjectResponseMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestxml_serializeOpWriteGetObjectResponse{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpWriteGetObjectResponse{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddUnsignedPayloadMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = swapWithCustomHTTPSignerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addEndpointPrefix_opWriteGetObjectResponseMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpWriteGetObjectResponseValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opWriteGetObjectResponse(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addWriteGetObjectResponseUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.UseDynamicPayloadSigningMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+type endpointPrefix_opWriteGetObjectResponseMiddleware struct {
+}
+
+func (*endpointPrefix_opWriteGetObjectResponseMiddleware) ID() string {
+ return "EndpointHostPrefix"
+}
+
+func (m *endpointPrefix_opWriteGetObjectResponseMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ input, ok := in.Parameters.(*WriteGetObjectResponseInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input type %T", in.Parameters)
+ }
+
+ var prefix strings.Builder
+ if input.RequestRoute == nil {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("RequestRoute forms part of the endpoint host and so may not be nil")}
+ } else if !smithyhttp.ValidHostLabel(*input.RequestRoute) {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("RequestRoute forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.RequestRoute)}
+ } else {
+ prefix.WriteString(*input.RequestRoute)
+ }
+ prefix.WriteString(".")
+ req.URL.Host = prefix.String() + req.URL.Host
+
+ return next.HandleSerialize(ctx, in)
+}
+func addEndpointPrefix_opWriteGetObjectResponseMiddleware(stack *middleware.Stack) error {
+ return stack.Serialize.Insert(&endpointPrefix_opWriteGetObjectResponseMiddleware{}, `OperationSerializer`, middleware.After)
+}
+
+func newServiceMetadataMiddleware_opWriteGetObjectResponse(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "s3",
+ OperationName: "WriteGetObjectResponse",
+ }
+}
+
+func addWriteGetObjectResponseUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: nopGetBucketAccessor,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: true,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go
new file mode 100644
index 000000000..8867bf451
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go
@@ -0,0 +1,20745 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "encoding/xml"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi"
+ awsxml "github.com/aws/aws-sdk-go-v2/aws/protocol/xml"
+ "github.com/aws/aws-sdk-go-v2/service/internal/s3shared"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ smithy "github.com/aws/smithy-go"
+ smithyxml "github.com/aws/smithy-go/encoding/xml"
+ smithyio "github.com/aws/smithy-go/io"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithytime "github.com/aws/smithy-go/time"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+ "io/ioutil"
+ "strconv"
+ "strings"
+)
+
+type awsRestxml_deserializeOpAbortMultipartUpload struct {
+}
+
+func (*awsRestxml_deserializeOpAbortMultipartUpload) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpAbortMultipartUpload) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorAbortMultipartUpload(response, &metadata)
+ }
+ output := &AbortMultipartUploadOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsAbortMultipartUploadOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorAbortMultipartUpload(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("NoSuchUpload", errorCode):
+ return awsRestxml_deserializeErrorNoSuchUpload(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsAbortMultipartUploadOutput(v *AbortMultipartUploadOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ return nil
+}
+
+type awsRestxml_deserializeOpCompleteMultipartUpload struct {
+}
+
+func (*awsRestxml_deserializeOpCompleteMultipartUpload) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpCompleteMultipartUpload) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorCompleteMultipartUpload(response, &metadata)
+ }
+ output := &CompleteMultipartUploadOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsCompleteMultipartUploadOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentCompleteMultipartUploadOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorCompleteMultipartUpload(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsCompleteMultipartUploadOutput(v *CompleteMultipartUploadOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-bucket-key-enabled"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseBool(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.BucketKeyEnabled = vv
+ }
+
+ if headerValues := response.Header.Values("x-amz-expiration"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.Expiration = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ServerSideEncryption = types.ServerSideEncryption(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-aws-kms-key-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSEKMSKeyId = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-version-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.VersionId = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+func awsRestxml_deserializeOpDocumentCompleteMultipartUploadOutput(v **CompleteMultipartUploadOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CompleteMultipartUploadOutput
+ if *v == nil {
+ sv = &CompleteMultipartUploadOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Bucket", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Bucket = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ETag", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ETag = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Key", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Key = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Location", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Location = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpCopyObject struct {
+}
+
+func (*awsRestxml_deserializeOpCopyObject) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpCopyObject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorCopyObject(response, &metadata)
+ }
+ output := &CopyObjectOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsCopyObjectOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentCopyObjectResult(&output.CopyObjectResult, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorCopyObject(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("ObjectNotInActiveTierError", errorCode):
+ return awsRestxml_deserializeErrorObjectNotInActiveTierError(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsCopyObjectOutput(v *CopyObjectOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-bucket-key-enabled"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseBool(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.BucketKeyEnabled = vv
+ }
+
+ if headerValues := response.Header.Values("x-amz-copy-source-version-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.CopySourceVersionId = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-expiration"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.Expiration = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ServerSideEncryption = types.ServerSideEncryption(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-algorithm"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSECustomerAlgorithm = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-key-MD5"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSECustomerKeyMD5 = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-context"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSEKMSEncryptionContext = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-aws-kms-key-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSEKMSKeyId = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-version-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.VersionId = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+func awsRestxml_deserializeOpDocumentCopyObjectOutput(v **CopyObjectOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CopyObjectOutput
+ if *v == nil {
+ sv = &CopyObjectOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("CopyObjectResult", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentCopyObjectResult(&sv.CopyObjectResult, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpCreateBucket struct {
+}
+
+func (*awsRestxml_deserializeOpCreateBucket) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpCreateBucket) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorCreateBucket(response, &metadata)
+ }
+ output := &CreateBucketOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsCreateBucketOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorCreateBucket(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("BucketAlreadyExists", errorCode):
+ return awsRestxml_deserializeErrorBucketAlreadyExists(response, errorBody)
+
+ case strings.EqualFold("BucketAlreadyOwnedByYou", errorCode):
+ return awsRestxml_deserializeErrorBucketAlreadyOwnedByYou(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsCreateBucketOutput(v *CreateBucketOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("Location"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.Location = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+
+type awsRestxml_deserializeOpCreateMultipartUpload struct {
+}
+
+func (*awsRestxml_deserializeOpCreateMultipartUpload) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpCreateMultipartUpload) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorCreateMultipartUpload(response, &metadata)
+ }
+ output := &CreateMultipartUploadOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsCreateMultipartUploadOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentCreateMultipartUploadOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorCreateMultipartUpload(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsCreateMultipartUploadOutput(v *CreateMultipartUploadOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-abort-date"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ t, err := smithytime.ParseHTTPDate(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.AbortDate = ptr.Time(t)
+ }
+
+ if headerValues := response.Header.Values("x-amz-abort-rule-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.AbortRuleId = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-bucket-key-enabled"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseBool(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.BucketKeyEnabled = vv
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ServerSideEncryption = types.ServerSideEncryption(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-algorithm"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSECustomerAlgorithm = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-key-MD5"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSECustomerKeyMD5 = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-context"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSEKMSEncryptionContext = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-aws-kms-key-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSEKMSKeyId = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+func awsRestxml_deserializeOpDocumentCreateMultipartUploadOutput(v **CreateMultipartUploadOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *CreateMultipartUploadOutput
+ if *v == nil {
+ sv = &CreateMultipartUploadOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Bucket", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Bucket = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Key", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Key = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("UploadId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UploadId = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpDeleteBucket struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteBucket) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteBucket) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteBucket(response, &metadata)
+ }
+ output := &DeleteBucketOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteBucket(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpDeleteBucketAnalyticsConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteBucketAnalyticsConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteBucketAnalyticsConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteBucketAnalyticsConfiguration(response, &metadata)
+ }
+ output := &DeleteBucketAnalyticsConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteBucketAnalyticsConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpDeleteBucketCors struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteBucketCors) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteBucketCors) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteBucketCors(response, &metadata)
+ }
+ output := &DeleteBucketCorsOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteBucketCors(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpDeleteBucketEncryption struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteBucketEncryption) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteBucketEncryption) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteBucketEncryption(response, &metadata)
+ }
+ output := &DeleteBucketEncryptionOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteBucketEncryption(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpDeleteBucketIntelligentTieringConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteBucketIntelligentTieringConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteBucketIntelligentTieringConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteBucketIntelligentTieringConfiguration(response, &metadata)
+ }
+ output := &DeleteBucketIntelligentTieringConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteBucketIntelligentTieringConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpDeleteBucketInventoryConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteBucketInventoryConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteBucketInventoryConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteBucketInventoryConfiguration(response, &metadata)
+ }
+ output := &DeleteBucketInventoryConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteBucketInventoryConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpDeleteBucketLifecycle struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteBucketLifecycle) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteBucketLifecycle) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteBucketLifecycle(response, &metadata)
+ }
+ output := &DeleteBucketLifecycleOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteBucketLifecycle(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpDeleteBucketMetricsConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteBucketMetricsConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteBucketMetricsConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteBucketMetricsConfiguration(response, &metadata)
+ }
+ output := &DeleteBucketMetricsConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteBucketMetricsConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpDeleteBucketOwnershipControls struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteBucketOwnershipControls) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteBucketOwnershipControls) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteBucketOwnershipControls(response, &metadata)
+ }
+ output := &DeleteBucketOwnershipControlsOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteBucketOwnershipControls(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpDeleteBucketPolicy struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteBucketPolicy) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteBucketPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteBucketPolicy(response, &metadata)
+ }
+ output := &DeleteBucketPolicyOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteBucketPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpDeleteBucketReplication struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteBucketReplication) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteBucketReplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteBucketReplication(response, &metadata)
+ }
+ output := &DeleteBucketReplicationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteBucketReplication(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpDeleteBucketTagging struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteBucketTagging) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteBucketTagging) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteBucketTagging(response, &metadata)
+ }
+ output := &DeleteBucketTaggingOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteBucketTagging(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpDeleteBucketWebsite struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteBucketWebsite) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteBucketWebsite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteBucketWebsite(response, &metadata)
+ }
+ output := &DeleteBucketWebsiteOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteBucketWebsite(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpDeleteObject struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteObject) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteObject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteObject(response, &metadata)
+ }
+ output := &DeleteObjectOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsDeleteObjectOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteObject(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsDeleteObjectOutput(v *DeleteObjectOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-delete-marker"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseBool(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.DeleteMarker = vv
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-version-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.VersionId = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+
+type awsRestxml_deserializeOpDeleteObjects struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteObjects) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteObjects) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteObjects(response, &metadata)
+ }
+ output := &DeleteObjectsOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsDeleteObjectsOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentDeleteObjectsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteObjects(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsDeleteObjectsOutput(v *DeleteObjectsOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ return nil
+}
+func awsRestxml_deserializeOpDocumentDeleteObjectsOutput(v **DeleteObjectsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DeleteObjectsOutput
+ if *v == nil {
+ sv = &DeleteObjectsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Deleted", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentDeletedObjectsUnwrapped(&sv.Deleted, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Error", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentErrorsUnwrapped(&sv.Errors, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpDeleteObjectTagging struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteObjectTagging) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteObjectTagging) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteObjectTagging(response, &metadata)
+ }
+ output := &DeleteObjectTaggingOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsDeleteObjectTaggingOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteObjectTagging(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsDeleteObjectTaggingOutput(v *DeleteObjectTaggingOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-version-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.VersionId = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+
+type awsRestxml_deserializeOpDeletePublicAccessBlock struct {
+}
+
+func (*awsRestxml_deserializeOpDeletePublicAccessBlock) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeletePublicAccessBlock) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeletePublicAccessBlock(response, &metadata)
+ }
+ output := &DeletePublicAccessBlockOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeletePublicAccessBlock(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpGetBucketAccelerateConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketAccelerateConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketAccelerateConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketAccelerateConfiguration(response, &metadata)
+ }
+ output := &GetBucketAccelerateConfigurationOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentGetBucketAccelerateConfigurationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketAccelerateConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketAccelerateConfigurationOutput(v **GetBucketAccelerateConfigurationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketAccelerateConfigurationOutput
+ if *v == nil {
+ sv = &GetBucketAccelerateConfigurationOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Status", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Status = types.BucketAccelerateStatus(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketAcl struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketAcl) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketAcl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketAcl(response, &metadata)
+ }
+ output := &GetBucketAclOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentGetBucketAclOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketAcl(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketAclOutput(v **GetBucketAclOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketAclOutput
+ if *v == nil {
+ sv = &GetBucketAclOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AccessControlList", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentGrants(&sv.Grants, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Owner", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentOwner(&sv.Owner, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketAnalyticsConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketAnalyticsConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketAnalyticsConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketAnalyticsConfiguration(response, &metadata)
+ }
+ output := &GetBucketAnalyticsConfigurationOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentAnalyticsConfiguration(&output.AnalyticsConfiguration, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketAnalyticsConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketAnalyticsConfigurationOutput(v **GetBucketAnalyticsConfigurationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketAnalyticsConfigurationOutput
+ if *v == nil {
+ sv = &GetBucketAnalyticsConfigurationOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AnalyticsConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentAnalyticsConfiguration(&sv.AnalyticsConfiguration, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketCors struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketCors) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketCors) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketCors(response, &metadata)
+ }
+ output := &GetBucketCorsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentGetBucketCorsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketCors(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketCorsOutput(v **GetBucketCorsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketCorsOutput
+ if *v == nil {
+ sv = &GetBucketCorsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("CORSRule", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentCORSRulesUnwrapped(&sv.CORSRules, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketEncryption struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketEncryption) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketEncryption) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketEncryption(response, &metadata)
+ }
+ output := &GetBucketEncryptionOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentServerSideEncryptionConfiguration(&output.ServerSideEncryptionConfiguration, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketEncryption(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketEncryptionOutput(v **GetBucketEncryptionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketEncryptionOutput
+ if *v == nil {
+ sv = &GetBucketEncryptionOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ServerSideEncryptionConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentServerSideEncryptionConfiguration(&sv.ServerSideEncryptionConfiguration, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketIntelligentTieringConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketIntelligentTieringConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketIntelligentTieringConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketIntelligentTieringConfiguration(response, &metadata)
+ }
+ output := &GetBucketIntelligentTieringConfigurationOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentIntelligentTieringConfiguration(&output.IntelligentTieringConfiguration, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketIntelligentTieringConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketIntelligentTieringConfigurationOutput(v **GetBucketIntelligentTieringConfigurationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketIntelligentTieringConfigurationOutput
+ if *v == nil {
+ sv = &GetBucketIntelligentTieringConfigurationOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("IntelligentTieringConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentIntelligentTieringConfiguration(&sv.IntelligentTieringConfiguration, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketInventoryConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketInventoryConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketInventoryConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketInventoryConfiguration(response, &metadata)
+ }
+ output := &GetBucketInventoryConfigurationOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentInventoryConfiguration(&output.InventoryConfiguration, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketInventoryConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketInventoryConfigurationOutput(v **GetBucketInventoryConfigurationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketInventoryConfigurationOutput
+ if *v == nil {
+ sv = &GetBucketInventoryConfigurationOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("InventoryConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentInventoryConfiguration(&sv.InventoryConfiguration, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketLifecycleConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketLifecycleConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketLifecycleConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketLifecycleConfiguration(response, &metadata)
+ }
+ output := &GetBucketLifecycleConfigurationOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentGetBucketLifecycleConfigurationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketLifecycleConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketLifecycleConfigurationOutput(v **GetBucketLifecycleConfigurationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketLifecycleConfigurationOutput
+ if *v == nil {
+ sv = &GetBucketLifecycleConfigurationOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Rule", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentLifecycleRulesUnwrapped(&sv.Rules, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketLocation struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketLocation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketLocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketLocation(response, &metadata)
+ }
+ output := &GetBucketLocationOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentGetBucketLocationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketLocation(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketLocationOutput(v **GetBucketLocationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketLocationOutput
+ if *v == nil {
+ sv = &GetBucketLocationOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("LocationConstraint", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LocationConstraint = types.BucketLocationConstraint(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketLogging struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketLogging) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketLogging) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketLogging(response, &metadata)
+ }
+ output := &GetBucketLoggingOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentGetBucketLoggingOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketLogging(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketLoggingOutput(v **GetBucketLoggingOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketLoggingOutput
+ if *v == nil {
+ sv = &GetBucketLoggingOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("LoggingEnabled", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentLoggingEnabled(&sv.LoggingEnabled, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketMetricsConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketMetricsConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketMetricsConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketMetricsConfiguration(response, &metadata)
+ }
+ output := &GetBucketMetricsConfigurationOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentMetricsConfiguration(&output.MetricsConfiguration, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketMetricsConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketMetricsConfigurationOutput(v **GetBucketMetricsConfigurationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketMetricsConfigurationOutput
+ if *v == nil {
+ sv = &GetBucketMetricsConfigurationOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("MetricsConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentMetricsConfiguration(&sv.MetricsConfiguration, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketNotificationConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketNotificationConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketNotificationConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketNotificationConfiguration(response, &metadata)
+ }
+ output := &GetBucketNotificationConfigurationOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentGetBucketNotificationConfigurationOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketNotificationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketNotificationConfigurationOutput(v **GetBucketNotificationConfigurationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketNotificationConfigurationOutput
+ if *v == nil {
+ sv = &GetBucketNotificationConfigurationOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("CloudFunctionConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentLambdaFunctionConfigurationListUnwrapped(&sv.LambdaFunctionConfigurations, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("QueueConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentQueueConfigurationListUnwrapped(&sv.QueueConfigurations, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("TopicConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentTopicConfigurationListUnwrapped(&sv.TopicConfigurations, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketOwnershipControls struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketOwnershipControls) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketOwnershipControls) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketOwnershipControls(response, &metadata)
+ }
+ output := &GetBucketOwnershipControlsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentOwnershipControls(&output.OwnershipControls, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketOwnershipControls(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketOwnershipControlsOutput(v **GetBucketOwnershipControlsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketOwnershipControlsOutput
+ if *v == nil {
+ sv = &GetBucketOwnershipControlsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("OwnershipControls", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentOwnershipControls(&sv.OwnershipControls, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketPolicy struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketPolicy) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketPolicy(response, &metadata)
+ }
+ output := &GetBucketPolicyOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpDocumentGetBucketPolicyOutput(output, response.Body)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketPolicyOutput(v *GetBucketPolicyOutput, body io.ReadCloser) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization of nil %T", v)
+ }
+ bs, err := ioutil.ReadAll(body)
+ if err != nil {
+ return err
+ }
+ if len(bs) > 0 {
+ v.Policy = ptr.String(string(bs))
+ }
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketPolicyStatus struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketPolicyStatus) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketPolicyStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketPolicyStatus(response, &metadata)
+ }
+ output := &GetBucketPolicyStatusOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentPolicyStatus(&output.PolicyStatus, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketPolicyStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketPolicyStatusOutput(v **GetBucketPolicyStatusOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketPolicyStatusOutput
+ if *v == nil {
+ sv = &GetBucketPolicyStatusOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("PolicyStatus", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentPolicyStatus(&sv.PolicyStatus, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketReplication struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketReplication) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketReplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketReplication(response, &metadata)
+ }
+ output := &GetBucketReplicationOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentReplicationConfiguration(&output.ReplicationConfiguration, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketReplication(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketReplicationOutput(v **GetBucketReplicationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketReplicationOutput
+ if *v == nil {
+ sv = &GetBucketReplicationOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ReplicationConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentReplicationConfiguration(&sv.ReplicationConfiguration, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketRequestPayment struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketRequestPayment) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketRequestPayment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketRequestPayment(response, &metadata)
+ }
+ output := &GetBucketRequestPaymentOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentGetBucketRequestPaymentOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketRequestPayment(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketRequestPaymentOutput(v **GetBucketRequestPaymentOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketRequestPaymentOutput
+ if *v == nil {
+ sv = &GetBucketRequestPaymentOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Payer", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Payer = types.Payer(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketTagging struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketTagging) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketTagging) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketTagging(response, &metadata)
+ }
+ output := &GetBucketTaggingOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentGetBucketTaggingOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketTagging(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketTaggingOutput(v **GetBucketTaggingOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketTaggingOutput
+ if *v == nil {
+ sv = &GetBucketTaggingOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("TagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentTagSet(&sv.TagSet, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketVersioning struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketVersioning) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketVersioning) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketVersioning(response, &metadata)
+ }
+ output := &GetBucketVersioningOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentGetBucketVersioningOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketVersioning(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketVersioningOutput(v **GetBucketVersioningOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketVersioningOutput
+ if *v == nil {
+ sv = &GetBucketVersioningOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("MfaDelete", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.MFADelete = types.MFADeleteStatus(xtv)
+ }
+
+ case strings.EqualFold("Status", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Status = types.BucketVersioningStatus(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketWebsite struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketWebsite) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketWebsite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketWebsite(response, &metadata)
+ }
+ output := &GetBucketWebsiteOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentGetBucketWebsiteOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketWebsite(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketWebsiteOutput(v **GetBucketWebsiteOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketWebsiteOutput
+ if *v == nil {
+ sv = &GetBucketWebsiteOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ErrorDocument", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentErrorDocument(&sv.ErrorDocument, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("IndexDocument", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentIndexDocument(&sv.IndexDocument, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("RedirectAllRequestsTo", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentRedirectAllRequestsTo(&sv.RedirectAllRequestsTo, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("RoutingRules", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentRoutingRules(&sv.RoutingRules, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetObject struct {
+}
+
+func (*awsRestxml_deserializeOpGetObject) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetObject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetObject(response, &metadata)
+ }
+ output := &GetObjectOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsGetObjectOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ err = awsRestxml_deserializeOpDocumentGetObjectOutput(output, response.Body)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetObject(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("InvalidObjectState", errorCode):
+ return awsRestxml_deserializeErrorInvalidObjectState(response, errorBody)
+
+ case strings.EqualFold("NoSuchKey", errorCode):
+ return awsRestxml_deserializeErrorNoSuchKey(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsGetObjectOutput(v *GetObjectOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("accept-ranges"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.AcceptRanges = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-bucket-key-enabled"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseBool(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.BucketKeyEnabled = vv
+ }
+
+ if headerValues := response.Header.Values("Cache-Control"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.CacheControl = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("Content-Disposition"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ContentDisposition = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("Content-Encoding"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ContentEncoding = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("Content-Language"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ContentLanguage = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("Content-Length"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseInt(headerValues[0], 0, 64)
+ if err != nil {
+ return err
+ }
+ v.ContentLength = vv
+ }
+
+ if headerValues := response.Header.Values("Content-Range"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ContentRange = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ContentType = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-delete-marker"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseBool(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.DeleteMarker = vv
+ }
+
+ if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ETag = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-expiration"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.Expiration = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("Expires"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ t, err := smithytime.ParseHTTPDate(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.Expires = ptr.Time(t)
+ }
+
+ if headerValues := response.Header.Values("Last-Modified"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ t, err := smithytime.ParseHTTPDate(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.LastModified = ptr.Time(t)
+ }
+
+ for headerKey, headerValues := range response.Header {
+ if lenPrefix := len("x-amz-meta-"); len(headerKey) >= lenPrefix && strings.EqualFold(headerKey[:lenPrefix], "x-amz-meta-") {
+ if v.Metadata == nil {
+ v.Metadata = map[string]string{}
+ }
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.Metadata[strings.ToLower(headerKey[lenPrefix:])] = headerValues[0]
+ }
+ }
+
+ if headerValues := response.Header.Values("x-amz-missing-meta"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseInt(headerValues[0], 0, 32)
+ if err != nil {
+ return err
+ }
+ v.MissingMeta = int32(vv)
+ }
+
+ if headerValues := response.Header.Values("x-amz-object-lock-legal-hold"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ObjectLockLegalHoldStatus = types.ObjectLockLegalHoldStatus(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-object-lock-mode"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ObjectLockMode = types.ObjectLockMode(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-object-lock-retain-until-date"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ t, err := smithytime.ParseDateTime(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.ObjectLockRetainUntilDate = ptr.Time(t)
+ }
+
+ if headerValues := response.Header.Values("x-amz-mp-parts-count"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseInt(headerValues[0], 0, 32)
+ if err != nil {
+ return err
+ }
+ v.PartsCount = int32(vv)
+ }
+
+ if headerValues := response.Header.Values("x-amz-replication-status"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ReplicationStatus = types.ReplicationStatus(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-restore"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.Restore = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ServerSideEncryption = types.ServerSideEncryption(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-algorithm"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSECustomerAlgorithm = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-key-MD5"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSECustomerKeyMD5 = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-aws-kms-key-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSEKMSKeyId = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-storage-class"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.StorageClass = types.StorageClass(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-tagging-count"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseInt(headerValues[0], 0, 32)
+ if err != nil {
+ return err
+ }
+ v.TagCount = int32(vv)
+ }
+
+ if headerValues := response.Header.Values("x-amz-version-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.VersionId = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-website-redirect-location"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.WebsiteRedirectLocation = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+func awsRestxml_deserializeOpDocumentGetObjectOutput(v *GetObjectOutput, body io.ReadCloser) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization of nil %T", v)
+ }
+ v.Body = body
+ return nil
+}
+
+type awsRestxml_deserializeOpGetObjectAcl struct {
+}
+
+func (*awsRestxml_deserializeOpGetObjectAcl) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetObjectAcl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetObjectAcl(response, &metadata)
+ }
+ output := &GetObjectAclOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsGetObjectAclOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentGetObjectAclOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetObjectAcl(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("NoSuchKey", errorCode):
+ return awsRestxml_deserializeErrorNoSuchKey(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsGetObjectAclOutput(v *GetObjectAclOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ return nil
+}
+func awsRestxml_deserializeOpDocumentGetObjectAclOutput(v **GetObjectAclOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetObjectAclOutput
+ if *v == nil {
+ sv = &GetObjectAclOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AccessControlList", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentGrants(&sv.Grants, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Owner", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentOwner(&sv.Owner, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetObjectLegalHold struct {
+}
+
+func (*awsRestxml_deserializeOpGetObjectLegalHold) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetObjectLegalHold) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetObjectLegalHold(response, &metadata)
+ }
+ output := &GetObjectLegalHoldOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentObjectLockLegalHold(&output.LegalHold, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetObjectLegalHold(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetObjectLegalHoldOutput(v **GetObjectLegalHoldOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetObjectLegalHoldOutput
+ if *v == nil {
+ sv = &GetObjectLegalHoldOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("LegalHold", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentObjectLockLegalHold(&sv.LegalHold, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetObjectLockConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpGetObjectLockConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetObjectLockConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetObjectLockConfiguration(response, &metadata)
+ }
+ output := &GetObjectLockConfigurationOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentObjectLockConfiguration(&output.ObjectLockConfiguration, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetObjectLockConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetObjectLockConfigurationOutput(v **GetObjectLockConfigurationOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetObjectLockConfigurationOutput
+ if *v == nil {
+ sv = &GetObjectLockConfigurationOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ObjectLockConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentObjectLockConfiguration(&sv.ObjectLockConfiguration, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetObjectRetention struct {
+}
+
+func (*awsRestxml_deserializeOpGetObjectRetention) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetObjectRetention) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetObjectRetention(response, &metadata)
+ }
+ output := &GetObjectRetentionOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentObjectLockRetention(&output.Retention, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetObjectRetention(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetObjectRetentionOutput(v **GetObjectRetentionOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetObjectRetentionOutput
+ if *v == nil {
+ sv = &GetObjectRetentionOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Retention", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentObjectLockRetention(&sv.Retention, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetObjectTagging struct {
+}
+
+func (*awsRestxml_deserializeOpGetObjectTagging) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetObjectTagging) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetObjectTagging(response, &metadata)
+ }
+ output := &GetObjectTaggingOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsGetObjectTaggingOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentGetObjectTaggingOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetObjectTagging(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsGetObjectTaggingOutput(v *GetObjectTaggingOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-version-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.VersionId = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+func awsRestxml_deserializeOpDocumentGetObjectTaggingOutput(v **GetObjectTaggingOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetObjectTaggingOutput
+ if *v == nil {
+ sv = &GetObjectTaggingOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("TagSet", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentTagSet(&sv.TagSet, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetObjectTorrent struct {
+}
+
+func (*awsRestxml_deserializeOpGetObjectTorrent) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetObjectTorrent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetObjectTorrent(response, &metadata)
+ }
+ output := &GetObjectTorrentOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsGetObjectTorrentOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ err = awsRestxml_deserializeOpDocumentGetObjectTorrentOutput(output, response.Body)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetObjectTorrent(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsGetObjectTorrentOutput(v *GetObjectTorrentOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ return nil
+}
+func awsRestxml_deserializeOpDocumentGetObjectTorrentOutput(v *GetObjectTorrentOutput, body io.ReadCloser) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization of nil %T", v)
+ }
+ v.Body = body
+ return nil
+}
+
+type awsRestxml_deserializeOpGetPublicAccessBlock struct {
+}
+
+func (*awsRestxml_deserializeOpGetPublicAccessBlock) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetPublicAccessBlock) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetPublicAccessBlock(response, &metadata)
+ }
+ output := &GetPublicAccessBlockOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentPublicAccessBlockConfiguration(&output.PublicAccessBlockConfiguration, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetPublicAccessBlock(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetPublicAccessBlockOutput(v **GetPublicAccessBlockOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetPublicAccessBlockOutput
+ if *v == nil {
+ sv = &GetPublicAccessBlockOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("PublicAccessBlockConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentPublicAccessBlockConfiguration(&sv.PublicAccessBlockConfiguration, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpHeadBucket struct {
+}
+
+func (*awsRestxml_deserializeOpHeadBucket) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpHeadBucket) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorHeadBucket(response, &metadata)
+ }
+ output := &HeadBucketOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorHeadBucket(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("NotFound", errorCode):
+ return awsRestxml_deserializeErrorNotFound(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpHeadObject struct {
+}
+
+func (*awsRestxml_deserializeOpHeadObject) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpHeadObject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorHeadObject(response, &metadata)
+ }
+ output := &HeadObjectOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsHeadObjectOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorHeadObject(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsHeadObjectOutput(v *HeadObjectOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("accept-ranges"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.AcceptRanges = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-archive-status"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ArchiveStatus = types.ArchiveStatus(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-bucket-key-enabled"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseBool(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.BucketKeyEnabled = vv
+ }
+
+ if headerValues := response.Header.Values("Cache-Control"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.CacheControl = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("Content-Disposition"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ContentDisposition = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("Content-Encoding"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ContentEncoding = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("Content-Language"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ContentLanguage = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("Content-Length"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseInt(headerValues[0], 0, 64)
+ if err != nil {
+ return err
+ }
+ v.ContentLength = vv
+ }
+
+ if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ContentType = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-delete-marker"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseBool(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.DeleteMarker = vv
+ }
+
+ if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ETag = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-expiration"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.Expiration = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("Expires"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ t, err := smithytime.ParseHTTPDate(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.Expires = ptr.Time(t)
+ }
+
+ if headerValues := response.Header.Values("Last-Modified"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ t, err := smithytime.ParseHTTPDate(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.LastModified = ptr.Time(t)
+ }
+
+ for headerKey, headerValues := range response.Header {
+ if lenPrefix := len("x-amz-meta-"); len(headerKey) >= lenPrefix && strings.EqualFold(headerKey[:lenPrefix], "x-amz-meta-") {
+ if v.Metadata == nil {
+ v.Metadata = map[string]string{}
+ }
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.Metadata[strings.ToLower(headerKey[lenPrefix:])] = headerValues[0]
+ }
+ }
+
+ if headerValues := response.Header.Values("x-amz-missing-meta"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseInt(headerValues[0], 0, 32)
+ if err != nil {
+ return err
+ }
+ v.MissingMeta = int32(vv)
+ }
+
+ if headerValues := response.Header.Values("x-amz-object-lock-legal-hold"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ObjectLockLegalHoldStatus = types.ObjectLockLegalHoldStatus(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-object-lock-mode"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ObjectLockMode = types.ObjectLockMode(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-object-lock-retain-until-date"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ t, err := smithytime.ParseDateTime(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.ObjectLockRetainUntilDate = ptr.Time(t)
+ }
+
+ if headerValues := response.Header.Values("x-amz-mp-parts-count"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseInt(headerValues[0], 0, 32)
+ if err != nil {
+ return err
+ }
+ v.PartsCount = int32(vv)
+ }
+
+ if headerValues := response.Header.Values("x-amz-replication-status"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ReplicationStatus = types.ReplicationStatus(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-restore"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.Restore = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ServerSideEncryption = types.ServerSideEncryption(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-algorithm"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSECustomerAlgorithm = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-key-MD5"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSECustomerKeyMD5 = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-aws-kms-key-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSEKMSKeyId = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-storage-class"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.StorageClass = types.StorageClass(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-version-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.VersionId = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-website-redirect-location"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.WebsiteRedirectLocation = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+
+type awsRestxml_deserializeOpListBucketAnalyticsConfigurations struct {
+}
+
+func (*awsRestxml_deserializeOpListBucketAnalyticsConfigurations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpListBucketAnalyticsConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorListBucketAnalyticsConfigurations(response, &metadata)
+ }
+ output := &ListBucketAnalyticsConfigurationsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentListBucketAnalyticsConfigurationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorListBucketAnalyticsConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentListBucketAnalyticsConfigurationsOutput(v **ListBucketAnalyticsConfigurationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ListBucketAnalyticsConfigurationsOutput
+ if *v == nil {
+ sv = &ListBucketAnalyticsConfigurationsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AnalyticsConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentAnalyticsConfigurationListUnwrapped(&sv.AnalyticsConfigurationList, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ContinuationToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ContinuationToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("IsTruncated", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
+ }
+ sv.IsTruncated = xtv
+ }
+
+ case strings.EqualFold("NextContinuationToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NextContinuationToken = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpListBucketIntelligentTieringConfigurations struct {
+}
+
+func (*awsRestxml_deserializeOpListBucketIntelligentTieringConfigurations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpListBucketIntelligentTieringConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorListBucketIntelligentTieringConfigurations(response, &metadata)
+ }
+ output := &ListBucketIntelligentTieringConfigurationsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentListBucketIntelligentTieringConfigurationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorListBucketIntelligentTieringConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentListBucketIntelligentTieringConfigurationsOutput(v **ListBucketIntelligentTieringConfigurationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ListBucketIntelligentTieringConfigurationsOutput
+ if *v == nil {
+ sv = &ListBucketIntelligentTieringConfigurationsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ContinuationToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ContinuationToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("IntelligentTieringConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentIntelligentTieringConfigurationListUnwrapped(&sv.IntelligentTieringConfigurationList, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("IsTruncated", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
+ }
+ sv.IsTruncated = xtv
+ }
+
+ case strings.EqualFold("NextContinuationToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NextContinuationToken = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpListBucketInventoryConfigurations struct {
+}
+
+func (*awsRestxml_deserializeOpListBucketInventoryConfigurations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpListBucketInventoryConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorListBucketInventoryConfigurations(response, &metadata)
+ }
+ output := &ListBucketInventoryConfigurationsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentListBucketInventoryConfigurationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorListBucketInventoryConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentListBucketInventoryConfigurationsOutput(v **ListBucketInventoryConfigurationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ListBucketInventoryConfigurationsOutput
+ if *v == nil {
+ sv = &ListBucketInventoryConfigurationsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ContinuationToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ContinuationToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("InventoryConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentInventoryConfigurationListUnwrapped(&sv.InventoryConfigurationList, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("IsTruncated", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
+ }
+ sv.IsTruncated = xtv
+ }
+
+ case strings.EqualFold("NextContinuationToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NextContinuationToken = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpListBucketMetricsConfigurations struct {
+}
+
+func (*awsRestxml_deserializeOpListBucketMetricsConfigurations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpListBucketMetricsConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorListBucketMetricsConfigurations(response, &metadata)
+ }
+ output := &ListBucketMetricsConfigurationsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentListBucketMetricsConfigurationsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorListBucketMetricsConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentListBucketMetricsConfigurationsOutput(v **ListBucketMetricsConfigurationsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ListBucketMetricsConfigurationsOutput
+ if *v == nil {
+ sv = &ListBucketMetricsConfigurationsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ContinuationToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ContinuationToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("IsTruncated", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
+ }
+ sv.IsTruncated = xtv
+ }
+
+ case strings.EqualFold("MetricsConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentMetricsConfigurationListUnwrapped(&sv.MetricsConfigurationList, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("NextContinuationToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NextContinuationToken = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpListBuckets struct {
+}
+
+func (*awsRestxml_deserializeOpListBuckets) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpListBuckets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorListBuckets(response, &metadata)
+ }
+ output := &ListBucketsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentListBucketsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorListBuckets(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentListBucketsOutput(v **ListBucketsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ListBucketsOutput
+ if *v == nil {
+ sv = &ListBucketsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Buckets", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentBuckets(&sv.Buckets, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Owner", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentOwner(&sv.Owner, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpListMultipartUploads struct {
+}
+
+func (*awsRestxml_deserializeOpListMultipartUploads) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpListMultipartUploads) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorListMultipartUploads(response, &metadata)
+ }
+ output := &ListMultipartUploadsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentListMultipartUploadsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorListMultipartUploads(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentListMultipartUploadsOutput(v **ListMultipartUploadsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ListMultipartUploadsOutput
+ if *v == nil {
+ sv = &ListMultipartUploadsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Bucket", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Bucket = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("CommonPrefixes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentCommonPrefixListUnwrapped(&sv.CommonPrefixes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Delimiter", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Delimiter = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("EncodingType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EncodingType = types.EncodingType(xtv)
+ }
+
+ case strings.EqualFold("IsTruncated", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
+ }
+ sv.IsTruncated = xtv
+ }
+
+ case strings.EqualFold("KeyMarker", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyMarker = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("MaxUploads", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.MaxUploads = int32(i64)
+ }
+
+ case strings.EqualFold("NextKeyMarker", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NextKeyMarker = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("NextUploadIdMarker", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NextUploadIdMarker = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("UploadIdMarker", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UploadIdMarker = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Upload", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentMultipartUploadListUnwrapped(&sv.Uploads, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpListObjects struct {
+}
+
+func (*awsRestxml_deserializeOpListObjects) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpListObjects) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorListObjects(response, &metadata)
+ }
+ output := &ListObjectsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentListObjectsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorListObjects(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("NoSuchBucket", errorCode):
+ return awsRestxml_deserializeErrorNoSuchBucket(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentListObjectsOutput(v **ListObjectsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ListObjectsOutput
+ if *v == nil {
+ sv = &ListObjectsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("CommonPrefixes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentCommonPrefixListUnwrapped(&sv.CommonPrefixes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Contents", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentObjectListUnwrapped(&sv.Contents, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Delimiter", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Delimiter = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("EncodingType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EncodingType = types.EncodingType(xtv)
+ }
+
+ case strings.EqualFold("IsTruncated", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
+ }
+ sv.IsTruncated = xtv
+ }
+
+ case strings.EqualFold("Marker", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Marker = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("MaxKeys", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.MaxKeys = int32(i64)
+ }
+
+ case strings.EqualFold("Name", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Name = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("NextMarker", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NextMarker = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpListObjectsV2 struct {
+}
+
+func (*awsRestxml_deserializeOpListObjectsV2) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpListObjectsV2) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorListObjectsV2(response, &metadata)
+ }
+ output := &ListObjectsV2Output{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentListObjectsV2Output(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorListObjectsV2(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("NoSuchBucket", errorCode):
+ return awsRestxml_deserializeErrorNoSuchBucket(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentListObjectsV2Output(v **ListObjectsV2Output, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ListObjectsV2Output
+ if *v == nil {
+ sv = &ListObjectsV2Output{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("CommonPrefixes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentCommonPrefixListUnwrapped(&sv.CommonPrefixes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Contents", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentObjectListUnwrapped(&sv.Contents, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ContinuationToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ContinuationToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Delimiter", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Delimiter = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("EncodingType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EncodingType = types.EncodingType(xtv)
+ }
+
+ case strings.EqualFold("IsTruncated", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
+ }
+ sv.IsTruncated = xtv
+ }
+
+ case strings.EqualFold("KeyCount", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.KeyCount = int32(i64)
+ }
+
+ case strings.EqualFold("MaxKeys", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.MaxKeys = int32(i64)
+ }
+
+ case strings.EqualFold("Name", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Name = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("NextContinuationToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NextContinuationToken = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("StartAfter", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StartAfter = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpListObjectVersions struct {
+}
+
+func (*awsRestxml_deserializeOpListObjectVersions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpListObjectVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorListObjectVersions(response, &metadata)
+ }
+ output := &ListObjectVersionsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentListObjectVersionsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorListObjectVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentListObjectVersionsOutput(v **ListObjectVersionsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ListObjectVersionsOutput
+ if *v == nil {
+ sv = &ListObjectVersionsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("CommonPrefixes", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentCommonPrefixListUnwrapped(&sv.CommonPrefixes, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("DeleteMarker", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentDeleteMarkersUnwrapped(&sv.DeleteMarkers, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Delimiter", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Delimiter = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("EncodingType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EncodingType = types.EncodingType(xtv)
+ }
+
+ case strings.EqualFold("IsTruncated", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
+ }
+ sv.IsTruncated = xtv
+ }
+
+ case strings.EqualFold("KeyMarker", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyMarker = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("MaxKeys", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.MaxKeys = int32(i64)
+ }
+
+ case strings.EqualFold("Name", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Name = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("NextKeyMarker", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NextKeyMarker = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("NextVersionIdMarker", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NextVersionIdMarker = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("VersionIdMarker", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VersionIdMarker = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Version", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentObjectVersionListUnwrapped(&sv.Versions, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpListParts struct {
+}
+
+func (*awsRestxml_deserializeOpListParts) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpListParts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorListParts(response, &metadata)
+ }
+ output := &ListPartsOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsListPartsOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeOpDocumentListPartsOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorListParts(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsListPartsOutput(v *ListPartsOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-abort-date"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ t, err := smithytime.ParseHTTPDate(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.AbortDate = ptr.Time(t)
+ }
+
+ if headerValues := response.Header.Values("x-amz-abort-rule-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.AbortRuleId = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ return nil
+}
+func awsRestxml_deserializeOpDocumentListPartsOutput(v **ListPartsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *ListPartsOutput
+ if *v == nil {
+ sv = &ListPartsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Bucket", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Bucket = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Initiator", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentInitiator(&sv.Initiator, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("IsTruncated", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected IsTruncated to be of type *bool, got %T instead", val)
+ }
+ sv.IsTruncated = xtv
+ }
+
+ case strings.EqualFold("Key", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Key = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("MaxParts", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.MaxParts = int32(i64)
+ }
+
+ case strings.EqualFold("NextPartNumberMarker", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NextPartNumberMarker = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Owner", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentOwner(&sv.Owner, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("PartNumberMarker", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.PartNumberMarker = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Part", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentPartsUnwrapped(&sv.Parts, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("StorageClass", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StorageClass = types.StorageClass(xtv)
+ }
+
+ case strings.EqualFold("UploadId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UploadId = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpPutBucketAccelerateConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketAccelerateConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketAccelerateConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketAccelerateConfiguration(response, &metadata)
+ }
+ output := &PutBucketAccelerateConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketAccelerateConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketAcl struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketAcl) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketAcl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketAcl(response, &metadata)
+ }
+ output := &PutBucketAclOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketAcl(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketAnalyticsConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketAnalyticsConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketAnalyticsConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketAnalyticsConfiguration(response, &metadata)
+ }
+ output := &PutBucketAnalyticsConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketAnalyticsConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketCors struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketCors) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketCors) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketCors(response, &metadata)
+ }
+ output := &PutBucketCorsOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketCors(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketEncryption struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketEncryption) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketEncryption) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketEncryption(response, &metadata)
+ }
+ output := &PutBucketEncryptionOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketEncryption(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketIntelligentTieringConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketIntelligentTieringConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketIntelligentTieringConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketIntelligentTieringConfiguration(response, &metadata)
+ }
+ output := &PutBucketIntelligentTieringConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketIntelligentTieringConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketInventoryConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketInventoryConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketInventoryConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketInventoryConfiguration(response, &metadata)
+ }
+ output := &PutBucketInventoryConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketInventoryConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketLifecycleConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketLifecycleConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketLifecycleConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketLifecycleConfiguration(response, &metadata)
+ }
+ output := &PutBucketLifecycleConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketLifecycleConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketLogging struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketLogging) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketLogging) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketLogging(response, &metadata)
+ }
+ output := &PutBucketLoggingOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketLogging(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketMetricsConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketMetricsConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketMetricsConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketMetricsConfiguration(response, &metadata)
+ }
+ output := &PutBucketMetricsConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketMetricsConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketNotificationConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketNotificationConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketNotificationConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketNotificationConfiguration(response, &metadata)
+ }
+ output := &PutBucketNotificationConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketNotificationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketOwnershipControls struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketOwnershipControls) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketOwnershipControls) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketOwnershipControls(response, &metadata)
+ }
+ output := &PutBucketOwnershipControlsOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketOwnershipControls(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketPolicy struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketPolicy) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketPolicy(response, &metadata)
+ }
+ output := &PutBucketPolicyOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketReplication struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketReplication) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketReplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketReplication(response, &metadata)
+ }
+ output := &PutBucketReplicationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketReplication(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketRequestPayment struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketRequestPayment) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketRequestPayment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketRequestPayment(response, &metadata)
+ }
+ output := &PutBucketRequestPaymentOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketRequestPayment(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketTagging struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketTagging) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketTagging) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketTagging(response, &metadata)
+ }
+ output := &PutBucketTaggingOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketTagging(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketVersioning struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketVersioning) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketVersioning) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketVersioning(response, &metadata)
+ }
+ output := &PutBucketVersioningOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketVersioning(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutBucketWebsite struct {
+}
+
+func (*awsRestxml_deserializeOpPutBucketWebsite) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutBucketWebsite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutBucketWebsite(response, &metadata)
+ }
+ output := &PutBucketWebsiteOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutBucketWebsite(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpPutObject struct {
+}
+
+func (*awsRestxml_deserializeOpPutObject) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutObject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutObject(response, &metadata)
+ }
+ output := &PutObjectOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsPutObjectOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutObject(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsPutObjectOutput(v *PutObjectOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-bucket-key-enabled"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseBool(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.BucketKeyEnabled = vv
+ }
+
+ if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ETag = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-expiration"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.Expiration = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ServerSideEncryption = types.ServerSideEncryption(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-algorithm"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSECustomerAlgorithm = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-key-MD5"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSECustomerKeyMD5 = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-context"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSEKMSEncryptionContext = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-aws-kms-key-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSEKMSKeyId = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-version-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.VersionId = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+
+type awsRestxml_deserializeOpPutObjectAcl struct {
+}
+
+func (*awsRestxml_deserializeOpPutObjectAcl) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutObjectAcl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutObjectAcl(response, &metadata)
+ }
+ output := &PutObjectAclOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsPutObjectAclOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutObjectAcl(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("NoSuchKey", errorCode):
+ return awsRestxml_deserializeErrorNoSuchKey(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsPutObjectAclOutput(v *PutObjectAclOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ return nil
+}
+
+type awsRestxml_deserializeOpPutObjectLegalHold struct {
+}
+
+func (*awsRestxml_deserializeOpPutObjectLegalHold) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutObjectLegalHold) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutObjectLegalHold(response, &metadata)
+ }
+ output := &PutObjectLegalHoldOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsPutObjectLegalHoldOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutObjectLegalHold(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsPutObjectLegalHoldOutput(v *PutObjectLegalHoldOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ return nil
+}
+
+type awsRestxml_deserializeOpPutObjectLockConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpPutObjectLockConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutObjectLockConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutObjectLockConfiguration(response, &metadata)
+ }
+ output := &PutObjectLockConfigurationOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsPutObjectLockConfigurationOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutObjectLockConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsPutObjectLockConfigurationOutput(v *PutObjectLockConfigurationOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ return nil
+}
+
+type awsRestxml_deserializeOpPutObjectRetention struct {
+}
+
+func (*awsRestxml_deserializeOpPutObjectRetention) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutObjectRetention) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutObjectRetention(response, &metadata)
+ }
+ output := &PutObjectRetentionOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsPutObjectRetentionOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutObjectRetention(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsPutObjectRetentionOutput(v *PutObjectRetentionOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ return nil
+}
+
+type awsRestxml_deserializeOpPutObjectTagging struct {
+}
+
+func (*awsRestxml_deserializeOpPutObjectTagging) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutObjectTagging) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutObjectTagging(response, &metadata)
+ }
+ output := &PutObjectTaggingOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsPutObjectTaggingOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutObjectTagging(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsPutObjectTaggingOutput(v *PutObjectTaggingOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-version-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.VersionId = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+
+type awsRestxml_deserializeOpPutPublicAccessBlock struct {
+}
+
+func (*awsRestxml_deserializeOpPutPublicAccessBlock) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpPutPublicAccessBlock) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorPutPublicAccessBlock(response, &metadata)
+ }
+ output := &PutPublicAccessBlockOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorPutPublicAccessBlock(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpRestoreObject struct {
+}
+
+func (*awsRestxml_deserializeOpRestoreObject) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpRestoreObject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorRestoreObject(response, &metadata)
+ }
+ output := &RestoreObjectOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsRestoreObjectOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorRestoreObject(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("ObjectAlreadyInActiveTierError", errorCode):
+ return awsRestxml_deserializeErrorObjectAlreadyInActiveTierError(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsRestoreObjectOutput(v *RestoreObjectOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-restore-output-path"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RestoreOutputPath = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+
+type awsRestxml_deserializeOpSelectObjectContent struct {
+}
+
+func (*awsRestxml_deserializeOpSelectObjectContent) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpSelectObjectContent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorSelectObjectContent(response, &metadata)
+ }
+ output := &SelectObjectContentOutput{}
+ out.Result = output
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorSelectObjectContent(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestxml_deserializeOpUploadPart struct {
+}
+
+func (*awsRestxml_deserializeOpUploadPart) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpUploadPart) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorUploadPart(response, &metadata)
+ }
+ output := &UploadPartOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsUploadPartOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorUploadPart(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsUploadPartOutput(v *UploadPartOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-bucket-key-enabled"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseBool(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.BucketKeyEnabled = vv
+ }
+
+ if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ETag = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ServerSideEncryption = types.ServerSideEncryption(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-algorithm"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSECustomerAlgorithm = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-key-MD5"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSECustomerKeyMD5 = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-aws-kms-key-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSEKMSKeyId = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+
+type awsRestxml_deserializeOpUploadPartCopy struct {
+}
+
+func (*awsRestxml_deserializeOpUploadPartCopy) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpUploadPartCopy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorUploadPartCopy(response, &metadata)
+ }
+ output := &UploadPartCopyOutput{}
+ out.Result = output
+
+ err = awsRestxml_deserializeOpHttpBindingsUploadPartCopyOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentCopyPartResult(&output.CopyPartResult, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorUploadPartCopy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpHttpBindingsUploadPartCopyOutput(v *UploadPartCopyOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-bucket-key-enabled"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseBool(headerValues[0])
+ if err != nil {
+ return err
+ }
+ v.BucketKeyEnabled = vv
+ }
+
+ if headerValues := response.Header.Values("x-amz-copy-source-version-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.CopySourceVersionId = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RequestCharged = types.RequestCharged(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ServerSideEncryption = types.ServerSideEncryption(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-algorithm"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSECustomerAlgorithm = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-key-MD5"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSECustomerKeyMD5 = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("x-amz-server-side-encryption-aws-kms-key-id"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.SSEKMSKeyId = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+func awsRestxml_deserializeOpDocumentUploadPartCopyOutput(v **UploadPartCopyOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *UploadPartCopyOutput
+ if *v == nil {
+ sv = &UploadPartCopyOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("CopyPartResult", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentCopyPartResult(&sv.CopyPartResult, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpWriteGetObjectResponse struct {
+}
+
+func (*awsRestxml_deserializeOpWriteGetObjectResponse) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpWriteGetObjectResponse) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorWriteGetObjectResponse(response, &metadata)
+ }
+ output := &WriteGetObjectResponseOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorWriteGetObjectResponse(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeEventStreamSelectObjectContentEventStream(v *types.SelectObjectContentEventStream, msg *eventstream.Message) error {
+ if v == nil {
+ return fmt.Errorf("unexpected serialization of nil %T", v)
+ }
+
+ eventType := msg.Headers.Get(eventstreamapi.EventTypeHeader)
+ if eventType == nil {
+ return fmt.Errorf("%s event header not present", eventstreamapi.EventTypeHeader)
+ }
+
+ switch {
+ case strings.EqualFold("Cont", eventType.String()):
+ vv := &types.SelectObjectContentEventStreamMemberCont{}
+ if err := awsRestxml_deserializeEventMessageContinuationEvent(&vv.Value, msg); err != nil {
+ return err
+ }
+ *v = vv
+ return nil
+
+ case strings.EqualFold("End", eventType.String()):
+ vv := &types.SelectObjectContentEventStreamMemberEnd{}
+ if err := awsRestxml_deserializeEventMessageEndEvent(&vv.Value, msg); err != nil {
+ return err
+ }
+ *v = vv
+ return nil
+
+ case strings.EqualFold("Progress", eventType.String()):
+ vv := &types.SelectObjectContentEventStreamMemberProgress{}
+ if err := awsRestxml_deserializeEventMessageProgressEvent(&vv.Value, msg); err != nil {
+ return err
+ }
+ *v = vv
+ return nil
+
+ case strings.EqualFold("Records", eventType.String()):
+ vv := &types.SelectObjectContentEventStreamMemberRecords{}
+ if err := awsRestxml_deserializeEventMessageRecordsEvent(&vv.Value, msg); err != nil {
+ return err
+ }
+ *v = vv
+ return nil
+
+ case strings.EqualFold("Stats", eventType.String()):
+ vv := &types.SelectObjectContentEventStreamMemberStats{}
+ if err := awsRestxml_deserializeEventMessageStatsEvent(&vv.Value, msg); err != nil {
+ return err
+ }
+ *v = vv
+ return nil
+
+ default:
+ buffer := bytes.NewBuffer(nil)
+ eventstream.NewEncoder().Encode(buffer, *msg)
+ *v = &types.UnknownUnionMember{
+ Tag: eventType.String(),
+ Value: buffer.Bytes(),
+ }
+ return nil
+
+ }
+}
+
+func awsRestxml_deserializeEventStreamExceptionSelectObjectContentEventStream(msg *eventstream.Message) error {
+ exceptionType := msg.Headers.Get(eventstreamapi.ExceptionTypeHeader)
+ if exceptionType == nil {
+ return fmt.Errorf("%s event header not present", eventstreamapi.ExceptionTypeHeader)
+ }
+
+ switch {
+ default:
+ br := bytes.NewReader(msg.Payload)
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(br, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ errorComponents, err := awsxml.GetErrorResponseComponents(br, true)
+ if err != nil {
+ return err
+ }
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+ if ev := exceptionType.String(); len(ev) > 0 {
+ errorCode = ev
+ } else if ev := errorComponents.Code; len(ev) > 0 {
+ errorCode = ev
+ }
+ if ev := errorComponents.Message; len(ev) > 0 {
+ errorMessage = ev
+ }
+ return &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+
+ }
+}
+
+func awsRestxml_deserializeEventMessageRecordsEvent(v *types.RecordsEvent, msg *eventstream.Message) error {
+ if v == nil {
+ return fmt.Errorf("unexpected serialization of nil %T", v)
+ }
+
+ if msg.Payload != nil {
+ bsv := make([]byte, len(msg.Payload))
+ copy(bsv, msg.Payload)
+
+ v.Payload = bsv
+ }
+ return nil
+}
+
+func awsRestxml_deserializeEventMessageStatsEvent(v *types.StatsEvent, msg *eventstream.Message) error {
+ if v == nil {
+ return fmt.Errorf("unexpected serialization of nil %T", v)
+ }
+
+ br := bytes.NewReader(msg.Payload)
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(br, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentStats(&v.Details, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return nil
+}
+
+func awsRestxml_deserializeEventMessageProgressEvent(v *types.ProgressEvent, msg *eventstream.Message) error {
+ if v == nil {
+ return fmt.Errorf("unexpected serialization of nil %T", v)
+ }
+
+ br := bytes.NewReader(msg.Payload)
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(br, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentProgress(&v.Details, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return nil
+}
+
+func awsRestxml_deserializeEventMessageContinuationEvent(v *types.ContinuationEvent, msg *eventstream.Message) error {
+ if v == nil {
+ return fmt.Errorf("unexpected serialization of nil %T", v)
+ }
+
+ br := bytes.NewReader(msg.Payload)
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(br, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentContinuationEvent(&v, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return nil
+}
+
+func awsRestxml_deserializeEventMessageEndEvent(v *types.EndEvent, msg *eventstream.Message) error {
+ if v == nil {
+ return fmt.Errorf("unexpected serialization of nil %T", v)
+ }
+
+ br := bytes.NewReader(msg.Payload)
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(br, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentEndEvent(&v, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return nil
+}
+
+func awsRestxml_deserializeDocumentContinuationEvent(v **types.ContinuationEvent, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ContinuationEvent
+ if *v == nil {
+ sv = &types.ContinuationEvent{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentEndEvent(v **types.EndEvent, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EndEvent
+ if *v == nil {
+ sv = &types.EndEvent{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentProgress(v **types.Progress, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Progress
+ if *v == nil {
+ sv = &types.Progress{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("BytesProcessed", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.BytesProcessed = i64
+ }
+
+ case strings.EqualFold("BytesReturned", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.BytesReturned = i64
+ }
+
+ case strings.EqualFold("BytesScanned", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.BytesScanned = i64
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentStats(v **types.Stats, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Stats
+ if *v == nil {
+ sv = &types.Stats{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("BytesProcessed", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.BytesProcessed = i64
+ }
+
+ case strings.EqualFold("BytesReturned", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.BytesReturned = i64
+ }
+
+ case strings.EqualFold("BytesScanned", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.BytesScanned = i64
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeErrorBucketAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.BucketAlreadyExists{}
+ return output
+}
+
+func awsRestxml_deserializeErrorBucketAlreadyOwnedByYou(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.BucketAlreadyOwnedByYou{}
+ return output
+}
+
+func awsRestxml_deserializeErrorInvalidObjectState(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidObjectState{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(errorBody, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return output
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentInvalidObjectState(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return output
+}
+
+func awsRestxml_deserializeErrorNoSuchBucket(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.NoSuchBucket{}
+ return output
+}
+
+func awsRestxml_deserializeErrorNoSuchKey(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.NoSuchKey{}
+ return output
+}
+
+func awsRestxml_deserializeErrorNoSuchUpload(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.NoSuchUpload{}
+ return output
+}
+
+func awsRestxml_deserializeErrorNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.NotFound{}
+ return output
+}
+
+func awsRestxml_deserializeErrorObjectAlreadyInActiveTierError(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ObjectAlreadyInActiveTierError{}
+ return output
+}
+
+func awsRestxml_deserializeErrorObjectNotInActiveTierError(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ObjectNotInActiveTierError{}
+ return output
+}
+
+func awsRestxml_deserializeDocumentAbortIncompleteMultipartUpload(v **types.AbortIncompleteMultipartUpload, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AbortIncompleteMultipartUpload
+ if *v == nil {
+ sv = &types.AbortIncompleteMultipartUpload{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("DaysAfterInitiation", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.DaysAfterInitiation = int32(i64)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentAccessControlTranslation(v **types.AccessControlTranslation, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AccessControlTranslation
+ if *v == nil {
+ sv = &types.AccessControlTranslation{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Owner", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Owner = types.OwnerOverride(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentAllowedHeaders(v *[]string, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []string
+ if *v == nil {
+ sv = make([]string, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ decoder = memberDecoder
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col string
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ col = xtv
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentAllowedHeadersUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error {
+ var sv []string
+ if *v == nil {
+ sv = make([]string, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv string
+ t := decoder.StartEl
+ _ = t
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = xtv
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentAllowedMethods(v *[]string, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []string
+ if *v == nil {
+ sv = make([]string, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ decoder = memberDecoder
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col string
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ col = xtv
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentAllowedMethodsUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error {
+ var sv []string
+ if *v == nil {
+ sv = make([]string, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv string
+ t := decoder.StartEl
+ _ = t
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = xtv
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentAllowedOrigins(v *[]string, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []string
+ if *v == nil {
+ sv = make([]string, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ decoder = memberDecoder
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col string
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ col = xtv
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentAllowedOriginsUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error {
+ var sv []string
+ if *v == nil {
+ sv = make([]string, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv string
+ t := decoder.StartEl
+ _ = t
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = xtv
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentAnalyticsAndOperator(v **types.AnalyticsAndOperator, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AnalyticsAndOperator
+ if *v == nil {
+ sv = &types.AnalyticsAndOperator{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Tag", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentTagSetUnwrapped(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentAnalyticsConfiguration(v **types.AnalyticsConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AnalyticsConfiguration
+ if *v == nil {
+ sv = &types.AnalyticsConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Filter", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentAnalyticsFilter(&sv.Filter, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Id", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Id = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("StorageClassAnalysis", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentStorageClassAnalysis(&sv.StorageClassAnalysis, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentAnalyticsConfigurationList(v *[]types.AnalyticsConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.AnalyticsConfiguration
+ if *v == nil {
+ sv = make([]types.AnalyticsConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.AnalyticsConfiguration
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentAnalyticsConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentAnalyticsConfigurationListUnwrapped(v *[]types.AnalyticsConfiguration, decoder smithyxml.NodeDecoder) error {
+ var sv []types.AnalyticsConfiguration
+ if *v == nil {
+ sv = make([]types.AnalyticsConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.AnalyticsConfiguration
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentAnalyticsConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentAnalyticsExportDestination(v **types.AnalyticsExportDestination, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AnalyticsExportDestination
+ if *v == nil {
+ sv = &types.AnalyticsExportDestination{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("S3BucketDestination", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentAnalyticsS3BucketDestination(&sv.S3BucketDestination, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentAnalyticsFilter(v *types.AnalyticsFilter, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var uv types.AnalyticsFilter
+ var memberFound bool
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ if memberFound {
+ if err = decoder.Decoder.Skip(); err != nil {
+ return err
+ }
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("And", t.Name.Local):
+ var mv types.AnalyticsAndOperator
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentAnalyticsAndOperator(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ uv = &types.AnalyticsFilterMemberAnd{Value: mv}
+ memberFound = true
+
+ case strings.EqualFold("Prefix", t.Name.Local):
+ var mv string
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = xtv
+ }
+ uv = &types.AnalyticsFilterMemberPrefix{Value: mv}
+ memberFound = true
+
+ case strings.EqualFold("Tag", t.Name.Local):
+ var mv types.Tag
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ uv = &types.AnalyticsFilterMemberTag{Value: mv}
+ memberFound = true
+
+ default:
+ uv = &types.UnknownUnionMember{Tag: t.Name.Local}
+ memberFound = true
+
+ }
+ decoder = originalDecoder
+ }
+ *v = uv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentAnalyticsS3BucketDestination(v **types.AnalyticsS3BucketDestination, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AnalyticsS3BucketDestination
+ if *v == nil {
+ sv = &types.AnalyticsS3BucketDestination{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Bucket", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Bucket = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("BucketAccountId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.BucketAccountId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Format", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Format = types.AnalyticsS3ExportFileFormat(xtv)
+ }
+
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentBucket(v **types.Bucket, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Bucket
+ if *v == nil {
+ sv = &types.Bucket{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("CreationDate", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.CreationDate = ptr.Time(t)
+ }
+
+ case strings.EqualFold("Name", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Name = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentBucketAlreadyExists(v **types.BucketAlreadyExists, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.BucketAlreadyExists
+ if *v == nil {
+ sv = &types.BucketAlreadyExists{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentBucketAlreadyOwnedByYou(v **types.BucketAlreadyOwnedByYou, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.BucketAlreadyOwnedByYou
+ if *v == nil {
+ sv = &types.BucketAlreadyOwnedByYou{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentBuckets(v *[]types.Bucket, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Bucket
+ if *v == nil {
+ sv = make([]types.Bucket, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("Bucket", t.Name.Local):
+ var col types.Bucket
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentBucket(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentBucketsUnwrapped(v *[]types.Bucket, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Bucket
+ if *v == nil {
+ sv = make([]types.Bucket, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Bucket
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentBucket(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentCommonPrefix(v **types.CommonPrefix, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CommonPrefix
+ if *v == nil {
+ sv = &types.CommonPrefix{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentCommonPrefixList(v *[]types.CommonPrefix, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.CommonPrefix
+ if *v == nil {
+ sv = make([]types.CommonPrefix, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.CommonPrefix
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentCommonPrefix(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentCommonPrefixListUnwrapped(v *[]types.CommonPrefix, decoder smithyxml.NodeDecoder) error {
+ var sv []types.CommonPrefix
+ if *v == nil {
+ sv = make([]types.CommonPrefix, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.CommonPrefix
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentCommonPrefix(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentCondition(v **types.Condition, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Condition
+ if *v == nil {
+ sv = &types.Condition{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("HttpErrorCodeReturnedEquals", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HttpErrorCodeReturnedEquals = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("KeyPrefixEquals", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyPrefixEquals = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentCopyObjectResult(v **types.CopyObjectResult, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CopyObjectResult
+ if *v == nil {
+ sv = &types.CopyObjectResult{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ETag", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ETag = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LastModified", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.LastModified = ptr.Time(t)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentCopyPartResult(v **types.CopyPartResult, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CopyPartResult
+ if *v == nil {
+ sv = &types.CopyPartResult{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ETag", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ETag = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LastModified", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.LastModified = ptr.Time(t)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentCORSRule(v **types.CORSRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.CORSRule
+ if *v == nil {
+ sv = &types.CORSRule{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AllowedHeader", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentAllowedHeadersUnwrapped(&sv.AllowedHeaders, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("AllowedMethod", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentAllowedMethodsUnwrapped(&sv.AllowedMethods, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("AllowedOrigin", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentAllowedOriginsUnwrapped(&sv.AllowedOrigins, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ExposeHeader", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentExposeHeadersUnwrapped(&sv.ExposeHeaders, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ID", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ID = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("MaxAgeSeconds", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.MaxAgeSeconds = int32(i64)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentCORSRules(v *[]types.CORSRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.CORSRule
+ if *v == nil {
+ sv = make([]types.CORSRule, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.CORSRule
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentCORSRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentCORSRulesUnwrapped(v *[]types.CORSRule, decoder smithyxml.NodeDecoder) error {
+ var sv []types.CORSRule
+ if *v == nil {
+ sv = make([]types.CORSRule, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.CORSRule
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentCORSRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentDefaultRetention(v **types.DefaultRetention, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DefaultRetention
+ if *v == nil {
+ sv = &types.DefaultRetention{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Days", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.Days = int32(i64)
+ }
+
+ case strings.EqualFold("Mode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Mode = types.ObjectLockRetentionMode(xtv)
+ }
+
+ case strings.EqualFold("Years", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.Years = int32(i64)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentDeletedObject(v **types.DeletedObject, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DeletedObject
+ if *v == nil {
+ sv = &types.DeletedObject{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("DeleteMarker", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected DeleteMarker to be of type *bool, got %T instead", val)
+ }
+ sv.DeleteMarker = xtv
+ }
+
+ case strings.EqualFold("DeleteMarkerVersionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DeleteMarkerVersionId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Key", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Key = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("VersionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VersionId = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentDeletedObjects(v *[]types.DeletedObject, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DeletedObject
+ if *v == nil {
+ sv = make([]types.DeletedObject, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.DeletedObject
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentDeletedObject(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentDeletedObjectsUnwrapped(v *[]types.DeletedObject, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DeletedObject
+ if *v == nil {
+ sv = make([]types.DeletedObject, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DeletedObject
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentDeletedObject(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentDeleteMarkerEntry(v **types.DeleteMarkerEntry, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DeleteMarkerEntry
+ if *v == nil {
+ sv = &types.DeleteMarkerEntry{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("IsLatest", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected IsLatest to be of type *bool, got %T instead", val)
+ }
+ sv.IsLatest = xtv
+ }
+
+ case strings.EqualFold("Key", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Key = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LastModified", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.LastModified = ptr.Time(t)
+ }
+
+ case strings.EqualFold("Owner", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentOwner(&sv.Owner, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("VersionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VersionId = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentDeleteMarkerReplication(v **types.DeleteMarkerReplication, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.DeleteMarkerReplication
+ if *v == nil {
+ sv = &types.DeleteMarkerReplication{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Status", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Status = types.DeleteMarkerReplicationStatus(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentDeleteMarkers(v *[]types.DeleteMarkerEntry, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.DeleteMarkerEntry
+ if *v == nil {
+ sv = make([]types.DeleteMarkerEntry, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.DeleteMarkerEntry
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentDeleteMarkerEntry(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentDeleteMarkersUnwrapped(v *[]types.DeleteMarkerEntry, decoder smithyxml.NodeDecoder) error {
+ var sv []types.DeleteMarkerEntry
+ if *v == nil {
+ sv = make([]types.DeleteMarkerEntry, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.DeleteMarkerEntry
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentDeleteMarkerEntry(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentDestination(v **types.Destination, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Destination
+ if *v == nil {
+ sv = &types.Destination{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AccessControlTranslation", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentAccessControlTranslation(&sv.AccessControlTranslation, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Account", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Account = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Bucket", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Bucket = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("EncryptionConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentEncryptionConfiguration(&sv.EncryptionConfiguration, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Metrics", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentMetrics(&sv.Metrics, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ReplicationTime", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentReplicationTime(&sv.ReplicationTime, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("StorageClass", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StorageClass = types.StorageClass(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentEncryptionConfiguration(v **types.EncryptionConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EncryptionConfiguration
+ if *v == nil {
+ sv = &types.EncryptionConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ReplicaKmsKeyID", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReplicaKmsKeyID = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentError(v **types.Error, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Error
+ if *v == nil {
+ sv = &types.Error{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Code", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Code = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Key", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Key = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Message", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Message = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("VersionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VersionId = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentErrorDocument(v **types.ErrorDocument, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ErrorDocument
+ if *v == nil {
+ sv = &types.ErrorDocument{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Key", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Key = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentErrors(v *[]types.Error, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Error
+ if *v == nil {
+ sv = make([]types.Error, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.Error
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentError(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentErrorsUnwrapped(v *[]types.Error, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Error
+ if *v == nil {
+ sv = make([]types.Error, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Error
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentError(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentEventList(v *[]types.Event, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Event
+ if *v == nil {
+ sv = make([]types.Event, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ decoder = memberDecoder
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.Event
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ col = types.Event(xtv)
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentEventListUnwrapped(v *[]types.Event, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Event
+ if *v == nil {
+ sv = make([]types.Event, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Event
+ t := decoder.StartEl
+ _ = t
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = types.Event(xtv)
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentExistingObjectReplication(v **types.ExistingObjectReplication, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ExistingObjectReplication
+ if *v == nil {
+ sv = &types.ExistingObjectReplication{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Status", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Status = types.ExistingObjectReplicationStatus(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentExposeHeaders(v *[]string, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []string
+ if *v == nil {
+ sv = make([]string, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ decoder = memberDecoder
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col string
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ col = xtv
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentExposeHeadersUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error {
+ var sv []string
+ if *v == nil {
+ sv = make([]string, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv string
+ t := decoder.StartEl
+ _ = t
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = xtv
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentFilterRule(v **types.FilterRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FilterRule
+ if *v == nil {
+ sv = &types.FilterRule{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Name", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Name = types.FilterRuleName(xtv)
+ }
+
+ case strings.EqualFold("Value", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Value = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentFilterRuleList(v *[]types.FilterRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.FilterRule
+ if *v == nil {
+ sv = make([]types.FilterRule, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.FilterRule
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentFilterRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentFilterRuleListUnwrapped(v *[]types.FilterRule, decoder smithyxml.NodeDecoder) error {
+ var sv []types.FilterRule
+ if *v == nil {
+ sv = make([]types.FilterRule, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.FilterRule
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentFilterRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentGrant(v **types.Grant, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Grant
+ if *v == nil {
+ sv = &types.Grant{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Grantee", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentGrantee(&sv.Grantee, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Permission", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Permission = types.Permission(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentGrantee(v **types.Grantee, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Grantee
+ if *v == nil {
+ sv = &types.Grantee{}
+ } else {
+ sv = *v
+ }
+
+ for _, attr := range decoder.StartEl.Attr {
+ name := attr.Name.Local
+ if len(attr.Name.Space) != 0 {
+ name = attr.Name.Space + `:` + attr.Name.Local
+ }
+ switch {
+ case strings.EqualFold("xsi:type", name):
+ val := []byte(attr.Value)
+ {
+ xtv := string(val)
+ sv.Type = types.Type(xtv)
+ }
+
+ }
+ }
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("DisplayName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DisplayName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("EmailAddress", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.EmailAddress = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ID", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ID = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("URI", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.URI = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentGrants(v *[]types.Grant, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Grant
+ if *v == nil {
+ sv = make([]types.Grant, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("Grant", t.Name.Local):
+ var col types.Grant
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentGrant(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentGrantsUnwrapped(v *[]types.Grant, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Grant
+ if *v == nil {
+ sv = make([]types.Grant, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Grant
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentGrant(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentIndexDocument(v **types.IndexDocument, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.IndexDocument
+ if *v == nil {
+ sv = &types.IndexDocument{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Suffix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Suffix = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentInitiator(v **types.Initiator, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Initiator
+ if *v == nil {
+ sv = &types.Initiator{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("DisplayName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DisplayName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ID", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ID = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentIntelligentTieringAndOperator(v **types.IntelligentTieringAndOperator, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.IntelligentTieringAndOperator
+ if *v == nil {
+ sv = &types.IntelligentTieringAndOperator{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Tag", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentTagSetUnwrapped(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentIntelligentTieringConfiguration(v **types.IntelligentTieringConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.IntelligentTieringConfiguration
+ if *v == nil {
+ sv = &types.IntelligentTieringConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Filter", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentIntelligentTieringFilter(&sv.Filter, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Id", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Id = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Status", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Status = types.IntelligentTieringStatus(xtv)
+ }
+
+ case strings.EqualFold("Tiering", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentTieringListUnwrapped(&sv.Tierings, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentIntelligentTieringConfigurationList(v *[]types.IntelligentTieringConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.IntelligentTieringConfiguration
+ if *v == nil {
+ sv = make([]types.IntelligentTieringConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.IntelligentTieringConfiguration
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentIntelligentTieringConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentIntelligentTieringConfigurationListUnwrapped(v *[]types.IntelligentTieringConfiguration, decoder smithyxml.NodeDecoder) error {
+ var sv []types.IntelligentTieringConfiguration
+ if *v == nil {
+ sv = make([]types.IntelligentTieringConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.IntelligentTieringConfiguration
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentIntelligentTieringConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentIntelligentTieringFilter(v **types.IntelligentTieringFilter, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.IntelligentTieringFilter
+ if *v == nil {
+ sv = &types.IntelligentTieringFilter{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("And", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentIntelligentTieringAndOperator(&sv.And, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Tag", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentTag(&sv.Tag, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentInvalidObjectState(v **types.InvalidObjectState, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InvalidObjectState
+ if *v == nil {
+ sv = &types.InvalidObjectState{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AccessTier", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AccessTier = types.IntelligentTieringAccessTier(xtv)
+ }
+
+ case strings.EqualFold("StorageClass", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StorageClass = types.StorageClass(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentInventoryConfiguration(v **types.InventoryConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InventoryConfiguration
+ if *v == nil {
+ sv = &types.InventoryConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Destination", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentInventoryDestination(&sv.Destination, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Filter", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentInventoryFilter(&sv.Filter, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Id", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Id = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("IncludedObjectVersions", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.IncludedObjectVersions = types.InventoryIncludedObjectVersions(xtv)
+ }
+
+ case strings.EqualFold("IsEnabled", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected IsEnabled to be of type *bool, got %T instead", val)
+ }
+ sv.IsEnabled = xtv
+ }
+
+ case strings.EqualFold("OptionalFields", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentInventoryOptionalFields(&sv.OptionalFields, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Schedule", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentInventorySchedule(&sv.Schedule, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentInventoryConfigurationList(v *[]types.InventoryConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InventoryConfiguration
+ if *v == nil {
+ sv = make([]types.InventoryConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.InventoryConfiguration
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentInventoryConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentInventoryConfigurationListUnwrapped(v *[]types.InventoryConfiguration, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InventoryConfiguration
+ if *v == nil {
+ sv = make([]types.InventoryConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InventoryConfiguration
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentInventoryConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentInventoryDestination(v **types.InventoryDestination, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InventoryDestination
+ if *v == nil {
+ sv = &types.InventoryDestination{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("S3BucketDestination", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentInventoryS3BucketDestination(&sv.S3BucketDestination, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentInventoryEncryption(v **types.InventoryEncryption, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InventoryEncryption
+ if *v == nil {
+ sv = &types.InventoryEncryption{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("SSE-KMS", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentSSEKMS(&sv.SSEKMS, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("SSE-S3", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentSSES3(&sv.SSES3, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentInventoryFilter(v **types.InventoryFilter, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InventoryFilter
+ if *v == nil {
+ sv = &types.InventoryFilter{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentInventoryOptionalFields(v *[]types.InventoryOptionalField, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.InventoryOptionalField
+ if *v == nil {
+ sv = make([]types.InventoryOptionalField, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ decoder = memberDecoder
+ switch {
+ case strings.EqualFold("Field", t.Name.Local):
+ var col types.InventoryOptionalField
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ col = types.InventoryOptionalField(xtv)
+ }
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentInventoryOptionalFieldsUnwrapped(v *[]types.InventoryOptionalField, decoder smithyxml.NodeDecoder) error {
+ var sv []types.InventoryOptionalField
+ if *v == nil {
+ sv = make([]types.InventoryOptionalField, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.InventoryOptionalField
+ t := decoder.StartEl
+ _ = t
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = types.InventoryOptionalField(xtv)
+ }
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentInventoryS3BucketDestination(v **types.InventoryS3BucketDestination, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InventoryS3BucketDestination
+ if *v == nil {
+ sv = &types.InventoryS3BucketDestination{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AccountId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AccountId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Bucket", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Bucket = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Encryption", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentInventoryEncryption(&sv.Encryption, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Format", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Format = types.InventoryFormat(xtv)
+ }
+
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentInventorySchedule(v **types.InventorySchedule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InventorySchedule
+ if *v == nil {
+ sv = &types.InventorySchedule{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Frequency", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Frequency = types.InventoryFrequency(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentLambdaFunctionConfiguration(v **types.LambdaFunctionConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LambdaFunctionConfiguration
+ if *v == nil {
+ sv = &types.LambdaFunctionConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Event", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentEventListUnwrapped(&sv.Events, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Filter", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentNotificationConfigurationFilter(&sv.Filter, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Id", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Id = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("CloudFunction", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.LambdaFunctionArn = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentLambdaFunctionConfigurationList(v *[]types.LambdaFunctionConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LambdaFunctionConfiguration
+ if *v == nil {
+ sv = make([]types.LambdaFunctionConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.LambdaFunctionConfiguration
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentLambdaFunctionConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentLambdaFunctionConfigurationListUnwrapped(v *[]types.LambdaFunctionConfiguration, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LambdaFunctionConfiguration
+ if *v == nil {
+ sv = make([]types.LambdaFunctionConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LambdaFunctionConfiguration
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentLambdaFunctionConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentLifecycleExpiration(v **types.LifecycleExpiration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LifecycleExpiration
+ if *v == nil {
+ sv = &types.LifecycleExpiration{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Date", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.Date = ptr.Time(t)
+ }
+
+ case strings.EqualFold("Days", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.Days = int32(i64)
+ }
+
+ case strings.EqualFold("ExpiredObjectDeleteMarker", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected ExpiredObjectDeleteMarker to be of type *bool, got %T instead", val)
+ }
+ sv.ExpiredObjectDeleteMarker = xtv
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentLifecycleRule(v **types.LifecycleRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LifecycleRule
+ if *v == nil {
+ sv = &types.LifecycleRule{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AbortIncompleteMultipartUpload", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentAbortIncompleteMultipartUpload(&sv.AbortIncompleteMultipartUpload, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Expiration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentLifecycleExpiration(&sv.Expiration, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Filter", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentLifecycleRuleFilter(&sv.Filter, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ID", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ID = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("NoncurrentVersionExpiration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentNoncurrentVersionExpiration(&sv.NoncurrentVersionExpiration, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("NoncurrentVersionTransition", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentNoncurrentVersionTransitionListUnwrapped(&sv.NoncurrentVersionTransitions, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Status", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Status = types.ExpirationStatus(xtv)
+ }
+
+ case strings.EqualFold("Transition", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentTransitionListUnwrapped(&sv.Transitions, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentLifecycleRuleAndOperator(v **types.LifecycleRuleAndOperator, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LifecycleRuleAndOperator
+ if *v == nil {
+ sv = &types.LifecycleRuleAndOperator{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Tag", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentTagSetUnwrapped(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentLifecycleRuleFilter(v *types.LifecycleRuleFilter, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var uv types.LifecycleRuleFilter
+ var memberFound bool
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ if memberFound {
+ if err = decoder.Decoder.Skip(); err != nil {
+ return err
+ }
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("And", t.Name.Local):
+ var mv types.LifecycleRuleAndOperator
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentLifecycleRuleAndOperator(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ uv = &types.LifecycleRuleFilterMemberAnd{Value: mv}
+ memberFound = true
+
+ case strings.EqualFold("Prefix", t.Name.Local):
+ var mv string
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = xtv
+ }
+ uv = &types.LifecycleRuleFilterMemberPrefix{Value: mv}
+ memberFound = true
+
+ case strings.EqualFold("Tag", t.Name.Local):
+ var mv types.Tag
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ uv = &types.LifecycleRuleFilterMemberTag{Value: mv}
+ memberFound = true
+
+ default:
+ uv = &types.UnknownUnionMember{Tag: t.Name.Local}
+ memberFound = true
+
+ }
+ decoder = originalDecoder
+ }
+ *v = uv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentLifecycleRules(v *[]types.LifecycleRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.LifecycleRule
+ if *v == nil {
+ sv = make([]types.LifecycleRule, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.LifecycleRule
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentLifecycleRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentLifecycleRulesUnwrapped(v *[]types.LifecycleRule, decoder smithyxml.NodeDecoder) error {
+ var sv []types.LifecycleRule
+ if *v == nil {
+ sv = make([]types.LifecycleRule, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.LifecycleRule
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentLifecycleRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentLoggingEnabled(v **types.LoggingEnabled, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.LoggingEnabled
+ if *v == nil {
+ sv = &types.LoggingEnabled{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("TargetBucket", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TargetBucket = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("TargetGrants", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentTargetGrants(&sv.TargetGrants, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("TargetPrefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TargetPrefix = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentMetrics(v **types.Metrics, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Metrics
+ if *v == nil {
+ sv = &types.Metrics{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("EventThreshold", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentReplicationTimeValue(&sv.EventThreshold, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Status", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Status = types.MetricsStatus(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentMetricsAndOperator(v **types.MetricsAndOperator, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.MetricsAndOperator
+ if *v == nil {
+ sv = &types.MetricsAndOperator{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AccessPointArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AccessPointArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Tag", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentTagSetUnwrapped(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentMetricsConfiguration(v **types.MetricsConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.MetricsConfiguration
+ if *v == nil {
+ sv = &types.MetricsConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Filter", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentMetricsFilter(&sv.Filter, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Id", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Id = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentMetricsConfigurationList(v *[]types.MetricsConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.MetricsConfiguration
+ if *v == nil {
+ sv = make([]types.MetricsConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.MetricsConfiguration
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentMetricsConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentMetricsConfigurationListUnwrapped(v *[]types.MetricsConfiguration, decoder smithyxml.NodeDecoder) error {
+ var sv []types.MetricsConfiguration
+ if *v == nil {
+ sv = make([]types.MetricsConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.MetricsConfiguration
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentMetricsConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentMetricsFilter(v *types.MetricsFilter, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var uv types.MetricsFilter
+ var memberFound bool
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ if memberFound {
+ if err = decoder.Decoder.Skip(); err != nil {
+ return err
+ }
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AccessPointArn", t.Name.Local):
+ var mv string
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = xtv
+ }
+ uv = &types.MetricsFilterMemberAccessPointArn{Value: mv}
+ memberFound = true
+
+ case strings.EqualFold("And", t.Name.Local):
+ var mv types.MetricsAndOperator
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentMetricsAndOperator(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ uv = &types.MetricsFilterMemberAnd{Value: mv}
+ memberFound = true
+
+ case strings.EqualFold("Prefix", t.Name.Local):
+ var mv string
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = xtv
+ }
+ uv = &types.MetricsFilterMemberPrefix{Value: mv}
+ memberFound = true
+
+ case strings.EqualFold("Tag", t.Name.Local):
+ var mv types.Tag
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ uv = &types.MetricsFilterMemberTag{Value: mv}
+ memberFound = true
+
+ default:
+ uv = &types.UnknownUnionMember{Tag: t.Name.Local}
+ memberFound = true
+
+ }
+ decoder = originalDecoder
+ }
+ *v = uv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentMultipartUpload(v **types.MultipartUpload, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.MultipartUpload
+ if *v == nil {
+ sv = &types.MultipartUpload{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Initiated", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.Initiated = ptr.Time(t)
+ }
+
+ case strings.EqualFold("Initiator", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentInitiator(&sv.Initiator, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Key", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Key = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Owner", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentOwner(&sv.Owner, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("StorageClass", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StorageClass = types.StorageClass(xtv)
+ }
+
+ case strings.EqualFold("UploadId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UploadId = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentMultipartUploadList(v *[]types.MultipartUpload, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.MultipartUpload
+ if *v == nil {
+ sv = make([]types.MultipartUpload, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.MultipartUpload
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentMultipartUpload(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentMultipartUploadListUnwrapped(v *[]types.MultipartUpload, decoder smithyxml.NodeDecoder) error {
+ var sv []types.MultipartUpload
+ if *v == nil {
+ sv = make([]types.MultipartUpload, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.MultipartUpload
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentMultipartUpload(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentNoncurrentVersionExpiration(v **types.NoncurrentVersionExpiration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NoncurrentVersionExpiration
+ if *v == nil {
+ sv = &types.NoncurrentVersionExpiration{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("NoncurrentDays", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.NoncurrentDays = int32(i64)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentNoncurrentVersionTransition(v **types.NoncurrentVersionTransition, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NoncurrentVersionTransition
+ if *v == nil {
+ sv = &types.NoncurrentVersionTransition{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("NoncurrentDays", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.NoncurrentDays = int32(i64)
+ }
+
+ case strings.EqualFold("StorageClass", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StorageClass = types.TransitionStorageClass(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentNoncurrentVersionTransitionList(v *[]types.NoncurrentVersionTransition, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.NoncurrentVersionTransition
+ if *v == nil {
+ sv = make([]types.NoncurrentVersionTransition, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.NoncurrentVersionTransition
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentNoncurrentVersionTransition(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentNoncurrentVersionTransitionListUnwrapped(v *[]types.NoncurrentVersionTransition, decoder smithyxml.NodeDecoder) error {
+ var sv []types.NoncurrentVersionTransition
+ if *v == nil {
+ sv = make([]types.NoncurrentVersionTransition, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.NoncurrentVersionTransition
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentNoncurrentVersionTransition(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentNoSuchBucket(v **types.NoSuchBucket, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NoSuchBucket
+ if *v == nil {
+ sv = &types.NoSuchBucket{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentNoSuchKey(v **types.NoSuchKey, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NoSuchKey
+ if *v == nil {
+ sv = &types.NoSuchKey{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentNoSuchUpload(v **types.NoSuchUpload, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NoSuchUpload
+ if *v == nil {
+ sv = &types.NoSuchUpload{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentNotFound(v **types.NotFound, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NotFound
+ if *v == nil {
+ sv = &types.NotFound{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentNotificationConfigurationFilter(v **types.NotificationConfigurationFilter, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.NotificationConfigurationFilter
+ if *v == nil {
+ sv = &types.NotificationConfigurationFilter{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("S3Key", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentS3KeyFilter(&sv.Key, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentObject(v **types.Object, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Object
+ if *v == nil {
+ sv = &types.Object{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ETag", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ETag = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Key", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Key = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LastModified", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.LastModified = ptr.Time(t)
+ }
+
+ case strings.EqualFold("Owner", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentOwner(&sv.Owner, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Size", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.Size = i64
+ }
+
+ case strings.EqualFold("StorageClass", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StorageClass = types.ObjectStorageClass(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentObjectAlreadyInActiveTierError(v **types.ObjectAlreadyInActiveTierError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ObjectAlreadyInActiveTierError
+ if *v == nil {
+ sv = &types.ObjectAlreadyInActiveTierError{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentObjectList(v *[]types.Object, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Object
+ if *v == nil {
+ sv = make([]types.Object, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.Object
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentObject(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentObjectListUnwrapped(v *[]types.Object, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Object
+ if *v == nil {
+ sv = make([]types.Object, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Object
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentObject(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentObjectLockConfiguration(v **types.ObjectLockConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ObjectLockConfiguration
+ if *v == nil {
+ sv = &types.ObjectLockConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ObjectLockEnabled", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ObjectLockEnabled = types.ObjectLockEnabled(xtv)
+ }
+
+ case strings.EqualFold("Rule", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentObjectLockRule(&sv.Rule, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentObjectLockLegalHold(v **types.ObjectLockLegalHold, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ObjectLockLegalHold
+ if *v == nil {
+ sv = &types.ObjectLockLegalHold{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Status", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Status = types.ObjectLockLegalHoldStatus(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentObjectLockRetention(v **types.ObjectLockRetention, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ObjectLockRetention
+ if *v == nil {
+ sv = &types.ObjectLockRetention{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Mode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Mode = types.ObjectLockRetentionMode(xtv)
+ }
+
+ case strings.EqualFold("RetainUntilDate", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.RetainUntilDate = ptr.Time(t)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentObjectLockRule(v **types.ObjectLockRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ObjectLockRule
+ if *v == nil {
+ sv = &types.ObjectLockRule{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("DefaultRetention", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentDefaultRetention(&sv.DefaultRetention, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentObjectNotInActiveTierError(v **types.ObjectNotInActiveTierError, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ObjectNotInActiveTierError
+ if *v == nil {
+ sv = &types.ObjectNotInActiveTierError{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentObjectVersion(v **types.ObjectVersion, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ObjectVersion
+ if *v == nil {
+ sv = &types.ObjectVersion{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ETag", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ETag = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("IsLatest", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected IsLatest to be of type *bool, got %T instead", val)
+ }
+ sv.IsLatest = xtv
+ }
+
+ case strings.EqualFold("Key", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Key = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LastModified", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.LastModified = ptr.Time(t)
+ }
+
+ case strings.EqualFold("Owner", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentOwner(&sv.Owner, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Size", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.Size = i64
+ }
+
+ case strings.EqualFold("StorageClass", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StorageClass = types.ObjectVersionStorageClass(xtv)
+ }
+
+ case strings.EqualFold("VersionId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.VersionId = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentObjectVersionList(v *[]types.ObjectVersion, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ObjectVersion
+ if *v == nil {
+ sv = make([]types.ObjectVersion, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.ObjectVersion
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentObjectVersion(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentObjectVersionListUnwrapped(v *[]types.ObjectVersion, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ObjectVersion
+ if *v == nil {
+ sv = make([]types.ObjectVersion, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ObjectVersion
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentObjectVersion(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentOwner(v **types.Owner, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Owner
+ if *v == nil {
+ sv = &types.Owner{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("DisplayName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DisplayName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ID", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ID = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentOwnershipControls(v **types.OwnershipControls, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.OwnershipControls
+ if *v == nil {
+ sv = &types.OwnershipControls{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Rule", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentOwnershipControlsRulesUnwrapped(&sv.Rules, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentOwnershipControlsRule(v **types.OwnershipControlsRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.OwnershipControlsRule
+ if *v == nil {
+ sv = &types.OwnershipControlsRule{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ObjectOwnership", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ObjectOwnership = types.ObjectOwnership(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentOwnershipControlsRules(v *[]types.OwnershipControlsRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.OwnershipControlsRule
+ if *v == nil {
+ sv = make([]types.OwnershipControlsRule, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.OwnershipControlsRule
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentOwnershipControlsRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentOwnershipControlsRulesUnwrapped(v *[]types.OwnershipControlsRule, decoder smithyxml.NodeDecoder) error {
+ var sv []types.OwnershipControlsRule
+ if *v == nil {
+ sv = make([]types.OwnershipControlsRule, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.OwnershipControlsRule
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentOwnershipControlsRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentPart(v **types.Part, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Part
+ if *v == nil {
+ sv = &types.Part{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ETag", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ETag = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LastModified", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.LastModified = ptr.Time(t)
+ }
+
+ case strings.EqualFold("PartNumber", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.PartNumber = int32(i64)
+ }
+
+ case strings.EqualFold("Size", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.Size = i64
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentParts(v *[]types.Part, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Part
+ if *v == nil {
+ sv = make([]types.Part, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.Part
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentPart(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentPartsUnwrapped(v *[]types.Part, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Part
+ if *v == nil {
+ sv = make([]types.Part, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Part
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentPart(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentPolicyStatus(v **types.PolicyStatus, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PolicyStatus
+ if *v == nil {
+ sv = &types.PolicyStatus{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("IsPublic", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected IsPublic to be of type *bool, got %T instead", val)
+ }
+ sv.IsPublic = xtv
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentPublicAccessBlockConfiguration(v **types.PublicAccessBlockConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PublicAccessBlockConfiguration
+ if *v == nil {
+ sv = &types.PublicAccessBlockConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("BlockPublicAcls", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected Setting to be of type *bool, got %T instead", val)
+ }
+ sv.BlockPublicAcls = xtv
+ }
+
+ case strings.EqualFold("BlockPublicPolicy", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected Setting to be of type *bool, got %T instead", val)
+ }
+ sv.BlockPublicPolicy = xtv
+ }
+
+ case strings.EqualFold("IgnorePublicAcls", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected Setting to be of type *bool, got %T instead", val)
+ }
+ sv.IgnorePublicAcls = xtv
+ }
+
+ case strings.EqualFold("RestrictPublicBuckets", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected Setting to be of type *bool, got %T instead", val)
+ }
+ sv.RestrictPublicBuckets = xtv
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentQueueConfiguration(v **types.QueueConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.QueueConfiguration
+ if *v == nil {
+ sv = &types.QueueConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Event", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentEventListUnwrapped(&sv.Events, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Filter", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentNotificationConfigurationFilter(&sv.Filter, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Id", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Id = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Queue", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.QueueArn = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentQueueConfigurationList(v *[]types.QueueConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.QueueConfiguration
+ if *v == nil {
+ sv = make([]types.QueueConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.QueueConfiguration
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentQueueConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentQueueConfigurationListUnwrapped(v *[]types.QueueConfiguration, decoder smithyxml.NodeDecoder) error {
+ var sv []types.QueueConfiguration
+ if *v == nil {
+ sv = make([]types.QueueConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.QueueConfiguration
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentQueueConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentRedirect(v **types.Redirect, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Redirect
+ if *v == nil {
+ sv = &types.Redirect{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("HostName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HostName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("HttpRedirectCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HttpRedirectCode = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Protocol", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Protocol = types.Protocol(xtv)
+ }
+
+ case strings.EqualFold("ReplaceKeyPrefixWith", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReplaceKeyPrefixWith = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ReplaceKeyWith", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ReplaceKeyWith = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentRedirectAllRequestsTo(v **types.RedirectAllRequestsTo, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.RedirectAllRequestsTo
+ if *v == nil {
+ sv = &types.RedirectAllRequestsTo{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("HostName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.HostName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Protocol", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Protocol = types.Protocol(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentReplicaModifications(v **types.ReplicaModifications, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReplicaModifications
+ if *v == nil {
+ sv = &types.ReplicaModifications{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Status", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Status = types.ReplicaModificationsStatus(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentReplicationConfiguration(v **types.ReplicationConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReplicationConfiguration
+ if *v == nil {
+ sv = &types.ReplicationConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Role", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Role = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Rule", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentReplicationRulesUnwrapped(&sv.Rules, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentReplicationRule(v **types.ReplicationRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReplicationRule
+ if *v == nil {
+ sv = &types.ReplicationRule{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("DeleteMarkerReplication", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentDeleteMarkerReplication(&sv.DeleteMarkerReplication, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Destination", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentDestination(&sv.Destination, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ExistingObjectReplication", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentExistingObjectReplication(&sv.ExistingObjectReplication, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Filter", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentReplicationRuleFilter(&sv.Filter, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("ID", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ID = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Priority", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.Priority = int32(i64)
+ }
+
+ case strings.EqualFold("SourceSelectionCriteria", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentSourceSelectionCriteria(&sv.SourceSelectionCriteria, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Status", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Status = types.ReplicationRuleStatus(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentReplicationRuleAndOperator(v **types.ReplicationRuleAndOperator, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReplicationRuleAndOperator
+ if *v == nil {
+ sv = &types.ReplicationRuleAndOperator{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Tag", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentTagSetUnwrapped(&sv.Tags, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentReplicationRuleFilter(v *types.ReplicationRuleFilter, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var uv types.ReplicationRuleFilter
+ var memberFound bool
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ if memberFound {
+ if err = decoder.Decoder.Skip(); err != nil {
+ return err
+ }
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("And", t.Name.Local):
+ var mv types.ReplicationRuleAndOperator
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentReplicationRuleAndOperator(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ uv = &types.ReplicationRuleFilterMemberAnd{Value: mv}
+ memberFound = true
+
+ case strings.EqualFold("Prefix", t.Name.Local):
+ var mv string
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ mv = xtv
+ }
+ uv = &types.ReplicationRuleFilterMemberPrefix{Value: mv}
+ memberFound = true
+
+ case strings.EqualFold("Tag", t.Name.Local):
+ var mv types.Tag
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ uv = &types.ReplicationRuleFilterMemberTag{Value: mv}
+ memberFound = true
+
+ default:
+ uv = &types.UnknownUnionMember{Tag: t.Name.Local}
+ memberFound = true
+
+ }
+ decoder = originalDecoder
+ }
+ *v = uv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentReplicationRules(v *[]types.ReplicationRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ReplicationRule
+ if *v == nil {
+ sv = make([]types.ReplicationRule, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.ReplicationRule
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentReplicationRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentReplicationRulesUnwrapped(v *[]types.ReplicationRule, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ReplicationRule
+ if *v == nil {
+ sv = make([]types.ReplicationRule, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ReplicationRule
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentReplicationRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentReplicationTime(v **types.ReplicationTime, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReplicationTime
+ if *v == nil {
+ sv = &types.ReplicationTime{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Status", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Status = types.ReplicationTimeStatus(xtv)
+ }
+
+ case strings.EqualFold("Time", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentReplicationTimeValue(&sv.Time, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentReplicationTimeValue(v **types.ReplicationTimeValue, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ReplicationTimeValue
+ if *v == nil {
+ sv = &types.ReplicationTimeValue{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Minutes", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.Minutes = int32(i64)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentRoutingRule(v **types.RoutingRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.RoutingRule
+ if *v == nil {
+ sv = &types.RoutingRule{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Condition", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentCondition(&sv.Condition, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Redirect", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentRedirect(&sv.Redirect, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentRoutingRules(v *[]types.RoutingRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.RoutingRule
+ if *v == nil {
+ sv = make([]types.RoutingRule, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("RoutingRule", t.Name.Local):
+ var col types.RoutingRule
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentRoutingRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentRoutingRulesUnwrapped(v *[]types.RoutingRule, decoder smithyxml.NodeDecoder) error {
+ var sv []types.RoutingRule
+ if *v == nil {
+ sv = make([]types.RoutingRule, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.RoutingRule
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentRoutingRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentS3KeyFilter(v **types.S3KeyFilter, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.S3KeyFilter
+ if *v == nil {
+ sv = &types.S3KeyFilter{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("FilterRule", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentFilterRuleListUnwrapped(&sv.FilterRules, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentServerSideEncryptionByDefault(v **types.ServerSideEncryptionByDefault, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ServerSideEncryptionByDefault
+ if *v == nil {
+ sv = &types.ServerSideEncryptionByDefault{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("KMSMasterKeyID", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KMSMasterKeyID = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("SSEAlgorithm", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SSEAlgorithm = types.ServerSideEncryption(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentServerSideEncryptionConfiguration(v **types.ServerSideEncryptionConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ServerSideEncryptionConfiguration
+ if *v == nil {
+ sv = &types.ServerSideEncryptionConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Rule", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentServerSideEncryptionRulesUnwrapped(&sv.Rules, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentServerSideEncryptionRule(v **types.ServerSideEncryptionRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ServerSideEncryptionRule
+ if *v == nil {
+ sv = &types.ServerSideEncryptionRule{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ApplyServerSideEncryptionByDefault", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentServerSideEncryptionByDefault(&sv.ApplyServerSideEncryptionByDefault, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("BucketKeyEnabled", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv, err := strconv.ParseBool(string(val))
+ if err != nil {
+ return fmt.Errorf("expected BucketKeyEnabled to be of type *bool, got %T instead", val)
+ }
+ sv.BucketKeyEnabled = xtv
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentServerSideEncryptionRules(v *[]types.ServerSideEncryptionRule, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.ServerSideEncryptionRule
+ if *v == nil {
+ sv = make([]types.ServerSideEncryptionRule, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.ServerSideEncryptionRule
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentServerSideEncryptionRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentServerSideEncryptionRulesUnwrapped(v *[]types.ServerSideEncryptionRule, decoder smithyxml.NodeDecoder) error {
+ var sv []types.ServerSideEncryptionRule
+ if *v == nil {
+ sv = make([]types.ServerSideEncryptionRule, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.ServerSideEncryptionRule
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentServerSideEncryptionRule(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentSourceSelectionCriteria(v **types.SourceSelectionCriteria, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SourceSelectionCriteria
+ if *v == nil {
+ sv = &types.SourceSelectionCriteria{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ReplicaModifications", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentReplicaModifications(&sv.ReplicaModifications, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("SseKmsEncryptedObjects", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentSseKmsEncryptedObjects(&sv.SseKmsEncryptedObjects, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentSSEKMS(v **types.SSEKMS, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SSEKMS
+ if *v == nil {
+ sv = &types.SSEKMS{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("KeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.KeyId = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentSseKmsEncryptedObjects(v **types.SseKmsEncryptedObjects, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SseKmsEncryptedObjects
+ if *v == nil {
+ sv = &types.SseKmsEncryptedObjects{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Status", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Status = types.SseKmsEncryptedObjectsStatus(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentSSES3(v **types.SSES3, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.SSES3
+ if *v == nil {
+ sv = &types.SSES3{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentStorageClassAnalysis(v **types.StorageClassAnalysis, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.StorageClassAnalysis
+ if *v == nil {
+ sv = &types.StorageClassAnalysis{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("DataExport", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentStorageClassAnalysisDataExport(&sv.DataExport, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentStorageClassAnalysisDataExport(v **types.StorageClassAnalysisDataExport, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.StorageClassAnalysisDataExport
+ if *v == nil {
+ sv = &types.StorageClassAnalysisDataExport{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Destination", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentAnalyticsExportDestination(&sv.Destination, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("OutputSchemaVersion", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.OutputSchemaVersion = types.StorageClassAnalysisSchemaVersion(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentTag(v **types.Tag, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Tag
+ if *v == nil {
+ sv = &types.Tag{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Key", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Key = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Value", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Value = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentTagSet(v *[]types.Tag, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Tag
+ if *v == nil {
+ sv = make([]types.Tag, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("Tag", t.Name.Local):
+ var col types.Tag
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentTagSetUnwrapped(v *[]types.Tag, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Tag
+ if *v == nil {
+ sv = make([]types.Tag, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Tag
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentTargetGrant(v **types.TargetGrant, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TargetGrant
+ if *v == nil {
+ sv = &types.TargetGrant{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Grantee", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentGrantee(&sv.Grantee, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Permission", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Permission = types.BucketLogsPermission(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentTargetGrants(v *[]types.TargetGrant, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TargetGrant
+ if *v == nil {
+ sv = make([]types.TargetGrant, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("Grant", t.Name.Local):
+ var col types.TargetGrant
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentTargetGrant(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentTargetGrantsUnwrapped(v *[]types.TargetGrant, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TargetGrant
+ if *v == nil {
+ sv = make([]types.TargetGrant, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TargetGrant
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentTargetGrant(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentTiering(v **types.Tiering, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Tiering
+ if *v == nil {
+ sv = &types.Tiering{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AccessTier", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AccessTier = types.IntelligentTieringAccessTier(xtv)
+ }
+
+ case strings.EqualFold("Days", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.Days = int32(i64)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentTieringList(v *[]types.Tiering, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Tiering
+ if *v == nil {
+ sv = make([]types.Tiering, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.Tiering
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentTiering(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentTieringListUnwrapped(v *[]types.Tiering, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Tiering
+ if *v == nil {
+ sv = make([]types.Tiering, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Tiering
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentTiering(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentTopicConfiguration(v **types.TopicConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TopicConfiguration
+ if *v == nil {
+ sv = &types.TopicConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Event", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentEventListUnwrapped(&sv.Events, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Filter", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentNotificationConfigurationFilter(&sv.Filter, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Id", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Id = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Topic", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TopicArn = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentTopicConfigurationList(v *[]types.TopicConfiguration, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.TopicConfiguration
+ if *v == nil {
+ sv = make([]types.TopicConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.TopicConfiguration
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentTopicConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentTopicConfigurationListUnwrapped(v *[]types.TopicConfiguration, decoder smithyxml.NodeDecoder) error {
+ var sv []types.TopicConfiguration
+ if *v == nil {
+ sv = make([]types.TopicConfiguration, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.TopicConfiguration
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentTopicConfiguration(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
+func awsRestxml_deserializeDocumentTransition(v **types.Transition, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Transition
+ if *v == nil {
+ sv = &types.Transition{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Date", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.Date = ptr.Time(t)
+ }
+
+ case strings.EqualFold("Days", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.Days = int32(i64)
+ }
+
+ case strings.EqualFold("StorageClass", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StorageClass = types.TransitionStorageClass(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentTransitionList(v *[]types.Transition, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv []types.Transition
+ if *v == nil {
+ sv = make([]types.Transition, 0)
+ } else {
+ sv = *v
+ }
+
+ originalDecoder := decoder
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ switch {
+ case strings.EqualFold("member", t.Name.Local):
+ var col types.Transition
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &col
+ if err := awsRestxml_deserializeDocumentTransition(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ col = *destAddr
+ sv = append(sv, col)
+
+ default:
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentTransitionListUnwrapped(v *[]types.Transition, decoder smithyxml.NodeDecoder) error {
+ var sv []types.Transition
+ if *v == nil {
+ sv = make([]types.Transition, 0)
+ } else {
+ sv = *v
+ }
+
+ switch {
+ default:
+ var mv types.Transition
+ t := decoder.StartEl
+ _ = t
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ destAddr := &mv
+ if err := awsRestxml_deserializeDocumentTransition(&destAddr, nodeDecoder); err != nil {
+ return err
+ }
+ mv = *destAddr
+ sv = append(sv, mv)
+ }
+ *v = sv
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/doc.go
new file mode 100644
index 000000000..ce3203be5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/doc.go
@@ -0,0 +1,7 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+// Package s3 provides the API client, operations, and parameter types for Amazon
+// Simple Storage Service.
+//
+//
+package s3
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go
new file mode 100644
index 000000000..8df6368cd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go
@@ -0,0 +1,208 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalendpoints "github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/url"
+ "strings"
+)
+
+// EndpointResolverOptions is the service endpoint resolver options
+type EndpointResolverOptions = internalendpoints.Options
+
+// EndpointResolver interface for resolving service endpoints.
+type EndpointResolver interface {
+ ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+}
+
+var _ EndpointResolver = &internalendpoints.Resolver{}
+
+// NewDefaultEndpointResolver constructs a new service endpoint resolver
+func NewDefaultEndpointResolver() *internalendpoints.Resolver {
+ return internalendpoints.New()
+}
+
+// EndpointResolverFunc is a helper utility that wraps a function so it satisfies
+// the EndpointResolver interface. This is useful when you want to add additional
+// endpoint resolving logic, or stub out specific endpoints with custom values.
+type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+
+func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ return fn(region, options)
+}
+
+func resolveDefaultEndpointConfiguration(o *Options) {
+ if o.EndpointResolver != nil {
+ return
+ }
+ o.EndpointResolver = NewDefaultEndpointResolver()
+}
+
+// EndpointResolverFromURL returns an EndpointResolver configured using the
+// provided endpoint url. By default, the resolved endpoint resolver uses the
+// client region as signing region, and the endpoint source is set to
+// EndpointSourceCustom.You can provide functional options to configure endpoint
+// values for the resolved endpoint.
+func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver {
+ e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom}
+ for _, fn := range optFns {
+ fn(&e)
+ }
+
+ return EndpointResolverFunc(
+ func(region string, options EndpointResolverOptions) (aws.Endpoint, error) {
+ if len(e.SigningRegion) == 0 {
+ e.SigningRegion = region
+ }
+ return e, nil
+ },
+ )
+}
+
+type ResolveEndpoint struct {
+ Resolver EndpointResolver
+ Options EndpointResolverOptions
+}
+
+func (*ResolveEndpoint) ID() string {
+ return "ResolveEndpoint"
+}
+
+func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.Resolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ eo := m.Options
+ eo.Logger = middleware.GetLogger(ctx)
+
+ var endpoint aws.Endpoint
+ endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL, err = url.Parse(endpoint.URL)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err)
+ }
+
+ if len(awsmiddleware.GetSigningName(ctx)) == 0 {
+ signingName := endpoint.SigningName
+ if len(signingName) == 0 {
+ signingName = "s3"
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ }
+ ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source)
+ ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable)
+ ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
+ ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID)
+ return next.HandleSerialize(ctx, in)
+}
+func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Serialize.Insert(&ResolveEndpoint{
+ Resolver: o.EndpointResolver,
+ Options: o.EndpointOptions,
+ }, "OperationSerializer", middleware.Before)
+}
+
+func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
+ _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID())
+ return err
+}
+
+type wrappedEndpointResolver struct {
+ awsResolver aws.EndpointResolverWithOptions
+ resolver EndpointResolver
+}
+
+func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ if w.awsResolver == nil {
+ goto fallback
+ }
+ endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options)
+ if err == nil {
+ return endpoint, nil
+ }
+
+ if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) {
+ return endpoint, err
+ }
+
+fallback:
+ if w.resolver == nil {
+ return endpoint, fmt.Errorf("default endpoint resolver provided was nil")
+ }
+ return w.resolver.ResolveEndpoint(region, options)
+}
+
+type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
+
+func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) {
+ return a(service, region)
+}
+
+var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
+
+// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver.
+// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided
+// fallbackResolver for resolution.
+//
+// fallbackResolver must not be nil
+func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver {
+ var resolver aws.EndpointResolverWithOptions
+
+ if awsResolverWithOptions != nil {
+ resolver = awsResolverWithOptions
+ } else if awsResolver != nil {
+ resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint)
+ }
+
+ return &wrappedEndpointResolver{
+ awsResolver: resolver,
+ resolver: fallbackResolver,
+ }
+}
+
+func finalizeClientEndpointResolverOptions(options *Options) {
+ options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage()
+
+ if len(options.EndpointOptions.ResolvedRegion) == 0 {
+ const fipsInfix = "-fips-"
+ const fipsPrefix = "fips-"
+ const fipsSuffix = "-fips"
+
+ if strings.Contains(options.Region, fipsInfix) ||
+ strings.Contains(options.Region, fipsPrefix) ||
+ strings.Contains(options.Region, fipsSuffix) {
+ options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
+ options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
+ options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled
+ }
+ }
+
+ if options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateUnset {
+ if options.UseDualstack {
+ options.EndpointOptions.UseDualStackEndpoint = aws.DualStackEndpointStateEnabled
+ } else {
+ options.EndpointOptions.UseDualStackEndpoint = aws.DualStackEndpointStateDisabled
+ }
+ }
+
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/eventstream.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/eventstream.go
new file mode 100644
index 000000000..38d579a3a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/eventstream.go
@@ -0,0 +1,281 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+ smithysync "github.com/aws/smithy-go/sync"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+ "io/ioutil"
+ "sync"
+)
+
+// SelectObjectContentEventStreamReader provides the interface for reading events
+// from a stream.
+//
+// The writer's Close method must allow multiple concurrent calls.
+type SelectObjectContentEventStreamReader interface {
+ Events() <-chan types.SelectObjectContentEventStream
+ Close() error
+ Err() error
+}
+
+type selectObjectContentEventStream struct {
+ stream chan types.SelectObjectContentEventStream
+ decoder *eventstream.Decoder
+ eventStream io.ReadCloser
+ err *smithysync.OnceErr
+ payloadBuf []byte
+ done chan struct{}
+ closeOnce sync.Once
+}
+
+func newSelectObjectContentEventStream(readCloser io.ReadCloser, decoder *eventstream.Decoder) *selectObjectContentEventStream {
+ w := &selectObjectContentEventStream{
+ stream: make(chan types.SelectObjectContentEventStream),
+ decoder: decoder,
+ eventStream: readCloser,
+ err: smithysync.NewOnceErr(),
+ done: make(chan struct{}),
+ payloadBuf: make([]byte, 10*1024),
+ }
+
+ go w.readEventStream()
+
+ return w
+}
+
+func (r *selectObjectContentEventStream) Events() <-chan types.SelectObjectContentEventStream {
+ return r.stream
+}
+
+func (r *selectObjectContentEventStream) readEventStream() {
+ defer r.Close()
+ defer close(r.stream)
+
+ for {
+ r.payloadBuf = r.payloadBuf[0:0]
+ decodedMessage, err := r.decoder.Decode(r.eventStream, r.payloadBuf)
+ if err != nil {
+ if err == io.EOF {
+ return
+ }
+ select {
+ case <-r.done:
+ return
+ default:
+ r.err.SetError(err)
+ return
+ }
+ }
+
+ event, err := r.deserializeEventMessage(&decodedMessage)
+ if err != nil {
+ r.err.SetError(err)
+ return
+ }
+
+ select {
+ case r.stream <- event:
+ case <-r.done:
+ return
+ }
+
+ }
+}
+
+func (r *selectObjectContentEventStream) deserializeEventMessage(msg *eventstream.Message) (types.SelectObjectContentEventStream, error) {
+ messageType := msg.Headers.Get(eventstreamapi.MessageTypeHeader)
+ if messageType == nil {
+ return nil, fmt.Errorf("%s event header not present", eventstreamapi.MessageTypeHeader)
+ }
+
+ switch messageType.String() {
+ case eventstreamapi.EventMessageType:
+ var v types.SelectObjectContentEventStream
+ if err := awsRestxml_deserializeEventStreamSelectObjectContentEventStream(&v, msg); err != nil {
+ return nil, err
+ }
+ return v, nil
+
+ case eventstreamapi.ExceptionMessageType:
+ return nil, awsRestxml_deserializeEventStreamExceptionSelectObjectContentEventStream(msg)
+
+ case eventstreamapi.ErrorMessageType:
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+ if header := msg.Headers.Get(eventstreamapi.ErrorCodeHeader); header != nil {
+ errorCode = header.String()
+ }
+ if header := msg.Headers.Get(eventstreamapi.ErrorMessageHeader); header != nil {
+ errorMessage = header.String()
+ }
+ return nil, &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+
+ default:
+ mc := msg.Clone()
+ return nil, &UnknownEventMessageError{
+ Type: messageType.String(),
+ Message: &mc,
+ }
+
+ }
+}
+
+func (r *selectObjectContentEventStream) ErrorSet() <-chan struct{} {
+ return r.err.ErrorSet()
+}
+
+func (r *selectObjectContentEventStream) Close() error {
+ r.closeOnce.Do(r.safeClose)
+ return r.Err()
+}
+
+func (r *selectObjectContentEventStream) safeClose() {
+ close(r.done)
+ r.eventStream.Close()
+
+}
+
+func (r *selectObjectContentEventStream) Err() error {
+ return r.err.Err()
+}
+
+func (r *selectObjectContentEventStream) Closed() <-chan struct{} {
+ return r.done
+}
+
+type awsRestxml_deserializeOpEventStreamSelectObjectContent struct {
+ LogEventStreamWrites bool
+ LogEventStreamReads bool
+}
+
+func (*awsRestxml_deserializeOpEventStreamSelectObjectContent) ID() string {
+ return "OperationEventStreamDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpEventStreamSelectObjectContent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ defer func() {
+ if err == nil {
+ return
+ }
+ m.closeResponseBody(out)
+ }()
+
+ logger := middleware.GetLogger(ctx)
+
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type: %T", in.Request)
+ }
+ _ = request
+
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ deserializeOutput, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type: %T", out.RawResponse)
+ }
+ _ = deserializeOutput
+
+ output, ok := out.Result.(*SelectObjectContentOutput)
+ if out.Result != nil && !ok {
+ return out, metadata, fmt.Errorf("unexpected output result type: %T", out.Result)
+ } else if out.Result == nil {
+ output = &SelectObjectContentOutput{}
+ out.Result = output
+ }
+
+ eventReader := newSelectObjectContentEventStream(
+ deserializeOutput.Body,
+ eventstream.NewDecoder(func(options *eventstream.DecoderOptions) {
+ options.Logger = logger
+ options.LogMessages = m.LogEventStreamReads
+
+ }),
+ )
+ defer func() {
+ if err == nil {
+ return
+ }
+ _ = eventReader.Close()
+ }()
+
+ output.eventStream = NewSelectObjectContentEventStream(func(stream *SelectObjectContentEventStream) {
+ stream.Reader = eventReader
+ })
+
+ go output.eventStream.waitStreamClose()
+
+ return out, metadata, nil
+}
+
+func (*awsRestxml_deserializeOpEventStreamSelectObjectContent) closeResponseBody(out middleware.DeserializeOutput) {
+ if resp, ok := out.RawResponse.(*smithyhttp.Response); ok && resp != nil && resp.Body != nil {
+ _, _ = io.Copy(ioutil.Discard, resp.Body)
+ _ = resp.Body.Close()
+ }
+}
+
+func addEventStreamSelectObjectContentMiddleware(stack *middleware.Stack, options Options) error {
+ return stack.Deserialize.Insert(&awsRestxml_deserializeOpEventStreamSelectObjectContent{
+ LogEventStreamWrites: options.ClientLogMode.IsRequestEventMessage(),
+ LogEventStreamReads: options.ClientLogMode.IsResponseEventMessage(),
+ }, "OperationDeserializer", middleware.Before)
+}
+
+// UnknownEventMessageError provides an error when a message is received from the stream,
+// but the reader is unable to determine what kind of message it is.
+type UnknownEventMessageError struct {
+ Type string
+ Message *eventstream.Message
+}
+
+// Error retruns the error message string.
+func (e *UnknownEventMessageError) Error() string {
+ return "unknown event stream message type, " + e.Type
+}
+
+func setSafeEventStreamClientLogMode(o *Options, operation string) {
+ switch operation {
+ case "SelectObjectContent":
+ toggleEventStreamClientLogMode(o, false, true)
+ return
+
+ default:
+ return
+
+ }
+}
+func toggleEventStreamClientLogMode(o *Options, request, response bool) {
+ mode := o.ClientLogMode
+
+ if request && mode.IsRequestWithBody() {
+ mode.ClearRequestWithBody()
+ mode |= aws.LogRequest
+ }
+
+ if response && mode.IsResponseWithBody() {
+ mode.ClearResponseWithBody()
+ mode |= aws.LogResponse
+ }
+
+ o.ClientLogMode = mode
+
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json
new file mode 100644
index 000000000..5e47a19c0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json
@@ -0,0 +1,124 @@
+{
+ "dependencies": {
+ "github.com/aws/aws-sdk-go-v2": "v1.4.0",
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream": "v0.0.0-00010101000000-000000000000",
+ "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000",
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000",
+ "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding": "v1.0.5",
+ "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url": "v1.0.7",
+ "github.com/aws/aws-sdk-go-v2/service/internal/s3shared": "v1.2.3",
+ "github.com/aws/smithy-go": "v1.4.0"
+ },
+ "files": [
+ "api_client.go",
+ "api_op_AbortMultipartUpload.go",
+ "api_op_CompleteMultipartUpload.go",
+ "api_op_CopyObject.go",
+ "api_op_CreateBucket.go",
+ "api_op_CreateMultipartUpload.go",
+ "api_op_DeleteBucket.go",
+ "api_op_DeleteBucketAnalyticsConfiguration.go",
+ "api_op_DeleteBucketCors.go",
+ "api_op_DeleteBucketEncryption.go",
+ "api_op_DeleteBucketIntelligentTieringConfiguration.go",
+ "api_op_DeleteBucketInventoryConfiguration.go",
+ "api_op_DeleteBucketLifecycle.go",
+ "api_op_DeleteBucketMetricsConfiguration.go",
+ "api_op_DeleteBucketOwnershipControls.go",
+ "api_op_DeleteBucketPolicy.go",
+ "api_op_DeleteBucketReplication.go",
+ "api_op_DeleteBucketTagging.go",
+ "api_op_DeleteBucketWebsite.go",
+ "api_op_DeleteObject.go",
+ "api_op_DeleteObjectTagging.go",
+ "api_op_DeleteObjects.go",
+ "api_op_DeletePublicAccessBlock.go",
+ "api_op_GetBucketAccelerateConfiguration.go",
+ "api_op_GetBucketAcl.go",
+ "api_op_GetBucketAnalyticsConfiguration.go",
+ "api_op_GetBucketCors.go",
+ "api_op_GetBucketEncryption.go",
+ "api_op_GetBucketIntelligentTieringConfiguration.go",
+ "api_op_GetBucketInventoryConfiguration.go",
+ "api_op_GetBucketLifecycleConfiguration.go",
+ "api_op_GetBucketLocation.go",
+ "api_op_GetBucketLogging.go",
+ "api_op_GetBucketMetricsConfiguration.go",
+ "api_op_GetBucketNotificationConfiguration.go",
+ "api_op_GetBucketOwnershipControls.go",
+ "api_op_GetBucketPolicy.go",
+ "api_op_GetBucketPolicyStatus.go",
+ "api_op_GetBucketReplication.go",
+ "api_op_GetBucketRequestPayment.go",
+ "api_op_GetBucketTagging.go",
+ "api_op_GetBucketVersioning.go",
+ "api_op_GetBucketWebsite.go",
+ "api_op_GetObject.go",
+ "api_op_GetObjectAcl.go",
+ "api_op_GetObjectLegalHold.go",
+ "api_op_GetObjectLockConfiguration.go",
+ "api_op_GetObjectRetention.go",
+ "api_op_GetObjectTagging.go",
+ "api_op_GetObjectTorrent.go",
+ "api_op_GetPublicAccessBlock.go",
+ "api_op_HeadBucket.go",
+ "api_op_HeadObject.go",
+ "api_op_ListBucketAnalyticsConfigurations.go",
+ "api_op_ListBucketIntelligentTieringConfigurations.go",
+ "api_op_ListBucketInventoryConfigurations.go",
+ "api_op_ListBucketMetricsConfigurations.go",
+ "api_op_ListBuckets.go",
+ "api_op_ListMultipartUploads.go",
+ "api_op_ListObjectVersions.go",
+ "api_op_ListObjects.go",
+ "api_op_ListObjectsV2.go",
+ "api_op_ListParts.go",
+ "api_op_PutBucketAccelerateConfiguration.go",
+ "api_op_PutBucketAcl.go",
+ "api_op_PutBucketAnalyticsConfiguration.go",
+ "api_op_PutBucketCors.go",
+ "api_op_PutBucketEncryption.go",
+ "api_op_PutBucketIntelligentTieringConfiguration.go",
+ "api_op_PutBucketInventoryConfiguration.go",
+ "api_op_PutBucketLifecycleConfiguration.go",
+ "api_op_PutBucketLogging.go",
+ "api_op_PutBucketMetricsConfiguration.go",
+ "api_op_PutBucketNotificationConfiguration.go",
+ "api_op_PutBucketOwnershipControls.go",
+ "api_op_PutBucketPolicy.go",
+ "api_op_PutBucketReplication.go",
+ "api_op_PutBucketRequestPayment.go",
+ "api_op_PutBucketTagging.go",
+ "api_op_PutBucketVersioning.go",
+ "api_op_PutBucketWebsite.go",
+ "api_op_PutObject.go",
+ "api_op_PutObjectAcl.go",
+ "api_op_PutObjectLegalHold.go",
+ "api_op_PutObjectLockConfiguration.go",
+ "api_op_PutObjectRetention.go",
+ "api_op_PutObjectTagging.go",
+ "api_op_PutPublicAccessBlock.go",
+ "api_op_RestoreObject.go",
+ "api_op_SelectObjectContent.go",
+ "api_op_UploadPart.go",
+ "api_op_UploadPartCopy.go",
+ "api_op_WriteGetObjectResponse.go",
+ "deserializers.go",
+ "doc.go",
+ "endpoints.go",
+ "eventstream.go",
+ "generated.json",
+ "internal/endpoints/endpoints.go",
+ "internal/endpoints/endpoints_test.go",
+ "protocol_test.go",
+ "serializers.go",
+ "types/enums.go",
+ "types/errors.go",
+ "types/types.go",
+ "types/types_exported_test.go",
+ "validators.go"
+ ],
+ "go": "1.15",
+ "module": "github.com/aws/aws-sdk-go-v2/service/s3",
+ "unstable": false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go
new file mode 100644
index 000000000..9ca3f774e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package s3
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.19.0"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/arn/arn_parser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/arn/arn_parser.go
new file mode 100644
index 000000000..97b5771bb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/arn/arn_parser.go
@@ -0,0 +1,106 @@
+package arn
+
+import (
+ "fmt"
+ "strings"
+
+ awsarn "github.com/aws/aws-sdk-go-v2/aws/arn"
+ "github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn"
+)
+
+const (
+ s3Namespace = "s3"
+ s3ObjectsLambdaNamespace = "s3-object-lambda"
+ s3OutpostsNamespace = "s3-outposts"
+)
+
+// ParseEndpointARN parses a given generic aws ARN into a s3 arn resource.
+func ParseEndpointARN(v awsarn.ARN) (arn.Resource, error) {
+ return arn.ParseResource(v, accessPointResourceParser)
+}
+
+func accessPointResourceParser(a awsarn.ARN) (arn.Resource, error) {
+ resParts := arn.SplitResource(a.Resource)
+
+ switch resParts[0] {
+ case "accesspoint":
+ switch a.Service {
+ case s3Namespace:
+ return arn.ParseAccessPointResource(a, resParts[1:])
+ case s3ObjectsLambdaNamespace:
+ return parseS3ObjectLambdaAccessPointResource(a, resParts)
+ default:
+ return arn.AccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: fmt.Sprintf("service is not %s or %s", s3Namespace, s3ObjectsLambdaNamespace)}
+ }
+ case "outpost":
+ if a.Service != s3OutpostsNamespace {
+ return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "service is not %s"}
+ }
+ return parseOutpostAccessPointResource(a, resParts[1:])
+ default:
+ return nil, arn.InvalidARNError{ARN: a, Reason: "unknown resource type"}
+ }
+}
+
+func parseOutpostAccessPointResource(a awsarn.ARN, resParts []string) (arn.OutpostAccessPointARN, error) {
+ // outpost accesspoint arn is only valid if service is s3-outposts
+ if a.Service != "s3-outposts" {
+ return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "service is not s3-outposts"}
+ }
+
+ if len(resParts) == 0 {
+ return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "outpost resource-id not set"}
+ }
+
+ if len(resParts) < 3 {
+ return arn.OutpostAccessPointARN{}, arn.InvalidARNError{
+ ARN: a, Reason: "access-point resource not set in Outpost ARN",
+ }
+ }
+
+ resID := strings.TrimSpace(resParts[0])
+ if len(resID) == 0 {
+ return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "outpost resource-id not set"}
+ }
+
+ var outpostAccessPointARN = arn.OutpostAccessPointARN{}
+ switch resParts[1] {
+ case "accesspoint":
+ // Do not allow region-less outpost access-point arns.
+ if len(a.Region) == 0 {
+ return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "region is not set"}
+ }
+
+ accessPointARN, err := arn.ParseAccessPointResource(a, resParts[2:])
+ if err != nil {
+ return arn.OutpostAccessPointARN{}, err
+ }
+ // set access-point arn
+ outpostAccessPointARN.AccessPointARN = accessPointARN
+ default:
+ return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "access-point resource not set in Outpost ARN"}
+ }
+
+ // set outpost id
+ outpostAccessPointARN.OutpostID = resID
+ return outpostAccessPointARN, nil
+}
+
+func parseS3ObjectLambdaAccessPointResource(a awsarn.ARN, resParts []string) (arn.S3ObjectLambdaAccessPointARN, error) {
+ if a.Service != s3ObjectsLambdaNamespace {
+ return arn.S3ObjectLambdaAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: fmt.Sprintf("service is not %s", s3ObjectsLambdaNamespace)}
+ }
+
+ if len(a.Region) == 0 {
+ return arn.S3ObjectLambdaAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: fmt.Sprintf("%s region not set", s3ObjectsLambdaNamespace)}
+ }
+
+ accessPointARN, err := arn.ParseAccessPointResource(a, resParts[1:])
+ if err != nil {
+ return arn.S3ObjectLambdaAccessPointARN{}, err
+ }
+
+ return arn.S3ObjectLambdaAccessPointARN{
+ AccessPointARN: accessPointARN,
+ }, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/doc.go
new file mode 100644
index 000000000..4629e494f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/doc.go
@@ -0,0 +1,87 @@
+/*
+Package customizations provides customizations for the Amazon S3 API client.
+
+This package provides support for following S3 customizations
+
+ ProcessARN Middleware: processes an ARN if provided as input and updates the endpoint as per the arn type
+
+ UpdateEndpoint Middleware: resolves a custom endpoint as per s3 config options
+
+ RemoveBucket Middleware: removes a serialized bucket name from request url path
+
+ processResponseWith200Error Middleware: Deserializing response error with 200 status code
+
+
+Virtual Host style url addressing
+
+Since serializers serialize by default as path style url, we use customization
+to modify the endpoint url when `UsePathStyle` option on S3Client is unset or
+false. This flag will be ignored if `UseAccelerate` option is set to true.
+
+If UseAccelerate is not enabled, and the bucket name is not a valid hostname
+label, they SDK will fallback to forcing the request to be made as if
+UsePathStyle was enabled. This behavior is also used if UseDualStackEndpoint is enabled.
+
+https://docs.aws.amazon.com/AmazonS3/latest/dev/dual-stack-endpoints.html#dual-stack-endpoints-description
+
+
+Transfer acceleration
+
+By default S3 Transfer acceleration support is disabled. By enabling `UseAccelerate`
+option on S3Client, one can enable s3 transfer acceleration support. Transfer
+acceleration only works with Virtual Host style addressing, and thus `UsePathStyle`
+option if set is ignored. Transfer acceleration is not supported for S3 operations
+DeleteBucket, ListBuckets, and CreateBucket.
+
+
+Dualstack support
+
+By default dualstack support for s3 client is disabled. By enabling `UseDualstack`
+option on s3 client, you can enable dualstack endpoint support.
+
+
+Endpoint customizations
+
+
+Customizations to lookup ARN, process ARN needs to happen before request serialization.
+UpdateEndpoint middleware which mutates resources based on Options such as
+UseDualstack, UseAccelerate for modifying resolved endpoint are executed after
+request serialization. Remove bucket middleware is executed after
+an request is serialized, and removes the serialized bucket name from request path
+
+ Middleware layering:
+
+
+ Initialize : HTTP Request -> ARN Lookup -> Input-Validation -> Serialize step
+
+ Serialize : HTTP Request -> Process ARN -> operation serializer -> Update-Endpoint customization -> Remove-Bucket -> next middleware
+
+
+Customization options:
+ UseARNRegion (Disabled by Default)
+
+ UsePathStyle (Disabled by Default)
+
+ UseAccelerate (Disabled by Default)
+
+ UseDualstack (Disabled by Default)
+
+
+Handle Error response with 200 status code
+
+S3 operations: CopyObject, CompleteMultipartUpload, UploadPartCopy can have an
+error Response with status code 2xx. The processResponseWith200Error middleware
+customizations enables SDK to check for an error within response body prior to
+deserialization.
+
+As the check for 2xx response containing an error needs to be performed earlier
+than response deserialization. Since the behavior of Deserialization is in
+reverse order to the other stack steps its easier to consider that "after" means
+"before".
+
+ Middleware layering:
+
+ HTTP Response -> handle 200 error customization -> deserialize
+
+*/
+package customizations
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/handle_200_error.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/handle_200_error.go
new file mode 100644
index 000000000..2b11b1fa2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/handle_200_error.go
@@ -0,0 +1,74 @@
+package customizations
+
+import (
+ "bytes"
+ "context"
+ "encoding/xml"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "strings"
+
+ "github.com/aws/smithy-go"
+ smithyxml "github.com/aws/smithy-go/encoding/xml"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// HandleResponseErrorWith200Status check for S3 200 error response.
+// If an s3 200 error is found, status code for the response is modified temporarily to
+// 5xx response status code.
+func HandleResponseErrorWith200Status(stack *middleware.Stack) error {
+ return stack.Deserialize.Insert(&processResponseFor200ErrorMiddleware{}, "OperationDeserializer", middleware.After)
+}
+
+// middleware to process raw response and look for error response with 200 status code
+type processResponseFor200ErrorMiddleware struct{}
+
+// ID returns the middleware ID.
+func (*processResponseFor200ErrorMiddleware) ID() string {
+ return "S3:ProcessResponseFor200Error"
+}
+
+func (m *processResponseFor200ErrorMiddleware) HandleDeserialize(
+ ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ // check if response status code is 2xx.
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return
+ }
+
+ var readBuff bytes.Buffer
+ body := io.TeeReader(response.Body, &readBuff)
+
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("received empty response payload"),
+ }
+ }
+
+ // rewind response body
+ response.Body = ioutil.NopCloser(io.MultiReader(&readBuff, response.Body))
+
+ // if start tag is "Error", the response is consider error response.
+ if strings.EqualFold(t.Name.Local, "Error") {
+ // according to https://aws.amazon.com/premiumsupport/knowledge-center/s3-resolve-200-internalerror/
+ // 200 error responses are similar to 5xx errors.
+ response.StatusCode = 500
+ }
+
+ return out, metadata, err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/host.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/host.go
new file mode 100644
index 000000000..87f7a2232
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/host.go
@@ -0,0 +1,22 @@
+package customizations
+
+import (
+ "github.com/aws/smithy-go/transport/http"
+ "strings"
+)
+
+func updateS3HostForS3AccessPoint(req *http.Request) {
+ updateHostPrefix(req, "s3", s3AccessPoint)
+}
+
+func updateS3HostForS3ObjectLambda(req *http.Request) {
+ updateHostPrefix(req, "s3", s3ObjectLambda)
+}
+
+func updateHostPrefix(req *http.Request, oldEndpointPrefix, newEndpointPrefix string) {
+ host := req.URL.Host
+ if strings.HasPrefix(host, oldEndpointPrefix) {
+ // For example if oldEndpointPrefix=s3 would replace to newEndpointPrefix
+ req.URL.Host = newEndpointPrefix + host[len(oldEndpointPrefix):]
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/presigned_expires.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/presigned_expires.go
new file mode 100644
index 000000000..f4bbb4b6d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/presigned_expires.go
@@ -0,0 +1,49 @@
+package customizations
+
+import (
+ "context"
+ "fmt"
+ "strconv"
+ "time"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// AddExpiresOnPresignedURL represents a build middleware used to assign
+// expiration on a presigned URL.
+type AddExpiresOnPresignedURL struct {
+
+ // Expires is time.Duration within which presigned url should be expired.
+ // This should be the duration in seconds the presigned URL should be considered valid for.
+ // By default the S3 presigned url expires in 15 minutes ie. 900 seconds.
+ Expires time.Duration
+}
+
+// ID representing the middleware
+func (*AddExpiresOnPresignedURL) ID() string {
+ return "S3:AddExpiresOnPresignedURL"
+}
+
+// HandleBuild handles the build step middleware behavior
+func (m *AddExpiresOnPresignedURL) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ // if expiration is unset skip this middleware
+ if m.Expires == 0 {
+ // default to 15 * time.Minutes
+ m.Expires = 15 * time.Minute
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", req)
+ }
+
+ // set S3 X-AMZ-Expires header
+ query := req.URL.Query()
+ query.Set("X-Amz-Expires", strconv.FormatInt(int64(m.Expires/time.Second), 10))
+ req.URL.RawQuery = query.Encode()
+
+ return next.HandleBuild(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/process_arn_resource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/process_arn_resource.go
new file mode 100644
index 000000000..7c68cbcdd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/process_arn_resource.go
@@ -0,0 +1,564 @@
+package customizations
+
+import (
+ "context"
+ "fmt"
+ "net/url"
+ "strings"
+
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/transport/http"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/internal/s3shared"
+ "github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn"
+ s3arn "github.com/aws/aws-sdk-go-v2/service/s3/internal/arn"
+ "github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints"
+ "github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a"
+)
+
+const (
+ s3AccessPoint = "s3-accesspoint"
+ s3ObjectLambda = "s3-object-lambda"
+)
+
+// processARNResource is used to process an ARN resource.
+type processARNResource struct {
+
+ // UseARNRegion indicates if region parsed from an ARN should be used.
+ UseARNRegion bool
+
+ // UseAccelerate indicates if s3 transfer acceleration is enabled
+ UseAccelerate bool
+
+ // EndpointResolver used to resolve endpoints. This may be a custom endpoint resolver
+ EndpointResolver EndpointResolver
+
+ // EndpointResolverOptions used by endpoint resolver
+ EndpointResolverOptions EndpointResolverOptions
+
+ // DisableMultiRegionAccessPoints indicates multi-region access point support is disabled
+ DisableMultiRegionAccessPoints bool
+}
+
+// ID returns the middleware ID.
+func (*processARNResource) ID() string { return "S3:ProcessARNResource" }
+
+func (m *processARNResource) HandleSerialize(
+ ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ // check if arn was provided, if not skip this middleware
+ arnValue, ok := s3shared.GetARNResourceFromContext(ctx)
+ if !ok {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*http.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown request type %T", req)
+ }
+
+ // parse arn into an endpoint arn wrt to service
+ resource, err := s3arn.ParseEndpointARN(arnValue)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ // build a resource request struct
+ resourceRequest := s3shared.ResourceRequest{
+ Resource: resource,
+ UseARNRegion: m.UseARNRegion,
+ UseFIPS: m.EndpointResolverOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled,
+ RequestRegion: awsmiddleware.GetRegion(ctx),
+ SigningRegion: awsmiddleware.GetSigningRegion(ctx),
+ PartitionID: awsmiddleware.GetPartitionID(ctx),
+ }
+
+ // switch to correct endpoint updater
+ switch tv := resource.(type) {
+ case arn.AccessPointARN:
+ // multi-region arns do not need to validate for cross partition request
+ if len(tv.Region) != 0 {
+ // validate resource request
+ if err := validateRegionForResourceRequest(resourceRequest); err != nil {
+ return out, metadata, err
+ }
+ }
+
+ // Special handling for region-less ap-arns.
+ if len(tv.Region) == 0 {
+ // check if multi-region arn support is disabled
+ if m.DisableMultiRegionAccessPoints {
+ return out, metadata, fmt.Errorf("Invalid configuration, Multi-Region access point ARNs are disabled")
+ }
+
+ // Do not allow dual-stack configuration with multi-region arns.
+ if m.EndpointResolverOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled {
+ return out, metadata, s3shared.NewClientConfiguredForDualStackError(tv,
+ resourceRequest.PartitionID, resourceRequest.RequestRegion, nil)
+ }
+ }
+
+ // check if accelerate
+ if m.UseAccelerate {
+ return out, metadata, s3shared.NewClientConfiguredForAccelerateError(tv,
+ resourceRequest.PartitionID, resourceRequest.RequestRegion, nil)
+ }
+
+ // fetch arn region to resolve request
+ resolveRegion := tv.Region
+ // check if request region is FIPS
+ if resourceRequest.UseFIPS && len(resolveRegion) == 0 {
+ // Do not allow Fips support within multi-region arns.
+ return out, metadata, s3shared.NewClientConfiguredForFIPSError(
+ tv, resourceRequest.PartitionID, resourceRequest.RequestRegion, nil)
+ }
+
+ var requestBuilder func(context.Context, accesspointOptions) (context.Context, error)
+ if len(resolveRegion) == 0 {
+ requestBuilder = buildMultiRegionAccessPointsRequest
+ } else {
+ requestBuilder = buildAccessPointRequest
+ }
+
+ // build request as per accesspoint builder
+ ctx, err = requestBuilder(ctx, accesspointOptions{
+ processARNResource: *m,
+ request: req,
+ resource: tv,
+ resolveRegion: resolveRegion,
+ partitionID: resourceRequest.PartitionID,
+ requestRegion: resourceRequest.RequestRegion,
+ })
+ if err != nil {
+ return out, metadata, err
+ }
+
+ case arn.S3ObjectLambdaAccessPointARN:
+ // validate region for resource request
+ if err := validateRegionForResourceRequest(resourceRequest); err != nil {
+ return out, metadata, err
+ }
+
+ // check if accelerate
+ if m.UseAccelerate {
+ return out, metadata, s3shared.NewClientConfiguredForAccelerateError(tv,
+ resourceRequest.PartitionID, resourceRequest.RequestRegion, nil)
+ }
+
+ // check if dualstack
+ if m.EndpointResolverOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled {
+ return out, metadata, s3shared.NewClientConfiguredForDualStackError(tv,
+ resourceRequest.PartitionID, resourceRequest.RequestRegion, nil)
+ }
+
+ // fetch arn region to resolve request
+ resolveRegion := tv.Region
+
+ // build access point request
+ ctx, err = buildS3ObjectLambdaAccessPointRequest(ctx, accesspointOptions{
+ processARNResource: *m,
+ request: req,
+ resource: tv.AccessPointARN,
+ resolveRegion: resolveRegion,
+ partitionID: resourceRequest.PartitionID,
+ requestRegion: resourceRequest.RequestRegion,
+ })
+ if err != nil {
+ return out, metadata, err
+ }
+
+ // process outpost accesspoint ARN
+ case arn.OutpostAccessPointARN:
+ // validate region for resource request
+ if err := validateRegionForResourceRequest(resourceRequest); err != nil {
+ return out, metadata, err
+ }
+
+ // check if accelerate
+ if m.UseAccelerate {
+ return out, metadata, s3shared.NewClientConfiguredForAccelerateError(tv,
+ resourceRequest.PartitionID, resourceRequest.RequestRegion, nil)
+ }
+
+ // check if dual stack
+ if m.EndpointResolverOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled {
+ return out, metadata, s3shared.NewClientConfiguredForDualStackError(tv,
+ resourceRequest.PartitionID, resourceRequest.RequestRegion, nil)
+ }
+
+ // check if request region is FIPS
+ if resourceRequest.UseFIPS {
+ return out, metadata, s3shared.NewFIPSConfigurationError(tv, resourceRequest.PartitionID,
+ resourceRequest.RequestRegion, nil)
+ }
+
+ // build outpost access point request
+ ctx, err = buildOutpostAccessPointRequest(ctx, outpostAccessPointOptions{
+ processARNResource: *m,
+ resource: tv,
+ request: req,
+ partitionID: resourceRequest.PartitionID,
+ requestRegion: resourceRequest.RequestRegion,
+ })
+ if err != nil {
+ return out, metadata, err
+ }
+
+ default:
+ return out, metadata, s3shared.NewInvalidARNError(resource, nil)
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
+
+// validate if s3 resource and request region config is compatible.
+func validateRegionForResourceRequest(resourceRequest s3shared.ResourceRequest) error {
+ // check if resourceRequest leads to a cross partition error
+ v, err := resourceRequest.IsCrossPartition()
+ if err != nil {
+ return err
+ }
+ if v {
+ // if cross partition
+ return s3shared.NewClientPartitionMismatchError(resourceRequest.Resource,
+ resourceRequest.PartitionID, resourceRequest.RequestRegion, nil)
+ }
+
+ // check if resourceRequest leads to a cross region error
+ if !resourceRequest.AllowCrossRegion() && resourceRequest.IsCrossRegion() {
+ // if cross region, but not use ARN region is not enabled
+ return s3shared.NewClientRegionMismatchError(resourceRequest.Resource,
+ resourceRequest.PartitionID, resourceRequest.RequestRegion, nil)
+ }
+
+ return nil
+}
+
+// === Accesspoint ==========
+
+type accesspointOptions struct {
+ processARNResource
+ request *http.Request
+ resource arn.AccessPointARN
+ resolveRegion string
+ partitionID string
+ requestRegion string
+}
+
+func buildAccessPointRequest(ctx context.Context, options accesspointOptions) (context.Context, error) {
+ tv := options.resource
+ req := options.request
+ resolveRegion := options.resolveRegion
+
+ resolveService := tv.Service
+
+ ero := options.EndpointResolverOptions
+ ero.Logger = middleware.GetLogger(ctx)
+ ero.ResolvedRegion = "" // clear endpoint option's resolved region so that we resolve using the passed in region
+
+ // resolve endpoint
+ endpoint, err := options.EndpointResolver.ResolveEndpoint(resolveRegion, ero)
+ if err != nil {
+ return ctx, s3shared.NewFailedToResolveEndpointError(
+ tv,
+ options.partitionID,
+ options.requestRegion,
+ err,
+ )
+ }
+
+ // assign resolved endpoint url to request url
+ req.URL, err = url.Parse(endpoint.URL)
+ if err != nil {
+ return ctx, fmt.Errorf("failed to parse endpoint URL: %w", err)
+ }
+
+ if len(endpoint.SigningName) != 0 && endpoint.Source == aws.EndpointSourceCustom {
+ ctx = awsmiddleware.SetSigningName(ctx, endpoint.SigningName)
+ } else {
+ // Must sign with s3-object-lambda
+ ctx = awsmiddleware.SetSigningName(ctx, resolveService)
+ }
+
+ if len(endpoint.SigningRegion) != 0 {
+ ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
+ } else {
+ ctx = awsmiddleware.SetSigningRegion(ctx, resolveRegion)
+ }
+
+ // update serviceID to "s3-accesspoint"
+ ctx = awsmiddleware.SetServiceID(ctx, s3AccessPoint)
+
+ // disable host prefix behavior
+ ctx = http.DisableEndpointHostPrefix(ctx, true)
+
+ // remove the serialized arn in place of /{Bucket}
+ ctx = setBucketToRemoveOnContext(ctx, tv.String())
+
+ // skip arn processing, if arn region resolves to a immutable endpoint
+ if endpoint.HostnameImmutable {
+ return ctx, nil
+ }
+
+ updateS3HostForS3AccessPoint(req)
+
+ ctx, err = buildAccessPointHostPrefix(ctx, req, tv)
+ if err != nil {
+ return ctx, err
+ }
+
+ return ctx, nil
+}
+
+func buildS3ObjectLambdaAccessPointRequest(ctx context.Context, options accesspointOptions) (context.Context, error) {
+ tv := options.resource
+ req := options.request
+ resolveRegion := options.resolveRegion
+
+ resolveService := tv.Service
+
+ ero := options.EndpointResolverOptions
+ ero.Logger = middleware.GetLogger(ctx)
+ ero.ResolvedRegion = "" // clear endpoint options resolved region so we resolve the passed in region
+
+ // resolve endpoint
+ endpoint, err := options.EndpointResolver.ResolveEndpoint(resolveRegion, ero)
+ if err != nil {
+ return ctx, s3shared.NewFailedToResolveEndpointError(
+ tv,
+ options.partitionID,
+ options.requestRegion,
+ err,
+ )
+ }
+
+ // assign resolved endpoint url to request url
+ req.URL, err = url.Parse(endpoint.URL)
+ if err != nil {
+ return ctx, fmt.Errorf("failed to parse endpoint URL: %w", err)
+ }
+
+ if len(endpoint.SigningName) != 0 && endpoint.Source == aws.EndpointSourceCustom {
+ ctx = awsmiddleware.SetSigningName(ctx, endpoint.SigningName)
+ } else {
+ // Must sign with s3-object-lambda
+ ctx = awsmiddleware.SetSigningName(ctx, resolveService)
+ }
+
+ if len(endpoint.SigningRegion) != 0 {
+ ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
+ } else {
+ ctx = awsmiddleware.SetSigningRegion(ctx, resolveRegion)
+ }
+
+ // update serviceID to "s3-object-lambda"
+ ctx = awsmiddleware.SetServiceID(ctx, s3ObjectLambda)
+
+ // disable host prefix behavior
+ ctx = http.DisableEndpointHostPrefix(ctx, true)
+
+ // remove the serialized arn in place of /{Bucket}
+ ctx = setBucketToRemoveOnContext(ctx, tv.String())
+
+ // skip arn processing, if arn region resolves to a immutable endpoint
+ if endpoint.HostnameImmutable {
+ return ctx, nil
+ }
+
+ if endpoint.Source == aws.EndpointSourceServiceMetadata {
+ updateS3HostForS3ObjectLambda(req)
+ }
+
+ ctx, err = buildAccessPointHostPrefix(ctx, req, tv)
+ if err != nil {
+ return ctx, err
+ }
+
+ return ctx, nil
+}
+
+func buildMultiRegionAccessPointsRequest(ctx context.Context, options accesspointOptions) (context.Context, error) {
+ const s3GlobalLabel = "s3-global."
+ const accesspointLabel = "accesspoint."
+
+ tv := options.resource
+ req := options.request
+ resolveService := tv.Service
+ resolveRegion := options.requestRegion
+ arnPartition := tv.Partition
+
+ // resolve endpoint
+ ero := options.EndpointResolverOptions
+ ero.Logger = middleware.GetLogger(ctx)
+
+ endpoint, err := options.EndpointResolver.ResolveEndpoint(resolveRegion, ero)
+ if err != nil {
+ return ctx, s3shared.NewFailedToResolveEndpointError(
+ tv,
+ options.partitionID,
+ options.requestRegion,
+ err,
+ )
+ }
+
+ // set signing region and version for MRAP
+ endpoint.SigningRegion = "*"
+ ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
+ ctx = SetSignerVersion(ctx, v4a.Version)
+
+ if len(endpoint.SigningName) != 0 {
+ ctx = awsmiddleware.SetSigningName(ctx, endpoint.SigningName)
+ } else {
+ ctx = awsmiddleware.SetSigningName(ctx, resolveService)
+ }
+
+ // skip arn processing, if arn region resolves to a immutable endpoint
+ if endpoint.HostnameImmutable {
+ return ctx, nil
+ }
+
+ // modify endpoint host to use s3-global host prefix
+ scheme := strings.SplitN(endpoint.URL, "://", 2)
+ dnsSuffix, err := endpoints.GetDNSSuffix(arnPartition, ero)
+ if err != nil {
+ return ctx, fmt.Errorf("Error determining dns suffix from arn partition, %w", err)
+ }
+ // set url as per partition
+ endpoint.URL = scheme[0] + "://" + s3GlobalLabel + dnsSuffix
+
+ // assign resolved endpoint url to request url
+ req.URL, err = url.Parse(endpoint.URL)
+ if err != nil {
+ return ctx, fmt.Errorf("failed to parse endpoint URL: %w", err)
+ }
+
+ // build access point host prefix
+ accessPointHostPrefix := tv.AccessPointName + "." + accesspointLabel
+
+ // add host prefix to url
+ req.URL.Host = accessPointHostPrefix + req.URL.Host
+ if len(req.Host) > 0 {
+ req.Host = accessPointHostPrefix + req.Host
+ }
+
+ // validate the endpoint host
+ if err := http.ValidateEndpointHost(req.URL.Host); err != nil {
+ return ctx, fmt.Errorf("endpoint validation error: %w, when using arn %v", err, tv)
+ }
+
+ // disable host prefix behavior
+ ctx = http.DisableEndpointHostPrefix(ctx, true)
+
+ // remove the serialized arn in place of /{Bucket}
+ ctx = setBucketToRemoveOnContext(ctx, tv.String())
+
+ return ctx, nil
+}
+
+func buildAccessPointHostPrefix(ctx context.Context, req *http.Request, tv arn.AccessPointARN) (context.Context, error) {
+ // add host prefix for access point
+ accessPointHostPrefix := tv.AccessPointName + "-" + tv.AccountID + "."
+ req.URL.Host = accessPointHostPrefix + req.URL.Host
+ if len(req.Host) > 0 {
+ req.Host = accessPointHostPrefix + req.Host
+ }
+
+ // validate the endpoint host
+ if err := http.ValidateEndpointHost(req.URL.Host); err != nil {
+ return ctx, s3shared.NewInvalidARNError(tv, err)
+ }
+
+ return ctx, nil
+}
+
+// ====== Outpost Accesspoint ========
+
+type outpostAccessPointOptions struct {
+ processARNResource
+ request *http.Request
+ resource arn.OutpostAccessPointARN
+ partitionID string
+ requestRegion string
+}
+
+func buildOutpostAccessPointRequest(ctx context.Context, options outpostAccessPointOptions) (context.Context, error) {
+ tv := options.resource
+ req := options.request
+
+ resolveRegion := tv.Region
+ resolveService := tv.Service
+ endpointsID := resolveService
+ if strings.EqualFold(resolveService, "s3-outposts") {
+ // assign endpoints ID as "S3"
+ endpointsID = "s3"
+ }
+
+ ero := options.EndpointResolverOptions
+ ero.Logger = middleware.GetLogger(ctx)
+ ero.ResolvedRegion = ""
+
+ // resolve regional endpoint for resolved region.
+ endpoint, err := options.EndpointResolver.ResolveEndpoint(resolveRegion, ero)
+ if err != nil {
+ return ctx, s3shared.NewFailedToResolveEndpointError(
+ tv,
+ options.partitionID,
+ options.requestRegion,
+ err,
+ )
+ }
+
+ // assign resolved endpoint url to request url
+ req.URL, err = url.Parse(endpoint.URL)
+ if err != nil {
+ return ctx, fmt.Errorf("failed to parse endpoint URL: %w", err)
+ }
+
+ // assign resolved service from arn as signing name
+ if len(endpoint.SigningName) != 0 && endpoint.Source == aws.EndpointSourceCustom {
+ ctx = awsmiddleware.SetSigningName(ctx, endpoint.SigningName)
+ } else {
+ ctx = awsmiddleware.SetSigningName(ctx, resolveService)
+ }
+
+ if len(endpoint.SigningRegion) != 0 {
+ // redirect signer to use resolved endpoint signing name and region
+ ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
+ } else {
+ ctx = awsmiddleware.SetSigningRegion(ctx, resolveRegion)
+ }
+
+ // update serviceID to resolved service id
+ ctx = awsmiddleware.SetServiceID(ctx, resolveService)
+
+ // disable host prefix behavior
+ ctx = http.DisableEndpointHostPrefix(ctx, true)
+
+ // remove the serialized arn in place of /{Bucket}
+ ctx = setBucketToRemoveOnContext(ctx, tv.String())
+
+ // skip further customizations, if arn region resolves to a immutable endpoint
+ if endpoint.HostnameImmutable {
+ return ctx, nil
+ }
+
+ updateHostPrefix(req, endpointsID, resolveService)
+
+ // add host prefix for s3-outposts
+ outpostAPHostPrefix := tv.AccessPointName + "-" + tv.AccountID + "." + tv.OutpostID + "."
+ req.URL.Host = outpostAPHostPrefix + req.URL.Host
+ if len(req.Host) > 0 {
+ req.Host = outpostAPHostPrefix + req.Host
+ }
+
+ // validate the endpoint host
+ if err := http.ValidateEndpointHost(req.URL.Host); err != nil {
+ return ctx, s3shared.NewInvalidARNError(tv, err)
+ }
+
+ return ctx, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/remove_bucket_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/remove_bucket_middleware.go
new file mode 100644
index 000000000..2e030f29c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/remove_bucket_middleware.go
@@ -0,0 +1,58 @@
+package customizations
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/transport/http"
+)
+
+// removeBucketFromPathMiddleware needs to be executed after serialize step is performed
+type removeBucketFromPathMiddleware struct {
+}
+
+func (m *removeBucketFromPathMiddleware) ID() string {
+ return "S3:RemoveBucketFromPathMiddleware"
+}
+
+func (m *removeBucketFromPathMiddleware) HandleSerialize(
+ ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ // check if a bucket removal from HTTP path is required
+ bucket, ok := getRemoveBucketFromPath(ctx)
+ if !ok {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*http.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown request type %T", req)
+ }
+
+ removeBucketFromPath(req.URL, bucket)
+ return next.HandleSerialize(ctx, in)
+}
+
+type removeBucketKey struct {
+ bucket string
+}
+
+// setBucketToRemoveOnContext sets the bucket name to be removed.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func setBucketToRemoveOnContext(ctx context.Context, bucket string) context.Context {
+ return middleware.WithStackValue(ctx, removeBucketKey{}, bucket)
+}
+
+// getRemoveBucketFromPath returns the bucket name to remove from the path.
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func getRemoveBucketFromPath(ctx context.Context) (string, bool) {
+ v, ok := middleware.GetStackValue(ctx, removeBucketKey{}).(string)
+ return v, ok
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/s3_object_lambda.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/s3_object_lambda.go
new file mode 100644
index 000000000..325b2d369
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/s3_object_lambda.go
@@ -0,0 +1,84 @@
+package customizations
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/transport/http"
+ "net/url"
+)
+
+type s3ObjectLambdaEndpoint struct {
+ // whether the operation should use the s3-object-lambda endpoint
+ UseEndpoint bool
+
+ // use transfer acceleration
+ UseAccelerate bool
+
+ EndpointResolver EndpointResolver
+ EndpointResolverOptions EndpointResolverOptions
+}
+
+func (t *s3ObjectLambdaEndpoint) ID() string {
+ return "S3:ObjectLambdaEndpoint"
+}
+
+func (t *s3ObjectLambdaEndpoint) HandleSerialize(
+ ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if !t.UseEndpoint {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*http.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type: %T", in.Request)
+ }
+
+ if t.EndpointResolverOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled {
+ return out, metadata, fmt.Errorf("client configured for dualstack but not supported for operation")
+ }
+
+ if t.UseAccelerate {
+ return out, metadata, fmt.Errorf("client configured for accelerate but not supported for operation")
+ }
+
+ region := awsmiddleware.GetRegion(ctx)
+
+ ero := t.EndpointResolverOptions
+
+ endpoint, err := t.EndpointResolver.ResolveEndpoint(region, ero)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ // Set the ServiceID and SigningName
+ ctx = awsmiddleware.SetServiceID(ctx, s3ObjectLambda)
+
+ if len(endpoint.SigningName) > 0 && endpoint.Source == aws.EndpointSourceCustom {
+ ctx = awsmiddleware.SetSigningName(ctx, endpoint.SigningName)
+ } else {
+ ctx = awsmiddleware.SetSigningName(ctx, s3ObjectLambda)
+ }
+
+ req.URL, err = url.Parse(endpoint.URL)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ if len(endpoint.SigningRegion) > 0 {
+ ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
+ } else {
+ ctx = awsmiddleware.SetSigningRegion(ctx, region)
+ }
+
+ if endpoint.Source == aws.EndpointSourceServiceMetadata || !endpoint.HostnameImmutable {
+ updateS3HostForS3ObjectLambda(req)
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/signer_wrapper.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/signer_wrapper.go
new file mode 100644
index 000000000..40d668264
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/signer_wrapper.go
@@ -0,0 +1,213 @@
+package customizations
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ "github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a"
+ "github.com/aws/smithy-go/middleware"
+)
+
+type signerVersionKey struct{}
+
+// GetSignerVersion retrieves the signer version to use for signing
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func GetSignerVersion(ctx context.Context) (v string) {
+ v, _ = middleware.GetStackValue(ctx, signerVersionKey{}).(string)
+ return v
+}
+
+// SetSignerVersion sets the signer version to be used for signing the request
+//
+// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
+// to clear all stack values.
+func SetSignerVersion(ctx context.Context, version string) context.Context {
+ return middleware.WithStackValue(ctx, signerVersionKey{}, version)
+}
+
+// SignHTTPRequestMiddlewareOptions is the configuration options for the SignHTTPRequestMiddleware middleware.
+type SignHTTPRequestMiddlewareOptions struct {
+
+ // credential provider
+ CredentialsProvider aws.CredentialsProvider
+
+ // log signing
+ LogSigning bool
+
+ // v4 signer
+ V4Signer v4.HTTPSigner
+
+ //v4a signer
+ V4aSigner v4a.HTTPSigner
+}
+
+// NewSignHTTPRequestMiddleware constructs a SignHTTPRequestMiddleware using the given Signer for signing requests
+func NewSignHTTPRequestMiddleware(options SignHTTPRequestMiddlewareOptions) *SignHTTPRequestMiddleware {
+ return &SignHTTPRequestMiddleware{
+ credentialsProvider: options.CredentialsProvider,
+ v4Signer: options.V4Signer,
+ v4aSigner: options.V4aSigner,
+ logSigning: options.LogSigning,
+ }
+}
+
+// SignHTTPRequestMiddleware is a `FinalizeMiddleware` implementation to select HTTP Signing method
+type SignHTTPRequestMiddleware struct {
+
+ // credential provider
+ credentialsProvider aws.CredentialsProvider
+
+ // log signing
+ logSigning bool
+
+ // v4 signer
+ v4Signer v4.HTTPSigner
+
+ //v4a signer
+ v4aSigner v4a.HTTPSigner
+}
+
+// ID is the SignHTTPRequestMiddleware identifier
+func (s *SignHTTPRequestMiddleware) ID() string {
+ return "Signing"
+}
+
+// HandleFinalize will take the provided input and sign the request using the SigV4 authentication scheme
+func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ // fetch signer type from context
+ signerVersion := GetSignerVersion(ctx)
+
+ switch signerVersion {
+ case v4a.Version:
+ v4aCredentialProvider, ok := s.credentialsProvider.(v4a.CredentialsProvider)
+ if !ok {
+ return out, metadata, fmt.Errorf("invalid credential-provider provided for sigV4a Signer")
+ }
+
+ mw := v4a.NewSignHTTPRequestMiddleware(v4a.SignHTTPRequestMiddlewareOptions{
+ Credentials: v4aCredentialProvider,
+ Signer: s.v4aSigner,
+ LogSigning: s.logSigning,
+ })
+ return mw.HandleFinalize(ctx, in, next)
+
+ default:
+ mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: s.credentialsProvider,
+ Signer: s.v4Signer,
+ LogSigning: s.logSigning,
+ })
+ return mw.HandleFinalize(ctx, in, next)
+ }
+}
+
+// RegisterSigningMiddleware registers the wrapper signing middleware to the stack. If a signing middleware is already
+// present, this provided middleware will be swapped. Otherwise the middleware will be added at the tail of the
+// finalize step.
+func RegisterSigningMiddleware(stack *middleware.Stack, signingMiddleware *SignHTTPRequestMiddleware) (err error) {
+ const signedID = "Signing"
+ _, present := stack.Finalize.Get(signedID)
+ if present {
+ _, err = stack.Finalize.Swap(signedID, signingMiddleware)
+ } else {
+ err = stack.Finalize.Add(signingMiddleware, middleware.After)
+ }
+ return err
+}
+
+// PresignHTTPRequestMiddlewareOptions is the options for the PresignHTTPRequestMiddleware middleware.
+type PresignHTTPRequestMiddlewareOptions struct {
+ CredentialsProvider aws.CredentialsProvider
+ V4Presigner v4.HTTPPresigner
+ V4aPresigner v4a.HTTPPresigner
+ LogSigning bool
+}
+
+// PresignHTTPRequestMiddleware provides the Finalize middleware for creating a
+// presigned URL for an HTTP request.
+//
+// Will short circuit the middleware stack and not forward onto the next
+// Finalize handler.
+type PresignHTTPRequestMiddleware struct {
+
+ // cred provider and signer for sigv4
+ credentialsProvider aws.CredentialsProvider
+
+ // sigV4 signer
+ v4Signer v4.HTTPPresigner
+
+ // sigV4a signer
+ v4aSigner v4a.HTTPPresigner
+
+ // log signing
+ logSigning bool
+}
+
+// NewPresignHTTPRequestMiddleware constructs a PresignHTTPRequestMiddleware using the given Signer for signing requests
+func NewPresignHTTPRequestMiddleware(options PresignHTTPRequestMiddlewareOptions) *PresignHTTPRequestMiddleware {
+ return &PresignHTTPRequestMiddleware{
+ credentialsProvider: options.CredentialsProvider,
+ v4Signer: options.V4Presigner,
+ v4aSigner: options.V4aPresigner,
+ logSigning: options.LogSigning,
+ }
+}
+
+// ID provides the middleware ID.
+func (*PresignHTTPRequestMiddleware) ID() string { return "PresignHTTPRequest" }
+
+// HandleFinalize will take the provided input and create a presigned url for
+// the http request using the SigV4 or SigV4a presign authentication scheme.
+//
+// Since the signed request is not a valid HTTP request
+func (p *PresignHTTPRequestMiddleware) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
+) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ // fetch signer type from context
+ signerVersion := GetSignerVersion(ctx)
+
+ switch signerVersion {
+ case v4a.Version:
+ v4aCredentialProvider, ok := p.credentialsProvider.(v4a.CredentialsProvider)
+ if !ok {
+ return out, metadata, fmt.Errorf("invalid credential-provider provided for sigV4a Signer")
+ }
+
+ mw := v4a.NewPresignHTTPRequestMiddleware(v4a.PresignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: v4aCredentialProvider,
+ Presigner: p.v4aSigner,
+ LogSigning: p.logSigning,
+ })
+ return mw.HandleFinalize(ctx, in, next)
+
+ default:
+ mw := v4.NewPresignHTTPRequestMiddleware(v4.PresignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: p.credentialsProvider,
+ Presigner: p.v4Signer,
+ LogSigning: p.logSigning,
+ })
+ return mw.HandleFinalize(ctx, in, next)
+ }
+}
+
+// RegisterPreSigningMiddleware registers the wrapper pre-signing middleware to the stack. If a pre-signing middleware is already
+// present, this provided middleware will be swapped. Otherwise the middleware will be added at the tail of the
+// finalize step.
+func RegisterPreSigningMiddleware(stack *middleware.Stack, signingMiddleware *PresignHTTPRequestMiddleware) (err error) {
+ const signedID = "PresignHTTPRequest"
+ _, present := stack.Finalize.Get(signedID)
+ if present {
+ _, err = stack.Finalize.Swap(signedID, signingMiddleware)
+ } else {
+ err = stack.Finalize.Add(signingMiddleware, middleware.After)
+ }
+ return err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/update_endpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/update_endpoint.go
new file mode 100644
index 000000000..209e554ef
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations/update_endpoint.go
@@ -0,0 +1,304 @@
+package customizations
+
+import (
+ "context"
+ "fmt"
+ "log"
+ "net/url"
+ "strings"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/internal/s3shared"
+ internalendpoints "github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints"
+ "github.com/aws/smithy-go/encoding/httpbinding"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// EndpointResolver interface for resolving service endpoints.
+type EndpointResolver interface {
+ ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+}
+
+// EndpointResolverOptions is the service endpoint resolver options
+type EndpointResolverOptions = internalendpoints.Options
+
+// UpdateEndpointParameterAccessor represents accessor functions used by the middleware
+type UpdateEndpointParameterAccessor struct {
+ // functional pointer to fetch bucket name from provided input.
+ // The function is intended to take an input value, and
+ // return a string pointer to value of string, and bool if
+ // input has no bucket member.
+ GetBucketFromInput func(interface{}) (*string, bool)
+}
+
+// UpdateEndpointOptions provides the options for the UpdateEndpoint middleware setup.
+type UpdateEndpointOptions struct {
+
+ // Accessor are parameter accessors used by the middleware
+ Accessor UpdateEndpointParameterAccessor
+
+ // use path style
+ UsePathStyle bool
+
+ // use transfer acceleration
+ UseAccelerate bool
+
+ // indicates if an operation supports s3 transfer acceleration.
+ SupportsAccelerate bool
+
+ // use ARN region
+ UseARNRegion bool
+
+ // Indicates that the operation should target the s3-object-lambda endpoint.
+ // Used to direct operations that do not route based on an input ARN.
+ TargetS3ObjectLambda bool
+
+ // EndpointResolver used to resolve endpoints. This may be a custom endpoint resolver
+ EndpointResolver EndpointResolver
+
+ // EndpointResolverOptions used by endpoint resolver
+ EndpointResolverOptions EndpointResolverOptions
+
+ // DisableMultiRegionAccessPoints indicates multi-region access point support is disabled
+ DisableMultiRegionAccessPoints bool
+}
+
+// UpdateEndpoint adds the middleware to the middleware stack based on the UpdateEndpointOptions.
+func UpdateEndpoint(stack *middleware.Stack, options UpdateEndpointOptions) (err error) {
+ const serializerID = "OperationSerializer"
+
+ // initial arn look up middleware
+ err = stack.Initialize.Add(&s3shared.ARNLookup{
+ GetARNValue: options.Accessor.GetBucketFromInput,
+ }, middleware.Before)
+ if err != nil {
+ return err
+ }
+
+ // process arn
+ err = stack.Serialize.Insert(&processARNResource{
+ UseARNRegion: options.UseARNRegion,
+ UseAccelerate: options.UseAccelerate,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointResolverOptions,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ }, serializerID, middleware.Before)
+ if err != nil {
+ return err
+ }
+
+ // process whether the operation requires the s3-object-lambda endpoint
+ // Occurs before operation serializer so that hostPrefix mutations
+ // can be handled correctly.
+ err = stack.Serialize.Insert(&s3ObjectLambdaEndpoint{
+ UseEndpoint: options.TargetS3ObjectLambda,
+ UseAccelerate: options.UseAccelerate,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointResolverOptions,
+ }, serializerID, middleware.Before)
+ if err != nil {
+ return err
+ }
+
+ // remove bucket arn middleware
+ err = stack.Serialize.Insert(&removeBucketFromPathMiddleware{}, serializerID, middleware.After)
+ if err != nil {
+ return err
+ }
+
+ // update endpoint to use options for path style and accelerate
+ err = stack.Serialize.Insert(&updateEndpoint{
+ usePathStyle: options.UsePathStyle,
+ getBucketFromInput: options.Accessor.GetBucketFromInput,
+ useAccelerate: options.UseAccelerate,
+ supportsAccelerate: options.SupportsAccelerate,
+ }, serializerID, middleware.After)
+ if err != nil {
+ return err
+ }
+
+ return err
+}
+
+type updateEndpoint struct {
+ // path style options
+ usePathStyle bool
+ getBucketFromInput func(interface{}) (*string, bool)
+
+ // accelerate options
+ useAccelerate bool
+ supportsAccelerate bool
+}
+
+// ID returns the middleware ID.
+func (*updateEndpoint) ID() string {
+ return "S3:UpdateEndpoint"
+}
+
+func (u *updateEndpoint) HandleSerialize(
+ ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ // if arn was processed, skip this middleware
+ if _, ok := s3shared.GetARNResourceFromContext(ctx); ok {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ // skip this customization if host name is set as immutable
+ if smithyhttp.GetHostnameImmutable(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown request type %T", req)
+ }
+
+ // check if accelerate is supported
+ if u.useAccelerate && !u.supportsAccelerate {
+ // accelerate is not supported, thus will be ignored
+ log.Println("Transfer acceleration is not supported for the operation, ignoring UseAccelerate.")
+ u.useAccelerate = false
+ }
+
+ // transfer acceleration is not supported with path style urls
+ if u.useAccelerate && u.usePathStyle {
+ log.Println("UseAccelerate is not compatible with UsePathStyle, ignoring UsePathStyle.")
+ u.usePathStyle = false
+ }
+
+ if u.getBucketFromInput != nil {
+ // Below customization only apply if bucket name is provided
+ bucket, ok := u.getBucketFromInput(in.Parameters)
+ if ok && bucket != nil {
+ region := awsmiddleware.GetRegion(ctx)
+ if err := u.updateEndpointFromConfig(req, *bucket, region); err != nil {
+ return out, metadata, err
+ }
+ }
+ }
+
+ return next.HandleSerialize(ctx, in)
+}
+
+func (u updateEndpoint) updateEndpointFromConfig(req *smithyhttp.Request, bucket string, region string) error {
+ // do nothing if path style is enforced
+ if u.usePathStyle {
+ return nil
+ }
+
+ if !hostCompatibleBucketName(req.URL, bucket) {
+ // bucket name must be valid to put into the host for accelerate operations.
+ // For non-accelerate operations the bucket name can stay in the path if
+ // not valid hostname.
+ var err error
+ if u.useAccelerate {
+ err = fmt.Errorf("bucket name %s is not compatible with S3", bucket)
+ }
+
+ // No-Op if not using accelerate.
+ return err
+ }
+
+ // accelerate is only supported if use path style is disabled
+ if u.useAccelerate {
+ parts := strings.Split(req.URL.Host, ".")
+ if len(parts) < 3 {
+ return fmt.Errorf("unable to update endpoint host for S3 accelerate, hostname invalid, %s", req.URL.Host)
+ }
+
+ if parts[0] == "s3" || strings.HasPrefix(parts[0], "s3-") {
+ parts[0] = "s3-accelerate"
+ }
+
+ for i := 1; i+1 < len(parts); i++ {
+ if strings.EqualFold(parts[i], region) {
+ parts = append(parts[:i], parts[i+1:]...)
+ break
+ }
+ }
+
+ // construct the url host
+ req.URL.Host = strings.Join(parts, ".")
+ }
+
+ // move bucket to follow virtual host style
+ moveBucketNameToHost(req.URL, bucket)
+ return nil
+}
+
+// updates endpoint to use virtual host styling
+func moveBucketNameToHost(u *url.URL, bucket string) {
+ u.Host = bucket + "." + u.Host
+ removeBucketFromPath(u, bucket)
+}
+
+// remove bucket from url
+func removeBucketFromPath(u *url.URL, bucket string) {
+ if strings.HasPrefix(u.Path, "/"+bucket) {
+ // modify url path
+ u.Path = strings.Replace(u.Path, "/"+bucket, "", 1)
+
+ // modify url raw path
+ u.RawPath = strings.Replace(u.RawPath, "/"+httpbinding.EscapePath(bucket, true), "", 1)
+ }
+
+ if u.Path == "" {
+ u.Path = "/"
+ }
+
+ if u.RawPath == "" {
+ u.RawPath = "/"
+ }
+}
+
+// hostCompatibleBucketName returns true if the request should
+// put the bucket in the host. This is false if S3ForcePathStyle is
+// explicitly set or if the bucket is not DNS compatible.
+func hostCompatibleBucketName(u *url.URL, bucket string) bool {
+ // Bucket might be DNS compatible but dots in the hostname will fail
+ // certificate validation, so do not use host-style.
+ if u.Scheme == "https" && strings.Contains(bucket, ".") {
+ return false
+ }
+
+ // if the bucket is DNS compatible
+ return dnsCompatibleBucketName(bucket)
+}
+
+// dnsCompatibleBucketName returns true if the bucket name is DNS compatible.
+// Buckets created outside of the classic region MUST be DNS compatible.
+func dnsCompatibleBucketName(bucket string) bool {
+ if strings.Contains(bucket, "..") {
+ return false
+ }
+
+ // checks for `^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$` domain mapping
+ if !((bucket[0] > 96 && bucket[0] < 123) || (bucket[0] > 47 && bucket[0] < 58)) {
+ return false
+ }
+
+ for _, c := range bucket[1:] {
+ if !((c > 96 && c < 123) || (c > 47 && c < 58) || c == 46 || c == 45) {
+ return false
+ }
+ }
+
+ // checks for `^(\d+\.){3}\d+$` IPaddressing
+ v := strings.SplitN(bucket, ".", -1)
+ if len(v) == 4 {
+ for _, c := range bucket {
+ if !((c > 47 && c < 58) || c == 46) {
+ // we confirm that this is not a IP address
+ return true
+ }
+ }
+ // this is a IP address
+ return false
+ }
+
+ return true
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go
new file mode 100644
index 000000000..baba87377
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go
@@ -0,0 +1,793 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package endpoints
+
+import (
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
+ "github.com/aws/smithy-go/logging"
+ "regexp"
+ "strings"
+)
+
+// Options is the endpoint resolver configuration options
+type Options struct {
+ // Logger is a logging implementation that log events should be sent to.
+ Logger logging.Logger
+
+ // LogDeprecated indicates that deprecated endpoints should be logged to the
+ // provided logger.
+ LogDeprecated bool
+
+ // ResolvedRegion is used to override the region to be resolved, rather then the
+ // using the value passed to the ResolveEndpoint method. This value is used by the
+ // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative
+ // name. You must not set this value directly in your application.
+ ResolvedRegion string
+
+ // DisableHTTPS informs the resolver to return an endpoint that does not use the
+ // HTTPS scheme.
+ DisableHTTPS bool
+
+ // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint.
+ UseDualStackEndpoint aws.DualStackEndpointState
+
+ // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
+ UseFIPSEndpoint aws.FIPSEndpointState
+}
+
+func (o Options) GetResolvedRegion() string {
+ return o.ResolvedRegion
+}
+
+func (o Options) GetDisableHTTPS() bool {
+ return o.DisableHTTPS
+}
+
+func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState {
+ return o.UseDualStackEndpoint
+}
+
+func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState {
+ return o.UseFIPSEndpoint
+}
+
+func transformToSharedOptions(options Options) endpoints.Options {
+ return endpoints.Options{
+ Logger: options.Logger,
+ LogDeprecated: options.LogDeprecated,
+ ResolvedRegion: options.ResolvedRegion,
+ DisableHTTPS: options.DisableHTTPS,
+ UseDualStackEndpoint: options.UseDualStackEndpoint,
+ UseFIPSEndpoint: options.UseFIPSEndpoint,
+ }
+}
+
+// Resolver S3 endpoint resolver
+type Resolver struct {
+ partitions endpoints.Partitions
+}
+
+// ResolveEndpoint resolves the service endpoint for the given region and options
+func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) {
+ if len(region) == 0 {
+ return endpoint, &aws.MissingRegionError{}
+ }
+
+ opt := transformToSharedOptions(options)
+ return r.partitions.ResolveEndpoint(region, opt)
+}
+
+// New returns a new Resolver
+func New() *Resolver {
+ return &Resolver{
+ partitions: defaultPartitions,
+ }
+}
+
+var partitionRegexp = struct {
+ Aws *regexp.Regexp
+ AwsCn *regexp.Regexp
+ AwsIso *regexp.Regexp
+ AwsIsoB *regexp.Regexp
+ AwsUsGov *regexp.Regexp
+}{
+
+ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"),
+ AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
+ AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
+ AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
+ AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
+}
+
+var defaultPartitions = endpoints.Partitions{
+ {
+ ID: "aws",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.{region}.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.{region}.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3-fips.dualstack.{region}.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "s3.{region}.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.Aws,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "af-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "af-south-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.af-south-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-east-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.ap-east-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3.ap-northeast-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.ap-northeast-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-northeast-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.ap-northeast-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-3",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-northeast-3",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.ap-northeast-3.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-south-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.ap-south-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3.ap-southeast-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.ap-southeast-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-2",
+ }: endpoints.Endpoint{
+ Hostname: "s3.ap-southeast-2.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.ap-southeast-2.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "aws-global",
+ }: endpoints.Endpoint{
+ Hostname: "s3.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ca-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ca-central-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.ca-central-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ca-central-1",
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3-fips.dualstack.ca-central-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ca-central-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.ca-central-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-central-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.eu-central-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-north-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-north-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.eu-north-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-south-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.eu-south-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3.eu-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.eu-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-west-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.eu-west-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-3",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-west-3",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.eu-west-3.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "fips-ca-central-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3-fips.ca-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "fips-us-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3-fips.us-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "fips-us-east-2",
+ }: endpoints.Endpoint{
+ Hostname: "s3-fips.us-east-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "fips-us-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3-fips.us-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "fips-us-west-2",
+ }: endpoints.Endpoint{
+ Hostname: "s3-fips.us-west-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "me-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "me-south-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.me-south-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "s3-external-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3-external-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "sa-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3.sa-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "sa-east-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.sa-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3.us-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-1",
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3-fips.dualstack.us-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.us-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.us-east-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-east-2",
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3-fips.dualstack.us-east-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-2",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.us-east-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.us-east-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3.us-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-1",
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3-fips.dualstack.us-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.us-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.us-west-1.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-2",
+ }: endpoints.Endpoint{
+ Hostname: "s3.us-west-2.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-2",
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3-fips.dualstack.us-west-2.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-2",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.us-west-2.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.us-west-2.amazonaws.com",
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ },
+ },
+ {
+ ID: "aws-cn",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.{region}.amazonaws.com.cn",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.{region}.amazonaws.com.cn",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3-fips.{region}.api.amazonwebservices.com.cn",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "s3.{region}.amazonaws.com.cn",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsCn,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "cn-north-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "cn-north-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.cn-north-1.amazonaws.com.cn",
+ },
+ endpoints.EndpointKey{
+ Region: "cn-northwest-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "cn-northwest-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.cn-northwest-1.amazonaws.com.cn",
+ },
+ },
+ },
+ {
+ ID: "aws-iso",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "s3.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIso,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "us-iso-east-1",
+ }: endpoints.Endpoint{
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-iso-west-1",
+ }: endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-iso-b",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.{region}.sc2s.sgov.gov",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "s3.{region}.sc2s.sgov.gov",
+ Protocols: []string{"http", "https"},
+ SignatureVersions: []string{"s3v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoB,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "us-isob-east-1",
+ }: endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-us-gov",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3-fips.dualstack.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "s3.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"s3", "s3v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsUsGov,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3.us-gov-east-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.us-gov-east-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-east-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.us-gov-east-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "s3.us-gov-west-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-west-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "s3-fips.us-gov-west-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-west-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.us-gov-west-1.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ },
+ },
+ },
+}
+
+// GetDNSSuffix returns the dnsSuffix URL component for the given partition id
+func GetDNSSuffix(id string, options Options) (string, error) {
+ variant := transformToSharedOptions(options).GetEndpointVariant()
+ switch {
+ case strings.EqualFold(id, "aws"):
+ switch variant {
+ case endpoints.DualStackVariant:
+ return "amazonaws.com", nil
+
+ case endpoints.FIPSVariant:
+ return "amazonaws.com", nil
+
+ case endpoints.FIPSVariant | endpoints.DualStackVariant:
+ return "amazonaws.com", nil
+
+ case 0:
+ return "amazonaws.com", nil
+
+ default:
+ return "", fmt.Errorf("unsupported endpoint variant %v, in partition %s", variant, id)
+
+ }
+
+ case strings.EqualFold(id, "aws-cn"):
+ switch variant {
+ case endpoints.DualStackVariant:
+ return "amazonaws.com.cn", nil
+
+ case endpoints.FIPSVariant:
+ return "amazonaws.com.cn", nil
+
+ case endpoints.FIPSVariant | endpoints.DualStackVariant:
+ return "api.amazonwebservices.com.cn", nil
+
+ case 0:
+ return "amazonaws.com.cn", nil
+
+ default:
+ return "", fmt.Errorf("unsupported endpoint variant %v, in partition %s", variant, id)
+
+ }
+
+ case strings.EqualFold(id, "aws-iso"):
+ switch variant {
+ case endpoints.FIPSVariant:
+ return "c2s.ic.gov", nil
+
+ case 0:
+ return "c2s.ic.gov", nil
+
+ default:
+ return "", fmt.Errorf("unsupported endpoint variant %v, in partition %s", variant, id)
+
+ }
+
+ case strings.EqualFold(id, "aws-iso-b"):
+ switch variant {
+ case endpoints.FIPSVariant:
+ return "sc2s.sgov.gov", nil
+
+ case 0:
+ return "sc2s.sgov.gov", nil
+
+ default:
+ return "", fmt.Errorf("unsupported endpoint variant %v, in partition %s", variant, id)
+
+ }
+
+ case strings.EqualFold(id, "aws-us-gov"):
+ switch variant {
+ case endpoints.DualStackVariant:
+ return "amazonaws.com", nil
+
+ case endpoints.FIPSVariant:
+ return "amazonaws.com", nil
+
+ case endpoints.FIPSVariant | endpoints.DualStackVariant:
+ return "amazonaws.com", nil
+
+ case 0:
+ return "amazonaws.com", nil
+
+ default:
+ return "", fmt.Errorf("unsupported endpoint variant %v, in partition %s", variant, id)
+
+ }
+
+ default:
+ return "", fmt.Errorf("unknown partition")
+
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/credentials.go
new file mode 100644
index 000000000..856dcd62d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/credentials.go
@@ -0,0 +1,141 @@
+package v4a
+
+import (
+ "context"
+ "crypto/ecdsa"
+ "fmt"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+)
+
+// Credentials is Context, ECDSA, and Optional Session Token that can be used
+// to sign requests using SigV4a
+type Credentials struct {
+ Context string
+ PrivateKey *ecdsa.PrivateKey
+ SessionToken string
+
+ // Time the credentials will expire.
+ CanExpire bool
+ Expires time.Time
+}
+
+// Expired returns if the credentials have expired.
+func (v Credentials) Expired() bool {
+ if v.CanExpire {
+ return !v.Expires.After(sdk.NowTime())
+ }
+
+ return false
+}
+
+// HasKeys returns if the credentials keys are set.
+func (v Credentials) HasKeys() bool {
+ return len(v.Context) > 0 && v.PrivateKey != nil
+}
+
+// SymmetricCredentialAdaptor wraps a SigV4 AccessKey/SecretKey provider and adapts the credentials
+// to a ECDSA PrivateKey for signing with SiV4a
+type SymmetricCredentialAdaptor struct {
+ SymmetricProvider aws.CredentialsProvider
+
+ asymmetric atomic.Value
+ m sync.Mutex
+}
+
+// Retrieve retrieves symmetric credentials from the underlying provider.
+func (s *SymmetricCredentialAdaptor) Retrieve(ctx context.Context) (aws.Credentials, error) {
+ symCreds, err := s.retrieveFromSymmetricProvider(ctx)
+ if err != nil {
+ return aws.Credentials{}, nil
+ }
+
+ if asymCreds := s.getCreds(); asymCreds == nil {
+ return symCreds, nil
+ }
+
+ s.m.Lock()
+ defer s.m.Unlock()
+
+ asymCreds := s.getCreds()
+ if asymCreds == nil {
+ return symCreds, nil
+ }
+
+ // if the context does not match the access key id clear it
+ if asymCreds.Context != symCreds.AccessKeyID {
+ s.asymmetric.Store((*Credentials)(nil))
+ }
+
+ return symCreds, nil
+}
+
+// RetrievePrivateKey returns credentials suitable for SigV4a signing
+func (s *SymmetricCredentialAdaptor) RetrievePrivateKey(ctx context.Context) (Credentials, error) {
+ if asymCreds := s.getCreds(); asymCreds != nil {
+ return *asymCreds, nil
+ }
+
+ s.m.Lock()
+ defer s.m.Unlock()
+
+ if asymCreds := s.getCreds(); asymCreds != nil {
+ return *asymCreds, nil
+ }
+
+ symmetricCreds, err := s.retrieveFromSymmetricProvider(ctx)
+ if err != nil {
+ return Credentials{}, fmt.Errorf("failed to retrieve symmetric credentials: %v", err)
+ }
+
+ privateKey, err := deriveKeyFromAccessKeyPair(symmetricCreds.AccessKeyID, symmetricCreds.SecretAccessKey)
+ if err != nil {
+ return Credentials{}, fmt.Errorf("failed to derive assymetric key from credentials")
+ }
+
+ creds := Credentials{
+ Context: symmetricCreds.AccessKeyID,
+ PrivateKey: privateKey,
+ SessionToken: symmetricCreds.SessionToken,
+ CanExpire: symmetricCreds.CanExpire,
+ Expires: symmetricCreds.Expires,
+ }
+
+ s.asymmetric.Store(&creds)
+
+ return creds, nil
+}
+
+func (s *SymmetricCredentialAdaptor) getCreds() *Credentials {
+ v := s.asymmetric.Load()
+
+ if v == nil {
+ return nil
+ }
+
+ c := v.(*Credentials)
+ if c != nil && c.HasKeys() && !c.Expired() {
+ return c
+ }
+
+ return nil
+}
+
+func (s *SymmetricCredentialAdaptor) retrieveFromSymmetricProvider(ctx context.Context) (aws.Credentials, error) {
+ credentials, err := s.SymmetricProvider.Retrieve(ctx)
+ if err != nil {
+ return aws.Credentials{}, err
+ }
+
+ return credentials, nil
+}
+
+// CredentialsProvider is the interface for a provider to retrieve credentials
+// to sign requests with.
+type CredentialsProvider interface {
+ RetrievePrivateKey(context.Context) (Credentials, error)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/error.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/error.go
new file mode 100644
index 000000000..380d17427
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/error.go
@@ -0,0 +1,17 @@
+package v4a
+
+import "fmt"
+
+// SigningError indicates an error condition occurred while performing SigV4a signing
+type SigningError struct {
+ Err error
+}
+
+func (e *SigningError) Error() string {
+ return fmt.Sprintf("failed to sign request: %v", e.Err)
+}
+
+// Unwrap returns the underlying error cause
+func (e *SigningError) Unwrap() error {
+ return e.Err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/crypto/compare.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/crypto/compare.go
new file mode 100644
index 000000000..a93ec40c8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/crypto/compare.go
@@ -0,0 +1,30 @@
+package crypto
+
+import "fmt"
+
+// ConstantTimeByteCompare is a constant-time byte comparison of x and y. This function performs an absolute comparison
+// if the two byte slices assuming they represent a big-endian number.
+//
+// error if len(x) != len(y)
+// -1 if x < y
+// 0 if x == y
+// +1 if x > y
+func ConstantTimeByteCompare(x, y []byte) (int, error) {
+ if len(x) != len(y) {
+ return 0, fmt.Errorf("slice lengths do not match")
+ }
+
+ xLarger, yLarger := 0, 0
+
+ for i := 0; i < len(x); i++ {
+ xByte, yByte := int(x[i]), int(y[i])
+
+ x := ((yByte - xByte) >> 8) & 1
+ y := ((xByte - yByte) >> 8) & 1
+
+ xLarger |= x &^ yLarger
+ yLarger |= y &^ xLarger
+ }
+
+ return xLarger - yLarger, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/crypto/ecc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/crypto/ecc.go
new file mode 100644
index 000000000..758c73fcb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/crypto/ecc.go
@@ -0,0 +1,113 @@
+package crypto
+
+import (
+ "bytes"
+ "crypto/ecdsa"
+ "crypto/elliptic"
+ "crypto/hmac"
+ "encoding/asn1"
+ "encoding/binary"
+ "fmt"
+ "hash"
+ "math"
+ "math/big"
+)
+
+type ecdsaSignature struct {
+ R, S *big.Int
+}
+
+// ECDSAKey takes the given elliptic curve, and private key (d) byte slice
+// and returns the private ECDSA key.
+func ECDSAKey(curve elliptic.Curve, d []byte) *ecdsa.PrivateKey {
+ return ECDSAKeyFromPoint(curve, (&big.Int{}).SetBytes(d))
+}
+
+// ECDSAKeyFromPoint takes the given elliptic curve and point and returns the
+// private and public keypair
+func ECDSAKeyFromPoint(curve elliptic.Curve, d *big.Int) *ecdsa.PrivateKey {
+ pX, pY := curve.ScalarBaseMult(d.Bytes())
+
+ privKey := &ecdsa.PrivateKey{
+ PublicKey: ecdsa.PublicKey{
+ Curve: curve,
+ X: pX,
+ Y: pY,
+ },
+ D: d,
+ }
+
+ return privKey
+}
+
+// ECDSAPublicKey takes the provide curve and (x, y) coordinates and returns
+// *ecdsa.PublicKey. Returns an error if the given points are not on the curve.
+func ECDSAPublicKey(curve elliptic.Curve, x, y []byte) (*ecdsa.PublicKey, error) {
+ xPoint := (&big.Int{}).SetBytes(x)
+ yPoint := (&big.Int{}).SetBytes(y)
+
+ if !curve.IsOnCurve(xPoint, yPoint) {
+ return nil, fmt.Errorf("point(%v, %v) is not on the given curve", xPoint.String(), yPoint.String())
+ }
+
+ return &ecdsa.PublicKey{
+ Curve: curve,
+ X: xPoint,
+ Y: yPoint,
+ }, nil
+}
+
+// VerifySignature takes the provided public key, hash, and asn1 encoded signature and returns
+// whether the given signature is valid.
+func VerifySignature(key *ecdsa.PublicKey, hash []byte, signature []byte) (bool, error) {
+ var ecdsaSignature ecdsaSignature
+
+ _, err := asn1.Unmarshal(signature, &ecdsaSignature)
+ if err != nil {
+ return false, err
+ }
+
+ return ecdsa.Verify(key, hash, ecdsaSignature.R, ecdsaSignature.S), nil
+}
+
+// HMACKeyDerivation provides an implementation of a NIST-800-108 of a KDF (Key Derivation Function) in Counter Mode.
+// For the purposes of this implantation HMAC is used as the PRF (Pseudorandom function), where the value of
+// `r` is defined as a 4 byte counter.
+func HMACKeyDerivation(hash func() hash.Hash, bitLen int, key []byte, label, context []byte) ([]byte, error) {
+ // verify that we won't overflow the counter
+ n := int64(math.Ceil((float64(bitLen) / 8) / float64(hash().Size())))
+ if n > 0x7FFFFFFF {
+ return nil, fmt.Errorf("unable to derive key of size %d using 32-bit counter", bitLen)
+ }
+
+ // verify the requested bit length is not larger then the length encoding size
+ if int64(bitLen) > 0x7FFFFFFF {
+ return nil, fmt.Errorf("bitLen is greater than 32-bits")
+ }
+
+ fixedInput := bytes.NewBuffer(nil)
+ fixedInput.Write(label)
+ fixedInput.WriteByte(0x00)
+ fixedInput.Write(context)
+ if err := binary.Write(fixedInput, binary.BigEndian, int32(bitLen)); err != nil {
+ return nil, fmt.Errorf("failed to write bit length to fixed input string: %v", err)
+ }
+
+ var output []byte
+
+ h := hmac.New(hash, key)
+
+ for i := int64(1); i <= n; i++ {
+ h.Reset()
+ if err := binary.Write(h, binary.BigEndian, int32(i)); err != nil {
+ return nil, err
+ }
+ _, err := h.Write(fixedInput.Bytes())
+ if err != nil {
+ return nil, err
+ }
+ output = append(output, h.Sum(nil)...)
+ }
+
+ return output[:bitLen/8], nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/const.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/const.go
new file mode 100644
index 000000000..89a76e2ea
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/const.go
@@ -0,0 +1,36 @@
+package v4
+
+const (
+ // EmptyStringSHA256 is the hex encoded sha256 value of an empty string
+ EmptyStringSHA256 = `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855`
+
+ // UnsignedPayload indicates that the request payload body is unsigned
+ UnsignedPayload = "UNSIGNED-PAYLOAD"
+
+ // AmzAlgorithmKey indicates the signing algorithm
+ AmzAlgorithmKey = "X-Amz-Algorithm"
+
+ // AmzSecurityTokenKey indicates the security token to be used with temporary credentials
+ AmzSecurityTokenKey = "X-Amz-Security-Token"
+
+ // AmzDateKey is the UTC timestamp for the request in the format YYYYMMDD'T'HHMMSS'Z'
+ AmzDateKey = "X-Amz-Date"
+
+ // AmzCredentialKey is the access key ID and credential scope
+ AmzCredentialKey = "X-Amz-Credential"
+
+ // AmzSignedHeadersKey is the set of headers signed for the request
+ AmzSignedHeadersKey = "X-Amz-SignedHeaders"
+
+ // AmzSignatureKey is the query parameter to store the SigV4 signature
+ AmzSignatureKey = "X-Amz-Signature"
+
+ // TimeFormat is the time format to be used in the X-Amz-Date header or query parameter
+ TimeFormat = "20060102T150405Z"
+
+ // ShortTimeFormat is the shorten time format used in the credential scope
+ ShortTimeFormat = "20060102"
+
+ // ContentSHAKey is the SHA256 of request body
+ ContentSHAKey = "X-Amz-Content-Sha256"
+)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/header_rules.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/header_rules.go
new file mode 100644
index 000000000..a15177e8f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/header_rules.go
@@ -0,0 +1,82 @@
+package v4
+
+import (
+ sdkstrings "github.com/aws/aws-sdk-go-v2/internal/strings"
+)
+
+// Rules houses a set of Rule needed for validation of a
+// string value
+type Rules []Rule
+
+// Rule interface allows for more flexible rules and just simply
+// checks whether or not a value adheres to that Rule
+type Rule interface {
+ IsValid(value string) bool
+}
+
+// IsValid will iterate through all rules and see if any rules
+// apply to the value and supports nested rules
+func (r Rules) IsValid(value string) bool {
+ for _, rule := range r {
+ if rule.IsValid(value) {
+ return true
+ }
+ }
+ return false
+}
+
+// MapRule generic Rule for maps
+type MapRule map[string]struct{}
+
+// IsValid for the map Rule satisfies whether it exists in the map
+func (m MapRule) IsValid(value string) bool {
+ _, ok := m[value]
+ return ok
+}
+
+// AllowList is a generic Rule for whitelisting
+type AllowList struct {
+ Rule
+}
+
+// IsValid for AllowList checks if the value is within the AllowList
+func (w AllowList) IsValid(value string) bool {
+ return w.Rule.IsValid(value)
+}
+
+// DenyList is a generic Rule for blacklisting
+type DenyList struct {
+ Rule
+}
+
+// IsValid for AllowList checks if the value is within the AllowList
+func (b DenyList) IsValid(value string) bool {
+ return !b.Rule.IsValid(value)
+}
+
+// Patterns is a list of strings to match against
+type Patterns []string
+
+// IsValid for Patterns checks each pattern and returns if a match has
+// been found
+func (p Patterns) IsValid(value string) bool {
+ for _, pattern := range p {
+ if sdkstrings.HasPrefixFold(value, pattern) {
+ return true
+ }
+ }
+ return false
+}
+
+// InclusiveRules rules allow for rules to depend on one another
+type InclusiveRules []Rule
+
+// IsValid will return true if all rules are true
+func (r InclusiveRules) IsValid(value string) bool {
+ for _, rule := range r {
+ if !rule.IsValid(value) {
+ return false
+ }
+ }
+ return true
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/headers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/headers.go
new file mode 100644
index 000000000..3487dc335
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/headers.go
@@ -0,0 +1,67 @@
+package v4
+
+// IgnoredHeaders is a list of headers that are ignored during signing
+var IgnoredHeaders = Rules{
+ DenyList{
+ MapRule{
+ "Authorization": struct{}{},
+ "User-Agent": struct{}{},
+ "X-Amzn-Trace-Id": struct{}{},
+ },
+ },
+}
+
+// RequiredSignedHeaders is a whitelist for Build canonical headers.
+var RequiredSignedHeaders = Rules{
+ AllowList{
+ MapRule{
+ "Cache-Control": struct{}{},
+ "Content-Disposition": struct{}{},
+ "Content-Encoding": struct{}{},
+ "Content-Language": struct{}{},
+ "Content-Md5": struct{}{},
+ "Content-Type": struct{}{},
+ "Expires": struct{}{},
+ "If-Match": struct{}{},
+ "If-Modified-Since": struct{}{},
+ "If-None-Match": struct{}{},
+ "If-Unmodified-Since": struct{}{},
+ "Range": struct{}{},
+ "X-Amz-Acl": struct{}{},
+ "X-Amz-Copy-Source": struct{}{},
+ "X-Amz-Copy-Source-If-Match": struct{}{},
+ "X-Amz-Copy-Source-If-Modified-Since": struct{}{},
+ "X-Amz-Copy-Source-If-None-Match": struct{}{},
+ "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{},
+ "X-Amz-Copy-Source-Range": struct{}{},
+ "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{},
+ "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{},
+ "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{},
+ "X-Amz-Grant-Full-control": struct{}{},
+ "X-Amz-Grant-Read": struct{}{},
+ "X-Amz-Grant-Read-Acp": struct{}{},
+ "X-Amz-Grant-Write": struct{}{},
+ "X-Amz-Grant-Write-Acp": struct{}{},
+ "X-Amz-Metadata-Directive": struct{}{},
+ "X-Amz-Mfa": struct{}{},
+ "X-Amz-Request-Payer": struct{}{},
+ "X-Amz-Server-Side-Encryption": struct{}{},
+ "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id": struct{}{},
+ "X-Amz-Server-Side-Encryption-Customer-Algorithm": struct{}{},
+ "X-Amz-Server-Side-Encryption-Customer-Key": struct{}{},
+ "X-Amz-Server-Side-Encryption-Customer-Key-Md5": struct{}{},
+ "X-Amz-Storage-Class": struct{}{},
+ "X-Amz-Website-Redirect-Location": struct{}{},
+ "X-Amz-Content-Sha256": struct{}{},
+ "X-Amz-Tagging": struct{}{},
+ },
+ },
+ Patterns{"X-Amz-Meta-"},
+}
+
+// AllowedQueryHoisting is a whitelist for Build query headers. The boolean value
+// represents whether or not it is a pattern.
+var AllowedQueryHoisting = InclusiveRules{
+ DenyList{RequiredSignedHeaders},
+ Patterns{"X-Amz-"},
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/hmac.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/hmac.go
new file mode 100644
index 000000000..e7fa7a1b1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/hmac.go
@@ -0,0 +1,13 @@
+package v4
+
+import (
+ "crypto/hmac"
+ "crypto/sha256"
+)
+
+// HMACSHA256 computes a HMAC-SHA256 of data given the provided key.
+func HMACSHA256(key []byte, data []byte) []byte {
+ hash := hmac.New(sha256.New, key)
+ hash.Write(data)
+ return hash.Sum(nil)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/host.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/host.go
new file mode 100644
index 000000000..bf93659a4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/host.go
@@ -0,0 +1,75 @@
+package v4
+
+import (
+ "net/http"
+ "strings"
+)
+
+// SanitizeHostForHeader removes default port from host and updates request.Host
+func SanitizeHostForHeader(r *http.Request) {
+ host := getHost(r)
+ port := portOnly(host)
+ if port != "" && isDefaultPort(r.URL.Scheme, port) {
+ r.Host = stripPort(host)
+ }
+}
+
+// Returns host from request
+func getHost(r *http.Request) string {
+ if r.Host != "" {
+ return r.Host
+ }
+
+ return r.URL.Host
+}
+
+// Hostname returns u.Host, without any port number.
+//
+// If Host is an IPv6 literal with a port number, Hostname returns the
+// IPv6 literal without the square brackets. IPv6 literals may include
+// a zone identifier.
+//
+// Copied from the Go 1.8 standard library (net/url)
+func stripPort(hostport string) string {
+ colon := strings.IndexByte(hostport, ':')
+ if colon == -1 {
+ return hostport
+ }
+ if i := strings.IndexByte(hostport, ']'); i != -1 {
+ return strings.TrimPrefix(hostport[:i], "[")
+ }
+ return hostport[:colon]
+}
+
+// Port returns the port part of u.Host, without the leading colon.
+// If u.Host doesn't contain a port, Port returns an empty string.
+//
+// Copied from the Go 1.8 standard library (net/url)
+func portOnly(hostport string) string {
+ colon := strings.IndexByte(hostport, ':')
+ if colon == -1 {
+ return ""
+ }
+ if i := strings.Index(hostport, "]:"); i != -1 {
+ return hostport[i+len("]:"):]
+ }
+ if strings.Contains(hostport, "]") {
+ return ""
+ }
+ return hostport[colon+len(":"):]
+}
+
+// Returns true if the specified URI is using the standard port
+// (i.e. port 80 for HTTP URIs or 443 for HTTPS URIs)
+func isDefaultPort(scheme, port string) bool {
+ if port == "" {
+ return true
+ }
+
+ lowerCaseScheme := strings.ToLower(scheme)
+ if (lowerCaseScheme == "http" && port == "80") || (lowerCaseScheme == "https" && port == "443") {
+ return true
+ }
+
+ return false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/time.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/time.go
new file mode 100644
index 000000000..1de06a765
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/time.go
@@ -0,0 +1,36 @@
+package v4
+
+import "time"
+
+// SigningTime provides a wrapper around a time.Time which provides cached values for SigV4 signing.
+type SigningTime struct {
+ time.Time
+ timeFormat string
+ shortTimeFormat string
+}
+
+// NewSigningTime creates a new SigningTime given a time.Time
+func NewSigningTime(t time.Time) SigningTime {
+ return SigningTime{
+ Time: t,
+ }
+}
+
+// TimeFormat provides a time formatted in the X-Amz-Date format.
+func (m *SigningTime) TimeFormat() string {
+ return m.format(&m.timeFormat, TimeFormat)
+}
+
+// ShortTimeFormat provides a time formatted of 20060102.
+func (m *SigningTime) ShortTimeFormat() string {
+ return m.format(&m.shortTimeFormat, ShortTimeFormat)
+}
+
+func (m *SigningTime) format(target *string, format string) string {
+ if len(*target) > 0 {
+ return *target
+ }
+ v := m.Time.Format(format)
+ *target = v
+ return v
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/util.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/util.go
new file mode 100644
index 000000000..741019b5f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4/util.go
@@ -0,0 +1,64 @@
+package v4
+
+import (
+ "net/url"
+ "strings"
+)
+
+const doubleSpace = " "
+
+// StripExcessSpaces will rewrite the passed in slice's string values to not
+// contain muliple side-by-side spaces.
+func StripExcessSpaces(str string) string {
+ var j, k, l, m, spaces int
+ // Trim trailing spaces
+ for j = len(str) - 1; j >= 0 && str[j] == ' '; j-- {
+ }
+
+ // Trim leading spaces
+ for k = 0; k < j && str[k] == ' '; k++ {
+ }
+ str = str[k : j+1]
+
+ // Strip multiple spaces.
+ j = strings.Index(str, doubleSpace)
+ if j < 0 {
+ return str
+ }
+
+ buf := []byte(str)
+ for k, m, l = j, j, len(buf); k < l; k++ {
+ if buf[k] == ' ' {
+ if spaces == 0 {
+ // First space.
+ buf[m] = buf[k]
+ m++
+ }
+ spaces++
+ } else {
+ // End of multiple spaces.
+ spaces = 0
+ buf[m] = buf[k]
+ m++
+ }
+ }
+
+ return string(buf[:m])
+}
+
+// GetURIPath returns the escaped URI component from the provided URL
+func GetURIPath(u *url.URL) string {
+ var uri string
+
+ if len(u.Opaque) > 0 {
+ uri = "/" + strings.Join(strings.Split(u.Opaque, "/")[3:], "/")
+ } else {
+ uri = u.EscapedPath()
+ }
+
+ if len(uri) == 0 {
+ uri = "/"
+ }
+
+ return uri
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/middleware.go
new file mode 100644
index 000000000..55d5e8abd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/middleware.go
@@ -0,0 +1,105 @@
+package v4a
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+ "time"
+
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// HTTPSigner is SigV4a HTTP signer implementation
+type HTTPSigner interface {
+ SignHTTP(ctx context.Context, credentials Credentials, r *http.Request, payloadHash string, service string, regionSet []string, signingTime time.Time, optfns ...func(*SignerOptions)) error
+}
+
+// SignHTTPRequestMiddlewareOptions is the middleware options for constructing a SignHTTPRequestMiddleware.
+type SignHTTPRequestMiddlewareOptions struct {
+ Credentials CredentialsProvider
+ Signer HTTPSigner
+ LogSigning bool
+}
+
+// SignHTTPRequestMiddleware is a middleware for signing an HTTP request using SigV4a.
+type SignHTTPRequestMiddleware struct {
+ credentials CredentialsProvider
+ signer HTTPSigner
+ logSigning bool
+}
+
+// NewSignHTTPRequestMiddleware constructs a SignHTTPRequestMiddleware using the given SignHTTPRequestMiddlewareOptions.
+func NewSignHTTPRequestMiddleware(options SignHTTPRequestMiddlewareOptions) *SignHTTPRequestMiddleware {
+ return &SignHTTPRequestMiddleware{
+ credentials: options.Credentials,
+ signer: options.Signer,
+ logSigning: options.LogSigning,
+ }
+}
+
+// ID the middleware identifier.
+func (s *SignHTTPRequestMiddleware) ID() string {
+ return "Signing"
+}
+
+// HandleFinalize signs an HTTP request using SigV4a.
+func (s *SignHTTPRequestMiddleware) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
+) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ if !hasCredentialProvider(s.credentials) {
+ return next.HandleFinalize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unexpected request middleware type %T", in.Request)
+ }
+
+ signingName, signingRegion := awsmiddleware.GetSigningName(ctx), awsmiddleware.GetSigningRegion(ctx)
+ payloadHash := v4.GetPayloadHash(ctx)
+ if len(payloadHash) == 0 {
+ return out, metadata, &SigningError{Err: fmt.Errorf("computed payload hash missing from context")}
+ }
+
+ credentials, err := s.credentials.RetrievePrivateKey(ctx)
+ if err != nil {
+ return out, metadata, &SigningError{Err: fmt.Errorf("failed to retrieve credentials: %w", err)}
+ }
+
+ err = s.signer.SignHTTP(ctx, credentials, req.Request, payloadHash, signingName, []string{signingRegion}, time.Now().UTC(), func(o *SignerOptions) {
+ o.Logger = middleware.GetLogger(ctx)
+ o.LogSigning = s.logSigning
+ })
+ if err != nil {
+ return out, metadata, &SigningError{Err: fmt.Errorf("failed to sign http request, %w", err)}
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func hasCredentialProvider(p CredentialsProvider) bool {
+ if p == nil {
+ return false
+ }
+
+ return true
+}
+
+// RegisterSigningMiddleware registers the SigV4a signing middleware to the stack. If a signing middleware is already
+// present, this provided middleware will be swapped. Otherwise the middleware will be added at the tail of the
+// finalize step.
+func RegisterSigningMiddleware(stack *middleware.Stack, signingMiddleware *SignHTTPRequestMiddleware) (err error) {
+ const signedID = "Signing"
+ _, present := stack.Finalize.Get(signedID)
+ if present {
+ _, err = stack.Finalize.Swap(signedID, signingMiddleware)
+ } else {
+ err = stack.Finalize.Add(signingMiddleware, middleware.After)
+ }
+ return err
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/presign_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/presign_middleware.go
new file mode 100644
index 000000000..951fc415d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/presign_middleware.go
@@ -0,0 +1,117 @@
+package v4a
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+ "time"
+
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ "github.com/aws/aws-sdk-go-v2/internal/sdk"
+ "github.com/aws/smithy-go/middleware"
+ smithyHTTP "github.com/aws/smithy-go/transport/http"
+)
+
+// HTTPPresigner is an interface to a SigV4a signer that can sign create a
+// presigned URL for a HTTP requests.
+type HTTPPresigner interface {
+ PresignHTTP(
+ ctx context.Context, credentials Credentials, r *http.Request,
+ payloadHash string, service string, regionSet []string, signingTime time.Time,
+ optFns ...func(*SignerOptions),
+ ) (url string, signedHeader http.Header, err error)
+}
+
+// PresignHTTPRequestMiddlewareOptions is the options for the PresignHTTPRequestMiddleware middleware.
+type PresignHTTPRequestMiddlewareOptions struct {
+ CredentialsProvider CredentialsProvider
+ Presigner HTTPPresigner
+ LogSigning bool
+}
+
+// PresignHTTPRequestMiddleware provides the Finalize middleware for creating a
+// presigned URL for an HTTP request.
+//
+// Will short circuit the middleware stack and not forward onto the next
+// Finalize handler.
+type PresignHTTPRequestMiddleware struct {
+ credentialsProvider CredentialsProvider
+ presigner HTTPPresigner
+ logSigning bool
+}
+
+// NewPresignHTTPRequestMiddleware returns a new PresignHTTPRequestMiddleware
+// initialized with the presigner.
+func NewPresignHTTPRequestMiddleware(options PresignHTTPRequestMiddlewareOptions) *PresignHTTPRequestMiddleware {
+ return &PresignHTTPRequestMiddleware{
+ credentialsProvider: options.CredentialsProvider,
+ presigner: options.Presigner,
+ logSigning: options.LogSigning,
+ }
+}
+
+// ID provides the middleware ID.
+func (*PresignHTTPRequestMiddleware) ID() string { return "PresignHTTPRequest" }
+
+// HandleFinalize will take the provided input and create a presigned url for
+// the http request using the SigV4 presign authentication scheme.
+func (s *PresignHTTPRequestMiddleware) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
+) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyHTTP.Request)
+ if !ok {
+ return out, metadata, &SigningError{
+ Err: fmt.Errorf("unexpected request middleware type %T", in.Request),
+ }
+ }
+
+ httpReq := req.Build(ctx)
+ if !hasCredentialProvider(s.credentialsProvider) {
+ out.Result = &v4.PresignedHTTPRequest{
+ URL: httpReq.URL.String(),
+ Method: httpReq.Method,
+ SignedHeader: http.Header{},
+ }
+
+ return out, metadata, nil
+ }
+
+ signingName := awsmiddleware.GetSigningName(ctx)
+ signingRegion := awsmiddleware.GetSigningRegion(ctx)
+ payloadHash := v4.GetPayloadHash(ctx)
+ if len(payloadHash) == 0 {
+ return out, metadata, &SigningError{
+ Err: fmt.Errorf("computed payload hash missing from context"),
+ }
+ }
+
+ credentials, err := s.credentialsProvider.RetrievePrivateKey(ctx)
+ if err != nil {
+ return out, metadata, &SigningError{
+ Err: fmt.Errorf("failed to retrieve credentials: %w", err),
+ }
+ }
+
+ u, h, err := s.presigner.PresignHTTP(ctx, credentials,
+ httpReq, payloadHash, signingName, []string{signingRegion}, sdk.NowTime(),
+ func(o *SignerOptions) {
+ o.Logger = middleware.GetLogger(ctx)
+ o.LogSigning = s.logSigning
+ })
+ if err != nil {
+ return out, metadata, &SigningError{
+ Err: fmt.Errorf("failed to sign http request, %w", err),
+ }
+ }
+
+ out.Result = &v4.PresignedHTTPRequest{
+ URL: u,
+ Method: httpReq.Method,
+ SignedHeader: h,
+ }
+
+ return out, metadata, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/v4a.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/v4a.go
new file mode 100644
index 000000000..005d8768d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/v4a.go
@@ -0,0 +1,514 @@
+// TODO(GOSDK-1220): This signer has removed the conceptual knowledge of UNSIGNED-PAYLOAD and X-Amz-Content-Sha256
+
+package v4a
+
+import (
+ "bytes"
+ "context"
+ "crypto"
+ "crypto/ecdsa"
+ "crypto/elliptic"
+ "crypto/rand"
+ "crypto/sha256"
+ "encoding/hex"
+ "fmt"
+ "hash"
+ "math/big"
+ "net/http"
+ "net/textproto"
+ "net/url"
+ "sort"
+ "strconv"
+ "strings"
+ "time"
+
+ signerCrypto "github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/crypto"
+ v4Internal "github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4"
+ "github.com/aws/smithy-go/encoding/httpbinding"
+ "github.com/aws/smithy-go/logging"
+)
+
+const (
+ // AmzRegionSetKey represents the region set header used for sigv4a
+ AmzRegionSetKey = "X-Amz-Region-Set"
+ amzAlgorithmKey = v4Internal.AmzAlgorithmKey
+ amzSecurityTokenKey = v4Internal.AmzSecurityTokenKey
+ amzDateKey = v4Internal.AmzDateKey
+ amzCredentialKey = v4Internal.AmzCredentialKey
+ amzSignedHeadersKey = v4Internal.AmzSignedHeadersKey
+ authorizationHeader = "Authorization"
+
+ signingAlgorithm = "AWS4-ECDSA-P256-SHA256"
+
+ timeFormat = "20060102T150405Z"
+ shortTimeFormat = "20060102"
+
+ // EmptyStringSHA256 is a hex encoded SHA-256 hash of an empty string
+ EmptyStringSHA256 = v4Internal.EmptyStringSHA256
+
+ // Version of signing v4a
+ Version = "SigV4A"
+)
+
+var (
+ p256 elliptic.Curve
+ nMinusTwoP256 *big.Int
+
+ one = new(big.Int).SetInt64(1)
+)
+
+func init() {
+ // Ensure the elliptic curve parameters are initialized on package import rather then on first usage
+ p256 = elliptic.P256()
+
+ nMinusTwoP256 = new(big.Int).SetBytes(p256.Params().N.Bytes())
+ nMinusTwoP256 = nMinusTwoP256.Sub(nMinusTwoP256, new(big.Int).SetInt64(2))
+}
+
+// SignerOptions is the SigV4a signing options for constructing a Signer.
+type SignerOptions struct {
+ Logger logging.Logger
+ LogSigning bool
+
+ // Disables the Signer's moving HTTP header key/value pairs from the HTTP
+ // request header to the request's query string. This is most commonly used
+ // with pre-signed requests preventing headers from being added to the
+ // request's query string.
+ DisableHeaderHoisting bool
+
+ // Disables the automatic escaping of the URI path of the request for the
+ // siganture's canonical string's path. For services that do not need additional
+ // escaping then use this to disable the signer escaping the path.
+ //
+ // S3 is an example of a service that does not need additional escaping.
+ //
+ // http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
+ DisableURIPathEscaping bool
+}
+
+// Signer is a SigV4a HTTP signing implementation
+type Signer struct {
+ options SignerOptions
+}
+
+// NewSigner constructs a SigV4a Signer.
+func NewSigner(optFns ...func(*SignerOptions)) *Signer {
+ options := SignerOptions{}
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &Signer{options: options}
+}
+
+// deriveKeyFromAccessKeyPair derives a NIST P-256 PrivateKey from the given
+// IAM AccessKey and SecretKey pair.
+//
+// Based on FIPS.186-4 Appendix B.4.2
+func deriveKeyFromAccessKeyPair(accessKey, secretKey string) (*ecdsa.PrivateKey, error) {
+ params := p256.Params()
+ bitLen := params.BitSize // Testing random candidates does not require an additional 64 bits
+ counter := 0x01
+
+ buffer := make([]byte, 1+len(accessKey)) // 1 byte counter + len(accessKey)
+ kdfContext := bytes.NewBuffer(buffer)
+
+ inputKey := append([]byte("AWS4A"), []byte(secretKey)...)
+
+ d := new(big.Int)
+ for {
+ kdfContext.Reset()
+ kdfContext.WriteString(accessKey)
+ kdfContext.WriteByte(byte(counter))
+
+ key, err := signerCrypto.HMACKeyDerivation(sha256.New, bitLen, inputKey, []byte(signingAlgorithm), kdfContext.Bytes())
+ if err != nil {
+ return nil, err
+ }
+
+ // Check key first before calling SetBytes if key key is in fact a valid candidate.
+ // This ensures the byte slice is the correct length (32-bytes) to compare in constant-time
+ cmp, err := signerCrypto.ConstantTimeByteCompare(key, nMinusTwoP256.Bytes())
+ if err != nil {
+ return nil, err
+ }
+ if cmp == -1 {
+ d.SetBytes(key)
+ break
+ }
+
+ counter++
+ if counter > 0xFF {
+ return nil, fmt.Errorf("exhausted single byte external counter")
+ }
+ }
+ d = d.Add(d, one)
+
+ priv := new(ecdsa.PrivateKey)
+ priv.PublicKey.Curve = p256
+ priv.D = d
+ priv.PublicKey.X, priv.PublicKey.Y = p256.ScalarBaseMult(d.Bytes())
+
+ return priv, nil
+}
+
+type httpSigner struct {
+ Request *http.Request
+ ServiceName string
+ RegionSet []string
+ Time time.Time
+ Credentials Credentials
+ IsPreSign bool
+
+ Logger logging.Logger
+ Debug bool
+
+ // PayloadHash is the hex encoded SHA-256 hash of the request payload
+ // If len(PayloadHash) == 0 the signer will attempt to send the request
+ // as an unsigned payload. Note: Unsigned payloads only work for a subset of services.
+ PayloadHash string
+
+ DisableHeaderHoisting bool
+ DisableURIPathEscaping bool
+}
+
+// SignHTTP takes the provided http.Request, payload hash, service, regionSet, and time and signs using SigV4a.
+// The passed in request will be modified in place.
+func (s *Signer) SignHTTP(ctx context.Context, credentials Credentials, r *http.Request, payloadHash string, service string, regionSet []string, signingTime time.Time, optFns ...func(*SignerOptions)) error {
+ options := s.options
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ signer := &httpSigner{
+ Request: r,
+ PayloadHash: payloadHash,
+ ServiceName: service,
+ RegionSet: regionSet,
+ Credentials: credentials,
+ Time: signingTime.UTC(),
+ DisableHeaderHoisting: options.DisableHeaderHoisting,
+ DisableURIPathEscaping: options.DisableURIPathEscaping,
+ }
+
+ signedRequest, err := signer.Build()
+ if err != nil {
+ return err
+ }
+
+ logHTTPSigningInfo(ctx, options, signedRequest)
+
+ return nil
+}
+
+// PresignHTTP takes the provided http.Request, payload hash, service, regionSet, and time and presigns using SigV4a
+// Returns the presigned URL along with the headers that were signed with the request.
+//
+// PresignHTTP will not set the expires time of the presigned request
+// automatically. To specify the expire duration for a request add the
+// "X-Amz-Expires" query parameter on the request with the value as the
+// duration in seconds the presigned URL should be considered valid for. This
+// parameter is not used by all AWS services, and is most notable used by
+// Amazon S3 APIs.
+func (s *Signer) PresignHTTP(ctx context.Context, credentials Credentials, r *http.Request, payloadHash string, service string, regionSet []string, signingTime time.Time, optFns ...func(*SignerOptions)) (signedURI string, signedHeaders http.Header, err error) {
+ options := s.options
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ signer := &httpSigner{
+ Request: r,
+ PayloadHash: payloadHash,
+ ServiceName: service,
+ RegionSet: regionSet,
+ Credentials: credentials,
+ Time: signingTime.UTC(),
+ IsPreSign: true,
+ DisableHeaderHoisting: options.DisableHeaderHoisting,
+ DisableURIPathEscaping: options.DisableURIPathEscaping,
+ }
+
+ signedRequest, err := signer.Build()
+ if err != nil {
+ return "", nil, err
+ }
+
+ logHTTPSigningInfo(ctx, options, signedRequest)
+
+ signedHeaders = make(http.Header)
+
+ // For the signed headers we canonicalize the header keys in the returned map.
+ // This avoids situations where can standard library double headers like host header. For example the standard
+ // library will set the Host header, even if it is present in lower-case form.
+ for k, v := range signedRequest.SignedHeaders {
+ key := textproto.CanonicalMIMEHeaderKey(k)
+ signedHeaders[key] = append(signedHeaders[key], v...)
+ }
+
+ return signedRequest.Request.URL.String(), signedHeaders, nil
+}
+
+func (s *httpSigner) setRequiredSigningFields(headers http.Header, query url.Values) {
+ amzDate := s.Time.Format(timeFormat)
+
+ if s.IsPreSign {
+ query.Set(AmzRegionSetKey, strings.Join(s.RegionSet, ","))
+ query.Set(amzDateKey, amzDate)
+ query.Set(amzAlgorithmKey, signingAlgorithm)
+ if len(s.Credentials.SessionToken) > 0 {
+ query.Set(amzSecurityTokenKey, s.Credentials.SessionToken)
+ }
+ return
+ }
+
+ headers.Set(AmzRegionSetKey, strings.Join(s.RegionSet, ","))
+ headers.Set(amzDateKey, amzDate)
+ if len(s.Credentials.SessionToken) > 0 {
+ headers.Set(amzSecurityTokenKey, s.Credentials.SessionToken)
+ }
+}
+
+func (s *httpSigner) Build() (signedRequest, error) {
+ req := s.Request
+
+ query := req.URL.Query()
+ headers := req.Header
+
+ s.setRequiredSigningFields(headers, query)
+
+ // Sort Each Query Key's Values
+ for key := range query {
+ sort.Strings(query[key])
+ }
+
+ v4Internal.SanitizeHostForHeader(req)
+
+ credentialScope := s.buildCredentialScope()
+ credentialStr := s.Credentials.Context + "/" + credentialScope
+ if s.IsPreSign {
+ query.Set(amzCredentialKey, credentialStr)
+ }
+
+ unsignedHeaders := headers
+ if s.IsPreSign && !s.DisableHeaderHoisting {
+ urlValues := url.Values{}
+ urlValues, unsignedHeaders = buildQuery(v4Internal.AllowedQueryHoisting, unsignedHeaders)
+ for k := range urlValues {
+ query[k] = urlValues[k]
+ }
+ }
+
+ host := req.URL.Host
+ if len(req.Host) > 0 {
+ host = req.Host
+ }
+
+ signedHeaders, signedHeadersStr, canonicalHeaderStr := s.buildCanonicalHeaders(host, v4Internal.IgnoredHeaders, unsignedHeaders, s.Request.ContentLength)
+
+ if s.IsPreSign {
+ query.Set(amzSignedHeadersKey, signedHeadersStr)
+ }
+
+ rawQuery := strings.Replace(query.Encode(), "+", "%20", -1)
+
+ canonicalURI := v4Internal.GetURIPath(req.URL)
+ if !s.DisableURIPathEscaping {
+ canonicalURI = httpbinding.EscapePath(canonicalURI, false)
+ }
+
+ canonicalString := s.buildCanonicalString(
+ req.Method,
+ canonicalURI,
+ rawQuery,
+ signedHeadersStr,
+ canonicalHeaderStr,
+ )
+
+ strToSign := s.buildStringToSign(credentialScope, canonicalString)
+ signingSignature, err := s.buildSignature(strToSign)
+ if err != nil {
+ return signedRequest{}, err
+ }
+
+ if s.IsPreSign {
+ rawQuery += "&X-Amz-Signature=" + signingSignature
+ } else {
+ headers[authorizationHeader] = append(headers[authorizationHeader][:0], buildAuthorizationHeader(credentialStr, signedHeadersStr, signingSignature))
+ }
+
+ req.URL.RawQuery = rawQuery
+
+ return signedRequest{
+ Request: req,
+ SignedHeaders: signedHeaders,
+ CanonicalString: canonicalString,
+ StringToSign: strToSign,
+ PreSigned: s.IsPreSign,
+ }, nil
+}
+
+func buildAuthorizationHeader(credentialStr, signedHeadersStr, signingSignature string) string {
+ const credential = "Credential="
+ const signedHeaders = "SignedHeaders="
+ const signature = "Signature="
+ const commaSpace = ", "
+
+ var parts strings.Builder
+ parts.Grow(len(signingAlgorithm) + 1 +
+ len(credential) + len(credentialStr) + len(commaSpace) +
+ len(signedHeaders) + len(signedHeadersStr) + len(commaSpace) +
+ len(signature) + len(signingSignature),
+ )
+ parts.WriteString(signingAlgorithm)
+ parts.WriteRune(' ')
+ parts.WriteString(credential)
+ parts.WriteString(credentialStr)
+ parts.WriteString(commaSpace)
+ parts.WriteString(signedHeaders)
+ parts.WriteString(signedHeadersStr)
+ parts.WriteString(commaSpace)
+ parts.WriteString(signature)
+ parts.WriteString(signingSignature)
+ return parts.String()
+}
+
+func (s *httpSigner) buildCredentialScope() string {
+ return strings.Join([]string{
+ s.Time.Format(shortTimeFormat),
+ s.ServiceName,
+ "aws4_request",
+ }, "/")
+
+}
+
+func buildQuery(r v4Internal.Rule, header http.Header) (url.Values, http.Header) {
+ query := url.Values{}
+ unsignedHeaders := http.Header{}
+ for k, h := range header {
+ if r.IsValid(k) {
+ query[k] = h
+ } else {
+ unsignedHeaders[k] = h
+ }
+ }
+
+ return query, unsignedHeaders
+}
+
+func (s *httpSigner) buildCanonicalHeaders(host string, rule v4Internal.Rule, header http.Header, length int64) (signed http.Header, signedHeaders, canonicalHeadersStr string) {
+ signed = make(http.Header)
+
+ var headers []string
+ const hostHeader = "host"
+ headers = append(headers, hostHeader)
+ signed[hostHeader] = append(signed[hostHeader], host)
+
+ if length > 0 {
+ const contentLengthHeader = "content-length"
+ headers = append(headers, contentLengthHeader)
+ signed[contentLengthHeader] = append(signed[contentLengthHeader], strconv.FormatInt(length, 10))
+ }
+
+ for k, v := range header {
+ if !rule.IsValid(k) {
+ continue // ignored header
+ }
+
+ lowerCaseKey := strings.ToLower(k)
+ if _, ok := signed[lowerCaseKey]; ok {
+ // include additional values
+ signed[lowerCaseKey] = append(signed[lowerCaseKey], v...)
+ continue
+ }
+
+ headers = append(headers, lowerCaseKey)
+ signed[lowerCaseKey] = v
+ }
+ sort.Strings(headers)
+
+ signedHeaders = strings.Join(headers, ";")
+
+ var canonicalHeaders strings.Builder
+ n := len(headers)
+ const colon = ':'
+ for i := 0; i < n; i++ {
+ if headers[i] == hostHeader {
+ canonicalHeaders.WriteString(hostHeader)
+ canonicalHeaders.WriteRune(colon)
+ canonicalHeaders.WriteString(v4Internal.StripExcessSpaces(host))
+ } else {
+ canonicalHeaders.WriteString(headers[i])
+ canonicalHeaders.WriteRune(colon)
+ canonicalHeaders.WriteString(strings.Join(signed[headers[i]], ","))
+ }
+ canonicalHeaders.WriteRune('\n')
+ }
+ canonicalHeadersStr = canonicalHeaders.String()
+
+ return signed, signedHeaders, canonicalHeadersStr
+}
+
+func (s *httpSigner) buildCanonicalString(method, uri, query, signedHeaders, canonicalHeaders string) string {
+ return strings.Join([]string{
+ method,
+ uri,
+ query,
+ canonicalHeaders,
+ signedHeaders,
+ s.PayloadHash,
+ }, "\n")
+}
+
+func (s *httpSigner) buildStringToSign(credentialScope, canonicalRequestString string) string {
+ return strings.Join([]string{
+ signingAlgorithm,
+ s.Time.Format(timeFormat),
+ credentialScope,
+ hex.EncodeToString(makeHash(sha256.New(), []byte(canonicalRequestString))),
+ }, "\n")
+}
+
+func makeHash(hash hash.Hash, b []byte) []byte {
+ hash.Reset()
+ hash.Write(b)
+ return hash.Sum(nil)
+}
+
+func (s *httpSigner) buildSignature(strToSign string) (string, error) {
+ sig, err := s.Credentials.PrivateKey.Sign(rand.Reader, makeHash(sha256.New(), []byte(strToSign)), crypto.SHA256)
+ if err != nil {
+ return "", err
+ }
+ return hex.EncodeToString(sig), nil
+}
+
+const logSignInfoMsg = `Request Signature:
+---[ CANONICAL STRING ]-----------------------------
+%s
+---[ STRING TO SIGN ]--------------------------------
+%s%s
+-----------------------------------------------------`
+const logSignedURLMsg = `
+---[ SIGNED URL ]------------------------------------
+%s`
+
+func logHTTPSigningInfo(ctx context.Context, options SignerOptions, r signedRequest) {
+ if !options.LogSigning {
+ return
+ }
+ signedURLMsg := ""
+ if r.PreSigned {
+ signedURLMsg = fmt.Sprintf(logSignedURLMsg, r.Request.URL.String())
+ }
+ logger := logging.WithContext(ctx, options.Logger)
+ logger.Logf(logging.Debug, logSignInfoMsg, r.CanonicalString, r.StringToSign, signedURLMsg)
+}
+
+type signedRequest struct {
+ Request *http.Request
+ SignedHeaders http.Header
+ CanonicalString string
+ StringToSign string
+ PreSigned bool
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go
new file mode 100644
index 000000000..ca2281b2e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go
@@ -0,0 +1,12183 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/encoding/httpbinding"
+ smithyxml "github.com/aws/smithy-go/encoding/xml"
+ "github.com/aws/smithy-go/middleware"
+ smithytime "github.com/aws/smithy-go/time"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
+ "strings"
+)
+
+type awsRestxml_serializeOpAbortMultipartUpload struct {
+}
+
+func (*awsRestxml_serializeOpAbortMultipartUpload) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpAbortMultipartUpload) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*AbortMultipartUploadInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=AbortMultipartUpload")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsAbortMultipartUploadInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsAbortMultipartUploadInput(v *AbortMultipartUploadInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.UploadId != nil {
+ encoder.SetQuery("uploadId").String(*v.UploadId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpCompleteMultipartUpload struct {
+}
+
+func (*awsRestxml_serializeOpCompleteMultipartUpload) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpCompleteMultipartUpload) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CompleteMultipartUploadInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=CompleteMultipartUpload")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsCompleteMultipartUploadInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.MultipartUpload != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "CompleteMultipartUpload",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentCompletedMultipartUpload(input.MultipartUpload, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsCompleteMultipartUploadInput(v *CompleteMultipartUploadInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.UploadId != nil {
+ encoder.SetQuery("uploadId").String(*v.UploadId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpCopyObject struct {
+}
+
+func (*awsRestxml_serializeOpCopyObject) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpCopyObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CopyObjectInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=CopyObject")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsCopyObjectInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsCopyObjectInput(v *CopyObjectInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if len(v.ACL) > 0 {
+ locationName := "X-Amz-Acl"
+ encoder.SetHeader(locationName).String(string(v.ACL))
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.BucketKeyEnabled {
+ locationName := "X-Amz-Server-Side-Encryption-Bucket-Key-Enabled"
+ encoder.SetHeader(locationName).Boolean(v.BucketKeyEnabled)
+ }
+
+ if v.CacheControl != nil && len(*v.CacheControl) > 0 {
+ locationName := "Cache-Control"
+ encoder.SetHeader(locationName).String(*v.CacheControl)
+ }
+
+ if v.ContentDisposition != nil && len(*v.ContentDisposition) > 0 {
+ locationName := "Content-Disposition"
+ encoder.SetHeader(locationName).String(*v.ContentDisposition)
+ }
+
+ if v.ContentEncoding != nil && len(*v.ContentEncoding) > 0 {
+ locationName := "Content-Encoding"
+ encoder.SetHeader(locationName).String(*v.ContentEncoding)
+ }
+
+ if v.ContentLanguage != nil && len(*v.ContentLanguage) > 0 {
+ locationName := "Content-Language"
+ encoder.SetHeader(locationName).String(*v.ContentLanguage)
+ }
+
+ if v.ContentType != nil && len(*v.ContentType) > 0 {
+ locationName := "Content-Type"
+ encoder.SetHeader(locationName).String(*v.ContentType)
+ }
+
+ if v.CopySource != nil && len(*v.CopySource) > 0 {
+ locationName := "X-Amz-Copy-Source"
+ encoder.SetHeader(locationName).String(*v.CopySource)
+ }
+
+ if v.CopySourceIfMatch != nil && len(*v.CopySourceIfMatch) > 0 {
+ locationName := "X-Amz-Copy-Source-If-Match"
+ encoder.SetHeader(locationName).String(*v.CopySourceIfMatch)
+ }
+
+ if v.CopySourceIfModifiedSince != nil {
+ locationName := "X-Amz-Copy-Source-If-Modified-Since"
+ encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.CopySourceIfModifiedSince))
+ }
+
+ if v.CopySourceIfNoneMatch != nil && len(*v.CopySourceIfNoneMatch) > 0 {
+ locationName := "X-Amz-Copy-Source-If-None-Match"
+ encoder.SetHeader(locationName).String(*v.CopySourceIfNoneMatch)
+ }
+
+ if v.CopySourceIfUnmodifiedSince != nil {
+ locationName := "X-Amz-Copy-Source-If-Unmodified-Since"
+ encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.CopySourceIfUnmodifiedSince))
+ }
+
+ if v.CopySourceSSECustomerAlgorithm != nil && len(*v.CopySourceSSECustomerAlgorithm) > 0 {
+ locationName := "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm"
+ encoder.SetHeader(locationName).String(*v.CopySourceSSECustomerAlgorithm)
+ }
+
+ if v.CopySourceSSECustomerKey != nil && len(*v.CopySourceSSECustomerKey) > 0 {
+ locationName := "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key"
+ encoder.SetHeader(locationName).String(*v.CopySourceSSECustomerKey)
+ }
+
+ if v.CopySourceSSECustomerKeyMD5 != nil && len(*v.CopySourceSSECustomerKeyMD5) > 0 {
+ locationName := "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5"
+ encoder.SetHeader(locationName).String(*v.CopySourceSSECustomerKeyMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.ExpectedSourceBucketOwner != nil && len(*v.ExpectedSourceBucketOwner) > 0 {
+ locationName := "X-Amz-Source-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedSourceBucketOwner)
+ }
+
+ if v.Expires != nil {
+ locationName := "Expires"
+ encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.Expires))
+ }
+
+ if v.GrantFullControl != nil && len(*v.GrantFullControl) > 0 {
+ locationName := "X-Amz-Grant-Full-Control"
+ encoder.SetHeader(locationName).String(*v.GrantFullControl)
+ }
+
+ if v.GrantRead != nil && len(*v.GrantRead) > 0 {
+ locationName := "X-Amz-Grant-Read"
+ encoder.SetHeader(locationName).String(*v.GrantRead)
+ }
+
+ if v.GrantReadACP != nil && len(*v.GrantReadACP) > 0 {
+ locationName := "X-Amz-Grant-Read-Acp"
+ encoder.SetHeader(locationName).String(*v.GrantReadACP)
+ }
+
+ if v.GrantWriteACP != nil && len(*v.GrantWriteACP) > 0 {
+ locationName := "X-Amz-Grant-Write-Acp"
+ encoder.SetHeader(locationName).String(*v.GrantWriteACP)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if v.Metadata != nil {
+ hv := encoder.Headers("X-Amz-Meta-")
+ for mapKey, mapVal := range v.Metadata {
+ if len(mapVal) > 0 {
+ hv.SetHeader(http.CanonicalHeaderKey(mapKey)).String(mapVal)
+ }
+ }
+ }
+
+ if len(v.MetadataDirective) > 0 {
+ locationName := "X-Amz-Metadata-Directive"
+ encoder.SetHeader(locationName).String(string(v.MetadataDirective))
+ }
+
+ if len(v.ObjectLockLegalHoldStatus) > 0 {
+ locationName := "X-Amz-Object-Lock-Legal-Hold"
+ encoder.SetHeader(locationName).String(string(v.ObjectLockLegalHoldStatus))
+ }
+
+ if len(v.ObjectLockMode) > 0 {
+ locationName := "X-Amz-Object-Lock-Mode"
+ encoder.SetHeader(locationName).String(string(v.ObjectLockMode))
+ }
+
+ if v.ObjectLockRetainUntilDate != nil {
+ locationName := "X-Amz-Object-Lock-Retain-Until-Date"
+ encoder.SetHeader(locationName).String(smithytime.FormatDateTime(*v.ObjectLockRetainUntilDate))
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if len(v.ServerSideEncryption) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption"
+ encoder.SetHeader(locationName).String(string(v.ServerSideEncryption))
+ }
+
+ if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm"
+ encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm)
+ }
+
+ if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKey)
+ }
+
+ if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5)
+ }
+
+ if v.SSEKMSEncryptionContext != nil && len(*v.SSEKMSEncryptionContext) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Context"
+ encoder.SetHeader(locationName).String(*v.SSEKMSEncryptionContext)
+ }
+
+ if v.SSEKMSKeyId != nil && len(*v.SSEKMSKeyId) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id"
+ encoder.SetHeader(locationName).String(*v.SSEKMSKeyId)
+ }
+
+ if len(v.StorageClass) > 0 {
+ locationName := "X-Amz-Storage-Class"
+ encoder.SetHeader(locationName).String(string(v.StorageClass))
+ }
+
+ if v.Tagging != nil && len(*v.Tagging) > 0 {
+ locationName := "X-Amz-Tagging"
+ encoder.SetHeader(locationName).String(*v.Tagging)
+ }
+
+ if len(v.TaggingDirective) > 0 {
+ locationName := "X-Amz-Tagging-Directive"
+ encoder.SetHeader(locationName).String(string(v.TaggingDirective))
+ }
+
+ if v.WebsiteRedirectLocation != nil && len(*v.WebsiteRedirectLocation) > 0 {
+ locationName := "X-Amz-Website-Redirect-Location"
+ encoder.SetHeader(locationName).String(*v.WebsiteRedirectLocation)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpCreateBucket struct {
+}
+
+func (*awsRestxml_serializeOpCreateBucket) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpCreateBucket) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateBucketInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsCreateBucketInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.CreateBucketConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "CreateBucketConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentCreateBucketConfiguration(input.CreateBucketConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsCreateBucketInput(v *CreateBucketInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if len(v.ACL) > 0 {
+ locationName := "X-Amz-Acl"
+ encoder.SetHeader(locationName).String(string(v.ACL))
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.GrantFullControl != nil && len(*v.GrantFullControl) > 0 {
+ locationName := "X-Amz-Grant-Full-Control"
+ encoder.SetHeader(locationName).String(*v.GrantFullControl)
+ }
+
+ if v.GrantRead != nil && len(*v.GrantRead) > 0 {
+ locationName := "X-Amz-Grant-Read"
+ encoder.SetHeader(locationName).String(*v.GrantRead)
+ }
+
+ if v.GrantReadACP != nil && len(*v.GrantReadACP) > 0 {
+ locationName := "X-Amz-Grant-Read-Acp"
+ encoder.SetHeader(locationName).String(*v.GrantReadACP)
+ }
+
+ if v.GrantWrite != nil && len(*v.GrantWrite) > 0 {
+ locationName := "X-Amz-Grant-Write"
+ encoder.SetHeader(locationName).String(*v.GrantWrite)
+ }
+
+ if v.GrantWriteACP != nil && len(*v.GrantWriteACP) > 0 {
+ locationName := "X-Amz-Grant-Write-Acp"
+ encoder.SetHeader(locationName).String(*v.GrantWriteACP)
+ }
+
+ if v.ObjectLockEnabledForBucket {
+ locationName := "X-Amz-Bucket-Object-Lock-Enabled"
+ encoder.SetHeader(locationName).Boolean(v.ObjectLockEnabledForBucket)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpCreateMultipartUpload struct {
+}
+
+func (*awsRestxml_serializeOpCreateMultipartUpload) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpCreateMultipartUpload) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateMultipartUploadInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?uploads&x-id=CreateMultipartUpload")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsCreateMultipartUploadInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsCreateMultipartUploadInput(v *CreateMultipartUploadInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if len(v.ACL) > 0 {
+ locationName := "X-Amz-Acl"
+ encoder.SetHeader(locationName).String(string(v.ACL))
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.BucketKeyEnabled {
+ locationName := "X-Amz-Server-Side-Encryption-Bucket-Key-Enabled"
+ encoder.SetHeader(locationName).Boolean(v.BucketKeyEnabled)
+ }
+
+ if v.CacheControl != nil && len(*v.CacheControl) > 0 {
+ locationName := "Cache-Control"
+ encoder.SetHeader(locationName).String(*v.CacheControl)
+ }
+
+ if v.ContentDisposition != nil && len(*v.ContentDisposition) > 0 {
+ locationName := "Content-Disposition"
+ encoder.SetHeader(locationName).String(*v.ContentDisposition)
+ }
+
+ if v.ContentEncoding != nil && len(*v.ContentEncoding) > 0 {
+ locationName := "Content-Encoding"
+ encoder.SetHeader(locationName).String(*v.ContentEncoding)
+ }
+
+ if v.ContentLanguage != nil && len(*v.ContentLanguage) > 0 {
+ locationName := "Content-Language"
+ encoder.SetHeader(locationName).String(*v.ContentLanguage)
+ }
+
+ if v.ContentType != nil && len(*v.ContentType) > 0 {
+ locationName := "Content-Type"
+ encoder.SetHeader(locationName).String(*v.ContentType)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Expires != nil {
+ locationName := "Expires"
+ encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.Expires))
+ }
+
+ if v.GrantFullControl != nil && len(*v.GrantFullControl) > 0 {
+ locationName := "X-Amz-Grant-Full-Control"
+ encoder.SetHeader(locationName).String(*v.GrantFullControl)
+ }
+
+ if v.GrantRead != nil && len(*v.GrantRead) > 0 {
+ locationName := "X-Amz-Grant-Read"
+ encoder.SetHeader(locationName).String(*v.GrantRead)
+ }
+
+ if v.GrantReadACP != nil && len(*v.GrantReadACP) > 0 {
+ locationName := "X-Amz-Grant-Read-Acp"
+ encoder.SetHeader(locationName).String(*v.GrantReadACP)
+ }
+
+ if v.GrantWriteACP != nil && len(*v.GrantWriteACP) > 0 {
+ locationName := "X-Amz-Grant-Write-Acp"
+ encoder.SetHeader(locationName).String(*v.GrantWriteACP)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if v.Metadata != nil {
+ hv := encoder.Headers("X-Amz-Meta-")
+ for mapKey, mapVal := range v.Metadata {
+ if len(mapVal) > 0 {
+ hv.SetHeader(http.CanonicalHeaderKey(mapKey)).String(mapVal)
+ }
+ }
+ }
+
+ if len(v.ObjectLockLegalHoldStatus) > 0 {
+ locationName := "X-Amz-Object-Lock-Legal-Hold"
+ encoder.SetHeader(locationName).String(string(v.ObjectLockLegalHoldStatus))
+ }
+
+ if len(v.ObjectLockMode) > 0 {
+ locationName := "X-Amz-Object-Lock-Mode"
+ encoder.SetHeader(locationName).String(string(v.ObjectLockMode))
+ }
+
+ if v.ObjectLockRetainUntilDate != nil {
+ locationName := "X-Amz-Object-Lock-Retain-Until-Date"
+ encoder.SetHeader(locationName).String(smithytime.FormatDateTime(*v.ObjectLockRetainUntilDate))
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if len(v.ServerSideEncryption) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption"
+ encoder.SetHeader(locationName).String(string(v.ServerSideEncryption))
+ }
+
+ if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm"
+ encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm)
+ }
+
+ if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKey)
+ }
+
+ if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5)
+ }
+
+ if v.SSEKMSEncryptionContext != nil && len(*v.SSEKMSEncryptionContext) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Context"
+ encoder.SetHeader(locationName).String(*v.SSEKMSEncryptionContext)
+ }
+
+ if v.SSEKMSKeyId != nil && len(*v.SSEKMSKeyId) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id"
+ encoder.SetHeader(locationName).String(*v.SSEKMSKeyId)
+ }
+
+ if len(v.StorageClass) > 0 {
+ locationName := "X-Amz-Storage-Class"
+ encoder.SetHeader(locationName).String(string(v.StorageClass))
+ }
+
+ if v.Tagging != nil && len(*v.Tagging) > 0 {
+ locationName := "X-Amz-Tagging"
+ encoder.SetHeader(locationName).String(*v.Tagging)
+ }
+
+ if v.WebsiteRedirectLocation != nil && len(*v.WebsiteRedirectLocation) > 0 {
+ locationName := "X-Amz-Website-Redirect-Location"
+ encoder.SetHeader(locationName).String(*v.WebsiteRedirectLocation)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteBucket struct {
+}
+
+func (*awsRestxml_serializeOpDeleteBucket) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteBucket) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteBucketInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteBucketInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteBucketInput(v *DeleteBucketInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteBucketAnalyticsConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpDeleteBucketAnalyticsConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteBucketAnalyticsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteBucketAnalyticsConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?analytics")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteBucketAnalyticsConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteBucketAnalyticsConfigurationInput(v *DeleteBucketAnalyticsConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Id != nil {
+ encoder.SetQuery("id").String(*v.Id)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteBucketCors struct {
+}
+
+func (*awsRestxml_serializeOpDeleteBucketCors) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteBucketCors) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteBucketCorsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?cors")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteBucketCorsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteBucketCorsInput(v *DeleteBucketCorsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteBucketEncryption struct {
+}
+
+func (*awsRestxml_serializeOpDeleteBucketEncryption) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteBucketEncryption) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteBucketEncryptionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?encryption")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteBucketEncryptionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteBucketEncryptionInput(v *DeleteBucketEncryptionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteBucketIntelligentTieringConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpDeleteBucketIntelligentTieringConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteBucketIntelligentTieringConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteBucketIntelligentTieringConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?intelligent-tiering")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteBucketIntelligentTieringConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteBucketIntelligentTieringConfigurationInput(v *DeleteBucketIntelligentTieringConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.Id != nil {
+ encoder.SetQuery("id").String(*v.Id)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteBucketInventoryConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpDeleteBucketInventoryConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteBucketInventoryConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteBucketInventoryConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?inventory")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteBucketInventoryConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteBucketInventoryConfigurationInput(v *DeleteBucketInventoryConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Id != nil {
+ encoder.SetQuery("id").String(*v.Id)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteBucketLifecycle struct {
+}
+
+func (*awsRestxml_serializeOpDeleteBucketLifecycle) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteBucketLifecycle) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteBucketLifecycleInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?lifecycle")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteBucketLifecycleInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteBucketLifecycleInput(v *DeleteBucketLifecycleInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteBucketMetricsConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpDeleteBucketMetricsConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteBucketMetricsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteBucketMetricsConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?metrics")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteBucketMetricsConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteBucketMetricsConfigurationInput(v *DeleteBucketMetricsConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Id != nil {
+ encoder.SetQuery("id").String(*v.Id)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteBucketOwnershipControls struct {
+}
+
+func (*awsRestxml_serializeOpDeleteBucketOwnershipControls) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteBucketOwnershipControls) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteBucketOwnershipControlsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?ownershipControls")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteBucketOwnershipControlsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteBucketOwnershipControlsInput(v *DeleteBucketOwnershipControlsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteBucketPolicy struct {
+}
+
+func (*awsRestxml_serializeOpDeleteBucketPolicy) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteBucketPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteBucketPolicyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?policy")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteBucketPolicyInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteBucketPolicyInput(v *DeleteBucketPolicyInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteBucketReplication struct {
+}
+
+func (*awsRestxml_serializeOpDeleteBucketReplication) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteBucketReplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteBucketReplicationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?replication")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteBucketReplicationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteBucketReplicationInput(v *DeleteBucketReplicationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteBucketTagging struct {
+}
+
+func (*awsRestxml_serializeOpDeleteBucketTagging) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteBucketTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteBucketTaggingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?tagging")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteBucketTaggingInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteBucketTaggingInput(v *DeleteBucketTaggingInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteBucketWebsite struct {
+}
+
+func (*awsRestxml_serializeOpDeleteBucketWebsite) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteBucketWebsite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteBucketWebsiteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?website")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteBucketWebsiteInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteBucketWebsiteInput(v *DeleteBucketWebsiteInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteObject struct {
+}
+
+func (*awsRestxml_serializeOpDeleteObject) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteObjectInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=DeleteObject")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteObjectInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteObjectInput(v *DeleteObjectInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.BypassGovernanceRetention {
+ locationName := "X-Amz-Bypass-Governance-Retention"
+ encoder.SetHeader(locationName).Boolean(v.BypassGovernanceRetention)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if v.MFA != nil && len(*v.MFA) > 0 {
+ locationName := "X-Amz-Mfa"
+ encoder.SetHeader(locationName).String(*v.MFA)
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.VersionId != nil {
+ encoder.SetQuery("versionId").String(*v.VersionId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteObjects struct {
+}
+
+func (*awsRestxml_serializeOpDeleteObjects) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteObjects) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteObjectsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?delete&x-id=DeleteObjects")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteObjectsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.Delete != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Delete",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentDelete(input.Delete, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteObjectsInput(v *DeleteObjectsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.BypassGovernanceRetention {
+ locationName := "X-Amz-Bypass-Governance-Retention"
+ encoder.SetHeader(locationName).Boolean(v.BypassGovernanceRetention)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.MFA != nil && len(*v.MFA) > 0 {
+ locationName := "X-Amz-Mfa"
+ encoder.SetHeader(locationName).String(*v.MFA)
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeleteObjectTagging struct {
+}
+
+func (*awsRestxml_serializeOpDeleteObjectTagging) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteObjectTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteObjectTaggingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?tagging")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteObjectTaggingInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteObjectTaggingInput(v *DeleteObjectTaggingInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if v.VersionId != nil {
+ encoder.SetQuery("versionId").String(*v.VersionId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpDeletePublicAccessBlock struct {
+}
+
+func (*awsRestxml_serializeOpDeletePublicAccessBlock) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeletePublicAccessBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeletePublicAccessBlockInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?publicAccessBlock")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeletePublicAccessBlockInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeletePublicAccessBlockInput(v *DeletePublicAccessBlockInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketAccelerateConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketAccelerateConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketAccelerateConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketAccelerateConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?accelerate")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketAccelerateConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketAccelerateConfigurationInput(v *GetBucketAccelerateConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketAcl struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketAcl) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketAcl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketAclInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?acl")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketAclInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketAclInput(v *GetBucketAclInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketAnalyticsConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketAnalyticsConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketAnalyticsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketAnalyticsConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketAnalyticsConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketAnalyticsConfigurationInput(v *GetBucketAnalyticsConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Id != nil {
+ encoder.SetQuery("id").String(*v.Id)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketCors struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketCors) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketCors) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketCorsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?cors")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketCorsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketCorsInput(v *GetBucketCorsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketEncryption struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketEncryption) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketEncryption) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketEncryptionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?encryption")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketEncryptionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketEncryptionInput(v *GetBucketEncryptionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketIntelligentTieringConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketIntelligentTieringConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketIntelligentTieringConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketIntelligentTieringConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketIntelligentTieringConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketIntelligentTieringConfigurationInput(v *GetBucketIntelligentTieringConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.Id != nil {
+ encoder.SetQuery("id").String(*v.Id)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketInventoryConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketInventoryConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketInventoryConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketInventoryConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketInventoryConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketInventoryConfigurationInput(v *GetBucketInventoryConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Id != nil {
+ encoder.SetQuery("id").String(*v.Id)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketLifecycleConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketLifecycleConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketLifecycleConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketLifecycleConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?lifecycle")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketLifecycleConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketLifecycleConfigurationInput(v *GetBucketLifecycleConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketLocation struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketLocation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketLocation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketLocationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?location")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketLocationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketLocationInput(v *GetBucketLocationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketLogging struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketLogging) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketLogging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketLoggingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?logging")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketLoggingInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketLoggingInput(v *GetBucketLoggingInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketMetricsConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketMetricsConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketMetricsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketMetricsConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketMetricsConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketMetricsConfigurationInput(v *GetBucketMetricsConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Id != nil {
+ encoder.SetQuery("id").String(*v.Id)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketNotificationConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketNotificationConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketNotificationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketNotificationConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?notification")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketNotificationConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketNotificationConfigurationInput(v *GetBucketNotificationConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketOwnershipControls struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketOwnershipControls) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketOwnershipControls) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketOwnershipControlsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?ownershipControls")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketOwnershipControlsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketOwnershipControlsInput(v *GetBucketOwnershipControlsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketPolicy struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketPolicy) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketPolicyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?policy")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketPolicyInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketPolicyInput(v *GetBucketPolicyInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketPolicyStatus struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketPolicyStatus) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketPolicyStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketPolicyStatusInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?policyStatus")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketPolicyStatusInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketPolicyStatusInput(v *GetBucketPolicyStatusInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketReplication struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketReplication) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketReplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketReplicationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?replication")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketReplicationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketReplicationInput(v *GetBucketReplicationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketRequestPayment struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketRequestPayment) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketRequestPayment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketRequestPaymentInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?requestPayment")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketRequestPaymentInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketRequestPaymentInput(v *GetBucketRequestPaymentInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketTagging struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketTagging) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketTaggingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?tagging")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketTaggingInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketTaggingInput(v *GetBucketTaggingInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketVersioning struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketVersioning) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketVersioning) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketVersioningInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?versioning")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketVersioningInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketVersioningInput(v *GetBucketVersioningInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetBucketWebsite struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketWebsite) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketWebsite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketWebsiteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?website")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketWebsiteInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketWebsiteInput(v *GetBucketWebsiteInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetObject struct {
+}
+
+func (*awsRestxml_serializeOpGetObject) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetObjectInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=GetObject")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetObjectInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetObjectInput(v *GetObjectInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.IfMatch != nil && len(*v.IfMatch) > 0 {
+ locationName := "If-Match"
+ encoder.SetHeader(locationName).String(*v.IfMatch)
+ }
+
+ if v.IfModifiedSince != nil {
+ locationName := "If-Modified-Since"
+ encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.IfModifiedSince))
+ }
+
+ if v.IfNoneMatch != nil && len(*v.IfNoneMatch) > 0 {
+ locationName := "If-None-Match"
+ encoder.SetHeader(locationName).String(*v.IfNoneMatch)
+ }
+
+ if v.IfUnmodifiedSince != nil {
+ locationName := "If-Unmodified-Since"
+ encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.IfUnmodifiedSince))
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if v.PartNumber != 0 {
+ encoder.SetQuery("partNumber").Integer(v.PartNumber)
+ }
+
+ if v.Range != nil && len(*v.Range) > 0 {
+ locationName := "Range"
+ encoder.SetHeader(locationName).String(*v.Range)
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.ResponseCacheControl != nil {
+ encoder.SetQuery("response-cache-control").String(*v.ResponseCacheControl)
+ }
+
+ if v.ResponseContentDisposition != nil {
+ encoder.SetQuery("response-content-disposition").String(*v.ResponseContentDisposition)
+ }
+
+ if v.ResponseContentEncoding != nil {
+ encoder.SetQuery("response-content-encoding").String(*v.ResponseContentEncoding)
+ }
+
+ if v.ResponseContentLanguage != nil {
+ encoder.SetQuery("response-content-language").String(*v.ResponseContentLanguage)
+ }
+
+ if v.ResponseContentType != nil {
+ encoder.SetQuery("response-content-type").String(*v.ResponseContentType)
+ }
+
+ if v.ResponseExpires != nil {
+ encoder.SetQuery("response-expires").String(smithytime.FormatHTTPDate(*v.ResponseExpires))
+ }
+
+ if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm"
+ encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm)
+ }
+
+ if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKey)
+ }
+
+ if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5)
+ }
+
+ if v.VersionId != nil {
+ encoder.SetQuery("versionId").String(*v.VersionId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetObjectAcl struct {
+}
+
+func (*awsRestxml_serializeOpGetObjectAcl) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetObjectAcl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetObjectAclInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?acl")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetObjectAclInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetObjectAclInput(v *GetObjectAclInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.VersionId != nil {
+ encoder.SetQuery("versionId").String(*v.VersionId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetObjectLegalHold struct {
+}
+
+func (*awsRestxml_serializeOpGetObjectLegalHold) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetObjectLegalHold) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetObjectLegalHoldInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?legal-hold")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetObjectLegalHoldInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetObjectLegalHoldInput(v *GetObjectLegalHoldInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.VersionId != nil {
+ encoder.SetQuery("versionId").String(*v.VersionId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetObjectLockConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpGetObjectLockConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetObjectLockConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetObjectLockConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?object-lock")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetObjectLockConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetObjectLockConfigurationInput(v *GetObjectLockConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetObjectRetention struct {
+}
+
+func (*awsRestxml_serializeOpGetObjectRetention) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetObjectRetention) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetObjectRetentionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?retention")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetObjectRetentionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetObjectRetentionInput(v *GetObjectRetentionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.VersionId != nil {
+ encoder.SetQuery("versionId").String(*v.VersionId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetObjectTagging struct {
+}
+
+func (*awsRestxml_serializeOpGetObjectTagging) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetObjectTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetObjectTaggingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?tagging")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetObjectTaggingInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetObjectTaggingInput(v *GetObjectTaggingInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.VersionId != nil {
+ encoder.SetQuery("versionId").String(*v.VersionId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetObjectTorrent struct {
+}
+
+func (*awsRestxml_serializeOpGetObjectTorrent) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetObjectTorrent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetObjectTorrentInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?torrent")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetObjectTorrentInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetObjectTorrentInput(v *GetObjectTorrentInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpGetPublicAccessBlock struct {
+}
+
+func (*awsRestxml_serializeOpGetPublicAccessBlock) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetPublicAccessBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetPublicAccessBlockInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?publicAccessBlock")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetPublicAccessBlockInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetPublicAccessBlockInput(v *GetPublicAccessBlockInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpHeadBucket struct {
+}
+
+func (*awsRestxml_serializeOpHeadBucket) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpHeadBucket) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*HeadBucketInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "HEAD"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsHeadBucketInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsHeadBucketInput(v *HeadBucketInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpHeadObject struct {
+}
+
+func (*awsRestxml_serializeOpHeadObject) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpHeadObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*HeadObjectInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "HEAD"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsHeadObjectInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsHeadObjectInput(v *HeadObjectInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.IfMatch != nil && len(*v.IfMatch) > 0 {
+ locationName := "If-Match"
+ encoder.SetHeader(locationName).String(*v.IfMatch)
+ }
+
+ if v.IfModifiedSince != nil {
+ locationName := "If-Modified-Since"
+ encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.IfModifiedSince))
+ }
+
+ if v.IfNoneMatch != nil && len(*v.IfNoneMatch) > 0 {
+ locationName := "If-None-Match"
+ encoder.SetHeader(locationName).String(*v.IfNoneMatch)
+ }
+
+ if v.IfUnmodifiedSince != nil {
+ locationName := "If-Unmodified-Since"
+ encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.IfUnmodifiedSince))
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if v.PartNumber != 0 {
+ encoder.SetQuery("partNumber").Integer(v.PartNumber)
+ }
+
+ if v.Range != nil && len(*v.Range) > 0 {
+ locationName := "Range"
+ encoder.SetHeader(locationName).String(*v.Range)
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm"
+ encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm)
+ }
+
+ if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKey)
+ }
+
+ if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5)
+ }
+
+ if v.VersionId != nil {
+ encoder.SetQuery("versionId").String(*v.VersionId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpListBucketAnalyticsConfigurations struct {
+}
+
+func (*awsRestxml_serializeOpListBucketAnalyticsConfigurations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpListBucketAnalyticsConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListBucketAnalyticsConfigurationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsListBucketAnalyticsConfigurationsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsListBucketAnalyticsConfigurationsInput(v *ListBucketAnalyticsConfigurationsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContinuationToken != nil {
+ encoder.SetQuery("continuation-token").String(*v.ContinuationToken)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpListBucketIntelligentTieringConfigurations struct {
+}
+
+func (*awsRestxml_serializeOpListBucketIntelligentTieringConfigurations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpListBucketIntelligentTieringConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListBucketIntelligentTieringConfigurationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsListBucketIntelligentTieringConfigurationsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsListBucketIntelligentTieringConfigurationsInput(v *ListBucketIntelligentTieringConfigurationsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContinuationToken != nil {
+ encoder.SetQuery("continuation-token").String(*v.ContinuationToken)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpListBucketInventoryConfigurations struct {
+}
+
+func (*awsRestxml_serializeOpListBucketInventoryConfigurations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpListBucketInventoryConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListBucketInventoryConfigurationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsListBucketInventoryConfigurationsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsListBucketInventoryConfigurationsInput(v *ListBucketInventoryConfigurationsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContinuationToken != nil {
+ encoder.SetQuery("continuation-token").String(*v.ContinuationToken)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpListBucketMetricsConfigurations struct {
+}
+
+func (*awsRestxml_serializeOpListBucketMetricsConfigurations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpListBucketMetricsConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListBucketMetricsConfigurationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsListBucketMetricsConfigurationsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsListBucketMetricsConfigurationsInput(v *ListBucketMetricsConfigurationsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContinuationToken != nil {
+ encoder.SetQuery("continuation-token").String(*v.ContinuationToken)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpListBuckets struct {
+}
+
+func (*awsRestxml_serializeOpListBuckets) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpListBuckets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListBucketsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsListBucketsInput(v *ListBucketsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpListMultipartUploads struct {
+}
+
+func (*awsRestxml_serializeOpListMultipartUploads) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpListMultipartUploads) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListMultipartUploadsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?uploads")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsListMultipartUploadsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsListMultipartUploadsInput(v *ListMultipartUploadsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.Delimiter != nil {
+ encoder.SetQuery("delimiter").String(*v.Delimiter)
+ }
+
+ if len(v.EncodingType) > 0 {
+ encoder.SetQuery("encoding-type").String(string(v.EncodingType))
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.KeyMarker != nil {
+ encoder.SetQuery("key-marker").String(*v.KeyMarker)
+ }
+
+ if v.MaxUploads != 0 {
+ encoder.SetQuery("max-uploads").Integer(v.MaxUploads)
+ }
+
+ if v.Prefix != nil {
+ encoder.SetQuery("prefix").String(*v.Prefix)
+ }
+
+ if v.UploadIdMarker != nil {
+ encoder.SetQuery("upload-id-marker").String(*v.UploadIdMarker)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpListObjects struct {
+}
+
+func (*awsRestxml_serializeOpListObjects) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpListObjects) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListObjectsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsListObjectsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsListObjectsInput(v *ListObjectsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.Delimiter != nil {
+ encoder.SetQuery("delimiter").String(*v.Delimiter)
+ }
+
+ if len(v.EncodingType) > 0 {
+ encoder.SetQuery("encoding-type").String(string(v.EncodingType))
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Marker != nil {
+ encoder.SetQuery("marker").String(*v.Marker)
+ }
+
+ if v.MaxKeys != 0 {
+ encoder.SetQuery("max-keys").Integer(v.MaxKeys)
+ }
+
+ if v.Prefix != nil {
+ encoder.SetQuery("prefix").String(*v.Prefix)
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpListObjectsV2 struct {
+}
+
+func (*awsRestxml_serializeOpListObjectsV2) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpListObjectsV2) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListObjectsV2Input)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?list-type=2")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsListObjectsV2Input(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsListObjectsV2Input(v *ListObjectsV2Input, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContinuationToken != nil {
+ encoder.SetQuery("continuation-token").String(*v.ContinuationToken)
+ }
+
+ if v.Delimiter != nil {
+ encoder.SetQuery("delimiter").String(*v.Delimiter)
+ }
+
+ if len(v.EncodingType) > 0 {
+ encoder.SetQuery("encoding-type").String(string(v.EncodingType))
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.FetchOwner {
+ encoder.SetQuery("fetch-owner").Boolean(v.FetchOwner)
+ }
+
+ if v.MaxKeys != 0 {
+ encoder.SetQuery("max-keys").Integer(v.MaxKeys)
+ }
+
+ if v.Prefix != nil {
+ encoder.SetQuery("prefix").String(*v.Prefix)
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.StartAfter != nil {
+ encoder.SetQuery("start-after").String(*v.StartAfter)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpListObjectVersions struct {
+}
+
+func (*awsRestxml_serializeOpListObjectVersions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpListObjectVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListObjectVersionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?versions")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsListObjectVersionsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsListObjectVersionsInput(v *ListObjectVersionsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.Delimiter != nil {
+ encoder.SetQuery("delimiter").String(*v.Delimiter)
+ }
+
+ if len(v.EncodingType) > 0 {
+ encoder.SetQuery("encoding-type").String(string(v.EncodingType))
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.KeyMarker != nil {
+ encoder.SetQuery("key-marker").String(*v.KeyMarker)
+ }
+
+ if v.MaxKeys != 0 {
+ encoder.SetQuery("max-keys").Integer(v.MaxKeys)
+ }
+
+ if v.Prefix != nil {
+ encoder.SetQuery("prefix").String(*v.Prefix)
+ }
+
+ if v.VersionIdMarker != nil {
+ encoder.SetQuery("version-id-marker").String(*v.VersionIdMarker)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpListParts struct {
+}
+
+func (*awsRestxml_serializeOpListParts) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpListParts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListPartsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=ListParts")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsListPartsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsListPartsInput(v *ListPartsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxParts != 0 {
+ encoder.SetQuery("max-parts").Integer(v.MaxParts)
+ }
+
+ if v.PartNumberMarker != nil {
+ encoder.SetQuery("part-number-marker").String(*v.PartNumberMarker)
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.UploadId != nil {
+ encoder.SetQuery("uploadId").String(*v.UploadId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketAccelerateConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketAccelerateConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketAccelerateConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketAccelerateConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?accelerate")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketAccelerateConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.AccelerateConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AccelerateConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentAccelerateConfiguration(input.AccelerateConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketAccelerateConfigurationInput(v *PutBucketAccelerateConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketAcl struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketAcl) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketAcl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketAclInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?acl")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketAclInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.AccessControlPolicy != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AccessControlPolicy",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentAccessControlPolicy(input.AccessControlPolicy, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketAclInput(v *PutBucketAclInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if len(v.ACL) > 0 {
+ locationName := "X-Amz-Acl"
+ encoder.SetHeader(locationName).String(string(v.ACL))
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.GrantFullControl != nil && len(*v.GrantFullControl) > 0 {
+ locationName := "X-Amz-Grant-Full-Control"
+ encoder.SetHeader(locationName).String(*v.GrantFullControl)
+ }
+
+ if v.GrantRead != nil && len(*v.GrantRead) > 0 {
+ locationName := "X-Amz-Grant-Read"
+ encoder.SetHeader(locationName).String(*v.GrantRead)
+ }
+
+ if v.GrantReadACP != nil && len(*v.GrantReadACP) > 0 {
+ locationName := "X-Amz-Grant-Read-Acp"
+ encoder.SetHeader(locationName).String(*v.GrantReadACP)
+ }
+
+ if v.GrantWrite != nil && len(*v.GrantWrite) > 0 {
+ locationName := "X-Amz-Grant-Write"
+ encoder.SetHeader(locationName).String(*v.GrantWrite)
+ }
+
+ if v.GrantWriteACP != nil && len(*v.GrantWriteACP) > 0 {
+ locationName := "X-Amz-Grant-Write-Acp"
+ encoder.SetHeader(locationName).String(*v.GrantWriteACP)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketAnalyticsConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketAnalyticsConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketAnalyticsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketAnalyticsConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?analytics")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketAnalyticsConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.AnalyticsConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AnalyticsConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentAnalyticsConfiguration(input.AnalyticsConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketAnalyticsConfigurationInput(v *PutBucketAnalyticsConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Id != nil {
+ encoder.SetQuery("id").String(*v.Id)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketCors struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketCors) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketCors) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketCorsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?cors")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketCorsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.CORSConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "CORSConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentCORSConfiguration(input.CORSConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketCorsInput(v *PutBucketCorsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketEncryption struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketEncryption) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketEncryption) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketEncryptionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?encryption")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketEncryptionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.ServerSideEncryptionConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ServerSideEncryptionConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentServerSideEncryptionConfiguration(input.ServerSideEncryptionConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketEncryptionInput(v *PutBucketEncryptionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketIntelligentTieringConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketIntelligentTieringConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketIntelligentTieringConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketIntelligentTieringConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?intelligent-tiering")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketIntelligentTieringConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.IntelligentTieringConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "IntelligentTieringConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentIntelligentTieringConfiguration(input.IntelligentTieringConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketIntelligentTieringConfigurationInput(v *PutBucketIntelligentTieringConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.Id != nil {
+ encoder.SetQuery("id").String(*v.Id)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketInventoryConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketInventoryConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketInventoryConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketInventoryConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?inventory")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketInventoryConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.InventoryConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "InventoryConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentInventoryConfiguration(input.InventoryConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketInventoryConfigurationInput(v *PutBucketInventoryConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Id != nil {
+ encoder.SetQuery("id").String(*v.Id)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketLifecycleConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketLifecycleConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketLifecycleConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketLifecycleConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?lifecycle")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketLifecycleConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.LifecycleConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "LifecycleConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentBucketLifecycleConfiguration(input.LifecycleConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketLifecycleConfigurationInput(v *PutBucketLifecycleConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketLogging struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketLogging) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketLogging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketLoggingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?logging")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketLoggingInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.BucketLoggingStatus != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "BucketLoggingStatus",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentBucketLoggingStatus(input.BucketLoggingStatus, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketLoggingInput(v *PutBucketLoggingInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketMetricsConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketMetricsConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketMetricsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketMetricsConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?metrics")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketMetricsConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.MetricsConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "MetricsConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentMetricsConfiguration(input.MetricsConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketMetricsConfigurationInput(v *PutBucketMetricsConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Id != nil {
+ encoder.SetQuery("id").String(*v.Id)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketNotificationConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketNotificationConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketNotificationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketNotificationConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?notification")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketNotificationConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.NotificationConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "NotificationConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentNotificationConfiguration(input.NotificationConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketNotificationConfigurationInput(v *PutBucketNotificationConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketOwnershipControls struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketOwnershipControls) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketOwnershipControls) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketOwnershipControlsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?ownershipControls")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketOwnershipControlsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.OwnershipControls != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "OwnershipControls",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentOwnershipControls(input.OwnershipControls, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketOwnershipControlsInput(v *PutBucketOwnershipControlsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketPolicy struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketPolicy) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketPolicyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?policy")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketPolicyInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.Policy != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("text/plain")
+ }
+
+ payload := strings.NewReader(*input.Policy)
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketPolicyInput(v *PutBucketPolicyInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ConfirmRemoveSelfBucketAccess {
+ locationName := "X-Amz-Confirm-Remove-Self-Bucket-Access"
+ encoder.SetHeader(locationName).Boolean(v.ConfirmRemoveSelfBucketAccess)
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketReplication struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketReplication) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketReplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketReplicationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?replication")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketReplicationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.ReplicationConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ReplicationConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentReplicationConfiguration(input.ReplicationConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketReplicationInput(v *PutBucketReplicationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Token != nil && len(*v.Token) > 0 {
+ locationName := "X-Amz-Bucket-Object-Lock-Token"
+ encoder.SetHeader(locationName).String(*v.Token)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketRequestPayment struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketRequestPayment) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketRequestPayment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketRequestPaymentInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?requestPayment")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketRequestPaymentInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.RequestPaymentConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "RequestPaymentConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentRequestPaymentConfiguration(input.RequestPaymentConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketRequestPaymentInput(v *PutBucketRequestPaymentInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketTagging struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketTagging) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketTaggingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?tagging")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketTaggingInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.Tagging != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tagging",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentTagging(input.Tagging, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketTaggingInput(v *PutBucketTaggingInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketVersioning struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketVersioning) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketVersioning) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketVersioningInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?versioning")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketVersioningInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.VersioningConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "VersioningConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentVersioningConfiguration(input.VersioningConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketVersioningInput(v *PutBucketVersioningInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.MFA != nil && len(*v.MFA) > 0 {
+ locationName := "X-Amz-Mfa"
+ encoder.SetHeader(locationName).String(*v.MFA)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutBucketWebsite struct {
+}
+
+func (*awsRestxml_serializeOpPutBucketWebsite) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutBucketWebsite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutBucketWebsiteInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?website")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutBucketWebsiteInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.WebsiteConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "WebsiteConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentWebsiteConfiguration(input.WebsiteConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutBucketWebsiteInput(v *PutBucketWebsiteInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutObject struct {
+}
+
+func (*awsRestxml_serializeOpPutObject) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutObjectInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=PutObject")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutObjectInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.Body != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/octet-stream")
+ }
+
+ payload := input.Body
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutObjectInput(v *PutObjectInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if len(v.ACL) > 0 {
+ locationName := "X-Amz-Acl"
+ encoder.SetHeader(locationName).String(string(v.ACL))
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.BucketKeyEnabled {
+ locationName := "X-Amz-Server-Side-Encryption-Bucket-Key-Enabled"
+ encoder.SetHeader(locationName).Boolean(v.BucketKeyEnabled)
+ }
+
+ if v.CacheControl != nil && len(*v.CacheControl) > 0 {
+ locationName := "Cache-Control"
+ encoder.SetHeader(locationName).String(*v.CacheControl)
+ }
+
+ if v.ContentDisposition != nil && len(*v.ContentDisposition) > 0 {
+ locationName := "Content-Disposition"
+ encoder.SetHeader(locationName).String(*v.ContentDisposition)
+ }
+
+ if v.ContentEncoding != nil && len(*v.ContentEncoding) > 0 {
+ locationName := "Content-Encoding"
+ encoder.SetHeader(locationName).String(*v.ContentEncoding)
+ }
+
+ if v.ContentLanguage != nil && len(*v.ContentLanguage) > 0 {
+ locationName := "Content-Language"
+ encoder.SetHeader(locationName).String(*v.ContentLanguage)
+ }
+
+ if v.ContentLength != 0 {
+ locationName := "Content-Length"
+ encoder.SetHeader(locationName).Long(v.ContentLength)
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ContentType != nil && len(*v.ContentType) > 0 {
+ locationName := "Content-Type"
+ encoder.SetHeader(locationName).String(*v.ContentType)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Expires != nil {
+ locationName := "Expires"
+ encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.Expires))
+ }
+
+ if v.GrantFullControl != nil && len(*v.GrantFullControl) > 0 {
+ locationName := "X-Amz-Grant-Full-Control"
+ encoder.SetHeader(locationName).String(*v.GrantFullControl)
+ }
+
+ if v.GrantRead != nil && len(*v.GrantRead) > 0 {
+ locationName := "X-Amz-Grant-Read"
+ encoder.SetHeader(locationName).String(*v.GrantRead)
+ }
+
+ if v.GrantReadACP != nil && len(*v.GrantReadACP) > 0 {
+ locationName := "X-Amz-Grant-Read-Acp"
+ encoder.SetHeader(locationName).String(*v.GrantReadACP)
+ }
+
+ if v.GrantWriteACP != nil && len(*v.GrantWriteACP) > 0 {
+ locationName := "X-Amz-Grant-Write-Acp"
+ encoder.SetHeader(locationName).String(*v.GrantWriteACP)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if v.Metadata != nil {
+ hv := encoder.Headers("X-Amz-Meta-")
+ for mapKey, mapVal := range v.Metadata {
+ if len(mapVal) > 0 {
+ hv.SetHeader(http.CanonicalHeaderKey(mapKey)).String(mapVal)
+ }
+ }
+ }
+
+ if len(v.ObjectLockLegalHoldStatus) > 0 {
+ locationName := "X-Amz-Object-Lock-Legal-Hold"
+ encoder.SetHeader(locationName).String(string(v.ObjectLockLegalHoldStatus))
+ }
+
+ if len(v.ObjectLockMode) > 0 {
+ locationName := "X-Amz-Object-Lock-Mode"
+ encoder.SetHeader(locationName).String(string(v.ObjectLockMode))
+ }
+
+ if v.ObjectLockRetainUntilDate != nil {
+ locationName := "X-Amz-Object-Lock-Retain-Until-Date"
+ encoder.SetHeader(locationName).String(smithytime.FormatDateTime(*v.ObjectLockRetainUntilDate))
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if len(v.ServerSideEncryption) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption"
+ encoder.SetHeader(locationName).String(string(v.ServerSideEncryption))
+ }
+
+ if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm"
+ encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm)
+ }
+
+ if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKey)
+ }
+
+ if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5)
+ }
+
+ if v.SSEKMSEncryptionContext != nil && len(*v.SSEKMSEncryptionContext) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Context"
+ encoder.SetHeader(locationName).String(*v.SSEKMSEncryptionContext)
+ }
+
+ if v.SSEKMSKeyId != nil && len(*v.SSEKMSKeyId) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id"
+ encoder.SetHeader(locationName).String(*v.SSEKMSKeyId)
+ }
+
+ if len(v.StorageClass) > 0 {
+ locationName := "X-Amz-Storage-Class"
+ encoder.SetHeader(locationName).String(string(v.StorageClass))
+ }
+
+ if v.Tagging != nil && len(*v.Tagging) > 0 {
+ locationName := "X-Amz-Tagging"
+ encoder.SetHeader(locationName).String(*v.Tagging)
+ }
+
+ if v.WebsiteRedirectLocation != nil && len(*v.WebsiteRedirectLocation) > 0 {
+ locationName := "X-Amz-Website-Redirect-Location"
+ encoder.SetHeader(locationName).String(*v.WebsiteRedirectLocation)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutObjectAcl struct {
+}
+
+func (*awsRestxml_serializeOpPutObjectAcl) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutObjectAcl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutObjectAclInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?acl")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutObjectAclInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.AccessControlPolicy != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AccessControlPolicy",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentAccessControlPolicy(input.AccessControlPolicy, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutObjectAclInput(v *PutObjectAclInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if len(v.ACL) > 0 {
+ locationName := "X-Amz-Acl"
+ encoder.SetHeader(locationName).String(string(v.ACL))
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.GrantFullControl != nil && len(*v.GrantFullControl) > 0 {
+ locationName := "X-Amz-Grant-Full-Control"
+ encoder.SetHeader(locationName).String(*v.GrantFullControl)
+ }
+
+ if v.GrantRead != nil && len(*v.GrantRead) > 0 {
+ locationName := "X-Amz-Grant-Read"
+ encoder.SetHeader(locationName).String(*v.GrantRead)
+ }
+
+ if v.GrantReadACP != nil && len(*v.GrantReadACP) > 0 {
+ locationName := "X-Amz-Grant-Read-Acp"
+ encoder.SetHeader(locationName).String(*v.GrantReadACP)
+ }
+
+ if v.GrantWrite != nil && len(*v.GrantWrite) > 0 {
+ locationName := "X-Amz-Grant-Write"
+ encoder.SetHeader(locationName).String(*v.GrantWrite)
+ }
+
+ if v.GrantWriteACP != nil && len(*v.GrantWriteACP) > 0 {
+ locationName := "X-Amz-Grant-Write-Acp"
+ encoder.SetHeader(locationName).String(*v.GrantWriteACP)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.VersionId != nil {
+ encoder.SetQuery("versionId").String(*v.VersionId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutObjectLegalHold struct {
+}
+
+func (*awsRestxml_serializeOpPutObjectLegalHold) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutObjectLegalHold) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutObjectLegalHoldInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?legal-hold")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutObjectLegalHoldInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.LegalHold != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "LegalHold",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentObjectLockLegalHold(input.LegalHold, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutObjectLegalHoldInput(v *PutObjectLegalHoldInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.VersionId != nil {
+ encoder.SetQuery("versionId").String(*v.VersionId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutObjectLockConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpPutObjectLockConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutObjectLockConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutObjectLockConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?object-lock")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutObjectLockConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.ObjectLockConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ObjectLockConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentObjectLockConfiguration(input.ObjectLockConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutObjectLockConfigurationInput(v *PutObjectLockConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.Token != nil && len(*v.Token) > 0 {
+ locationName := "X-Amz-Bucket-Object-Lock-Token"
+ encoder.SetHeader(locationName).String(*v.Token)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutObjectRetention struct {
+}
+
+func (*awsRestxml_serializeOpPutObjectRetention) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutObjectRetention) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutObjectRetentionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?retention")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutObjectRetentionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.Retention != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Retention",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentObjectLockRetention(input.Retention, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutObjectRetentionInput(v *PutObjectRetentionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.BypassGovernanceRetention {
+ locationName := "X-Amz-Bypass-Governance-Retention"
+ encoder.SetHeader(locationName).Boolean(v.BypassGovernanceRetention)
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.VersionId != nil {
+ encoder.SetQuery("versionId").String(*v.VersionId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutObjectTagging struct {
+}
+
+func (*awsRestxml_serializeOpPutObjectTagging) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutObjectTagging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutObjectTaggingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?tagging")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutObjectTaggingInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.Tagging != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tagging",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentTagging(input.Tagging, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutObjectTaggingInput(v *PutObjectTaggingInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.VersionId != nil {
+ encoder.SetQuery("versionId").String(*v.VersionId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpPutPublicAccessBlock struct {
+}
+
+func (*awsRestxml_serializeOpPutPublicAccessBlock) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpPutPublicAccessBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutPublicAccessBlockInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}?publicAccessBlock")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsPutPublicAccessBlockInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.PublicAccessBlockConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "PublicAccessBlockConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentPublicAccessBlockConfiguration(input.PublicAccessBlockConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsPutPublicAccessBlockInput(v *PutPublicAccessBlockInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpRestoreObject struct {
+}
+
+func (*awsRestxml_serializeOpRestoreObject) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpRestoreObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*RestoreObjectInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?restore&x-id=RestoreObject")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsRestoreObjectInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.RestoreRequest != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "RestoreRequest",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentRestoreRequest(input.RestoreRequest, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsRestoreObjectInput(v *RestoreObjectInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.VersionId != nil {
+ encoder.SetQuery("versionId").String(*v.VersionId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpSelectObjectContent struct {
+}
+
+func (*awsRestxml_serializeOpSelectObjectContent) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpSelectObjectContent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*SelectObjectContentInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?select&select-type=2&x-id=SelectObjectContent")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsSelectObjectContentInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "SelectObjectContentRequest",
+ },
+ Attr: rootAttr,
+ }
+ root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeOpDocumentSelectObjectContentInput(input, xmlEncoder.RootElement(root)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsSelectObjectContentInput(v *SelectObjectContentInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm"
+ encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm)
+ }
+
+ if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKey)
+ }
+
+ if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5)
+ }
+
+ return nil
+}
+
+func awsRestxml_serializeOpDocumentSelectObjectContentInput(v *SelectObjectContentInput, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Expression != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Expression",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Expression)
+ }
+ if len(v.ExpressionType) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ExpressionType",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.ExpressionType))
+ }
+ if v.InputSerialization != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "InputSerialization",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentInputSerialization(v.InputSerialization, el); err != nil {
+ return err
+ }
+ }
+ if v.OutputSerialization != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "OutputSerialization",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentOutputSerialization(v.OutputSerialization, el); err != nil {
+ return err
+ }
+ }
+ if v.RequestProgress != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "RequestProgress",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentRequestProgress(v.RequestProgress, el); err != nil {
+ return err
+ }
+ }
+ if v.ScanRange != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ScanRange",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentScanRange(v.ScanRange, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+type awsRestxml_serializeOpUploadPart struct {
+}
+
+func (*awsRestxml_serializeOpUploadPart) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpUploadPart) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*UploadPartInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=UploadPart")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsUploadPartInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.Body != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/octet-stream")
+ }
+
+ payload := input.Body
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsUploadPartInput(v *UploadPartInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.ContentLength != 0 {
+ locationName := "Content-Length"
+ encoder.SetHeader(locationName).Long(v.ContentLength)
+ }
+
+ if v.ContentMD5 != nil && len(*v.ContentMD5) > 0 {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ {
+ encoder.SetQuery("partNumber").Integer(v.PartNumber)
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm"
+ encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm)
+ }
+
+ if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKey)
+ }
+
+ if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5)
+ }
+
+ if v.UploadId != nil {
+ encoder.SetQuery("uploadId").String(*v.UploadId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpUploadPartCopy struct {
+}
+
+func (*awsRestxml_serializeOpUploadPartCopy) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpUploadPartCopy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*UploadPartCopyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/{Bucket}/{Key+}?x-id=UploadPartCopy")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsUploadPartCopyInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsUploadPartCopyInput(v *UploadPartCopyInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Bucket == nil || len(*v.Bucket) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Bucket must not be empty")}
+ }
+ if v.Bucket != nil {
+ if err := encoder.SetURI("Bucket").String(*v.Bucket); err != nil {
+ return err
+ }
+ }
+
+ if v.CopySource != nil && len(*v.CopySource) > 0 {
+ locationName := "X-Amz-Copy-Source"
+ encoder.SetHeader(locationName).String(*v.CopySource)
+ }
+
+ if v.CopySourceIfMatch != nil && len(*v.CopySourceIfMatch) > 0 {
+ locationName := "X-Amz-Copy-Source-If-Match"
+ encoder.SetHeader(locationName).String(*v.CopySourceIfMatch)
+ }
+
+ if v.CopySourceIfModifiedSince != nil {
+ locationName := "X-Amz-Copy-Source-If-Modified-Since"
+ encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.CopySourceIfModifiedSince))
+ }
+
+ if v.CopySourceIfNoneMatch != nil && len(*v.CopySourceIfNoneMatch) > 0 {
+ locationName := "X-Amz-Copy-Source-If-None-Match"
+ encoder.SetHeader(locationName).String(*v.CopySourceIfNoneMatch)
+ }
+
+ if v.CopySourceIfUnmodifiedSince != nil {
+ locationName := "X-Amz-Copy-Source-If-Unmodified-Since"
+ encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.CopySourceIfUnmodifiedSince))
+ }
+
+ if v.CopySourceRange != nil && len(*v.CopySourceRange) > 0 {
+ locationName := "X-Amz-Copy-Source-Range"
+ encoder.SetHeader(locationName).String(*v.CopySourceRange)
+ }
+
+ if v.CopySourceSSECustomerAlgorithm != nil && len(*v.CopySourceSSECustomerAlgorithm) > 0 {
+ locationName := "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm"
+ encoder.SetHeader(locationName).String(*v.CopySourceSSECustomerAlgorithm)
+ }
+
+ if v.CopySourceSSECustomerKey != nil && len(*v.CopySourceSSECustomerKey) > 0 {
+ locationName := "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key"
+ encoder.SetHeader(locationName).String(*v.CopySourceSSECustomerKey)
+ }
+
+ if v.CopySourceSSECustomerKeyMD5 != nil && len(*v.CopySourceSSECustomerKeyMD5) > 0 {
+ locationName := "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5"
+ encoder.SetHeader(locationName).String(*v.CopySourceSSECustomerKeyMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil && len(*v.ExpectedBucketOwner) > 0 {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ if v.ExpectedSourceBucketOwner != nil && len(*v.ExpectedSourceBucketOwner) > 0 {
+ locationName := "X-Amz-Source-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedSourceBucketOwner)
+ }
+
+ if v.Key == nil || len(*v.Key) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
+ }
+ if v.Key != nil {
+ if err := encoder.SetURI("Key").String(*v.Key); err != nil {
+ return err
+ }
+ }
+
+ {
+ encoder.SetQuery("partNumber").Integer(v.PartNumber)
+ }
+
+ if len(v.RequestPayer) > 0 {
+ locationName := "X-Amz-Request-Payer"
+ encoder.SetHeader(locationName).String(string(v.RequestPayer))
+ }
+
+ if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Algorithm"
+ encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm)
+ }
+
+ if v.SSECustomerKey != nil && len(*v.SSECustomerKey) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKey)
+ }
+
+ if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 {
+ locationName := "X-Amz-Server-Side-Encryption-Customer-Key-Md5"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5)
+ }
+
+ if v.UploadId != nil {
+ encoder.SetQuery("uploadId").String(*v.UploadId)
+ }
+
+ return nil
+}
+
+type awsRestxml_serializeOpWriteGetObjectResponse struct {
+}
+
+func (*awsRestxml_serializeOpWriteGetObjectResponse) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpWriteGetObjectResponse) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*WriteGetObjectResponseInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/WriteGetObjectResponse?x-id=WriteGetObjectResponse")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.Body != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ restEncoder.SetHeader("Content-Type").String("application/octet-stream")
+ }
+
+ payload := input.Body
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetObjectResponseInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.AcceptRanges != nil && len(*v.AcceptRanges) > 0 {
+ locationName := "X-Amz-Fwd-Header-Accept-Ranges"
+ encoder.SetHeader(locationName).String(*v.AcceptRanges)
+ }
+
+ if v.BucketKeyEnabled {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Server-Side-Encryption-Bucket-Key-Enabled"
+ encoder.SetHeader(locationName).Boolean(v.BucketKeyEnabled)
+ }
+
+ if v.CacheControl != nil && len(*v.CacheControl) > 0 {
+ locationName := "X-Amz-Fwd-Header-Cache-Control"
+ encoder.SetHeader(locationName).String(*v.CacheControl)
+ }
+
+ if v.ContentDisposition != nil && len(*v.ContentDisposition) > 0 {
+ locationName := "X-Amz-Fwd-Header-Content-Disposition"
+ encoder.SetHeader(locationName).String(*v.ContentDisposition)
+ }
+
+ if v.ContentEncoding != nil && len(*v.ContentEncoding) > 0 {
+ locationName := "X-Amz-Fwd-Header-Content-Encoding"
+ encoder.SetHeader(locationName).String(*v.ContentEncoding)
+ }
+
+ if v.ContentLanguage != nil && len(*v.ContentLanguage) > 0 {
+ locationName := "X-Amz-Fwd-Header-Content-Language"
+ encoder.SetHeader(locationName).String(*v.ContentLanguage)
+ }
+
+ if v.ContentLength != 0 {
+ locationName := "Content-Length"
+ encoder.SetHeader(locationName).Long(v.ContentLength)
+ }
+
+ if v.ContentRange != nil && len(*v.ContentRange) > 0 {
+ locationName := "X-Amz-Fwd-Header-Content-Range"
+ encoder.SetHeader(locationName).String(*v.ContentRange)
+ }
+
+ if v.ContentType != nil && len(*v.ContentType) > 0 {
+ locationName := "X-Amz-Fwd-Header-Content-Type"
+ encoder.SetHeader(locationName).String(*v.ContentType)
+ }
+
+ if v.DeleteMarker {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Delete-Marker"
+ encoder.SetHeader(locationName).Boolean(v.DeleteMarker)
+ }
+
+ if v.ErrorCode != nil && len(*v.ErrorCode) > 0 {
+ locationName := "X-Amz-Fwd-Error-Code"
+ encoder.SetHeader(locationName).String(*v.ErrorCode)
+ }
+
+ if v.ErrorMessage != nil && len(*v.ErrorMessage) > 0 {
+ locationName := "X-Amz-Fwd-Error-Message"
+ encoder.SetHeader(locationName).String(*v.ErrorMessage)
+ }
+
+ if v.ETag != nil && len(*v.ETag) > 0 {
+ locationName := "X-Amz-Fwd-Header-Etag"
+ encoder.SetHeader(locationName).String(*v.ETag)
+ }
+
+ if v.Expiration != nil && len(*v.Expiration) > 0 {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Expiration"
+ encoder.SetHeader(locationName).String(*v.Expiration)
+ }
+
+ if v.Expires != nil {
+ locationName := "X-Amz-Fwd-Header-Expires"
+ encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.Expires))
+ }
+
+ if v.LastModified != nil {
+ locationName := "X-Amz-Fwd-Header-Last-Modified"
+ encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.LastModified))
+ }
+
+ if v.Metadata != nil {
+ hv := encoder.Headers("X-Amz-Meta-")
+ for mapKey, mapVal := range v.Metadata {
+ if len(mapVal) > 0 {
+ hv.SetHeader(http.CanonicalHeaderKey(mapKey)).String(mapVal)
+ }
+ }
+ }
+
+ if v.MissingMeta != 0 {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Missing-Meta"
+ encoder.SetHeader(locationName).Integer(v.MissingMeta)
+ }
+
+ if len(v.ObjectLockLegalHoldStatus) > 0 {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Object-Lock-Legal-Hold"
+ encoder.SetHeader(locationName).String(string(v.ObjectLockLegalHoldStatus))
+ }
+
+ if len(v.ObjectLockMode) > 0 {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Object-Lock-Mode"
+ encoder.SetHeader(locationName).String(string(v.ObjectLockMode))
+ }
+
+ if v.ObjectLockRetainUntilDate != nil {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Object-Lock-Retain-Until-Date"
+ encoder.SetHeader(locationName).String(smithytime.FormatDateTime(*v.ObjectLockRetainUntilDate))
+ }
+
+ if v.PartsCount != 0 {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Mp-Parts-Count"
+ encoder.SetHeader(locationName).Integer(v.PartsCount)
+ }
+
+ if len(v.ReplicationStatus) > 0 {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Replication-Status"
+ encoder.SetHeader(locationName).String(string(v.ReplicationStatus))
+ }
+
+ if len(v.RequestCharged) > 0 {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Request-Charged"
+ encoder.SetHeader(locationName).String(string(v.RequestCharged))
+ }
+
+ if v.RequestRoute != nil && len(*v.RequestRoute) > 0 {
+ locationName := "X-Amz-Request-Route"
+ encoder.SetHeader(locationName).String(*v.RequestRoute)
+ }
+
+ if v.RequestToken != nil && len(*v.RequestToken) > 0 {
+ locationName := "X-Amz-Request-Token"
+ encoder.SetHeader(locationName).String(*v.RequestToken)
+ }
+
+ if v.Restore != nil && len(*v.Restore) > 0 {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Restore"
+ encoder.SetHeader(locationName).String(*v.Restore)
+ }
+
+ if len(v.ServerSideEncryption) > 0 {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Server-Side-Encryption"
+ encoder.SetHeader(locationName).String(string(v.ServerSideEncryption))
+ }
+
+ if v.SSECustomerAlgorithm != nil && len(*v.SSECustomerAlgorithm) > 0 {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Server-Side-Encryption-Customer-Algorithm"
+ encoder.SetHeader(locationName).String(*v.SSECustomerAlgorithm)
+ }
+
+ if v.SSECustomerKeyMD5 != nil && len(*v.SSECustomerKeyMD5) > 0 {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Server-Side-Encryption-Customer-Key-Md5"
+ encoder.SetHeader(locationName).String(*v.SSECustomerKeyMD5)
+ }
+
+ if v.SSEKMSKeyId != nil && len(*v.SSEKMSKeyId) > 0 {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id"
+ encoder.SetHeader(locationName).String(*v.SSEKMSKeyId)
+ }
+
+ if v.StatusCode != 0 {
+ locationName := "X-Amz-Fwd-Status"
+ encoder.SetHeader(locationName).Integer(v.StatusCode)
+ }
+
+ if len(v.StorageClass) > 0 {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Storage-Class"
+ encoder.SetHeader(locationName).String(string(v.StorageClass))
+ }
+
+ if v.TagCount != 0 {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Tagging-Count"
+ encoder.SetHeader(locationName).Integer(v.TagCount)
+ }
+
+ if v.VersionId != nil && len(*v.VersionId) > 0 {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Version-Id"
+ encoder.SetHeader(locationName).String(*v.VersionId)
+ }
+
+ return nil
+}
+
+func awsRestxml_serializeDocumentAbortIncompleteMultipartUpload(v *types.AbortIncompleteMultipartUpload, value smithyxml.Value) error {
+ defer value.Close()
+ if v.DaysAfterInitiation != 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "DaysAfterInitiation",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Integer(v.DaysAfterInitiation)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentAccelerateConfiguration(v *types.AccelerateConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.Status) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Status",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Status))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentAccessControlPolicy(v *types.AccessControlPolicy, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Grants != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AccessControlList",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentGrants(v.Grants, el); err != nil {
+ return err
+ }
+ }
+ if v.Owner != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Owner",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentOwner(v.Owner, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentAccessControlTranslation(v *types.AccessControlTranslation, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.Owner) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Owner",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Owner))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentAllowedHeaders(v []string, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ am.String(v[i])
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentAllowedMethods(v []string, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ am.String(v[i])
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentAllowedOrigins(v []string, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ am.String(v[i])
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentAnalyticsAndOperator(v *types.AnalyticsAndOperator, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Prefix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Prefix)
+ }
+ if v.Tags != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tag",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentTagSet(v.Tags, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentAnalyticsConfiguration(v *types.AnalyticsConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Filter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Filter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentAnalyticsFilter(v.Filter, el); err != nil {
+ return err
+ }
+ }
+ if v.Id != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Id",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Id)
+ }
+ if v.StorageClassAnalysis != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "StorageClassAnalysis",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentStorageClassAnalysis(v.StorageClassAnalysis, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentAnalyticsExportDestination(v *types.AnalyticsExportDestination, value smithyxml.Value) error {
+ defer value.Close()
+ if v.S3BucketDestination != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "S3BucketDestination",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentAnalyticsS3BucketDestination(v.S3BucketDestination, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentAnalyticsFilter(v types.AnalyticsFilter, value smithyxml.Value) error {
+ defer value.Close()
+ switch uv := v.(type) {
+ case *types.AnalyticsFilterMemberAnd:
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "And",
+ },
+ Attr: customMemberNameAttr,
+ }
+ av := value.MemberElement(customMemberName)
+ if err := awsRestxml_serializeDocumentAnalyticsAndOperator(&uv.Value, av); err != nil {
+ return err
+ }
+
+ case *types.AnalyticsFilterMemberPrefix:
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: customMemberNameAttr,
+ }
+ av := value.MemberElement(customMemberName)
+ av.String(uv.Value)
+
+ case *types.AnalyticsFilterMemberTag:
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tag",
+ },
+ Attr: customMemberNameAttr,
+ }
+ av := value.MemberElement(customMemberName)
+ if err := awsRestxml_serializeDocumentTag(&uv.Value, av); err != nil {
+ return err
+ }
+
+ default:
+ return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v)
+
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentAnalyticsS3BucketDestination(v *types.AnalyticsS3BucketDestination, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Bucket != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Bucket",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Bucket)
+ }
+ if v.BucketAccountId != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "BucketAccountId",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.BucketAccountId)
+ }
+ if len(v.Format) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Format",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Format))
+ }
+ if v.Prefix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Prefix)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentBucketLifecycleConfiguration(v *types.BucketLifecycleConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Rules != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Rule",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentLifecycleRules(v.Rules, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentBucketLoggingStatus(v *types.BucketLoggingStatus, value smithyxml.Value) error {
+ defer value.Close()
+ if v.LoggingEnabled != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "LoggingEnabled",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentLoggingEnabled(v.LoggingEnabled, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentCompletedMultipartUpload(v *types.CompletedMultipartUpload, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Parts != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Part",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentCompletedPartList(v.Parts, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentCompletedPart(v *types.CompletedPart, value smithyxml.Value) error {
+ defer value.Close()
+ if v.ETag != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ETag",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.ETag)
+ }
+ if v.PartNumber != 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "PartNumber",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Integer(v.PartNumber)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentCompletedPartList(v []types.CompletedPart, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentCompletedPart(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentCondition(v *types.Condition, value smithyxml.Value) error {
+ defer value.Close()
+ if v.HttpErrorCodeReturnedEquals != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "HttpErrorCodeReturnedEquals",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.HttpErrorCodeReturnedEquals)
+ }
+ if v.KeyPrefixEquals != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "KeyPrefixEquals",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.KeyPrefixEquals)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentCORSConfiguration(v *types.CORSConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.CORSRules != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "CORSRule",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentCORSRules(v.CORSRules, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentCORSRule(v *types.CORSRule, value smithyxml.Value) error {
+ defer value.Close()
+ if v.AllowedHeaders != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AllowedHeader",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentAllowedHeaders(v.AllowedHeaders, el); err != nil {
+ return err
+ }
+ }
+ if v.AllowedMethods != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AllowedMethod",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentAllowedMethods(v.AllowedMethods, el); err != nil {
+ return err
+ }
+ }
+ if v.AllowedOrigins != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AllowedOrigin",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentAllowedOrigins(v.AllowedOrigins, el); err != nil {
+ return err
+ }
+ }
+ if v.ExposeHeaders != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ExposeHeader",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentExposeHeaders(v.ExposeHeaders, el); err != nil {
+ return err
+ }
+ }
+ if v.ID != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ID",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.ID)
+ }
+ if v.MaxAgeSeconds != 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "MaxAgeSeconds",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Integer(v.MaxAgeSeconds)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentCORSRules(v []types.CORSRule, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentCORSRule(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentCreateBucketConfiguration(v *types.CreateBucketConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.LocationConstraint) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "LocationConstraint",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.LocationConstraint))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentCSVInput(v *types.CSVInput, value smithyxml.Value) error {
+ defer value.Close()
+ if v.AllowQuotedRecordDelimiter {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AllowQuotedRecordDelimiter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Boolean(v.AllowQuotedRecordDelimiter)
+ }
+ if v.Comments != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Comments",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Comments)
+ }
+ if v.FieldDelimiter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "FieldDelimiter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.FieldDelimiter)
+ }
+ if len(v.FileHeaderInfo) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "FileHeaderInfo",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.FileHeaderInfo))
+ }
+ if v.QuoteCharacter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "QuoteCharacter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.QuoteCharacter)
+ }
+ if v.QuoteEscapeCharacter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "QuoteEscapeCharacter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.QuoteEscapeCharacter)
+ }
+ if v.RecordDelimiter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "RecordDelimiter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.RecordDelimiter)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentCSVOutput(v *types.CSVOutput, value smithyxml.Value) error {
+ defer value.Close()
+ if v.FieldDelimiter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "FieldDelimiter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.FieldDelimiter)
+ }
+ if v.QuoteCharacter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "QuoteCharacter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.QuoteCharacter)
+ }
+ if v.QuoteEscapeCharacter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "QuoteEscapeCharacter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.QuoteEscapeCharacter)
+ }
+ if len(v.QuoteFields) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "QuoteFields",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.QuoteFields))
+ }
+ if v.RecordDelimiter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "RecordDelimiter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.RecordDelimiter)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentDefaultRetention(v *types.DefaultRetention, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Days != 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Days",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Integer(v.Days)
+ }
+ if len(v.Mode) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Mode",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Mode))
+ }
+ if v.Years != 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Years",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Integer(v.Years)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentDelete(v *types.Delete, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Objects != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Object",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentObjectIdentifierList(v.Objects, el); err != nil {
+ return err
+ }
+ }
+ if v.Quiet {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Quiet",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Boolean(v.Quiet)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentDeleteMarkerReplication(v *types.DeleteMarkerReplication, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.Status) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Status",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Status))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentDestination(v *types.Destination, value smithyxml.Value) error {
+ defer value.Close()
+ if v.AccessControlTranslation != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AccessControlTranslation",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentAccessControlTranslation(v.AccessControlTranslation, el); err != nil {
+ return err
+ }
+ }
+ if v.Account != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Account",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Account)
+ }
+ if v.Bucket != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Bucket",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Bucket)
+ }
+ if v.EncryptionConfiguration != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "EncryptionConfiguration",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentEncryptionConfiguration(v.EncryptionConfiguration, el); err != nil {
+ return err
+ }
+ }
+ if v.Metrics != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Metrics",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentMetrics(v.Metrics, el); err != nil {
+ return err
+ }
+ }
+ if v.ReplicationTime != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ReplicationTime",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentReplicationTime(v.ReplicationTime, el); err != nil {
+ return err
+ }
+ }
+ if len(v.StorageClass) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "StorageClass",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.StorageClass))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentEncryption(v *types.Encryption, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.EncryptionType) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "EncryptionType",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.EncryptionType))
+ }
+ if v.KMSContext != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "KMSContext",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.KMSContext)
+ }
+ if v.KMSKeyId != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "KMSKeyId",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.KMSKeyId)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentEncryptionConfiguration(v *types.EncryptionConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.ReplicaKmsKeyID != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ReplicaKmsKeyID",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.ReplicaKmsKeyID)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentErrorDocument(v *types.ErrorDocument, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Key != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Key",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Key)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentEventList(v []types.Event, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ am.String(string(v[i]))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentExistingObjectReplication(v *types.ExistingObjectReplication, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.Status) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Status",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Status))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentExposeHeaders(v []string, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ am.String(v[i])
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentFilterRule(v *types.FilterRule, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.Name) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Name",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Name))
+ }
+ if v.Value != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Value",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Value)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentFilterRuleList(v []types.FilterRule, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentFilterRule(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentGlacierJobParameters(v *types.GlacierJobParameters, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.Tier) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tier",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Tier))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentGrant(v *types.Grant, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Grantee != nil {
+ rootAttr := []smithyxml.Attr{}
+ rootAttr = append(rootAttr, smithyxml.NewNamespaceAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance"))
+ if len(v.Grantee.Type) > 0 {
+ var av string
+ av = string(v.Grantee.Type)
+ rootAttr = append(rootAttr, smithyxml.NewAttribute("xsi:type", av))
+ }
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Grantee",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentGrantee(v.Grantee, el); err != nil {
+ return err
+ }
+ }
+ if len(v.Permission) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Permission",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Permission))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentGrantee(v *types.Grantee, value smithyxml.Value) error {
+ defer value.Close()
+ if v.DisplayName != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "DisplayName",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.DisplayName)
+ }
+ if v.EmailAddress != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "EmailAddress",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.EmailAddress)
+ }
+ if v.ID != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ID",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.ID)
+ }
+ if v.URI != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "URI",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.URI)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentGrants(v []types.Grant, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Grant",
+ },
+ Attr: customMemberNameAttr,
+ }
+ array = value.ArrayWithCustomName(customMemberName)
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentGrant(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentIndexDocument(v *types.IndexDocument, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Suffix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Suffix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Suffix)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentInputSerialization(v *types.InputSerialization, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.CompressionType) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "CompressionType",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.CompressionType))
+ }
+ if v.CSV != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "CSV",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentCSVInput(v.CSV, el); err != nil {
+ return err
+ }
+ }
+ if v.JSON != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "JSON",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentJSONInput(v.JSON, el); err != nil {
+ return err
+ }
+ }
+ if v.Parquet != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Parquet",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentParquetInput(v.Parquet, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentIntelligentTieringAndOperator(v *types.IntelligentTieringAndOperator, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Prefix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Prefix)
+ }
+ if v.Tags != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tag",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentTagSet(v.Tags, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentIntelligentTieringConfiguration(v *types.IntelligentTieringConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Filter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Filter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentIntelligentTieringFilter(v.Filter, el); err != nil {
+ return err
+ }
+ }
+ if v.Id != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Id",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Id)
+ }
+ if len(v.Status) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Status",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Status))
+ }
+ if v.Tierings != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tiering",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentTieringList(v.Tierings, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentIntelligentTieringFilter(v *types.IntelligentTieringFilter, value smithyxml.Value) error {
+ defer value.Close()
+ if v.And != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "And",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentIntelligentTieringAndOperator(v.And, el); err != nil {
+ return err
+ }
+ }
+ if v.Prefix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Prefix)
+ }
+ if v.Tag != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tag",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentTag(v.Tag, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentInventoryConfiguration(v *types.InventoryConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Destination != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Destination",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentInventoryDestination(v.Destination, el); err != nil {
+ return err
+ }
+ }
+ if v.Filter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Filter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentInventoryFilter(v.Filter, el); err != nil {
+ return err
+ }
+ }
+ if v.Id != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Id",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Id)
+ }
+ if len(v.IncludedObjectVersions) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "IncludedObjectVersions",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.IncludedObjectVersions))
+ }
+ {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "IsEnabled",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Boolean(v.IsEnabled)
+ }
+ if v.OptionalFields != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "OptionalFields",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentInventoryOptionalFields(v.OptionalFields, el); err != nil {
+ return err
+ }
+ }
+ if v.Schedule != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Schedule",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentInventorySchedule(v.Schedule, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentInventoryDestination(v *types.InventoryDestination, value smithyxml.Value) error {
+ defer value.Close()
+ if v.S3BucketDestination != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "S3BucketDestination",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentInventoryS3BucketDestination(v.S3BucketDestination, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentInventoryEncryption(v *types.InventoryEncryption, value smithyxml.Value) error {
+ defer value.Close()
+ if v.SSEKMS != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "SSE-KMS",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentSSEKMS(v.SSEKMS, el); err != nil {
+ return err
+ }
+ }
+ if v.SSES3 != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "SSE-S3",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentSSES3(v.SSES3, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentInventoryFilter(v *types.InventoryFilter, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Prefix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Prefix)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentInventoryOptionalFields(v []types.InventoryOptionalField, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Field",
+ },
+ Attr: customMemberNameAttr,
+ }
+ array = value.ArrayWithCustomName(customMemberName)
+ for i := range v {
+ am := array.Member()
+ am.String(string(v[i]))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentInventoryS3BucketDestination(v *types.InventoryS3BucketDestination, value smithyxml.Value) error {
+ defer value.Close()
+ if v.AccountId != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AccountId",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.AccountId)
+ }
+ if v.Bucket != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Bucket",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Bucket)
+ }
+ if v.Encryption != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Encryption",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentInventoryEncryption(v.Encryption, el); err != nil {
+ return err
+ }
+ }
+ if len(v.Format) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Format",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Format))
+ }
+ if v.Prefix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Prefix)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentInventorySchedule(v *types.InventorySchedule, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.Frequency) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Frequency",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Frequency))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentJSONInput(v *types.JSONInput, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.Type) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Type",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Type))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentJSONOutput(v *types.JSONOutput, value smithyxml.Value) error {
+ defer value.Close()
+ if v.RecordDelimiter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "RecordDelimiter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.RecordDelimiter)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentLambdaFunctionConfiguration(v *types.LambdaFunctionConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Events != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Event",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentEventList(v.Events, el); err != nil {
+ return err
+ }
+ }
+ if v.Filter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Filter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentNotificationConfigurationFilter(v.Filter, el); err != nil {
+ return err
+ }
+ }
+ if v.Id != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Id",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Id)
+ }
+ if v.LambdaFunctionArn != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "CloudFunction",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.LambdaFunctionArn)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentLambdaFunctionConfigurationList(v []types.LambdaFunctionConfiguration, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentLambdaFunctionConfiguration(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentLifecycleExpiration(v *types.LifecycleExpiration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Date != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Date",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(smithytime.FormatDateTime(*v.Date))
+ }
+ if v.Days != 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Days",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Integer(v.Days)
+ }
+ if v.ExpiredObjectDeleteMarker {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ExpiredObjectDeleteMarker",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Boolean(v.ExpiredObjectDeleteMarker)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentLifecycleRule(v *types.LifecycleRule, value smithyxml.Value) error {
+ defer value.Close()
+ if v.AbortIncompleteMultipartUpload != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AbortIncompleteMultipartUpload",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentAbortIncompleteMultipartUpload(v.AbortIncompleteMultipartUpload, el); err != nil {
+ return err
+ }
+ }
+ if v.Expiration != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Expiration",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentLifecycleExpiration(v.Expiration, el); err != nil {
+ return err
+ }
+ }
+ if v.Filter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Filter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentLifecycleRuleFilter(v.Filter, el); err != nil {
+ return err
+ }
+ }
+ if v.ID != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ID",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.ID)
+ }
+ if v.NoncurrentVersionExpiration != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "NoncurrentVersionExpiration",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentNoncurrentVersionExpiration(v.NoncurrentVersionExpiration, el); err != nil {
+ return err
+ }
+ }
+ if v.NoncurrentVersionTransitions != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "NoncurrentVersionTransition",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentNoncurrentVersionTransitionList(v.NoncurrentVersionTransitions, el); err != nil {
+ return err
+ }
+ }
+ if v.Prefix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Prefix)
+ }
+ if len(v.Status) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Status",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Status))
+ }
+ if v.Transitions != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Transition",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentTransitionList(v.Transitions, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentLifecycleRuleAndOperator(v *types.LifecycleRuleAndOperator, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Prefix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Prefix)
+ }
+ if v.Tags != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tag",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentTagSet(v.Tags, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentLifecycleRuleFilter(v types.LifecycleRuleFilter, value smithyxml.Value) error {
+ defer value.Close()
+ switch uv := v.(type) {
+ case *types.LifecycleRuleFilterMemberAnd:
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "And",
+ },
+ Attr: customMemberNameAttr,
+ }
+ av := value.MemberElement(customMemberName)
+ if err := awsRestxml_serializeDocumentLifecycleRuleAndOperator(&uv.Value, av); err != nil {
+ return err
+ }
+
+ case *types.LifecycleRuleFilterMemberPrefix:
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: customMemberNameAttr,
+ }
+ av := value.MemberElement(customMemberName)
+ av.String(uv.Value)
+
+ case *types.LifecycleRuleFilterMemberTag:
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tag",
+ },
+ Attr: customMemberNameAttr,
+ }
+ av := value.MemberElement(customMemberName)
+ if err := awsRestxml_serializeDocumentTag(&uv.Value, av); err != nil {
+ return err
+ }
+
+ default:
+ return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v)
+
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentLifecycleRules(v []types.LifecycleRule, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentLifecycleRule(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentLoggingEnabled(v *types.LoggingEnabled, value smithyxml.Value) error {
+ defer value.Close()
+ if v.TargetBucket != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "TargetBucket",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.TargetBucket)
+ }
+ if v.TargetGrants != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "TargetGrants",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentTargetGrants(v.TargetGrants, el); err != nil {
+ return err
+ }
+ }
+ if v.TargetPrefix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "TargetPrefix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.TargetPrefix)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentMetadataEntry(v *types.MetadataEntry, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Name != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Name",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Name)
+ }
+ if v.Value != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Value",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Value)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentMetrics(v *types.Metrics, value smithyxml.Value) error {
+ defer value.Close()
+ if v.EventThreshold != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "EventThreshold",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentReplicationTimeValue(v.EventThreshold, el); err != nil {
+ return err
+ }
+ }
+ if len(v.Status) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Status",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Status))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentMetricsAndOperator(v *types.MetricsAndOperator, value smithyxml.Value) error {
+ defer value.Close()
+ if v.AccessPointArn != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AccessPointArn",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.AccessPointArn)
+ }
+ if v.Prefix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Prefix)
+ }
+ if v.Tags != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tag",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentTagSet(v.Tags, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentMetricsConfiguration(v *types.MetricsConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Filter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Filter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentMetricsFilter(v.Filter, el); err != nil {
+ return err
+ }
+ }
+ if v.Id != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Id",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Id)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentMetricsFilter(v types.MetricsFilter, value smithyxml.Value) error {
+ defer value.Close()
+ switch uv := v.(type) {
+ case *types.MetricsFilterMemberAccessPointArn:
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AccessPointArn",
+ },
+ Attr: customMemberNameAttr,
+ }
+ av := value.MemberElement(customMemberName)
+ av.String(uv.Value)
+
+ case *types.MetricsFilterMemberAnd:
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "And",
+ },
+ Attr: customMemberNameAttr,
+ }
+ av := value.MemberElement(customMemberName)
+ if err := awsRestxml_serializeDocumentMetricsAndOperator(&uv.Value, av); err != nil {
+ return err
+ }
+
+ case *types.MetricsFilterMemberPrefix:
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: customMemberNameAttr,
+ }
+ av := value.MemberElement(customMemberName)
+ av.String(uv.Value)
+
+ case *types.MetricsFilterMemberTag:
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tag",
+ },
+ Attr: customMemberNameAttr,
+ }
+ av := value.MemberElement(customMemberName)
+ if err := awsRestxml_serializeDocumentTag(&uv.Value, av); err != nil {
+ return err
+ }
+
+ default:
+ return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v)
+
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentNoncurrentVersionExpiration(v *types.NoncurrentVersionExpiration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.NoncurrentDays != 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "NoncurrentDays",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Integer(v.NoncurrentDays)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentNoncurrentVersionTransition(v *types.NoncurrentVersionTransition, value smithyxml.Value) error {
+ defer value.Close()
+ if v.NoncurrentDays != 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "NoncurrentDays",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Integer(v.NoncurrentDays)
+ }
+ if len(v.StorageClass) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "StorageClass",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.StorageClass))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentNoncurrentVersionTransitionList(v []types.NoncurrentVersionTransition, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentNoncurrentVersionTransition(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentNotificationConfiguration(v *types.NotificationConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.LambdaFunctionConfigurations != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "CloudFunctionConfiguration",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentLambdaFunctionConfigurationList(v.LambdaFunctionConfigurations, el); err != nil {
+ return err
+ }
+ }
+ if v.QueueConfigurations != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "QueueConfiguration",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentQueueConfigurationList(v.QueueConfigurations, el); err != nil {
+ return err
+ }
+ }
+ if v.TopicConfigurations != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "TopicConfiguration",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentTopicConfigurationList(v.TopicConfigurations, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentNotificationConfigurationFilter(v *types.NotificationConfigurationFilter, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Key != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "S3Key",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentS3KeyFilter(v.Key, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentObjectIdentifier(v *types.ObjectIdentifier, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Key != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Key",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Key)
+ }
+ if v.VersionId != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "VersionId",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.VersionId)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentObjectIdentifierList(v []types.ObjectIdentifier, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentObjectIdentifier(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentObjectLockConfiguration(v *types.ObjectLockConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.ObjectLockEnabled) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ObjectLockEnabled",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.ObjectLockEnabled))
+ }
+ if v.Rule != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Rule",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentObjectLockRule(v.Rule, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentObjectLockLegalHold(v *types.ObjectLockLegalHold, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.Status) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Status",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Status))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentObjectLockRetention(v *types.ObjectLockRetention, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.Mode) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Mode",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Mode))
+ }
+ if v.RetainUntilDate != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "RetainUntilDate",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(smithytime.FormatDateTime(*v.RetainUntilDate))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentObjectLockRule(v *types.ObjectLockRule, value smithyxml.Value) error {
+ defer value.Close()
+ if v.DefaultRetention != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "DefaultRetention",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentDefaultRetention(v.DefaultRetention, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentOutputLocation(v *types.OutputLocation, value smithyxml.Value) error {
+ defer value.Close()
+ if v.S3 != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "S3",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentS3Location(v.S3, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentOutputSerialization(v *types.OutputSerialization, value smithyxml.Value) error {
+ defer value.Close()
+ if v.CSV != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "CSV",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentCSVOutput(v.CSV, el); err != nil {
+ return err
+ }
+ }
+ if v.JSON != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "JSON",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentJSONOutput(v.JSON, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentOwner(v *types.Owner, value smithyxml.Value) error {
+ defer value.Close()
+ if v.DisplayName != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "DisplayName",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.DisplayName)
+ }
+ if v.ID != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ID",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.ID)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentOwnershipControls(v *types.OwnershipControls, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Rules != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Rule",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentOwnershipControlsRules(v.Rules, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentOwnershipControlsRule(v *types.OwnershipControlsRule, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.ObjectOwnership) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ObjectOwnership",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.ObjectOwnership))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentOwnershipControlsRules(v []types.OwnershipControlsRule, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentOwnershipControlsRule(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentParquetInput(v *types.ParquetInput, value smithyxml.Value) error {
+ defer value.Close()
+ return nil
+}
+
+func awsRestxml_serializeDocumentPublicAccessBlockConfiguration(v *types.PublicAccessBlockConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.BlockPublicAcls {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "BlockPublicAcls",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Boolean(v.BlockPublicAcls)
+ }
+ if v.BlockPublicPolicy {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "BlockPublicPolicy",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Boolean(v.BlockPublicPolicy)
+ }
+ if v.IgnorePublicAcls {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "IgnorePublicAcls",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Boolean(v.IgnorePublicAcls)
+ }
+ if v.RestrictPublicBuckets {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "RestrictPublicBuckets",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Boolean(v.RestrictPublicBuckets)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentQueueConfiguration(v *types.QueueConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Events != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Event",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentEventList(v.Events, el); err != nil {
+ return err
+ }
+ }
+ if v.Filter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Filter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentNotificationConfigurationFilter(v.Filter, el); err != nil {
+ return err
+ }
+ }
+ if v.Id != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Id",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Id)
+ }
+ if v.QueueArn != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Queue",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.QueueArn)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentQueueConfigurationList(v []types.QueueConfiguration, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentQueueConfiguration(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentRedirect(v *types.Redirect, value smithyxml.Value) error {
+ defer value.Close()
+ if v.HostName != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "HostName",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.HostName)
+ }
+ if v.HttpRedirectCode != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "HttpRedirectCode",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.HttpRedirectCode)
+ }
+ if len(v.Protocol) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Protocol",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Protocol))
+ }
+ if v.ReplaceKeyPrefixWith != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ReplaceKeyPrefixWith",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.ReplaceKeyPrefixWith)
+ }
+ if v.ReplaceKeyWith != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ReplaceKeyWith",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.ReplaceKeyWith)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentRedirectAllRequestsTo(v *types.RedirectAllRequestsTo, value smithyxml.Value) error {
+ defer value.Close()
+ if v.HostName != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "HostName",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.HostName)
+ }
+ if len(v.Protocol) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Protocol",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Protocol))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentReplicaModifications(v *types.ReplicaModifications, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.Status) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Status",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Status))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentReplicationConfiguration(v *types.ReplicationConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Role != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Role",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Role)
+ }
+ if v.Rules != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Rule",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentReplicationRules(v.Rules, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentReplicationRule(v *types.ReplicationRule, value smithyxml.Value) error {
+ defer value.Close()
+ if v.DeleteMarkerReplication != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "DeleteMarkerReplication",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentDeleteMarkerReplication(v.DeleteMarkerReplication, el); err != nil {
+ return err
+ }
+ }
+ if v.Destination != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Destination",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentDestination(v.Destination, el); err != nil {
+ return err
+ }
+ }
+ if v.ExistingObjectReplication != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ExistingObjectReplication",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentExistingObjectReplication(v.ExistingObjectReplication, el); err != nil {
+ return err
+ }
+ }
+ if v.Filter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Filter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentReplicationRuleFilter(v.Filter, el); err != nil {
+ return err
+ }
+ }
+ if v.ID != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ID",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.ID)
+ }
+ if v.Prefix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Prefix)
+ }
+ if v.Priority != 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Priority",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Integer(v.Priority)
+ }
+ if v.SourceSelectionCriteria != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "SourceSelectionCriteria",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentSourceSelectionCriteria(v.SourceSelectionCriteria, el); err != nil {
+ return err
+ }
+ }
+ if len(v.Status) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Status",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Status))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentReplicationRuleAndOperator(v *types.ReplicationRuleAndOperator, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Prefix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Prefix)
+ }
+ if v.Tags != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tag",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentTagSet(v.Tags, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentReplicationRuleFilter(v types.ReplicationRuleFilter, value smithyxml.Value) error {
+ defer value.Close()
+ switch uv := v.(type) {
+ case *types.ReplicationRuleFilterMemberAnd:
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "And",
+ },
+ Attr: customMemberNameAttr,
+ }
+ av := value.MemberElement(customMemberName)
+ if err := awsRestxml_serializeDocumentReplicationRuleAndOperator(&uv.Value, av); err != nil {
+ return err
+ }
+
+ case *types.ReplicationRuleFilterMemberPrefix:
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: customMemberNameAttr,
+ }
+ av := value.MemberElement(customMemberName)
+ av.String(uv.Value)
+
+ case *types.ReplicationRuleFilterMemberTag:
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tag",
+ },
+ Attr: customMemberNameAttr,
+ }
+ av := value.MemberElement(customMemberName)
+ if err := awsRestxml_serializeDocumentTag(&uv.Value, av); err != nil {
+ return err
+ }
+
+ default:
+ return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v)
+
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentReplicationRules(v []types.ReplicationRule, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentReplicationRule(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentReplicationTime(v *types.ReplicationTime, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.Status) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Status",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Status))
+ }
+ if v.Time != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Time",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentReplicationTimeValue(v.Time, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentReplicationTimeValue(v *types.ReplicationTimeValue, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Minutes != 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Minutes",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Integer(v.Minutes)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentRequestPaymentConfiguration(v *types.RequestPaymentConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.Payer) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Payer",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Payer))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentRequestProgress(v *types.RequestProgress, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Enabled {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Enabled",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Boolean(v.Enabled)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentRestoreRequest(v *types.RestoreRequest, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Days != 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Days",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Integer(v.Days)
+ }
+ if v.Description != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Description",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Description)
+ }
+ if v.GlacierJobParameters != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "GlacierJobParameters",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentGlacierJobParameters(v.GlacierJobParameters, el); err != nil {
+ return err
+ }
+ }
+ if v.OutputLocation != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "OutputLocation",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentOutputLocation(v.OutputLocation, el); err != nil {
+ return err
+ }
+ }
+ if v.SelectParameters != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "SelectParameters",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentSelectParameters(v.SelectParameters, el); err != nil {
+ return err
+ }
+ }
+ if len(v.Tier) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tier",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Tier))
+ }
+ if len(v.Type) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Type",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Type))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentRoutingRule(v *types.RoutingRule, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Condition != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Condition",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentCondition(v.Condition, el); err != nil {
+ return err
+ }
+ }
+ if v.Redirect != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Redirect",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentRedirect(v.Redirect, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentRoutingRules(v []types.RoutingRule, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "RoutingRule",
+ },
+ Attr: customMemberNameAttr,
+ }
+ array = value.ArrayWithCustomName(customMemberName)
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentRoutingRule(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentS3KeyFilter(v *types.S3KeyFilter, value smithyxml.Value) error {
+ defer value.Close()
+ if v.FilterRules != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "FilterRule",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentFilterRuleList(v.FilterRules, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentS3Location(v *types.S3Location, value smithyxml.Value) error {
+ defer value.Close()
+ if v.AccessControlList != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AccessControlList",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentGrants(v.AccessControlList, el); err != nil {
+ return err
+ }
+ }
+ if v.BucketName != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "BucketName",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.BucketName)
+ }
+ if len(v.CannedACL) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "CannedACL",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.CannedACL))
+ }
+ if v.Encryption != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Encryption",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentEncryption(v.Encryption, el); err != nil {
+ return err
+ }
+ }
+ if v.Prefix != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Prefix",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Prefix)
+ }
+ if len(v.StorageClass) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "StorageClass",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.StorageClass))
+ }
+ if v.Tagging != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tagging",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentTagging(v.Tagging, el); err != nil {
+ return err
+ }
+ }
+ if v.UserMetadata != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "UserMetadata",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentUserMetadata(v.UserMetadata, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentScanRange(v *types.ScanRange, value smithyxml.Value) error {
+ defer value.Close()
+ if v.End != 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "End",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Long(v.End)
+ }
+ if v.Start != 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Start",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Long(v.Start)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentSelectParameters(v *types.SelectParameters, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Expression != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Expression",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Expression)
+ }
+ if len(v.ExpressionType) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ExpressionType",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.ExpressionType))
+ }
+ if v.InputSerialization != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "InputSerialization",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentInputSerialization(v.InputSerialization, el); err != nil {
+ return err
+ }
+ }
+ if v.OutputSerialization != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "OutputSerialization",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentOutputSerialization(v.OutputSerialization, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentServerSideEncryptionByDefault(v *types.ServerSideEncryptionByDefault, value smithyxml.Value) error {
+ defer value.Close()
+ if v.KMSMasterKeyID != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "KMSMasterKeyID",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.KMSMasterKeyID)
+ }
+ if len(v.SSEAlgorithm) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "SSEAlgorithm",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.SSEAlgorithm))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentServerSideEncryptionConfiguration(v *types.ServerSideEncryptionConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Rules != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Rule",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentServerSideEncryptionRules(v.Rules, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentServerSideEncryptionRule(v *types.ServerSideEncryptionRule, value smithyxml.Value) error {
+ defer value.Close()
+ if v.ApplyServerSideEncryptionByDefault != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ApplyServerSideEncryptionByDefault",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentServerSideEncryptionByDefault(v.ApplyServerSideEncryptionByDefault, el); err != nil {
+ return err
+ }
+ }
+ if v.BucketKeyEnabled {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "BucketKeyEnabled",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Boolean(v.BucketKeyEnabled)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentServerSideEncryptionRules(v []types.ServerSideEncryptionRule, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentServerSideEncryptionRule(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentSourceSelectionCriteria(v *types.SourceSelectionCriteria, value smithyxml.Value) error {
+ defer value.Close()
+ if v.ReplicaModifications != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ReplicaModifications",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentReplicaModifications(v.ReplicaModifications, el); err != nil {
+ return err
+ }
+ }
+ if v.SseKmsEncryptedObjects != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "SseKmsEncryptedObjects",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentSseKmsEncryptedObjects(v.SseKmsEncryptedObjects, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentSSEKMS(v *types.SSEKMS, value smithyxml.Value) error {
+ defer value.Close()
+ if v.KeyId != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "KeyId",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.KeyId)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentSseKmsEncryptedObjects(v *types.SseKmsEncryptedObjects, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.Status) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Status",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Status))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentSSES3(v *types.SSES3, value smithyxml.Value) error {
+ defer value.Close()
+ return nil
+}
+
+func awsRestxml_serializeDocumentStorageClassAnalysis(v *types.StorageClassAnalysis, value smithyxml.Value) error {
+ defer value.Close()
+ if v.DataExport != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "DataExport",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentStorageClassAnalysisDataExport(v.DataExport, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentStorageClassAnalysisDataExport(v *types.StorageClassAnalysisDataExport, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Destination != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Destination",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentAnalyticsExportDestination(v.Destination, el); err != nil {
+ return err
+ }
+ }
+ if len(v.OutputSchemaVersion) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "OutputSchemaVersion",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.OutputSchemaVersion))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentTag(v *types.Tag, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Key != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Key",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Key)
+ }
+ if v.Value != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Value",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Value)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentTagging(v *types.Tagging, value smithyxml.Value) error {
+ defer value.Close()
+ if v.TagSet != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "TagSet",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentTagSet(v.TagSet, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentTagSet(v []types.Tag, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Tag",
+ },
+ Attr: customMemberNameAttr,
+ }
+ array = value.ArrayWithCustomName(customMemberName)
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentTag(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentTargetGrant(v *types.TargetGrant, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Grantee != nil {
+ rootAttr := []smithyxml.Attr{}
+ rootAttr = append(rootAttr, smithyxml.NewNamespaceAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance"))
+ if len(v.Grantee.Type) > 0 {
+ var av string
+ av = string(v.Grantee.Type)
+ rootAttr = append(rootAttr, smithyxml.NewAttribute("xsi:type", av))
+ }
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Grantee",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentGrantee(v.Grantee, el); err != nil {
+ return err
+ }
+ }
+ if len(v.Permission) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Permission",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Permission))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentTargetGrants(v []types.TargetGrant, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Grant",
+ },
+ Attr: customMemberNameAttr,
+ }
+ array = value.ArrayWithCustomName(customMemberName)
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentTargetGrant(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentTiering(v *types.Tiering, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.AccessTier) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "AccessTier",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.AccessTier))
+ }
+ {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Days",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Integer(v.Days)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentTieringList(v []types.Tiering, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentTiering(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentTopicConfiguration(v *types.TopicConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Events != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Event",
+ },
+ Attr: rootAttr,
+ }
+ el := value.FlattenedElement(root)
+ if err := awsRestxml_serializeDocumentEventList(v.Events, el); err != nil {
+ return err
+ }
+ }
+ if v.Filter != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Filter",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentNotificationConfigurationFilter(v.Filter, el); err != nil {
+ return err
+ }
+ }
+ if v.Id != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Id",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.Id)
+ }
+ if v.TopicArn != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Topic",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.TopicArn)
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentTopicConfigurationList(v []types.TopicConfiguration, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentTopicConfiguration(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentTransition(v *types.Transition, value smithyxml.Value) error {
+ defer value.Close()
+ if v.Date != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Date",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(smithytime.FormatDateTime(*v.Date))
+ }
+ if v.Days != 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Days",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Integer(v.Days)
+ }
+ if len(v.StorageClass) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "StorageClass",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.StorageClass))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentTransitionList(v []types.Transition, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ array = value.Array()
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentTransition(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentUserMetadata(v []types.MetadataEntry, value smithyxml.Value) error {
+ var array *smithyxml.Array
+ if !value.IsFlattened() {
+ defer value.Close()
+ }
+ customMemberNameAttr := []smithyxml.Attr{}
+ customMemberName := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "MetadataEntry",
+ },
+ Attr: customMemberNameAttr,
+ }
+ array = value.ArrayWithCustomName(customMemberName)
+ for i := range v {
+ am := array.Member()
+ if err := awsRestxml_serializeDocumentMetadataEntry(&v[i], am); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentVersioningConfiguration(v *types.VersioningConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if len(v.MFADelete) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "MfaDelete",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.MFADelete))
+ }
+ if len(v.Status) > 0 {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Status",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(string(v.Status))
+ }
+ return nil
+}
+
+func awsRestxml_serializeDocumentWebsiteConfiguration(v *types.WebsiteConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.ErrorDocument != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ErrorDocument",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentErrorDocument(v.ErrorDocument, el); err != nil {
+ return err
+ }
+ }
+ if v.IndexDocument != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "IndexDocument",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentIndexDocument(v.IndexDocument, el); err != nil {
+ return err
+ }
+ }
+ if v.RedirectAllRequestsTo != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "RedirectAllRequestsTo",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentRedirectAllRequestsTo(v.RedirectAllRequestsTo, el); err != nil {
+ return err
+ }
+ }
+ if v.RoutingRules != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "RoutingRules",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentRoutingRules(v.RoutingRules, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go
new file mode 100644
index 000000000..5ead56140
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go
@@ -0,0 +1,1118 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+type AnalyticsS3ExportFileFormat string
+
+// Enum values for AnalyticsS3ExportFileFormat
+const (
+ AnalyticsS3ExportFileFormatCsv AnalyticsS3ExportFileFormat = "CSV"
+)
+
+// Values returns all known values for AnalyticsS3ExportFileFormat. Note that this
+// can be expanded in the future, and so it is only as up to date as the client.
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (AnalyticsS3ExportFileFormat) Values() []AnalyticsS3ExportFileFormat {
+ return []AnalyticsS3ExportFileFormat{
+ "CSV",
+ }
+}
+
+type ArchiveStatus string
+
+// Enum values for ArchiveStatus
+const (
+ ArchiveStatusArchiveAccess ArchiveStatus = "ARCHIVE_ACCESS"
+ ArchiveStatusDeepArchiveAccess ArchiveStatus = "DEEP_ARCHIVE_ACCESS"
+)
+
+// Values returns all known values for ArchiveStatus. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (ArchiveStatus) Values() []ArchiveStatus {
+ return []ArchiveStatus{
+ "ARCHIVE_ACCESS",
+ "DEEP_ARCHIVE_ACCESS",
+ }
+}
+
+type BucketAccelerateStatus string
+
+// Enum values for BucketAccelerateStatus
+const (
+ BucketAccelerateStatusEnabled BucketAccelerateStatus = "Enabled"
+ BucketAccelerateStatusSuspended BucketAccelerateStatus = "Suspended"
+)
+
+// Values returns all known values for BucketAccelerateStatus. Note that this can
+// be expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (BucketAccelerateStatus) Values() []BucketAccelerateStatus {
+ return []BucketAccelerateStatus{
+ "Enabled",
+ "Suspended",
+ }
+}
+
+type BucketCannedACL string
+
+// Enum values for BucketCannedACL
+const (
+ BucketCannedACLPrivate BucketCannedACL = "private"
+ BucketCannedACLPublicRead BucketCannedACL = "public-read"
+ BucketCannedACLPublicReadWrite BucketCannedACL = "public-read-write"
+ BucketCannedACLAuthenticatedRead BucketCannedACL = "authenticated-read"
+)
+
+// Values returns all known values for BucketCannedACL. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (BucketCannedACL) Values() []BucketCannedACL {
+ return []BucketCannedACL{
+ "private",
+ "public-read",
+ "public-read-write",
+ "authenticated-read",
+ }
+}
+
+type BucketLocationConstraint string
+
+// Enum values for BucketLocationConstraint
+const (
+ BucketLocationConstraintAfSouth1 BucketLocationConstraint = "af-south-1"
+ BucketLocationConstraintApEast1 BucketLocationConstraint = "ap-east-1"
+ BucketLocationConstraintApNortheast1 BucketLocationConstraint = "ap-northeast-1"
+ BucketLocationConstraintApNortheast2 BucketLocationConstraint = "ap-northeast-2"
+ BucketLocationConstraintApNortheast3 BucketLocationConstraint = "ap-northeast-3"
+ BucketLocationConstraintApSouth1 BucketLocationConstraint = "ap-south-1"
+ BucketLocationConstraintApSoutheast1 BucketLocationConstraint = "ap-southeast-1"
+ BucketLocationConstraintApSoutheast2 BucketLocationConstraint = "ap-southeast-2"
+ BucketLocationConstraintCaCentral1 BucketLocationConstraint = "ca-central-1"
+ BucketLocationConstraintCnNorth1 BucketLocationConstraint = "cn-north-1"
+ BucketLocationConstraintCnNorthwest1 BucketLocationConstraint = "cn-northwest-1"
+ BucketLocationConstraintEu BucketLocationConstraint = "EU"
+ BucketLocationConstraintEuCentral1 BucketLocationConstraint = "eu-central-1"
+ BucketLocationConstraintEuNorth1 BucketLocationConstraint = "eu-north-1"
+ BucketLocationConstraintEuSouth1 BucketLocationConstraint = "eu-south-1"
+ BucketLocationConstraintEuWest1 BucketLocationConstraint = "eu-west-1"
+ BucketLocationConstraintEuWest2 BucketLocationConstraint = "eu-west-2"
+ BucketLocationConstraintEuWest3 BucketLocationConstraint = "eu-west-3"
+ BucketLocationConstraintMeSouth1 BucketLocationConstraint = "me-south-1"
+ BucketLocationConstraintSaEast1 BucketLocationConstraint = "sa-east-1"
+ BucketLocationConstraintUsEast2 BucketLocationConstraint = "us-east-2"
+ BucketLocationConstraintUsGovEast1 BucketLocationConstraint = "us-gov-east-1"
+ BucketLocationConstraintUsGovWest1 BucketLocationConstraint = "us-gov-west-1"
+ BucketLocationConstraintUsWest1 BucketLocationConstraint = "us-west-1"
+ BucketLocationConstraintUsWest2 BucketLocationConstraint = "us-west-2"
+)
+
+// Values returns all known values for BucketLocationConstraint. Note that this can
+// be expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (BucketLocationConstraint) Values() []BucketLocationConstraint {
+ return []BucketLocationConstraint{
+ "af-south-1",
+ "ap-east-1",
+ "ap-northeast-1",
+ "ap-northeast-2",
+ "ap-northeast-3",
+ "ap-south-1",
+ "ap-southeast-1",
+ "ap-southeast-2",
+ "ca-central-1",
+ "cn-north-1",
+ "cn-northwest-1",
+ "EU",
+ "eu-central-1",
+ "eu-north-1",
+ "eu-south-1",
+ "eu-west-1",
+ "eu-west-2",
+ "eu-west-3",
+ "me-south-1",
+ "sa-east-1",
+ "us-east-2",
+ "us-gov-east-1",
+ "us-gov-west-1",
+ "us-west-1",
+ "us-west-2",
+ }
+}
+
+type BucketLogsPermission string
+
+// Enum values for BucketLogsPermission
+const (
+ BucketLogsPermissionFullControl BucketLogsPermission = "FULL_CONTROL"
+ BucketLogsPermissionRead BucketLogsPermission = "READ"
+ BucketLogsPermissionWrite BucketLogsPermission = "WRITE"
+)
+
+// Values returns all known values for BucketLogsPermission. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (BucketLogsPermission) Values() []BucketLogsPermission {
+ return []BucketLogsPermission{
+ "FULL_CONTROL",
+ "READ",
+ "WRITE",
+ }
+}
+
+type BucketVersioningStatus string
+
+// Enum values for BucketVersioningStatus
+const (
+ BucketVersioningStatusEnabled BucketVersioningStatus = "Enabled"
+ BucketVersioningStatusSuspended BucketVersioningStatus = "Suspended"
+)
+
+// Values returns all known values for BucketVersioningStatus. Note that this can
+// be expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (BucketVersioningStatus) Values() []BucketVersioningStatus {
+ return []BucketVersioningStatus{
+ "Enabled",
+ "Suspended",
+ }
+}
+
+type CompressionType string
+
+// Enum values for CompressionType
+const (
+ CompressionTypeNone CompressionType = "NONE"
+ CompressionTypeGzip CompressionType = "GZIP"
+ CompressionTypeBzip2 CompressionType = "BZIP2"
+)
+
+// Values returns all known values for CompressionType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (CompressionType) Values() []CompressionType {
+ return []CompressionType{
+ "NONE",
+ "GZIP",
+ "BZIP2",
+ }
+}
+
+type DeleteMarkerReplicationStatus string
+
+// Enum values for DeleteMarkerReplicationStatus
+const (
+ DeleteMarkerReplicationStatusEnabled DeleteMarkerReplicationStatus = "Enabled"
+ DeleteMarkerReplicationStatusDisabled DeleteMarkerReplicationStatus = "Disabled"
+)
+
+// Values returns all known values for DeleteMarkerReplicationStatus. Note that
+// this can be expanded in the future, and so it is only as up to date as the
+// client. The ordering of this slice is not guaranteed to be stable across
+// updates.
+func (DeleteMarkerReplicationStatus) Values() []DeleteMarkerReplicationStatus {
+ return []DeleteMarkerReplicationStatus{
+ "Enabled",
+ "Disabled",
+ }
+}
+
+type EncodingType string
+
+// Enum values for EncodingType
+const (
+ EncodingTypeUrl EncodingType = "url"
+)
+
+// Values returns all known values for EncodingType. Note that this can be expanded
+// in the future, and so it is only as up to date as the client. The ordering of
+// this slice is not guaranteed to be stable across updates.
+func (EncodingType) Values() []EncodingType {
+ return []EncodingType{
+ "url",
+ }
+}
+
+type Event string
+
+// Values returns all known values for Event. Note that this can be expanded in the
+// future, and so it is only as up to date as the client. The ordering of this
+// slice is not guaranteed to be stable across updates.
+func (Event) Values() []Event {
+ return []Event{
+ "s3:ReducedRedundancyLostObject",
+ "s3:ObjectCreated:*",
+ "s3:ObjectCreated:Put",
+ "s3:ObjectCreated:Post",
+ "s3:ObjectCreated:Copy",
+ "s3:ObjectCreated:CompleteMultipartUpload",
+ "s3:ObjectRemoved:*",
+ "s3:ObjectRemoved:Delete",
+ "s3:ObjectRemoved:DeleteMarkerCreated",
+ "s3:ObjectRestore:*",
+ "s3:ObjectRestore:Post",
+ "s3:ObjectRestore:Completed",
+ "s3:Replication:*",
+ "s3:Replication:OperationFailedReplication",
+ "s3:Replication:OperationNotTracked",
+ "s3:Replication:OperationMissedThreshold",
+ "s3:Replication:OperationReplicatedAfterThreshold",
+ }
+}
+
+type ExistingObjectReplicationStatus string
+
+// Enum values for ExistingObjectReplicationStatus
+const (
+ ExistingObjectReplicationStatusEnabled ExistingObjectReplicationStatus = "Enabled"
+ ExistingObjectReplicationStatusDisabled ExistingObjectReplicationStatus = "Disabled"
+)
+
+// Values returns all known values for ExistingObjectReplicationStatus. Note that
+// this can be expanded in the future, and so it is only as up to date as the
+// client. The ordering of this slice is not guaranteed to be stable across
+// updates.
+func (ExistingObjectReplicationStatus) Values() []ExistingObjectReplicationStatus {
+ return []ExistingObjectReplicationStatus{
+ "Enabled",
+ "Disabled",
+ }
+}
+
+type ExpirationStatus string
+
+// Enum values for ExpirationStatus
+const (
+ ExpirationStatusEnabled ExpirationStatus = "Enabled"
+ ExpirationStatusDisabled ExpirationStatus = "Disabled"
+)
+
+// Values returns all known values for ExpirationStatus. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (ExpirationStatus) Values() []ExpirationStatus {
+ return []ExpirationStatus{
+ "Enabled",
+ "Disabled",
+ }
+}
+
+type ExpressionType string
+
+// Enum values for ExpressionType
+const (
+ ExpressionTypeSql ExpressionType = "SQL"
+)
+
+// Values returns all known values for ExpressionType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (ExpressionType) Values() []ExpressionType {
+ return []ExpressionType{
+ "SQL",
+ }
+}
+
+type FileHeaderInfo string
+
+// Enum values for FileHeaderInfo
+const (
+ FileHeaderInfoUse FileHeaderInfo = "USE"
+ FileHeaderInfoIgnore FileHeaderInfo = "IGNORE"
+ FileHeaderInfoNone FileHeaderInfo = "NONE"
+)
+
+// Values returns all known values for FileHeaderInfo. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (FileHeaderInfo) Values() []FileHeaderInfo {
+ return []FileHeaderInfo{
+ "USE",
+ "IGNORE",
+ "NONE",
+ }
+}
+
+type FilterRuleName string
+
+// Enum values for FilterRuleName
+const (
+ FilterRuleNamePrefix FilterRuleName = "prefix"
+ FilterRuleNameSuffix FilterRuleName = "suffix"
+)
+
+// Values returns all known values for FilterRuleName. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (FilterRuleName) Values() []FilterRuleName {
+ return []FilterRuleName{
+ "prefix",
+ "suffix",
+ }
+}
+
+type IntelligentTieringAccessTier string
+
+// Enum values for IntelligentTieringAccessTier
+const (
+ IntelligentTieringAccessTierArchiveAccess IntelligentTieringAccessTier = "ARCHIVE_ACCESS"
+ IntelligentTieringAccessTierDeepArchiveAccess IntelligentTieringAccessTier = "DEEP_ARCHIVE_ACCESS"
+)
+
+// Values returns all known values for IntelligentTieringAccessTier. Note that this
+// can be expanded in the future, and so it is only as up to date as the client.
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (IntelligentTieringAccessTier) Values() []IntelligentTieringAccessTier {
+ return []IntelligentTieringAccessTier{
+ "ARCHIVE_ACCESS",
+ "DEEP_ARCHIVE_ACCESS",
+ }
+}
+
+type IntelligentTieringStatus string
+
+// Enum values for IntelligentTieringStatus
+const (
+ IntelligentTieringStatusEnabled IntelligentTieringStatus = "Enabled"
+ IntelligentTieringStatusDisabled IntelligentTieringStatus = "Disabled"
+)
+
+// Values returns all known values for IntelligentTieringStatus. Note that this can
+// be expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (IntelligentTieringStatus) Values() []IntelligentTieringStatus {
+ return []IntelligentTieringStatus{
+ "Enabled",
+ "Disabled",
+ }
+}
+
+type InventoryFormat string
+
+// Enum values for InventoryFormat
+const (
+ InventoryFormatCsv InventoryFormat = "CSV"
+ InventoryFormatOrc InventoryFormat = "ORC"
+ InventoryFormatParquet InventoryFormat = "Parquet"
+)
+
+// Values returns all known values for InventoryFormat. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (InventoryFormat) Values() []InventoryFormat {
+ return []InventoryFormat{
+ "CSV",
+ "ORC",
+ "Parquet",
+ }
+}
+
+type InventoryFrequency string
+
+// Enum values for InventoryFrequency
+const (
+ InventoryFrequencyDaily InventoryFrequency = "Daily"
+ InventoryFrequencyWeekly InventoryFrequency = "Weekly"
+)
+
+// Values returns all known values for InventoryFrequency. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (InventoryFrequency) Values() []InventoryFrequency {
+ return []InventoryFrequency{
+ "Daily",
+ "Weekly",
+ }
+}
+
+type InventoryIncludedObjectVersions string
+
+// Enum values for InventoryIncludedObjectVersions
+const (
+ InventoryIncludedObjectVersionsAll InventoryIncludedObjectVersions = "All"
+ InventoryIncludedObjectVersionsCurrent InventoryIncludedObjectVersions = "Current"
+)
+
+// Values returns all known values for InventoryIncludedObjectVersions. Note that
+// this can be expanded in the future, and so it is only as up to date as the
+// client. The ordering of this slice is not guaranteed to be stable across
+// updates.
+func (InventoryIncludedObjectVersions) Values() []InventoryIncludedObjectVersions {
+ return []InventoryIncludedObjectVersions{
+ "All",
+ "Current",
+ }
+}
+
+type InventoryOptionalField string
+
+// Enum values for InventoryOptionalField
+const (
+ InventoryOptionalFieldSize InventoryOptionalField = "Size"
+ InventoryOptionalFieldLastModifiedDate InventoryOptionalField = "LastModifiedDate"
+ InventoryOptionalFieldStorageClass InventoryOptionalField = "StorageClass"
+ InventoryOptionalFieldETag InventoryOptionalField = "ETag"
+ InventoryOptionalFieldIsMultipartUploaded InventoryOptionalField = "IsMultipartUploaded"
+ InventoryOptionalFieldReplicationStatus InventoryOptionalField = "ReplicationStatus"
+ InventoryOptionalFieldEncryptionStatus InventoryOptionalField = "EncryptionStatus"
+ InventoryOptionalFieldObjectLockRetainUntilDate InventoryOptionalField = "ObjectLockRetainUntilDate"
+ InventoryOptionalFieldObjectLockMode InventoryOptionalField = "ObjectLockMode"
+ InventoryOptionalFieldObjectLockLegalHoldStatus InventoryOptionalField = "ObjectLockLegalHoldStatus"
+ InventoryOptionalFieldIntelligentTieringAccessTier InventoryOptionalField = "IntelligentTieringAccessTier"
+ InventoryOptionalFieldBucketKeyStatus InventoryOptionalField = "BucketKeyStatus"
+)
+
+// Values returns all known values for InventoryOptionalField. Note that this can
+// be expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (InventoryOptionalField) Values() []InventoryOptionalField {
+ return []InventoryOptionalField{
+ "Size",
+ "LastModifiedDate",
+ "StorageClass",
+ "ETag",
+ "IsMultipartUploaded",
+ "ReplicationStatus",
+ "EncryptionStatus",
+ "ObjectLockRetainUntilDate",
+ "ObjectLockMode",
+ "ObjectLockLegalHoldStatus",
+ "IntelligentTieringAccessTier",
+ "BucketKeyStatus",
+ }
+}
+
+type JSONType string
+
+// Enum values for JSONType
+const (
+ JSONTypeDocument JSONType = "DOCUMENT"
+ JSONTypeLines JSONType = "LINES"
+)
+
+// Values returns all known values for JSONType. Note that this can be expanded in
+// the future, and so it is only as up to date as the client. The ordering of this
+// slice is not guaranteed to be stable across updates.
+func (JSONType) Values() []JSONType {
+ return []JSONType{
+ "DOCUMENT",
+ "LINES",
+ }
+}
+
+type MetadataDirective string
+
+// Enum values for MetadataDirective
+const (
+ MetadataDirectiveCopy MetadataDirective = "COPY"
+ MetadataDirectiveReplace MetadataDirective = "REPLACE"
+)
+
+// Values returns all known values for MetadataDirective. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (MetadataDirective) Values() []MetadataDirective {
+ return []MetadataDirective{
+ "COPY",
+ "REPLACE",
+ }
+}
+
+type MetricsStatus string
+
+// Enum values for MetricsStatus
+const (
+ MetricsStatusEnabled MetricsStatus = "Enabled"
+ MetricsStatusDisabled MetricsStatus = "Disabled"
+)
+
+// Values returns all known values for MetricsStatus. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (MetricsStatus) Values() []MetricsStatus {
+ return []MetricsStatus{
+ "Enabled",
+ "Disabled",
+ }
+}
+
+type MFADelete string
+
+// Enum values for MFADelete
+const (
+ MFADeleteEnabled MFADelete = "Enabled"
+ MFADeleteDisabled MFADelete = "Disabled"
+)
+
+// Values returns all known values for MFADelete. Note that this can be expanded in
+// the future, and so it is only as up to date as the client. The ordering of this
+// slice is not guaranteed to be stable across updates.
+func (MFADelete) Values() []MFADelete {
+ return []MFADelete{
+ "Enabled",
+ "Disabled",
+ }
+}
+
+type MFADeleteStatus string
+
+// Enum values for MFADeleteStatus
+const (
+ MFADeleteStatusEnabled MFADeleteStatus = "Enabled"
+ MFADeleteStatusDisabled MFADeleteStatus = "Disabled"
+)
+
+// Values returns all known values for MFADeleteStatus. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (MFADeleteStatus) Values() []MFADeleteStatus {
+ return []MFADeleteStatus{
+ "Enabled",
+ "Disabled",
+ }
+}
+
+type ObjectCannedACL string
+
+// Enum values for ObjectCannedACL
+const (
+ ObjectCannedACLPrivate ObjectCannedACL = "private"
+ ObjectCannedACLPublicRead ObjectCannedACL = "public-read"
+ ObjectCannedACLPublicReadWrite ObjectCannedACL = "public-read-write"
+ ObjectCannedACLAuthenticatedRead ObjectCannedACL = "authenticated-read"
+ ObjectCannedACLAwsExecRead ObjectCannedACL = "aws-exec-read"
+ ObjectCannedACLBucketOwnerRead ObjectCannedACL = "bucket-owner-read"
+ ObjectCannedACLBucketOwnerFullControl ObjectCannedACL = "bucket-owner-full-control"
+)
+
+// Values returns all known values for ObjectCannedACL. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (ObjectCannedACL) Values() []ObjectCannedACL {
+ return []ObjectCannedACL{
+ "private",
+ "public-read",
+ "public-read-write",
+ "authenticated-read",
+ "aws-exec-read",
+ "bucket-owner-read",
+ "bucket-owner-full-control",
+ }
+}
+
+type ObjectLockEnabled string
+
+// Enum values for ObjectLockEnabled
+const (
+ ObjectLockEnabledEnabled ObjectLockEnabled = "Enabled"
+)
+
+// Values returns all known values for ObjectLockEnabled. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (ObjectLockEnabled) Values() []ObjectLockEnabled {
+ return []ObjectLockEnabled{
+ "Enabled",
+ }
+}
+
+type ObjectLockLegalHoldStatus string
+
+// Enum values for ObjectLockLegalHoldStatus
+const (
+ ObjectLockLegalHoldStatusOn ObjectLockLegalHoldStatus = "ON"
+ ObjectLockLegalHoldStatusOff ObjectLockLegalHoldStatus = "OFF"
+)
+
+// Values returns all known values for ObjectLockLegalHoldStatus. Note that this
+// can be expanded in the future, and so it is only as up to date as the client.
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (ObjectLockLegalHoldStatus) Values() []ObjectLockLegalHoldStatus {
+ return []ObjectLockLegalHoldStatus{
+ "ON",
+ "OFF",
+ }
+}
+
+type ObjectLockMode string
+
+// Enum values for ObjectLockMode
+const (
+ ObjectLockModeGovernance ObjectLockMode = "GOVERNANCE"
+ ObjectLockModeCompliance ObjectLockMode = "COMPLIANCE"
+)
+
+// Values returns all known values for ObjectLockMode. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (ObjectLockMode) Values() []ObjectLockMode {
+ return []ObjectLockMode{
+ "GOVERNANCE",
+ "COMPLIANCE",
+ }
+}
+
+type ObjectLockRetentionMode string
+
+// Enum values for ObjectLockRetentionMode
+const (
+ ObjectLockRetentionModeGovernance ObjectLockRetentionMode = "GOVERNANCE"
+ ObjectLockRetentionModeCompliance ObjectLockRetentionMode = "COMPLIANCE"
+)
+
+// Values returns all known values for ObjectLockRetentionMode. Note that this can
+// be expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (ObjectLockRetentionMode) Values() []ObjectLockRetentionMode {
+ return []ObjectLockRetentionMode{
+ "GOVERNANCE",
+ "COMPLIANCE",
+ }
+}
+
+type ObjectOwnership string
+
+// Enum values for ObjectOwnership
+const (
+ ObjectOwnershipBucketOwnerPreferred ObjectOwnership = "BucketOwnerPreferred"
+ ObjectOwnershipObjectWriter ObjectOwnership = "ObjectWriter"
+)
+
+// Values returns all known values for ObjectOwnership. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (ObjectOwnership) Values() []ObjectOwnership {
+ return []ObjectOwnership{
+ "BucketOwnerPreferred",
+ "ObjectWriter",
+ }
+}
+
+type ObjectStorageClass string
+
+// Enum values for ObjectStorageClass
+const (
+ ObjectStorageClassStandard ObjectStorageClass = "STANDARD"
+ ObjectStorageClassReducedRedundancy ObjectStorageClass = "REDUCED_REDUNDANCY"
+ ObjectStorageClassGlacier ObjectStorageClass = "GLACIER"
+ ObjectStorageClassStandardIa ObjectStorageClass = "STANDARD_IA"
+ ObjectStorageClassOnezoneIa ObjectStorageClass = "ONEZONE_IA"
+ ObjectStorageClassIntelligentTiering ObjectStorageClass = "INTELLIGENT_TIERING"
+ ObjectStorageClassDeepArchive ObjectStorageClass = "DEEP_ARCHIVE"
+ ObjectStorageClassOutposts ObjectStorageClass = "OUTPOSTS"
+)
+
+// Values returns all known values for ObjectStorageClass. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (ObjectStorageClass) Values() []ObjectStorageClass {
+ return []ObjectStorageClass{
+ "STANDARD",
+ "REDUCED_REDUNDANCY",
+ "GLACIER",
+ "STANDARD_IA",
+ "ONEZONE_IA",
+ "INTELLIGENT_TIERING",
+ "DEEP_ARCHIVE",
+ "OUTPOSTS",
+ }
+}
+
+type ObjectVersionStorageClass string
+
+// Enum values for ObjectVersionStorageClass
+const (
+ ObjectVersionStorageClassStandard ObjectVersionStorageClass = "STANDARD"
+)
+
+// Values returns all known values for ObjectVersionStorageClass. Note that this
+// can be expanded in the future, and so it is only as up to date as the client.
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (ObjectVersionStorageClass) Values() []ObjectVersionStorageClass {
+ return []ObjectVersionStorageClass{
+ "STANDARD",
+ }
+}
+
+type OwnerOverride string
+
+// Enum values for OwnerOverride
+const (
+ OwnerOverrideDestination OwnerOverride = "Destination"
+)
+
+// Values returns all known values for OwnerOverride. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (OwnerOverride) Values() []OwnerOverride {
+ return []OwnerOverride{
+ "Destination",
+ }
+}
+
+type Payer string
+
+// Enum values for Payer
+const (
+ PayerRequester Payer = "Requester"
+ PayerBucketOwner Payer = "BucketOwner"
+)
+
+// Values returns all known values for Payer. Note that this can be expanded in the
+// future, and so it is only as up to date as the client. The ordering of this
+// slice is not guaranteed to be stable across updates.
+func (Payer) Values() []Payer {
+ return []Payer{
+ "Requester",
+ "BucketOwner",
+ }
+}
+
+type Permission string
+
+// Enum values for Permission
+const (
+ PermissionFullControl Permission = "FULL_CONTROL"
+ PermissionWrite Permission = "WRITE"
+ PermissionWriteAcp Permission = "WRITE_ACP"
+ PermissionRead Permission = "READ"
+ PermissionReadAcp Permission = "READ_ACP"
+)
+
+// Values returns all known values for Permission. Note that this can be expanded
+// in the future, and so it is only as up to date as the client. The ordering of
+// this slice is not guaranteed to be stable across updates.
+func (Permission) Values() []Permission {
+ return []Permission{
+ "FULL_CONTROL",
+ "WRITE",
+ "WRITE_ACP",
+ "READ",
+ "READ_ACP",
+ }
+}
+
+type Protocol string
+
+// Enum values for Protocol
+const (
+ ProtocolHttp Protocol = "http"
+ ProtocolHttps Protocol = "https"
+)
+
+// Values returns all known values for Protocol. Note that this can be expanded in
+// the future, and so it is only as up to date as the client. The ordering of this
+// slice is not guaranteed to be stable across updates.
+func (Protocol) Values() []Protocol {
+ return []Protocol{
+ "http",
+ "https",
+ }
+}
+
+type QuoteFields string
+
+// Enum values for QuoteFields
+const (
+ QuoteFieldsAlways QuoteFields = "ALWAYS"
+ QuoteFieldsAsneeded QuoteFields = "ASNEEDED"
+)
+
+// Values returns all known values for QuoteFields. Note that this can be expanded
+// in the future, and so it is only as up to date as the client. The ordering of
+// this slice is not guaranteed to be stable across updates.
+func (QuoteFields) Values() []QuoteFields {
+ return []QuoteFields{
+ "ALWAYS",
+ "ASNEEDED",
+ }
+}
+
+type ReplicaModificationsStatus string
+
+// Enum values for ReplicaModificationsStatus
+const (
+ ReplicaModificationsStatusEnabled ReplicaModificationsStatus = "Enabled"
+ ReplicaModificationsStatusDisabled ReplicaModificationsStatus = "Disabled"
+)
+
+// Values returns all known values for ReplicaModificationsStatus. Note that this
+// can be expanded in the future, and so it is only as up to date as the client.
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (ReplicaModificationsStatus) Values() []ReplicaModificationsStatus {
+ return []ReplicaModificationsStatus{
+ "Enabled",
+ "Disabled",
+ }
+}
+
+type ReplicationRuleStatus string
+
+// Enum values for ReplicationRuleStatus
+const (
+ ReplicationRuleStatusEnabled ReplicationRuleStatus = "Enabled"
+ ReplicationRuleStatusDisabled ReplicationRuleStatus = "Disabled"
+)
+
+// Values returns all known values for ReplicationRuleStatus. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (ReplicationRuleStatus) Values() []ReplicationRuleStatus {
+ return []ReplicationRuleStatus{
+ "Enabled",
+ "Disabled",
+ }
+}
+
+type ReplicationStatus string
+
+// Enum values for ReplicationStatus
+const (
+ ReplicationStatusComplete ReplicationStatus = "COMPLETE"
+ ReplicationStatusPending ReplicationStatus = "PENDING"
+ ReplicationStatusFailed ReplicationStatus = "FAILED"
+ ReplicationStatusReplica ReplicationStatus = "REPLICA"
+)
+
+// Values returns all known values for ReplicationStatus. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (ReplicationStatus) Values() []ReplicationStatus {
+ return []ReplicationStatus{
+ "COMPLETE",
+ "PENDING",
+ "FAILED",
+ "REPLICA",
+ }
+}
+
+type ReplicationTimeStatus string
+
+// Enum values for ReplicationTimeStatus
+const (
+ ReplicationTimeStatusEnabled ReplicationTimeStatus = "Enabled"
+ ReplicationTimeStatusDisabled ReplicationTimeStatus = "Disabled"
+)
+
+// Values returns all known values for ReplicationTimeStatus. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (ReplicationTimeStatus) Values() []ReplicationTimeStatus {
+ return []ReplicationTimeStatus{
+ "Enabled",
+ "Disabled",
+ }
+}
+
+type RequestCharged string
+
+// Enum values for RequestCharged
+const (
+ RequestChargedRequester RequestCharged = "requester"
+)
+
+// Values returns all known values for RequestCharged. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (RequestCharged) Values() []RequestCharged {
+ return []RequestCharged{
+ "requester",
+ }
+}
+
+type RequestPayer string
+
+// Enum values for RequestPayer
+const (
+ RequestPayerRequester RequestPayer = "requester"
+)
+
+// Values returns all known values for RequestPayer. Note that this can be expanded
+// in the future, and so it is only as up to date as the client. The ordering of
+// this slice is not guaranteed to be stable across updates.
+func (RequestPayer) Values() []RequestPayer {
+ return []RequestPayer{
+ "requester",
+ }
+}
+
+type RestoreRequestType string
+
+// Enum values for RestoreRequestType
+const (
+ RestoreRequestTypeSelect RestoreRequestType = "SELECT"
+)
+
+// Values returns all known values for RestoreRequestType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (RestoreRequestType) Values() []RestoreRequestType {
+ return []RestoreRequestType{
+ "SELECT",
+ }
+}
+
+type ServerSideEncryption string
+
+// Enum values for ServerSideEncryption
+const (
+ ServerSideEncryptionAes256 ServerSideEncryption = "AES256"
+ ServerSideEncryptionAwsKms ServerSideEncryption = "aws:kms"
+)
+
+// Values returns all known values for ServerSideEncryption. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (ServerSideEncryption) Values() []ServerSideEncryption {
+ return []ServerSideEncryption{
+ "AES256",
+ "aws:kms",
+ }
+}
+
+type SseKmsEncryptedObjectsStatus string
+
+// Enum values for SseKmsEncryptedObjectsStatus
+const (
+ SseKmsEncryptedObjectsStatusEnabled SseKmsEncryptedObjectsStatus = "Enabled"
+ SseKmsEncryptedObjectsStatusDisabled SseKmsEncryptedObjectsStatus = "Disabled"
+)
+
+// Values returns all known values for SseKmsEncryptedObjectsStatus. Note that this
+// can be expanded in the future, and so it is only as up to date as the client.
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (SseKmsEncryptedObjectsStatus) Values() []SseKmsEncryptedObjectsStatus {
+ return []SseKmsEncryptedObjectsStatus{
+ "Enabled",
+ "Disabled",
+ }
+}
+
+type StorageClass string
+
+// Enum values for StorageClass
+const (
+ StorageClassStandard StorageClass = "STANDARD"
+ StorageClassReducedRedundancy StorageClass = "REDUCED_REDUNDANCY"
+ StorageClassStandardIa StorageClass = "STANDARD_IA"
+ StorageClassOnezoneIa StorageClass = "ONEZONE_IA"
+ StorageClassIntelligentTiering StorageClass = "INTELLIGENT_TIERING"
+ StorageClassGlacier StorageClass = "GLACIER"
+ StorageClassDeepArchive StorageClass = "DEEP_ARCHIVE"
+ StorageClassOutposts StorageClass = "OUTPOSTS"
+)
+
+// Values returns all known values for StorageClass. Note that this can be expanded
+// in the future, and so it is only as up to date as the client. The ordering of
+// this slice is not guaranteed to be stable across updates.
+func (StorageClass) Values() []StorageClass {
+ return []StorageClass{
+ "STANDARD",
+ "REDUCED_REDUNDANCY",
+ "STANDARD_IA",
+ "ONEZONE_IA",
+ "INTELLIGENT_TIERING",
+ "GLACIER",
+ "DEEP_ARCHIVE",
+ "OUTPOSTS",
+ }
+}
+
+type StorageClassAnalysisSchemaVersion string
+
+// Enum values for StorageClassAnalysisSchemaVersion
+const (
+ StorageClassAnalysisSchemaVersionV1 StorageClassAnalysisSchemaVersion = "V_1"
+)
+
+// Values returns all known values for StorageClassAnalysisSchemaVersion. Note that
+// this can be expanded in the future, and so it is only as up to date as the
+// client. The ordering of this slice is not guaranteed to be stable across
+// updates.
+func (StorageClassAnalysisSchemaVersion) Values() []StorageClassAnalysisSchemaVersion {
+ return []StorageClassAnalysisSchemaVersion{
+ "V_1",
+ }
+}
+
+type TaggingDirective string
+
+// Enum values for TaggingDirective
+const (
+ TaggingDirectiveCopy TaggingDirective = "COPY"
+ TaggingDirectiveReplace TaggingDirective = "REPLACE"
+)
+
+// Values returns all known values for TaggingDirective. Note that this can be
+// expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (TaggingDirective) Values() []TaggingDirective {
+ return []TaggingDirective{
+ "COPY",
+ "REPLACE",
+ }
+}
+
+type Tier string
+
+// Enum values for Tier
+const (
+ TierStandard Tier = "Standard"
+ TierBulk Tier = "Bulk"
+ TierExpedited Tier = "Expedited"
+)
+
+// Values returns all known values for Tier. Note that this can be expanded in the
+// future, and so it is only as up to date as the client. The ordering of this
+// slice is not guaranteed to be stable across updates.
+func (Tier) Values() []Tier {
+ return []Tier{
+ "Standard",
+ "Bulk",
+ "Expedited",
+ }
+}
+
+type TransitionStorageClass string
+
+// Enum values for TransitionStorageClass
+const (
+ TransitionStorageClassGlacier TransitionStorageClass = "GLACIER"
+ TransitionStorageClassStandardIa TransitionStorageClass = "STANDARD_IA"
+ TransitionStorageClassOnezoneIa TransitionStorageClass = "ONEZONE_IA"
+ TransitionStorageClassIntelligentTiering TransitionStorageClass = "INTELLIGENT_TIERING"
+ TransitionStorageClassDeepArchive TransitionStorageClass = "DEEP_ARCHIVE"
+)
+
+// Values returns all known values for TransitionStorageClass. Note that this can
+// be expanded in the future, and so it is only as up to date as the client. The
+// ordering of this slice is not guaranteed to be stable across updates.
+func (TransitionStorageClass) Values() []TransitionStorageClass {
+ return []TransitionStorageClass{
+ "GLACIER",
+ "STANDARD_IA",
+ "ONEZONE_IA",
+ "INTELLIGENT_TIERING",
+ "DEEP_ARCHIVE",
+ }
+}
+
+type Type string
+
+// Enum values for Type
+const (
+ TypeCanonicalUser Type = "CanonicalUser"
+ TypeAmazonCustomerByEmail Type = "AmazonCustomerByEmail"
+ TypeGroup Type = "Group"
+)
+
+// Values returns all known values for Type. Note that this can be expanded in the
+// future, and so it is only as up to date as the client. The ordering of this
+// slice is not guaranteed to be stable across updates.
+func (Type) Values() []Type {
+ return []Type{
+ "CanonicalUser",
+ "AmazonCustomerByEmail",
+ "Group",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/errors.go
new file mode 100644
index 000000000..8c3a386f7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/errors.go
@@ -0,0 +1,188 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ "fmt"
+ smithy "github.com/aws/smithy-go"
+)
+
+// The requested bucket name is not available. The bucket namespace is shared by
+// all users of the system. Select a different name and try again.
+type BucketAlreadyExists struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *BucketAlreadyExists) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *BucketAlreadyExists) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *BucketAlreadyExists) ErrorCode() string { return "BucketAlreadyExists" }
+func (e *BucketAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The bucket you tried to create already exists, and you own it. Amazon S3 returns
+// this error in all Amazon Web Services 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).
+type BucketAlreadyOwnedByYou struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *BucketAlreadyOwnedByYou) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *BucketAlreadyOwnedByYou) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *BucketAlreadyOwnedByYou) ErrorCode() string { return "BucketAlreadyOwnedByYou" }
+func (e *BucketAlreadyOwnedByYou) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Object is archived and inaccessible until restored.
+type InvalidObjectState struct {
+ Message *string
+
+ StorageClass StorageClass
+ AccessTier IntelligentTieringAccessTier
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidObjectState) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidObjectState) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidObjectState) ErrorCode() string { return "InvalidObjectState" }
+func (e *InvalidObjectState) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The specified bucket does not exist.
+type NoSuchBucket struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *NoSuchBucket) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *NoSuchBucket) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *NoSuchBucket) ErrorCode() string { return "NoSuchBucket" }
+func (e *NoSuchBucket) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The specified key does not exist.
+type NoSuchKey struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *NoSuchKey) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *NoSuchKey) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *NoSuchKey) ErrorCode() string { return "NoSuchKey" }
+func (e *NoSuchKey) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The specified multipart upload does not exist.
+type NoSuchUpload struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *NoSuchUpload) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *NoSuchUpload) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *NoSuchUpload) ErrorCode() string { return "NoSuchUpload" }
+func (e *NoSuchUpload) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The specified content does not exist.
+type NotFound struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *NotFound) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *NotFound) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *NotFound) ErrorCode() string { return "NotFound" }
+func (e *NotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// This action is not allowed against this storage tier.
+type ObjectAlreadyInActiveTierError struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ObjectAlreadyInActiveTierError) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ObjectAlreadyInActiveTierError) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ObjectAlreadyInActiveTierError) ErrorCode() string { return "ObjectAlreadyInActiveTierError" }
+func (e *ObjectAlreadyInActiveTierError) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The source object of the COPY action is not in the active tier and is only
+// stored in Amazon S3 Glacier.
+type ObjectNotInActiveTierError struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ObjectNotInActiveTierError) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ObjectNotInActiveTierError) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ObjectNotInActiveTierError) ErrorCode() string { return "ObjectNotInActiveTierError" }
+func (e *ObjectNotInActiveTierError) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go
new file mode 100644
index 000000000..9bb2e28bb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go
@@ -0,0 +1,3567 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ smithydocument "github.com/aws/smithy-go/document"
+ "time"
+)
+
+// Specifies the days since the initiation of an incomplete multipart upload that
+// Amazon S3 will wait before permanently removing all parts of the 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)
+// in the Amazon S3 User Guide.
+type AbortIncompleteMultipartUpload struct {
+
+ // Specifies the number of days after which Amazon S3 aborts an incomplete
+ // multipart upload.
+ DaysAfterInitiation int32
+
+ noSmithyDocumentSerde
+}
+
+// Configures the transfer acceleration state for an Amazon S3 bucket. For more
+// information, see Amazon S3 Transfer Acceleration
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html) in
+// the Amazon S3 User Guide.
+type AccelerateConfiguration struct {
+
+ // Specifies the transfer acceleration status of the bucket.
+ Status BucketAccelerateStatus
+
+ noSmithyDocumentSerde
+}
+
+// Contains the elements that set the ACL permissions for an object per grantee.
+type AccessControlPolicy struct {
+
+ // A list of grants.
+ Grants []Grant
+
+ // Container for the bucket owner's display name and ID.
+ Owner *Owner
+
+ noSmithyDocumentSerde
+}
+
+// A container for information about access control for replicas.
+type AccessControlTranslation struct {
+
+ // Specifies the replica ownership. For default and valid values, see PUT bucket
+ // replication
+ // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html)
+ // in the Amazon S3 API Reference.
+ //
+ // This member is required.
+ Owner OwnerOverride
+
+ noSmithyDocumentSerde
+}
+
+// A conjunction (logical AND) of predicates, which is used in evaluating a metrics
+// filter. The operator must have at least two predicates in any combination, and
+// an object must match all of the predicates for the filter to apply.
+type AnalyticsAndOperator struct {
+
+ // The prefix to use when evaluating an AND predicate: The prefix that an object
+ // must have to be included in the metrics results.
+ Prefix *string
+
+ // The list of tags to use when evaluating an AND predicate.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the configuration and any analyses for the analytics filter of an
+// Amazon S3 bucket.
+type AnalyticsConfiguration struct {
+
+ // The ID that identifies the analytics configuration.
+ //
+ // This member is required.
+ Id *string
+
+ // Contains data related to access patterns to be collected and made available to
+ // analyze the tradeoffs between different storage classes.
+ //
+ // This member is required.
+ StorageClassAnalysis *StorageClassAnalysis
+
+ // 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.
+ Filter AnalyticsFilter
+
+ noSmithyDocumentSerde
+}
+
+// Where to publish the analytics results.
+type AnalyticsExportDestination struct {
+
+ // A destination signifying output to an S3 bucket.
+ //
+ // This member is required.
+ S3BucketDestination *AnalyticsS3BucketDestination
+
+ noSmithyDocumentSerde
+}
+
+// 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.
+//
+// The following types satisfy this interface:
+// AnalyticsFilterMemberAnd
+// AnalyticsFilterMemberPrefix
+// AnalyticsFilterMemberTag
+type AnalyticsFilter interface {
+ isAnalyticsFilter()
+}
+
+// A conjunction (logical AND) of predicates, which is used in evaluating an
+// analytics filter. The operator must have at least two predicates.
+type AnalyticsFilterMemberAnd struct {
+ Value AnalyticsAndOperator
+
+ noSmithyDocumentSerde
+}
+
+func (*AnalyticsFilterMemberAnd) isAnalyticsFilter() {}
+
+// The prefix to use when evaluating an analytics filter.
+type AnalyticsFilterMemberPrefix struct {
+ Value string
+
+ noSmithyDocumentSerde
+}
+
+func (*AnalyticsFilterMemberPrefix) isAnalyticsFilter() {}
+
+// The tag to use when evaluating an analytics filter.
+type AnalyticsFilterMemberTag struct {
+ Value Tag
+
+ noSmithyDocumentSerde
+}
+
+func (*AnalyticsFilterMemberTag) isAnalyticsFilter() {}
+
+// Contains information about where to publish the analytics results.
+type AnalyticsS3BucketDestination struct {
+
+ // The Amazon Resource Name (ARN) of the bucket to which data is exported.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Specifies the file format used when exporting data to Amazon S3.
+ //
+ // This member is required.
+ Format AnalyticsS3ExportFileFormat
+
+ // 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
+
+ // The prefix to use when exporting data. The prefix is prepended to all results.
+ Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// In terms of implementation, a Bucket is a resource. An Amazon S3 bucket name is
+// globally unique, and the namespace is shared by all Amazon Web Services
+// accounts.
+type Bucket struct {
+
+ // Date the bucket was created. This date can change when making changes to your
+ // bucket, such as editing its bucket policy.
+ CreationDate *time.Time
+
+ // The name of the bucket.
+ Name *string
+
+ noSmithyDocumentSerde
+}
+
+// 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 S3 User Guide.
+type BucketLifecycleConfiguration struct {
+
+ // A lifecycle rule for individual objects in an Amazon S3 bucket.
+ //
+ // This member is required.
+ Rules []LifecycleRule
+
+ noSmithyDocumentSerde
+}
+
+// Container for logging status information.
+type BucketLoggingStatus struct {
+
+ // Describes where logs are stored and the prefix that Amazon S3 assigns to all log
+ // object keys for a bucket. For more information, see PUT Bucket logging
+ // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html) in
+ // the Amazon S3 API Reference.
+ LoggingEnabled *LoggingEnabled
+
+ noSmithyDocumentSerde
+}
+
+// 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 {
+
+ // Container for the specified common prefix.
+ Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// The container for the completed multipart upload details.
+type CompletedMultipartUpload struct {
+
+ // Array of CompletedPart data types.
+ Parts []CompletedPart
+
+ noSmithyDocumentSerde
+}
+
+// Details of the parts that were uploaded.
+type CompletedPart struct {
+
+ // Entity tag returned when the part was uploaded.
+ ETag *string
+
+ // Part number that identifies the part. This is a positive integer between 1 and
+ // 10,000.
+ PartNumber int32
+
+ noSmithyDocumentSerde
+}
+
+// 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 {
+
+ // The HTTP error code when the redirect is applied. In the event of an error, if
+ // the error code equals this value, then the specified redirect is applied.
+ // Required when parent element Condition is specified and sibling KeyPrefixEquals
+ // is not specified. If both are specified, then both must be true for the redirect
+ // to be applied.
+ HttpErrorCodeReturnedEquals *string
+
+ // The object key name prefix when the redirect is applied. For example, to
+ // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
+ // To redirect request for all pages with the prefix docs/, the key prefix will be
+ // /docs, which identifies all objects in the docs/ folder. Required when the
+ // parent element Condition is specified and sibling HttpErrorCodeReturnedEquals is
+ // not specified. If both conditions are specified, both must be true for the
+ // redirect to be applied. Replacement must be made for object keys containing
+ // special characters (such as carriage returns) when using XML requests. For more
+ // information, see XML related object key constraints
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ KeyPrefixEquals *string
+
+ noSmithyDocumentSerde
+}
+
+//
+type ContinuationEvent struct {
+ noSmithyDocumentSerde
+}
+
+// Container for all response elements.
+type CopyObjectResult struct {
+
+ // Returns the ETag of the new object. The ETag reflects only changes to the
+ // contents of an object, not its metadata.
+ ETag *string
+
+ // Creation date of the object.
+ LastModified *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// Container for all response elements.
+type CopyPartResult struct {
+
+ // Entity tag of the object.
+ ETag *string
+
+ // Date and time at which the object was uploaded.
+ LastModified *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// Describes the cross-origin access configuration for objects in an Amazon S3
+// bucket. For more information, see Enabling Cross-Origin Resource Sharing
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon S3
+// User Guide.
+type CORSConfiguration struct {
+
+ // A set of origins and methods (cross-origin access that you want to allow). You
+ // can add up to 100 rules to the configuration.
+ //
+ // This member is required.
+ CORSRules []CORSRule
+
+ noSmithyDocumentSerde
+}
+
+// Specifies a cross-origin access rule for an Amazon S3 bucket.
+type CORSRule struct {
+
+ // An HTTP method that you allow the origin to execute. Valid values are GET, PUT,
+ // HEAD, POST, and DELETE.
+ //
+ // This member is required.
+ AllowedMethods []string
+
+ // One or more origins you want customers to be able to access the bucket from.
+ //
+ // This member is required.
+ AllowedOrigins []string
+
+ // Headers that are specified in the Access-Control-Request-Headers header. These
+ // headers are allowed in a preflight OPTIONS request. In response to any preflight
+ // OPTIONS request, Amazon S3 returns any requested headers that are allowed.
+ AllowedHeaders []string
+
+ // One or more headers in the response that you want customers to be able to access
+ // from their applications (for example, from a JavaScript XMLHttpRequest object).
+ ExposeHeaders []string
+
+ // Unique identifier for the rule. The value cannot be longer than 255 characters.
+ ID *string
+
+ // The time in seconds that your browser is to cache the preflight response for the
+ // specified resource.
+ MaxAgeSeconds int32
+
+ noSmithyDocumentSerde
+}
+
+// The configuration information for the bucket.
+type CreateBucketConfiguration struct {
+
+ // 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 BucketLocationConstraint
+
+ noSmithyDocumentSerde
+}
+
+// Describes how an uncompressed comma-separated values (CSV)-formatted input
+// object is formatted.
+type CSVInput struct {
+
+ // Specifies that CSV field values may contain quoted record delimiters and such
+ // records should be allowed. Default value is FALSE. Setting this value to TRUE
+ // may lower performance.
+ AllowQuotedRecordDelimiter bool
+
+ // 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
+
+ // A single character used to separate individual fields in a record. You can
+ // specify an arbitrary delimiter.
+ FieldDelimiter *string
+
+ // 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 FileHeaderInfo
+
+ // 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
+
+ // 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
+
+ // A single character used to separate individual records in the input. Instead of
+ // the default value, you can specify an arbitrary delimiter.
+ RecordDelimiter *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes how uncompressed comma-separated values (CSV)-formatted results are
+// formatted.
+type CSVOutput struct {
+
+ // The value used to separate individual fields in a record. You can specify an
+ // arbitrary delimiter.
+ FieldDelimiter *string
+
+ // 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
+
+ // The single character used for escaping the quote character inside an already
+ // escaped value.
+ QuoteEscapeCharacter *string
+
+ // 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 QuoteFields
+
+ // A single character used to separate individual records in the output. Instead of
+ // the default value, you can specify an arbitrary delimiter.
+ RecordDelimiter *string
+
+ noSmithyDocumentSerde
+}
+
+// The container element for specifying the default Object Lock retention settings
+// for new objects placed in the specified bucket.
+//
+// * The DefaultRetention settings
+// require both a mode and a period.
+//
+// * The DefaultRetention period can be either
+// Days or Years but you must select one. You cannot specify Days and Years at the
+// same time.
+type DefaultRetention struct {
+
+ // The number of days that you want to specify for the default retention period.
+ // Must be used with Mode.
+ Days int32
+
+ // The default Object Lock retention mode you want to apply to new objects placed
+ // in the specified bucket. Must be used with either Days or Years.
+ Mode ObjectLockRetentionMode
+
+ // The number of years that you want to specify for the default retention period.
+ // Must be used with Mode.
+ Years int32
+
+ noSmithyDocumentSerde
+}
+
+// Container for the objects to delete.
+type Delete struct {
+
+ // The objects to delete.
+ //
+ // This member is required.
+ Objects []ObjectIdentifier
+
+ // Element to enable quiet mode for the request. When you add this element, you
+ // must set its value to true.
+ Quiet bool
+
+ noSmithyDocumentSerde
+}
+
+// Information about the deleted object.
+type DeletedObject struct {
+
+ // 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
+
+ // 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
+
+ // The name of the deleted object.
+ Key *string
+
+ // The version ID of the deleted object.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+// Information about the delete marker.
+type DeleteMarkerEntry struct {
+
+ // Specifies whether the object is (true) or is not (false) the latest version of
+ // an object.
+ IsLatest bool
+
+ // The object key.
+ Key *string
+
+ // Date and time the object was last modified.
+ LastModified *time.Time
+
+ // The account that created the delete marker.>
+ Owner *Owner
+
+ // Version ID of an object.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+// Specifies whether Amazon S3 replicates delete markers. If you specify a Filter
+// in your replication configuration, you must also include a
+// DeleteMarkerReplication element. If your Filter includes a Tag element, the
+// DeleteMarkerReplicationStatus must be set to Disabled, because Amazon S3 does
+// not support replicating delete markers for tag-based rules. 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).
+// For more information about delete marker replication, see Basic Rule
+// Configuration
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html).
+// If you are using an earlier version of the replication configuration, Amazon S3
+// handles 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 {
+
+ // Indicates whether to replicate delete markers. Indicates whether to replicate
+ // delete markers.
+ Status DeleteMarkerReplicationStatus
+
+ noSmithyDocumentSerde
+}
+
+// Specifies information about where to publish analysis or configuration results
+// for an Amazon S3 bucket and S3 Replication Time Control (S3 RTC).
+type Destination struct {
+
+ // The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store
+ // the results.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Specify this only in a cross-account scenario (where source and destination
+ // bucket owners are not the same), and you want to change replica ownership to the
+ // Amazon Web Services account that owns the destination bucket. If this is not
+ // specified in the replication configuration, the replicas are owned by same
+ // Amazon Web Services account that owns the source object.
+ AccessControlTranslation *AccessControlTranslation
+
+ // Destination bucket owner account ID. In a cross-account scenario, if you direct
+ // Amazon S3 to change replica ownership to the Amazon Web Services 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 Replication Additional Configuration: Changing the Replica Owner
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-change-owner.html)
+ // in the Amazon S3 User Guide.
+ Account *string
+
+ // A container that provides information about encryption. If
+ // SourceSelectionCriteria is specified, you must specify this element.
+ EncryptionConfiguration *EncryptionConfiguration
+
+ // A container specifying replication metrics-related settings enabling replication
+ // metrics and events.
+ Metrics *Metrics
+
+ // 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
+
+ // 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)
+ // action in the Amazon S3 API Reference.
+ StorageClass StorageClass
+
+ noSmithyDocumentSerde
+}
+
+// Contains the type of server-side encryption used.
+type Encryption struct {
+
+ // The server-side encryption algorithm used when storing job results in Amazon S3
+ // (for example, AES256, aws:kms).
+ //
+ // This member is required.
+ EncryptionType ServerSideEncryption
+
+ // If the encryption type is aws:kms, this optional value can be used to specify
+ // the encryption context for the restore results.
+ KMSContext *string
+
+ // If the encryption type is aws:kms, this optional value specifies the ID of the
+ // symmetric customer managed key to use for encryption of job results. Amazon S3
+ // only supports symmetric keys. For more information, see Using symmetric and
+ // asymmetric keys
+ // (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
+ // in the Amazon Web Services Key Management Service Developer Guide.
+ KMSKeyId *string
+
+ noSmithyDocumentSerde
+}
+
+// Specifies encryption-related information for an Amazon S3 bucket that is a
+// destination for replicated objects.
+type EncryptionConfiguration struct {
+
+ // Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web
+ // Services KMS key stored in Amazon Web Services Key Management Service (KMS) for
+ // the destination bucket. Amazon S3 uses this key to encrypt replica objects.
+ // Amazon S3 only supports symmetric, customer managed KMS keys. For more
+ // information, see Using symmetric and asymmetric keys
+ // (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
+ // in the Amazon Web Services Key Management Service Developer Guide.
+ ReplicaKmsKeyID *string
+
+ noSmithyDocumentSerde
+}
+
+// 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 {
+ noSmithyDocumentSerde
+}
+
+// Container for all error elements.
+type Error struct {
+
+ // 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 Amazon Web
+ // Services account that prevents the action from completing successfully. Contact
+ // Amazon Web Services 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
+ // Amazon Web Services 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 Amazon Web Services 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 Amazon Web Services
+ // 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 action 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 Amazon Web Services 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 Amazon Web Services 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 Amazon Web Services 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: Amazon S3 (http://aws.amazon.com/s3)
+ //
+ // * HTTP Status Code: 403
+ // Forbidden
+ //
+ // * SOAP Fault Code Prefix: Client
+ //
+ // * Code: OperationAborted
+ //
+ // *
+ // Description: A conflicting conditional action 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 Amazon Web Services 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
+
+ // The error key.
+ Key *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
+
+ // The version ID of the error.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+// The error information.
+type ErrorDocument struct {
+
+ // The object key name to use when a 4XX class error occurs. Replacement must be
+ // made for object keys containing special characters (such as carriage returns)
+ // when using XML requests. For more information, see XML related object key
+ // constraints
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ //
+ // This member is required.
+ Key *string
+
+ noSmithyDocumentSerde
+}
+
+// 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 User Guide.
+type ExistingObjectReplication struct {
+
+ //
+ //
+ // This member is required.
+ Status ExistingObjectReplicationStatus
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the Amazon S3 object key name to filter on and whether to filter on
+// the suffix or prefix of the key name.
+type FilterRule struct {
+
+ // The object key name prefix or suffix identifying one or more objects to which
+ // the filtering rule applies. The maximum length is 1,024 characters. Overlapping
+ // prefixes and suffixes are not supported. For more information, see Configuring
+ // Event Notifications
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the
+ // Amazon S3 User Guide.
+ Name FilterRuleName
+
+ // The value that the filter searches for in object key names.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// Container for S3 Glacier job parameters.
+type GlacierJobParameters struct {
+
+ // Retrieval tier at which the restore will be processed.
+ //
+ // This member is required.
+ Tier Tier
+
+ noSmithyDocumentSerde
+}
+
+// Container for grant information.
+type Grant struct {
+
+ // The person being granted permissions.
+ Grantee *Grantee
+
+ // Specifies the permission given to the grantee.
+ Permission Permission
+
+ noSmithyDocumentSerde
+}
+
+// Container for the person being granted permissions.
+type Grantee struct {
+
+ // Type of grantee
+ //
+ // This member is required.
+ Type Type
+
+ // Screen name of the grantee.
+ DisplayName *string
+
+ // Email address of the grantee. Using email addresses to specify a grantee is only
+ // supported in the following Amazon Web Services 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
+ // Amazon Web Services General Reference.
+ EmailAddress *string
+
+ // The canonical user ID of the grantee.
+ ID *string
+
+ // URI of the grantee group.
+ URI *string
+
+ noSmithyDocumentSerde
+}
+
+// Container for the Suffix element.
+type IndexDocument struct {
+
+ // A suffix that is appended to a request that is for a directory on the website
+ // 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. Replacement must be made for object keys containing special
+ // characters (such as carriage returns) when using XML requests. For more
+ // information, see XML related object key constraints
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ //
+ // This member is required.
+ Suffix *string
+
+ noSmithyDocumentSerde
+}
+
+// Container element that identifies who initiated the multipart upload.
+type Initiator struct {
+
+ // Name of the Principal.
+ DisplayName *string
+
+ // If the principal is an Amazon Web Services account, it provides the Canonical
+ // User ID. If the principal is an IAM User, it provides a user ARN value.
+ ID *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the serialization format of the object.
+type InputSerialization struct {
+
+ // Describes the serialization of a CSV-encoded object.
+ CSV *CSVInput
+
+ // Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default
+ // Value: NONE.
+ CompressionType CompressionType
+
+ // Specifies JSON as object's input serialization format.
+ JSON *JSONInput
+
+ // Specifies Parquet as object's input serialization format.
+ Parquet *ParquetInput
+
+ noSmithyDocumentSerde
+}
+
+// A container for specifying S3 Intelligent-Tiering filters. The filters determine
+// the subset of objects to which the rule applies.
+type IntelligentTieringAndOperator struct {
+
+ // An object key name prefix that identifies the subset of objects to which the
+ // configuration applies.
+ Prefix *string
+
+ // All of these tags must exist in the object's tag set in order for the
+ // configuration to apply.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket. For
+// information about the S3 Intelligent-Tiering storage class, see Storage class
+// for automatically optimizing frequently and infrequently accessed objects
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
+type IntelligentTieringConfiguration struct {
+
+ // The ID used to identify the S3 Intelligent-Tiering configuration.
+ //
+ // This member is required.
+ Id *string
+
+ // Specifies the status of the configuration.
+ //
+ // This member is required.
+ Status IntelligentTieringStatus
+
+ // Specifies the S3 Intelligent-Tiering storage class tier of the configuration.
+ //
+ // This member is required.
+ Tierings []Tiering
+
+ // Specifies a bucket filter. The configuration only includes objects that meet the
+ // filter's criteria.
+ Filter *IntelligentTieringFilter
+
+ noSmithyDocumentSerde
+}
+
+// The Filter is used to identify objects that the S3 Intelligent-Tiering
+// configuration applies to.
+type IntelligentTieringFilter struct {
+
+ // 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.
+ And *IntelligentTieringAndOperator
+
+ // An object key name prefix that identifies the subset of objects to which the
+ // rule applies. Replacement must be made for object keys containing special
+ // characters (such as carriage returns) when using XML requests. For more
+ // information, see XML related object key constraints
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ Prefix *string
+
+ // A container of a key value name pair.
+ Tag *Tag
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the inventory configuration for an Amazon S3 bucket. For more
+// information, see GET Bucket inventory
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETInventoryConfig.html)
+// in the Amazon S3 API Reference.
+type InventoryConfiguration struct {
+
+ // Contains information about where to publish the inventory results.
+ //
+ // This member is required.
+ Destination *InventoryDestination
+
+ // The ID used to identify the inventory configuration.
+ //
+ // This member is required.
+ Id *string
+
+ // Object versions to include in the inventory list. If set to All, the list
+ // includes all the object versions, which adds the version-related fields
+ // VersionId, IsLatest, and DeleteMarker to the list. If set to Current, the list
+ // does not contain these version-related fields.
+ //
+ // This member is required.
+ IncludedObjectVersions InventoryIncludedObjectVersions
+
+ // Specifies whether the inventory is enabled or disabled. If set to True, an
+ // inventory list is generated. If set to False, no inventory list is generated.
+ //
+ // This member is required.
+ IsEnabled bool
+
+ // Specifies the schedule for generating inventory results.
+ //
+ // This member is required.
+ Schedule *InventorySchedule
+
+ // Specifies an inventory filter. The inventory only includes objects that meet the
+ // filter's criteria.
+ Filter *InventoryFilter
+
+ // Contains the optional fields that are included in the inventory results.
+ OptionalFields []InventoryOptionalField
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the inventory configuration for an Amazon S3 bucket.
+type InventoryDestination struct {
+
+ // Contains the bucket name, file format, bucket owner (optional), and prefix
+ // (optional) where inventory results are published.
+ //
+ // This member is required.
+ S3BucketDestination *InventoryS3BucketDestination
+
+ noSmithyDocumentSerde
+}
+
+// Contains the type of server-side encryption used to encrypt the inventory
+// results.
+type InventoryEncryption struct {
+
+ // Specifies the use of SSE-KMS to encrypt delivered inventory reports.
+ SSEKMS *SSEKMS
+
+ // Specifies the use of SSE-S3 to encrypt delivered inventory reports.
+ SSES3 *SSES3
+
+ noSmithyDocumentSerde
+}
+
+// Specifies an inventory filter. The inventory only includes objects that meet the
+// filter's criteria.
+type InventoryFilter struct {
+
+ // The prefix that an object must have to be included in the inventory results.
+ //
+ // This member is required.
+ Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the bucket name, file format, bucket owner (optional), and prefix
+// (optional) where inventory results are published.
+type InventoryS3BucketDestination struct {
+
+ // The Amazon Resource Name (ARN) of the bucket where inventory results will be
+ // published.
+ //
+ // This member is required.
+ Bucket *string
+
+ // Specifies the output format of the inventory results.
+ //
+ // This member is required.
+ Format InventoryFormat
+
+ // 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
+
+ // Contains the type of server-side encryption used to encrypt the inventory
+ // results.
+ Encryption *InventoryEncryption
+
+ // The prefix that is prepended to all inventory results.
+ Prefix *string
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the schedule for generating inventory results.
+type InventorySchedule struct {
+
+ // Specifies how frequently inventory results are produced.
+ //
+ // This member is required.
+ Frequency InventoryFrequency
+
+ noSmithyDocumentSerde
+}
+
+// Specifies JSON as object's input serialization format.
+type JSONInput struct {
+
+ // The type of JSON. Valid values: Document, Lines.
+ Type JSONType
+
+ noSmithyDocumentSerde
+}
+
+// Specifies JSON as request's output serialization format.
+type JSONOutput struct {
+
+ // The value used to separate individual records in the output. If no value is
+ // specified, Amazon S3 uses a newline character ('\n').
+ RecordDelimiter *string
+
+ noSmithyDocumentSerde
+}
+
+// A container for specifying the configuration for Lambda notifications.
+type LambdaFunctionConfiguration struct {
+
+ // The Amazon S3 bucket event for which to invoke the Lambda function. For more
+ // information, see Supported Event Types
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Events []Event
+
+ // The Amazon Resource Name (ARN) of the Lambda function that Amazon S3 invokes
+ // when the specified event type occurs.
+ //
+ // This member is required.
+ LambdaFunctionArn *string
+
+ // Specifies object key name filtering rules. For information about key name
+ // filtering, see Configuring Event Notifications
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the
+ // Amazon S3 User Guide.
+ Filter *NotificationConfigurationFilter
+
+ // An optional unique identifier for configurations in a notification
+ // configuration. If you don't provide one, Amazon S3 will assign an ID.
+ Id *string
+
+ noSmithyDocumentSerde
+}
+
+// Container for the expiration for the lifecycle of the object.
+type LifecycleExpiration struct {
+
+ // Indicates at what date the object is to be moved or deleted. Should be in GMT
+ // ISO 8601 Format.
+ Date *time.Time
+
+ // Indicates the lifetime, in days, of the objects that are subject to the rule.
+ // The value must be a non-zero positive integer.
+ Days int32
+
+ // Indicates whether Amazon S3 will remove a delete marker with no noncurrent
+ // versions. If set to true, the delete marker will be expired; if set to false the
+ // policy takes no action. This cannot be specified with Days or Date in a
+ // Lifecycle Expiration Policy.
+ ExpiredObjectDeleteMarker bool
+
+ noSmithyDocumentSerde
+}
+
+// A lifecycle rule for individual objects in an Amazon S3 bucket.
+type LifecycleRule struct {
+
+ // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is
+ // not currently being applied.
+ //
+ // This member is required.
+ Status ExpirationStatus
+
+ // Specifies the days since the initiation of an incomplete multipart upload that
+ // Amazon S3 will wait before permanently removing all parts of the 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)
+ // in the Amazon S3 User Guide.
+ AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload
+
+ // 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
+
+ // The Filter is used to identify objects that a Lifecycle Rule applies to. A
+ // Filter must have exactly one of Prefix, Tag, or And specified. Filter is
+ // required if the LifecycleRule does not containt a Prefix element.
+ Filter LifecycleRuleFilter
+
+ // Unique identifier for the rule. The value cannot be longer than 255 characters.
+ ID *string
+
+ // Specifies when noncurrent object versions expire. Upon expiration, Amazon S3
+ // permanently deletes the noncurrent object versions. You set this lifecycle
+ // configuration action on a bucket that has versioning enabled (or suspended) to
+ // request that Amazon S3 delete noncurrent object versions at a specific period in
+ // the object's lifetime.
+ NoncurrentVersionExpiration *NoncurrentVersionExpiration
+
+ // 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
+
+ // Prefix identifying one or more objects to which the rule applies. This is no
+ // longer used; use Filter instead. Replacement must be made for object keys
+ // containing special characters (such as carriage returns) when using XML
+ // requests. For more information, see XML related object key constraints
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ //
+ // Deprecated: This member has been deprecated.
+ Prefix *string
+
+ // Specifies when an Amazon S3 object transitions to a specified storage class.
+ Transitions []Transition
+
+ noSmithyDocumentSerde
+}
+
+// This is used in a Lifecycle Rule Filter to apply a logical AND to two or more
+// predicates. The Lifecycle Rule will apply to any object matching all of the
+// predicates configured inside the And operator.
+type LifecycleRuleAndOperator struct {
+
+ // Prefix identifying one or more objects to which the rule applies.
+ Prefix *string
+
+ // All of these tags must exist in the object's tag set in order for the rule to
+ // apply.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// The Filter is used to identify objects that a Lifecycle Rule applies to. A
+// Filter must have exactly one of Prefix, Tag, or And specified.
+//
+// The following types satisfy this interface:
+// LifecycleRuleFilterMemberAnd
+// LifecycleRuleFilterMemberPrefix
+// LifecycleRuleFilterMemberTag
+type LifecycleRuleFilter interface {
+ isLifecycleRuleFilter()
+}
+
+// This is used in a Lifecycle Rule Filter to apply a logical AND to two or more
+// predicates. The Lifecycle Rule will apply to any object matching all of the
+// predicates configured inside the And operator.
+type LifecycleRuleFilterMemberAnd struct {
+ Value LifecycleRuleAndOperator
+
+ noSmithyDocumentSerde
+}
+
+func (*LifecycleRuleFilterMemberAnd) isLifecycleRuleFilter() {}
+
+// Prefix identifying one or more objects to which the rule applies. Replacement
+// must be made for object keys containing special characters (such as carriage
+// returns) when using XML requests. For more information, see XML related object
+// key constraints
+// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+type LifecycleRuleFilterMemberPrefix struct {
+ Value string
+
+ noSmithyDocumentSerde
+}
+
+func (*LifecycleRuleFilterMemberPrefix) isLifecycleRuleFilter() {}
+
+// This tag must exist in the object's tag set in order for the rule to apply.
+type LifecycleRuleFilterMemberTag struct {
+ Value Tag
+
+ noSmithyDocumentSerde
+}
+
+func (*LifecycleRuleFilterMemberTag) isLifecycleRuleFilter() {}
+
+// Describes where logs are stored and the prefix that Amazon S3 assigns to all log
+// object keys for a bucket. For more information, see PUT Bucket logging
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html) in
+// the Amazon S3 API Reference.
+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 choose a
+ // different TargetPrefix for each source bucket so that the delivered log files
+ // can be distinguished by key.
+ //
+ // This member is required.
+ TargetBucket *string
+
+ // A prefix for all log object keys. If you store log files from multiple Amazon S3
+ // buckets in a single bucket, you can use a prefix to distinguish which log files
+ // came from which bucket.
+ //
+ // This member is required.
+ TargetPrefix *string
+
+ // Container for granting information.
+ TargetGrants []TargetGrant
+
+ noSmithyDocumentSerde
+}
+
+// A metadata key-value pair to store with an object.
+type MetadataEntry struct {
+
+ // Name of the Object.
+ Name *string
+
+ // Value of the Object.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// A container specifying replication metrics-related settings enabling replication
+// metrics and events.
+type Metrics struct {
+
+ // Specifies whether the replication metrics are enabled.
+ //
+ // This member is required.
+ Status MetricsStatus
+
+ // A container specifying the time threshold for emitting the
+ // s3:Replication:OperationMissedThreshold event.
+ EventThreshold *ReplicationTimeValue
+
+ noSmithyDocumentSerde
+}
+
+// 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 {
+
+ // The access point ARN used when evaluating an AND predicate.
+ AccessPointArn *string
+
+ // The prefix used when evaluating an AND predicate.
+ Prefix *string
+
+ // The list of tags used when evaluating an AND predicate.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Specifies a metrics configuration for the CloudWatch request metrics (specified
+// by the metrics configuration ID) from an Amazon S3 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. For more information, see PutBucketMetricsConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTMetricConfiguration.html).
+type MetricsConfiguration struct {
+
+ // The ID used to identify the metrics configuration.
+ //
+ // This member is required.
+ Id *string
+
+ // Specifies a metrics configuration filter. The metrics configuration will only
+ // include objects that meet the filter's criteria. A filter must be a prefix, an
+ // object tag, an access point ARN, or a conjunction (MetricsAndOperator).
+ Filter MetricsFilter
+
+ noSmithyDocumentSerde
+}
+
+// Specifies a metrics configuration filter. The metrics configuration only
+// includes objects that meet the filter's criteria. A filter must be a prefix, an
+// object tag, an access point ARN, or a conjunction (MetricsAndOperator). For more
+// information, see PutBucketMetricsConfiguration
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html).
+//
+// The following types satisfy this interface:
+// MetricsFilterMemberAccessPointArn
+// MetricsFilterMemberAnd
+// MetricsFilterMemberPrefix
+// MetricsFilterMemberTag
+type MetricsFilter interface {
+ isMetricsFilter()
+}
+
+// The access point ARN used when evaluating a metrics filter.
+type MetricsFilterMemberAccessPointArn struct {
+ Value string
+
+ noSmithyDocumentSerde
+}
+
+func (*MetricsFilterMemberAccessPointArn) isMetricsFilter() {}
+
+// 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 MetricsFilterMemberAnd struct {
+ Value MetricsAndOperator
+
+ noSmithyDocumentSerde
+}
+
+func (*MetricsFilterMemberAnd) isMetricsFilter() {}
+
+// The prefix used when evaluating a metrics filter.
+type MetricsFilterMemberPrefix struct {
+ Value string
+
+ noSmithyDocumentSerde
+}
+
+func (*MetricsFilterMemberPrefix) isMetricsFilter() {}
+
+// The tag used when evaluating a metrics filter.
+type MetricsFilterMemberTag struct {
+ Value Tag
+
+ noSmithyDocumentSerde
+}
+
+func (*MetricsFilterMemberTag) isMetricsFilter() {}
+
+// Container for the MultipartUpload for the Amazon S3 object.
+type MultipartUpload struct {
+
+ // Date and time at which the multipart upload was initiated.
+ Initiated *time.Time
+
+ // Identifies who initiated the multipart upload.
+ Initiator *Initiator
+
+ // Key of the object for which the multipart upload was initiated.
+ Key *string
+
+ // Specifies the owner of the object that is part of the multipart upload.
+ Owner *Owner
+
+ // The class of storage used to store the object.
+ StorageClass StorageClass
+
+ // Upload ID that identifies the multipart upload.
+ UploadId *string
+
+ noSmithyDocumentSerde
+}
+
+// Specifies when noncurrent object versions expire. Upon expiration, Amazon S3
+// permanently deletes the noncurrent object versions. You set this lifecycle
+// configuration action on a bucket that has versioning enabled (or suspended) to
+// request that Amazon S3 delete noncurrent object versions at a specific period in
+// the object's lifetime.
+type NoncurrentVersionExpiration 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/intro-lifecycle-rules.html#non-current-days-calculations)
+ // in the Amazon S3 User Guide.
+ NoncurrentDays int32
+
+ noSmithyDocumentSerde
+}
+
+// Container for the transition rule that describes when noncurrent objects
+// transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, or
+// DEEP_ARCHIVE 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 the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING,
+// GLACIER, or DEEP_ARCHIVE storage class at a specific period in the object's
+// lifetime.
+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 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 S3 User Guide.
+ NoncurrentDays int32
+
+ // The class of storage used to store the object.
+ StorageClass TransitionStorageClass
+
+ noSmithyDocumentSerde
+}
+
+// A container for specifying the notification configuration of the bucket. If this
+// element is empty, notifications are turned off for the bucket.
+type NotificationConfiguration struct {
+
+ // Describes the Lambda functions to invoke and the events for which to invoke
+ // them.
+ LambdaFunctionConfigurations []LambdaFunctionConfiguration
+
+ // The Amazon Simple Queue Service queues to publish messages to and the events for
+ // which to publish messages.
+ QueueConfigurations []QueueConfiguration
+
+ // The topic to which notifications are sent and the events for which notifications
+ // are generated.
+ TopicConfigurations []TopicConfiguration
+
+ noSmithyDocumentSerde
+}
+
+// Specifies object key name filtering rules. For information about key name
+// filtering, see Configuring Event Notifications
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the
+// Amazon S3 User Guide.
+type NotificationConfigurationFilter struct {
+
+ // A container for object key name prefix and suffix filtering rules.
+ Key *S3KeyFilter
+
+ noSmithyDocumentSerde
+}
+
+// An object consists of data and its descriptive metadata.
+type Object struct {
+
+ // The entity tag is a hash of the object. The ETag reflects changes only to the
+ // contents of an object, not its metadata. The ETag may or may not be an MD5
+ // digest of the object data. Whether or not it is depends on how the object was
+ // created and how it is encrypted as described below:
+ //
+ // * Objects created by the
+ // PUT Object, POST Object, or Copy operation, or through the Amazon Web Services
+ // Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that
+ // are an MD5 digest of their object data.
+ //
+ // * Objects created by the PUT Object,
+ // POST Object, or Copy operation, or through the Amazon Web Services Management
+ // Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5
+ // digest of their object data.
+ //
+ // * If an object is created by either the Multipart
+ // Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the
+ // method of encryption.
+ ETag *string
+
+ // The name that you assign to an object. You use the object key to retrieve the
+ // object.
+ Key *string
+
+ // Creation date of the object.
+ LastModified *time.Time
+
+ // The owner of the object
+ Owner *Owner
+
+ // Size in bytes of the object
+ Size int64
+
+ // The class of storage used to store the object.
+ StorageClass ObjectStorageClass
+
+ noSmithyDocumentSerde
+}
+
+// Object Identifier is unique value to identify objects.
+type ObjectIdentifier struct {
+
+ // Key name of the object. Replacement must be made for object keys containing
+ // special characters (such as carriage returns) when using XML requests. For more
+ // information, see XML related object key constraints
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ //
+ // This member is required.
+ Key *string
+
+ // VersionId for the specific version of the object to delete.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+// The container element for Object Lock configuration parameters.
+type ObjectLockConfiguration struct {
+
+ // Indicates whether this bucket has an Object Lock configuration enabled. Enable
+ // ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket.
+ ObjectLockEnabled ObjectLockEnabled
+
+ // Specifies the Object Lock rule for the specified object. Enable the this rule
+ // when you apply ObjectLockConfiguration to a bucket. Bucket settings require both
+ // a mode and a period. The period can be either Days or Years but you must select
+ // one. You cannot specify Days and Years at the same time.
+ Rule *ObjectLockRule
+
+ noSmithyDocumentSerde
+}
+
+// A Legal Hold configuration for an object.
+type ObjectLockLegalHold struct {
+
+ // Indicates whether the specified object has a Legal Hold in place.
+ Status ObjectLockLegalHoldStatus
+
+ noSmithyDocumentSerde
+}
+
+// A Retention configuration for an object.
+type ObjectLockRetention struct {
+
+ // Indicates the Retention mode for the specified object.
+ Mode ObjectLockRetentionMode
+
+ // The date on which this Object Lock Retention will expire.
+ RetainUntilDate *time.Time
+
+ noSmithyDocumentSerde
+}
+
+// The container element for an Object Lock rule.
+type ObjectLockRule struct {
+
+ // The default Object Lock retention mode and period that you want to apply to new
+ // objects placed in the specified bucket. Bucket settings require both a mode and
+ // a period. The period can be either Days or Years but you must select one. You
+ // cannot specify Days and Years at the same time.
+ DefaultRetention *DefaultRetention
+
+ noSmithyDocumentSerde
+}
+
+// The version of an object.
+type ObjectVersion struct {
+
+ // The entity tag is an MD5 hash of that version of the object.
+ ETag *string
+
+ // Specifies whether the object is (true) or is not (false) the latest version of
+ // an object.
+ IsLatest bool
+
+ // The object key.
+ Key *string
+
+ // Date and time the object was last modified.
+ LastModified *time.Time
+
+ // Specifies the owner of the object.
+ Owner *Owner
+
+ // Size in bytes of the object.
+ Size int64
+
+ // The class of storage used to store the object.
+ StorageClass ObjectVersionStorageClass
+
+ // Version ID of an object.
+ VersionId *string
+
+ noSmithyDocumentSerde
+}
+
+// Describes the location where the restore job's output is stored.
+type OutputLocation struct {
+
+ // Describes an S3 location that will receive the results of the restore request.
+ S3 *S3Location
+
+ noSmithyDocumentSerde
+}
+
+// Describes how results of the Select job are serialized.
+type OutputSerialization struct {
+
+ // Describes the serialization of CSV-encoded Select results.
+ CSV *CSVOutput
+
+ // Specifies JSON as request's output serialization format.
+ JSON *JSONOutput
+
+ noSmithyDocumentSerde
+}
+
+// Container for the owner's display name and ID.
+type Owner struct {
+
+ // Container for the display name of the owner.
+ DisplayName *string
+
+ // Container for the ID of the owner.
+ ID *string
+
+ noSmithyDocumentSerde
+}
+
+// The container element for a bucket's ownership controls.
+type OwnershipControls struct {
+
+ // The container element for an ownership control rule.
+ //
+ // This member is required.
+ Rules []OwnershipControlsRule
+
+ noSmithyDocumentSerde
+}
+
+// The container element for an ownership control rule.
+type OwnershipControlsRule struct {
+
+ // The container element for object ownership for a bucket's ownership controls.
+ // BucketOwnerPreferred - Objects uploaded to the bucket change ownership to the
+ // bucket owner if the objects are uploaded with the bucket-owner-full-control
+ // canned ACL. ObjectWriter - The uploading account will own the object if the
+ // object is uploaded with the bucket-owner-full-control canned ACL.
+ //
+ // This member is required.
+ ObjectOwnership ObjectOwnership
+
+ noSmithyDocumentSerde
+}
+
+// Container for Parquet.
+type ParquetInput struct {
+ noSmithyDocumentSerde
+}
+
+// Container for elements related to a part.
+type Part struct {
+
+ // Entity tag returned when the part was uploaded.
+ ETag *string
+
+ // Date and time at which the part was uploaded.
+ LastModified *time.Time
+
+ // Part number identifying the part. This is a positive integer between 1 and
+ // 10,000.
+ PartNumber int32
+
+ // Size in bytes of the uploaded part data.
+ Size int64
+
+ noSmithyDocumentSerde
+}
+
+// The container element for a bucket's policy status.
+type PolicyStatus struct {
+
+ // The policy status for this bucket. TRUE indicates that this bucket is public.
+ // FALSE indicates that the bucket is not public.
+ IsPublic bool
+
+ noSmithyDocumentSerde
+}
+
+// This data type contains information about progress of an operation.
+type Progress struct {
+
+ // The current number of uncompressed object bytes processed.
+ BytesProcessed int64
+
+ // The current number of bytes of records payload data returned.
+ BytesReturned int64
+
+ // The current number of object bytes scanned.
+ BytesScanned int64
+
+ noSmithyDocumentSerde
+}
+
+// This data type contains information about the progress event of an operation.
+type ProgressEvent struct {
+
+ // The Progress event details.
+ Details *Progress
+
+ noSmithyDocumentSerde
+}
+
+// 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 S3 User Guide.
+type PublicAccessBlockConfiguration struct {
+
+ // Specifies whether Amazon S3 should block public access control lists (ACLs) for
+ // this bucket and objects in this bucket. Setting this element to TRUE causes the
+ // following behavior:
+ //
+ // * PUT Bucket acl and PUT Object acl calls fail if the
+ // specified ACL is public.
+ //
+ // * 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
+
+ // Specifies whether Amazon S3 should block public bucket policies for this bucket.
+ // Setting this element to TRUE causes Amazon S3 to reject calls to PUT Bucket
+ // policy if the specified bucket policy allows public access. Enabling this
+ // setting doesn't affect existing bucket policies.
+ BlockPublicPolicy bool
+
+ // Specifies whether Amazon S3 should ignore public ACLs for this bucket and
+ // objects in this bucket. Setting this element to TRUE causes Amazon S3 to ignore
+ // all public ACLs on this bucket and objects in this bucket. Enabling this setting
+ // doesn't affect the persistence of any existing ACLs and doesn't prevent new
+ // public ACLs from being set.
+ IgnorePublicAcls bool
+
+ // Specifies whether Amazon S3 should restrict public bucket policies for this
+ // bucket. Setting this element to TRUE restricts access to this bucket to only
+ // Amazon Web Service principals and authorized users within this account if the
+ // bucket has a public policy. Enabling this setting doesn't affect previously
+ // stored bucket policies, except that public and cross-account access within any
+ // public bucket policy, including non-public delegation to specific accounts, is
+ // blocked.
+ RestrictPublicBuckets bool
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the configuration for publishing messages to an Amazon Simple Queue
+// Service (Amazon SQS) queue when Amazon S3 detects specified events.
+type QueueConfiguration struct {
+
+ // A collection of bucket events for which to send notifications
+ //
+ // This member is required.
+ Events []Event
+
+ // 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.
+ //
+ // This member is required.
+ QueueArn *string
+
+ // Specifies object key name filtering rules. For information about key name
+ // filtering, see Configuring Event Notifications
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the
+ // Amazon S3 User Guide.
+ Filter *NotificationConfigurationFilter
+
+ // An optional unique identifier for configurations in a notification
+ // configuration. If you don't provide one, Amazon S3 will assign an ID.
+ Id *string
+
+ noSmithyDocumentSerde
+}
+
+// The container for the records event.
+type RecordsEvent struct {
+
+ // The byte array of partial, one or more result records.
+ Payload []byte
+
+ noSmithyDocumentSerde
+}
+
+// Specifies how requests are redirected. In the event of an error, you can specify
+// a different error code to return.
+type Redirect struct {
+
+ // The host name to use in the redirect request.
+ HostName *string
+
+ // The HTTP redirect code to use on the response. Not required if one of the
+ // siblings is present.
+ HttpRedirectCode *string
+
+ // Protocol to use when redirecting requests. The default is the protocol that is
+ // used in the original request.
+ Protocol Protocol
+
+ // The object key prefix to use in the redirect request. For example, to redirect
+ // requests for all pages with prefix docs/ (objects in the docs/ folder) to
+ // documents/, you can set a condition block with KeyPrefixEquals set to docs/ and
+ // in the Redirect set ReplaceKeyPrefixWith to /documents. Not required if one of
+ // the siblings is present. Can be present only if ReplaceKeyWith is not provided.
+ // Replacement must be made for object keys containing special characters (such as
+ // carriage returns) when using XML requests. For more information, see XML
+ // related object key constraints
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ ReplaceKeyPrefixWith *string
+
+ // The specific object key to use in the redirect request. For example, redirect
+ // request to error.html. Not required if one of the siblings is present. Can be
+ // present only if ReplaceKeyPrefixWith is not provided. Replacement must be made
+ // for object keys containing special characters (such as carriage returns) when
+ // using XML requests. For more information, see XML related object key
+ // constraints
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ ReplaceKeyWith *string
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the redirect behavior of all requests to a website endpoint of an
+// Amazon S3 bucket.
+type RedirectAllRequestsTo struct {
+
+ // Name of the host where requests are redirected.
+ //
+ // This member is required.
+ HostName *string
+
+ // Protocol to use when redirecting requests. The default is the protocol that is
+ // used in the original request.
+ Protocol Protocol
+
+ noSmithyDocumentSerde
+}
+
+// A filter that you can specify for selection for modifications on replicas.
+// Amazon S3 doesn't replicate replica modifications by default. In the latest
+// version of replication configuration (when Filter is specified), you can specify
+// this element and set the status to Enabled to replicate modifications on
+// replicas. If you don't specify the Filter element, Amazon S3 assumes that the
+// replication configuration is the earlier version, V1. In the earlier version,
+// this element is not allowed.
+type ReplicaModifications struct {
+
+ // Specifies whether Amazon S3 replicates modifications on replicas.
+ //
+ // This member is required.
+ Status ReplicaModificationsStatus
+
+ noSmithyDocumentSerde
+}
+
+// A container for replication rules. You can add up to 1,000 rules. The maximum
+// size of a replication configuration is 2 MB.
+type ReplicationConfiguration struct {
+
+ // The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role
+ // that Amazon S3 assumes when replicating objects. For more information, see How
+ // to Set Up Replication
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html) in
+ // the Amazon S3 User Guide.
+ //
+ // This member is required.
+ Role *string
+
+ // A container for one or more replication rules. A replication configuration must
+ // have at least one rule and can contain a maximum of 1,000 rules.
+ //
+ // This member is required.
+ Rules []ReplicationRule
+
+ noSmithyDocumentSerde
+}
+
+// Specifies which Amazon S3 objects to replicate and where to store the replicas.
+type ReplicationRule struct {
+
+ // A container for information about the replication destination and its
+ // configurations including enabling the S3 Replication Time Control (S3 RTC).
+ //
+ // This member is required.
+ Destination *Destination
+
+ // Specifies whether the rule is enabled.
+ //
+ // This member is required.
+ Status ReplicationRuleStatus
+
+ // Specifies whether Amazon S3 replicates delete markers. If you specify a Filter
+ // in your replication configuration, you must also include a
+ // DeleteMarkerReplication element. If your Filter includes a Tag element, the
+ // DeleteMarkerReplicationStatus must be set to Disabled, because Amazon S3 does
+ // not support replicating delete markers for tag-based rules. 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).
+ // For more information about delete marker replication, see Basic Rule
+ // Configuration
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html).
+ // If you are using an earlier version of the replication configuration, Amazon S3
+ // handles 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
+
+ //
+ ExistingObjectReplication *ExistingObjectReplication
+
+ // 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
+
+ // A unique identifier for the rule. The maximum value is 255 characters.
+ ID *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. Replacement must be made for
+ // object keys containing special characters (such as carriage returns) when using
+ // XML requests. For more information, see XML related object key constraints
+ // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+ //
+ // Deprecated: This member has been deprecated.
+ Prefix *string
+
+ // The priority indicates which rule has precedence whenever two or more
+ // replication rules conflict. Amazon S3 will attempt to replicate objects
+ // according to all replication rules. However, if there are two or more rules with
+ // the same destination bucket, then objects will be replicated according to the
+ // rule with the highest priority. The higher the number, the higher the priority.
+ // For more information, see Replication
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) in the Amazon
+ // S3 User Guide.
+ Priority int32
+
+ // 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 a customer managed
+ // key stored in Amazon Web Services Key Management Service (SSE-KMS).
+ SourceSelectionCriteria *SourceSelectionCriteria
+
+ noSmithyDocumentSerde
+}
+
+// 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 {
+
+ // An object key name prefix that identifies the subset of objects to which the
+ // rule applies.
+ Prefix *string
+
+ // An array of tags containing key and value pairs.
+ Tags []Tag
+
+ noSmithyDocumentSerde
+}
+
+// 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.
+//
+// The following types satisfy this interface:
+// ReplicationRuleFilterMemberAnd
+// ReplicationRuleFilterMemberPrefix
+// ReplicationRuleFilterMemberTag
+type ReplicationRuleFilter interface {
+ isReplicationRuleFilter()
+}
+
+// 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 ReplicationRuleFilterMemberAnd struct {
+ Value ReplicationRuleAndOperator
+
+ noSmithyDocumentSerde
+}
+
+func (*ReplicationRuleFilterMemberAnd) isReplicationRuleFilter() {}
+
+// An object key name prefix that identifies the subset of objects to which the
+// rule applies. Replacement must be made for object keys containing special
+// characters (such as carriage returns) when using XML requests. For more
+// information, see XML related object key constraints
+// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
+type ReplicationRuleFilterMemberPrefix struct {
+ Value string
+
+ noSmithyDocumentSerde
+}
+
+func (*ReplicationRuleFilterMemberPrefix) isReplicationRuleFilter() {}
+
+// A container for specifying a tag key and value. The rule applies only to objects
+// that have the tag in their tag set.
+type ReplicationRuleFilterMemberTag struct {
+ Value Tag
+
+ noSmithyDocumentSerde
+}
+
+func (*ReplicationRuleFilterMemberTag) isReplicationRuleFilter() {}
+
+// 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 {
+
+ // Specifies whether the replication time is enabled.
+ //
+ // This member is required.
+ Status ReplicationTimeStatus
+
+ // A container specifying the time by which replication should be complete for all
+ // objects and operations on objects.
+ //
+ // This member is required.
+ Time *ReplicationTimeValue
+
+ noSmithyDocumentSerde
+}
+
+// A container specifying the time value for S3 Replication Time Control (S3 RTC)
+// and replication metrics EventThreshold.
+type ReplicationTimeValue struct {
+
+ // Contains an integer specifying time in minutes. Valid value: 15
+ Minutes int32
+
+ noSmithyDocumentSerde
+}
+
+// Container for Payer.
+type RequestPaymentConfiguration struct {
+
+ // Specifies who pays for the download and request fees.
+ //
+ // This member is required.
+ Payer Payer
+
+ noSmithyDocumentSerde
+}
+
+// Container for specifying if periodic QueryProgress messages should be sent.
+type RequestProgress struct {
+
+ // Specifies whether periodic QueryProgress frames should be sent. Valid values:
+ // TRUE, FALSE. Default value: FALSE.
+ Enabled bool
+
+ noSmithyDocumentSerde
+}
+
+// Container for restore job parameters.
+type RestoreRequest struct {
+
+ // Lifetime of the active copy in days. Do not use with restores that specify
+ // OutputLocation. The Days element is required for regular restores, and must not
+ // be provided for select requests.
+ Days int32
+
+ // The optional description for the job.
+ Description *string
+
+ // S3 Glacier related parameters pertaining to this job. Do not use with restores
+ // that specify OutputLocation.
+ GlacierJobParameters *GlacierJobParameters
+
+ // Describes the location where the restore job's output is stored.
+ OutputLocation *OutputLocation
+
+ // Describes the parameters for Select job types.
+ SelectParameters *SelectParameters
+
+ // Retrieval tier at which the restore will be processed.
+ Tier Tier
+
+ // Type of restore request.
+ Type RestoreRequestType
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the redirect behavior and when a redirect is applied. For more
+// information about routing rules, see Configuring advanced conditional redirects
+// (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html#advanced-conditional-redirects)
+// in the Amazon S3 User Guide.
+type RoutingRule struct {
+
+ // Container for redirect information. You can redirect requests to another host,
+ // to another page, or with another protocol. In the event of an error, you can
+ // specify a different error code to return.
+ //
+ // This member is required.
+ Redirect *Redirect
+
+ // 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.
+ Condition *Condition
+
+ noSmithyDocumentSerde
+}
+
+// A container for object key name prefix and suffix filtering rules.
+type S3KeyFilter struct {
+
+ // A list of containers for the key-value pair that defines the criteria for the
+ // filter rule.
+ FilterRules []FilterRule
+
+ noSmithyDocumentSerde
+}
+
+// Describes an Amazon S3 location that will receive the results of the restore
+// request.
+type S3Location struct {
+
+ // The name of the bucket where the restore results will be placed.
+ //
+ // This member is required.
+ BucketName *string
+
+ // The prefix that is prepended to the restore results for this request.
+ //
+ // This member is required.
+ Prefix *string
+
+ // A list of grants that control access to the staged results.
+ AccessControlList []Grant
+
+ // The canned ACL to apply to the restore results.
+ CannedACL ObjectCannedACL
+
+ // Contains the type of server-side encryption used.
+ Encryption *Encryption
+
+ // The class of storage used to store the restore results.
+ StorageClass StorageClass
+
+ // The tag-set that is applied to the restore results.
+ Tagging *Tagging
+
+ // A list of metadata to store with the restore results in S3.
+ UserMetadata []MetadataEntry
+
+ noSmithyDocumentSerde
+}
+
+// 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 {
+
+ // 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
+
+ // 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
+
+ noSmithyDocumentSerde
+}
+
+// The container for selecting objects from a content event stream.
+//
+// The following types satisfy this interface:
+// SelectObjectContentEventStreamMemberCont
+// SelectObjectContentEventStreamMemberEnd
+// SelectObjectContentEventStreamMemberProgress
+// SelectObjectContentEventStreamMemberRecords
+// SelectObjectContentEventStreamMemberStats
+type SelectObjectContentEventStream interface {
+ isSelectObjectContentEventStream()
+}
+
+// The Continuation Event.
+type SelectObjectContentEventStreamMemberCont struct {
+ Value ContinuationEvent
+
+ noSmithyDocumentSerde
+}
+
+func (*SelectObjectContentEventStreamMemberCont) isSelectObjectContentEventStream() {}
+
+// The End Event.
+type SelectObjectContentEventStreamMemberEnd struct {
+ Value EndEvent
+
+ noSmithyDocumentSerde
+}
+
+func (*SelectObjectContentEventStreamMemberEnd) isSelectObjectContentEventStream() {}
+
+// The Progress Event.
+type SelectObjectContentEventStreamMemberProgress struct {
+ Value ProgressEvent
+
+ noSmithyDocumentSerde
+}
+
+func (*SelectObjectContentEventStreamMemberProgress) isSelectObjectContentEventStream() {}
+
+// The Records Event.
+type SelectObjectContentEventStreamMemberRecords struct {
+ Value RecordsEvent
+
+ noSmithyDocumentSerde
+}
+
+func (*SelectObjectContentEventStreamMemberRecords) isSelectObjectContentEventStream() {}
+
+// The Stats Event.
+type SelectObjectContentEventStreamMemberStats struct {
+ Value StatsEvent
+
+ noSmithyDocumentSerde
+}
+
+func (*SelectObjectContentEventStreamMemberStats) isSelectObjectContentEventStream() {}
+
+// Describes the parameters for Select job types.
+type SelectParameters struct {
+
+ // The expression that is used to query the object.
+ //
+ // This member is required.
+ Expression *string
+
+ // The type of the provided expression (for example, SQL).
+ //
+ // This member is required.
+ ExpressionType ExpressionType
+
+ // Describes the serialization format of the object.
+ //
+ // This member is required.
+ InputSerialization *InputSerialization
+
+ // Describes how the results of the Select job are serialized.
+ //
+ // This member is required.
+ OutputSerialization *OutputSerialization
+
+ noSmithyDocumentSerde
+}
+
+// Describes the default server-side encryption to apply to new objects in the
+// bucket. If a PUT Object request doesn't specify any server-side encryption, this
+// default encryption will be applied. For more information, see PUT Bucket
+// encryption
+// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTencryption.html)
+// in the Amazon S3 API Reference.
+type ServerSideEncryptionByDefault struct {
+
+ // Server-side encryption algorithm to use for the default encryption.
+ //
+ // This member is required.
+ SSEAlgorithm ServerSideEncryption
+
+ // Amazon Web Services Key Management Service (KMS) customer Amazon Web Services
+ // KMS 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 KMS key. However, if you are using encryption with
+ // cross-account operations, you must use a fully qualified KMS key 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 KMS keys and not asymmetric KMS keys. For more
+ // information, see Using symmetric and asymmetric keys
+ // (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
+ // in the Amazon Web Services Key Management Service Developer Guide.
+ KMSMasterKeyID *string
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the default server-side-encryption configuration.
+type ServerSideEncryptionConfiguration struct {
+
+ // Container for information about a particular server-side encryption
+ // configuration rule.
+ //
+ // This member is required.
+ Rules []ServerSideEncryptionRule
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the default server-side encryption configuration.
+type ServerSideEncryptionRule struct {
+
+ // Specifies the default server-side encryption to apply to new objects in the
+ // bucket. If a PUT Object request doesn't specify any server-side encryption, this
+ // default encryption will be applied.
+ ApplyServerSideEncryptionByDefault *ServerSideEncryptionByDefault
+
+ // Specifies whether Amazon S3 should use an S3 Bucket Key with server-side
+ // encryption using KMS (SSE-KMS) for new objects in the bucket. Existing objects
+ // are not affected. Setting the BucketKeyEnabled element to true causes Amazon S3
+ // to use an S3 Bucket Key. By default, S3 Bucket Key is not enabled. For more
+ // information, see Amazon S3 Bucket Keys
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) in the Amazon
+ // S3 User Guide.
+ BucketKeyEnabled bool
+
+ noSmithyDocumentSerde
+}
+
+// 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 a customer managed
+// key stored in Amazon Web Services Key Management Service (SSE-KMS).
+type SourceSelectionCriteria struct {
+
+ // A filter that you can specify for selections for modifications on replicas.
+ // Amazon S3 doesn't replicate replica modifications by default. In the latest
+ // version of replication configuration (when Filter is specified), you can specify
+ // this element and set the status to Enabled to replicate modifications on
+ // replicas. If you don't specify the Filter element, Amazon S3 assumes that the
+ // replication configuration is the earlier version, V1. In the earlier version,
+ // this element is not allowed
+ ReplicaModifications *ReplicaModifications
+
+ // A container for filter information for the selection of Amazon S3 objects
+ // encrypted with Amazon Web Services KMS. If you include SourceSelectionCriteria
+ // in the replication configuration, this element is required.
+ SseKmsEncryptedObjects *SseKmsEncryptedObjects
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the use of SSE-KMS to encrypt delivered inventory reports.
+type SSEKMS struct {
+
+ // Specifies the ID of the Amazon Web Services Key Management Service (Amazon Web
+ // Services KMS) symmetric customer managed key to use for encrypting inventory
+ // reports.
+ //
+ // This member is required.
+ KeyId *string
+
+ noSmithyDocumentSerde
+}
+
+// A container for filter information for the selection of S3 objects encrypted
+// with Amazon Web Services KMS.
+type SseKmsEncryptedObjects struct {
+
+ // Specifies whether Amazon S3 replicates objects created with server-side
+ // encryption using an Amazon Web Services KMS key stored in Amazon Web Services
+ // Key Management Service.
+ //
+ // This member is required.
+ Status SseKmsEncryptedObjectsStatus
+
+ noSmithyDocumentSerde
+}
+
+// Specifies the use of SSE-S3 to encrypt delivered inventory reports.
+type SSES3 struct {
+ noSmithyDocumentSerde
+}
+
+// Container for the stats details.
+type Stats struct {
+
+ // The total number of uncompressed object bytes processed.
+ BytesProcessed int64
+
+ // The total number of bytes of records payload data returned.
+ BytesReturned int64
+
+ // The total number of object bytes scanned.
+ BytesScanned int64
+
+ noSmithyDocumentSerde
+}
+
+// Container for the Stats Event.
+type StatsEvent struct {
+
+ // The Stats event details.
+ Details *Stats
+
+ noSmithyDocumentSerde
+}
+
+// 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.
+type StorageClassAnalysis struct {
+
+ // Specifies how data related to the storage class analysis for an Amazon S3 bucket
+ // should be exported.
+ DataExport *StorageClassAnalysisDataExport
+
+ noSmithyDocumentSerde
+}
+
+// Container for data related to the storage class analysis for an Amazon S3 bucket
+// for export.
+type StorageClassAnalysisDataExport struct {
+
+ // The place to store the data for an analysis.
+ //
+ // This member is required.
+ Destination *AnalyticsExportDestination
+
+ // The version of the output schema to use when exporting data. Must be V_1.
+ //
+ // This member is required.
+ OutputSchemaVersion StorageClassAnalysisSchemaVersion
+
+ noSmithyDocumentSerde
+}
+
+// A container of a key value name pair.
+type Tag struct {
+
+ // Name of the object key.
+ //
+ // This member is required.
+ Key *string
+
+ // Value of the tag.
+ //
+ // This member is required.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+// Container for TagSet elements.
+type Tagging struct {
+
+ // A collection for a set of tags
+ //
+ // This member is required.
+ TagSet []Tag
+
+ noSmithyDocumentSerde
+}
+
+// Container for granting information.
+type TargetGrant struct {
+
+ // Container for the person being granted permissions.
+ Grantee *Grantee
+
+ // Logging permissions assigned to the grantee for the bucket.
+ Permission BucketLogsPermission
+
+ noSmithyDocumentSerde
+}
+
+// The S3 Intelligent-Tiering storage class is designed to optimize storage costs
+// by automatically moving data to the most cost-effective storage access tier,
+// without additional operational overhead.
+type Tiering struct {
+
+ // S3 Intelligent-Tiering access tier. See Storage class for automatically
+ // optimizing frequently and infrequently accessed objects
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access)
+ // for a list of access tiers in the S3 Intelligent-Tiering storage class.
+ //
+ // This member is required.
+ AccessTier IntelligentTieringAccessTier
+
+ // The number of consecutive days of no access after which an object will be
+ // eligible to be transitioned to the corresponding tier. The minimum number of
+ // days specified for Archive Access tier must be at least 90 days and Deep Archive
+ // Access tier must be at least 180 days. The maximum can be up to 2 years (730
+ // days).
+ //
+ // This member is required.
+ Days int32
+
+ noSmithyDocumentSerde
+}
+
+// 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.
+type TopicConfiguration struct {
+
+ // The Amazon S3 bucket event about which to send notifications. For more
+ // information, see Supported Event Types
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the
+ // Amazon S3 User Guide.
+ //
+ // This member is required.
+ Events []Event
+
+ // The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3
+ // publishes a message when it detects events of the specified type.
+ //
+ // This member is required.
+ TopicArn *string
+
+ // Specifies object key name filtering rules. For information about key name
+ // filtering, see Configuring Event Notifications
+ // (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the
+ // Amazon S3 User Guide.
+ Filter *NotificationConfigurationFilter
+
+ // An optional unique identifier for configurations in a notification
+ // configuration. If you don't provide one, Amazon S3 will assign an ID.
+ Id *string
+
+ noSmithyDocumentSerde
+}
+
+// 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 S3 User Guide.
+type Transition struct {
+
+ // Indicates when objects are transitioned to the specified storage class. The date
+ // value must be in ISO 8601 format. The time is always midnight UTC.
+ Date *time.Time
+
+ // Indicates the number of days after creation when objects are transitioned to the
+ // specified storage class. The value must be a positive integer.
+ Days int32
+
+ // The storage class to which you want the object to transition.
+ StorageClass TransitionStorageClass
+
+ noSmithyDocumentSerde
+}
+
+// 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 S3 API Reference.
+type VersioningConfiguration struct {
+
+ // Specifies whether MFA delete is enabled in the bucket versioning configuration.
+ // This element is only returned if the bucket has been configured with MFA delete.
+ // If the bucket has never been so configured, this element is not returned.
+ MFADelete MFADelete
+
+ // The versioning state of the bucket.
+ Status BucketVersioningStatus
+
+ noSmithyDocumentSerde
+}
+
+// Specifies website configuration parameters for an Amazon S3 bucket.
+type WebsiteConfiguration struct {
+
+ // The name of the error document for the website.
+ ErrorDocument *ErrorDocument
+
+ // The name of the index document for the website.
+ IndexDocument *IndexDocument
+
+ // The redirect behavior for every request to this bucket's website endpoint. If
+ // you specify this property, you can't specify any other property.
+ RedirectAllRequestsTo *RedirectAllRequestsTo
+
+ // Rules that define when a redirect is applied and the redirect behavior.
+ RoutingRules []RoutingRule
+
+ noSmithyDocumentSerde
+}
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
+
+// UnknownUnionMember is returned when a union member is returned over the wire,
+// but has an unknown tag.
+type UnknownUnionMember struct {
+ Tag string
+ Value []byte
+
+ noSmithyDocumentSerde
+}
+
+func (*UnknownUnionMember) isAnalyticsFilter() {}
+func (*UnknownUnionMember) isLifecycleRuleFilter() {}
+func (*UnknownUnionMember) isMetricsFilter() {}
+func (*UnknownUnionMember) isReplicationRuleFilter() {}
+func (*UnknownUnionMember) isSelectObjectContentEventStream() {}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go
new file mode 100644
index 000000000..a711ea619
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go
@@ -0,0 +1,5449 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+)
+
+type validateOpAbortMultipartUpload struct {
+}
+
+func (*validateOpAbortMultipartUpload) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpAbortMultipartUpload) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*AbortMultipartUploadInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpAbortMultipartUploadInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCompleteMultipartUpload struct {
+}
+
+func (*validateOpCompleteMultipartUpload) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCompleteMultipartUpload) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CompleteMultipartUploadInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCompleteMultipartUploadInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCopyObject struct {
+}
+
+func (*validateOpCopyObject) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCopyObject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CopyObjectInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCopyObjectInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCreateBucket struct {
+}
+
+func (*validateOpCreateBucket) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateBucket) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateBucketInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateBucketInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCreateMultipartUpload struct {
+}
+
+func (*validateOpCreateMultipartUpload) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateMultipartUpload) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateMultipartUploadInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateMultipartUploadInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteBucketAnalyticsConfiguration struct {
+}
+
+func (*validateOpDeleteBucketAnalyticsConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteBucketAnalyticsConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteBucketAnalyticsConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteBucketAnalyticsConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteBucketCors struct {
+}
+
+func (*validateOpDeleteBucketCors) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteBucketCors) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteBucketCorsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteBucketCorsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteBucketEncryption struct {
+}
+
+func (*validateOpDeleteBucketEncryption) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteBucketEncryption) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteBucketEncryptionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteBucketEncryptionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteBucket struct {
+}
+
+func (*validateOpDeleteBucket) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteBucket) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteBucketInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteBucketInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteBucketIntelligentTieringConfiguration struct {
+}
+
+func (*validateOpDeleteBucketIntelligentTieringConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteBucketIntelligentTieringConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteBucketIntelligentTieringConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteBucketIntelligentTieringConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteBucketInventoryConfiguration struct {
+}
+
+func (*validateOpDeleteBucketInventoryConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteBucketInventoryConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteBucketInventoryConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteBucketInventoryConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteBucketLifecycle struct {
+}
+
+func (*validateOpDeleteBucketLifecycle) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteBucketLifecycle) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteBucketLifecycleInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteBucketLifecycleInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteBucketMetricsConfiguration struct {
+}
+
+func (*validateOpDeleteBucketMetricsConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteBucketMetricsConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteBucketMetricsConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteBucketMetricsConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteBucketOwnershipControls struct {
+}
+
+func (*validateOpDeleteBucketOwnershipControls) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteBucketOwnershipControls) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteBucketOwnershipControlsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteBucketOwnershipControlsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteBucketPolicy struct {
+}
+
+func (*validateOpDeleteBucketPolicy) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteBucketPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteBucketPolicyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteBucketPolicyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteBucketReplication struct {
+}
+
+func (*validateOpDeleteBucketReplication) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteBucketReplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteBucketReplicationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteBucketReplicationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteBucketTagging struct {
+}
+
+func (*validateOpDeleteBucketTagging) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteBucketTagging) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteBucketTaggingInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteBucketTaggingInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteBucketWebsite struct {
+}
+
+func (*validateOpDeleteBucketWebsite) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteBucketWebsite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteBucketWebsiteInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteBucketWebsiteInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteObject struct {
+}
+
+func (*validateOpDeleteObject) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteObject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteObjectInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteObjectInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteObjects struct {
+}
+
+func (*validateOpDeleteObjects) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteObjects) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteObjectsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteObjectsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteObjectTagging struct {
+}
+
+func (*validateOpDeleteObjectTagging) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteObjectTagging) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteObjectTaggingInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteObjectTaggingInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeletePublicAccessBlock struct {
+}
+
+func (*validateOpDeletePublicAccessBlock) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeletePublicAccessBlock) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeletePublicAccessBlockInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeletePublicAccessBlockInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketAccelerateConfiguration struct {
+}
+
+func (*validateOpGetBucketAccelerateConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketAccelerateConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketAccelerateConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketAccelerateConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketAcl struct {
+}
+
+func (*validateOpGetBucketAcl) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketAcl) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketAclInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketAclInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketAnalyticsConfiguration struct {
+}
+
+func (*validateOpGetBucketAnalyticsConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketAnalyticsConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketAnalyticsConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketAnalyticsConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketCors struct {
+}
+
+func (*validateOpGetBucketCors) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketCors) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketCorsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketCorsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketEncryption struct {
+}
+
+func (*validateOpGetBucketEncryption) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketEncryption) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketEncryptionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketEncryptionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketIntelligentTieringConfiguration struct {
+}
+
+func (*validateOpGetBucketIntelligentTieringConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketIntelligentTieringConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketIntelligentTieringConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketIntelligentTieringConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketInventoryConfiguration struct {
+}
+
+func (*validateOpGetBucketInventoryConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketInventoryConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketInventoryConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketInventoryConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketLifecycleConfiguration struct {
+}
+
+func (*validateOpGetBucketLifecycleConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketLifecycleConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketLifecycleConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketLifecycleConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketLocation struct {
+}
+
+func (*validateOpGetBucketLocation) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketLocation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketLocationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketLocationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketLogging struct {
+}
+
+func (*validateOpGetBucketLogging) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketLogging) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketLoggingInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketLoggingInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketMetricsConfiguration struct {
+}
+
+func (*validateOpGetBucketMetricsConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketMetricsConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketMetricsConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketMetricsConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketNotificationConfiguration struct {
+}
+
+func (*validateOpGetBucketNotificationConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketNotificationConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketNotificationConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketNotificationConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketOwnershipControls struct {
+}
+
+func (*validateOpGetBucketOwnershipControls) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketOwnershipControls) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketOwnershipControlsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketOwnershipControlsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketPolicy struct {
+}
+
+func (*validateOpGetBucketPolicy) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketPolicyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketPolicyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketPolicyStatus struct {
+}
+
+func (*validateOpGetBucketPolicyStatus) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketPolicyStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketPolicyStatusInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketPolicyStatusInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketReplication struct {
+}
+
+func (*validateOpGetBucketReplication) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketReplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketReplicationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketReplicationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketRequestPayment struct {
+}
+
+func (*validateOpGetBucketRequestPayment) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketRequestPayment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketRequestPaymentInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketRequestPaymentInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketTagging struct {
+}
+
+func (*validateOpGetBucketTagging) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketTagging) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketTaggingInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketTaggingInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketVersioning struct {
+}
+
+func (*validateOpGetBucketVersioning) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketVersioning) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketVersioningInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketVersioningInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetBucketWebsite struct {
+}
+
+func (*validateOpGetBucketWebsite) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketWebsite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketWebsiteInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketWebsiteInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetObjectAcl struct {
+}
+
+func (*validateOpGetObjectAcl) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetObjectAcl) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetObjectAclInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetObjectAclInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetObject struct {
+}
+
+func (*validateOpGetObject) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetObject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetObjectInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetObjectInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetObjectLegalHold struct {
+}
+
+func (*validateOpGetObjectLegalHold) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetObjectLegalHold) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetObjectLegalHoldInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetObjectLegalHoldInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetObjectLockConfiguration struct {
+}
+
+func (*validateOpGetObjectLockConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetObjectLockConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetObjectLockConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetObjectLockConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetObjectRetention struct {
+}
+
+func (*validateOpGetObjectRetention) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetObjectRetention) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetObjectRetentionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetObjectRetentionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetObjectTagging struct {
+}
+
+func (*validateOpGetObjectTagging) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetObjectTagging) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetObjectTaggingInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetObjectTaggingInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetObjectTorrent struct {
+}
+
+func (*validateOpGetObjectTorrent) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetObjectTorrent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetObjectTorrentInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetObjectTorrentInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetPublicAccessBlock struct {
+}
+
+func (*validateOpGetPublicAccessBlock) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetPublicAccessBlock) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetPublicAccessBlockInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetPublicAccessBlockInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpHeadBucket struct {
+}
+
+func (*validateOpHeadBucket) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpHeadBucket) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*HeadBucketInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpHeadBucketInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpHeadObject struct {
+}
+
+func (*validateOpHeadObject) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpHeadObject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*HeadObjectInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpHeadObjectInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListBucketAnalyticsConfigurations struct {
+}
+
+func (*validateOpListBucketAnalyticsConfigurations) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListBucketAnalyticsConfigurations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListBucketAnalyticsConfigurationsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListBucketAnalyticsConfigurationsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListBucketIntelligentTieringConfigurations struct {
+}
+
+func (*validateOpListBucketIntelligentTieringConfigurations) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListBucketIntelligentTieringConfigurations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListBucketIntelligentTieringConfigurationsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListBucketIntelligentTieringConfigurationsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListBucketInventoryConfigurations struct {
+}
+
+func (*validateOpListBucketInventoryConfigurations) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListBucketInventoryConfigurations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListBucketInventoryConfigurationsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListBucketInventoryConfigurationsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListBucketMetricsConfigurations struct {
+}
+
+func (*validateOpListBucketMetricsConfigurations) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListBucketMetricsConfigurations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListBucketMetricsConfigurationsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListBucketMetricsConfigurationsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListMultipartUploads struct {
+}
+
+func (*validateOpListMultipartUploads) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListMultipartUploads) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListMultipartUploadsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListMultipartUploadsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListObjects struct {
+}
+
+func (*validateOpListObjects) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListObjects) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListObjectsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListObjectsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListObjectsV2 struct {
+}
+
+func (*validateOpListObjectsV2) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListObjectsV2) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListObjectsV2Input)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListObjectsV2Input(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListObjectVersions struct {
+}
+
+func (*validateOpListObjectVersions) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListObjectVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListObjectVersionsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListObjectVersionsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListParts struct {
+}
+
+func (*validateOpListParts) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListParts) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListPartsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListPartsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketAccelerateConfiguration struct {
+}
+
+func (*validateOpPutBucketAccelerateConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketAccelerateConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketAccelerateConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketAccelerateConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketAcl struct {
+}
+
+func (*validateOpPutBucketAcl) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketAcl) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketAclInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketAclInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketAnalyticsConfiguration struct {
+}
+
+func (*validateOpPutBucketAnalyticsConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketAnalyticsConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketAnalyticsConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketAnalyticsConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketCors struct {
+}
+
+func (*validateOpPutBucketCors) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketCors) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketCorsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketCorsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketEncryption struct {
+}
+
+func (*validateOpPutBucketEncryption) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketEncryption) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketEncryptionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketEncryptionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketIntelligentTieringConfiguration struct {
+}
+
+func (*validateOpPutBucketIntelligentTieringConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketIntelligentTieringConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketIntelligentTieringConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketIntelligentTieringConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketInventoryConfiguration struct {
+}
+
+func (*validateOpPutBucketInventoryConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketInventoryConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketInventoryConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketInventoryConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketLifecycleConfiguration struct {
+}
+
+func (*validateOpPutBucketLifecycleConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketLifecycleConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketLifecycleConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketLifecycleConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketLogging struct {
+}
+
+func (*validateOpPutBucketLogging) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketLogging) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketLoggingInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketLoggingInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketMetricsConfiguration struct {
+}
+
+func (*validateOpPutBucketMetricsConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketMetricsConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketMetricsConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketMetricsConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketNotificationConfiguration struct {
+}
+
+func (*validateOpPutBucketNotificationConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketNotificationConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketNotificationConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketNotificationConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketOwnershipControls struct {
+}
+
+func (*validateOpPutBucketOwnershipControls) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketOwnershipControls) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketOwnershipControlsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketOwnershipControlsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketPolicy struct {
+}
+
+func (*validateOpPutBucketPolicy) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketPolicyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketPolicyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketReplication struct {
+}
+
+func (*validateOpPutBucketReplication) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketReplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketReplicationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketReplicationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketRequestPayment struct {
+}
+
+func (*validateOpPutBucketRequestPayment) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketRequestPayment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketRequestPaymentInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketRequestPaymentInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketTagging struct {
+}
+
+func (*validateOpPutBucketTagging) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketTagging) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketTaggingInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketTaggingInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketVersioning struct {
+}
+
+func (*validateOpPutBucketVersioning) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketVersioning) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketVersioningInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketVersioningInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutBucketWebsite struct {
+}
+
+func (*validateOpPutBucketWebsite) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutBucketWebsite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutBucketWebsiteInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutBucketWebsiteInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutObjectAcl struct {
+}
+
+func (*validateOpPutObjectAcl) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutObjectAcl) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutObjectAclInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutObjectAclInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutObject struct {
+}
+
+func (*validateOpPutObject) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutObject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutObjectInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutObjectInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutObjectLegalHold struct {
+}
+
+func (*validateOpPutObjectLegalHold) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutObjectLegalHold) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutObjectLegalHoldInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutObjectLegalHoldInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutObjectLockConfiguration struct {
+}
+
+func (*validateOpPutObjectLockConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutObjectLockConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutObjectLockConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutObjectLockConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutObjectRetention struct {
+}
+
+func (*validateOpPutObjectRetention) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutObjectRetention) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutObjectRetentionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutObjectRetentionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutObjectTagging struct {
+}
+
+func (*validateOpPutObjectTagging) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutObjectTagging) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutObjectTaggingInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutObjectTaggingInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutPublicAccessBlock struct {
+}
+
+func (*validateOpPutPublicAccessBlock) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutPublicAccessBlock) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutPublicAccessBlockInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutPublicAccessBlockInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpRestoreObject struct {
+}
+
+func (*validateOpRestoreObject) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpRestoreObject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*RestoreObjectInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpRestoreObjectInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpSelectObjectContent struct {
+}
+
+func (*validateOpSelectObjectContent) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpSelectObjectContent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*SelectObjectContentInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpSelectObjectContentInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUploadPartCopy struct {
+}
+
+func (*validateOpUploadPartCopy) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUploadPartCopy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UploadPartCopyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUploadPartCopyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUploadPart struct {
+}
+
+func (*validateOpUploadPart) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUploadPart) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UploadPartInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUploadPartInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpWriteGetObjectResponse struct {
+}
+
+func (*validateOpWriteGetObjectResponse) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpWriteGetObjectResponse) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*WriteGetObjectResponseInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpWriteGetObjectResponseInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+func addOpAbortMultipartUploadValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpAbortMultipartUpload{}, middleware.After)
+}
+
+func addOpCompleteMultipartUploadValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCompleteMultipartUpload{}, middleware.After)
+}
+
+func addOpCopyObjectValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCopyObject{}, middleware.After)
+}
+
+func addOpCreateBucketValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateBucket{}, middleware.After)
+}
+
+func addOpCreateMultipartUploadValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateMultipartUpload{}, middleware.After)
+}
+
+func addOpDeleteBucketAnalyticsConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteBucketAnalyticsConfiguration{}, middleware.After)
+}
+
+func addOpDeleteBucketCorsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteBucketCors{}, middleware.After)
+}
+
+func addOpDeleteBucketEncryptionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteBucketEncryption{}, middleware.After)
+}
+
+func addOpDeleteBucketValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteBucket{}, middleware.After)
+}
+
+func addOpDeleteBucketIntelligentTieringConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteBucketIntelligentTieringConfiguration{}, middleware.After)
+}
+
+func addOpDeleteBucketInventoryConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteBucketInventoryConfiguration{}, middleware.After)
+}
+
+func addOpDeleteBucketLifecycleValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteBucketLifecycle{}, middleware.After)
+}
+
+func addOpDeleteBucketMetricsConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteBucketMetricsConfiguration{}, middleware.After)
+}
+
+func addOpDeleteBucketOwnershipControlsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteBucketOwnershipControls{}, middleware.After)
+}
+
+func addOpDeleteBucketPolicyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteBucketPolicy{}, middleware.After)
+}
+
+func addOpDeleteBucketReplicationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteBucketReplication{}, middleware.After)
+}
+
+func addOpDeleteBucketTaggingValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteBucketTagging{}, middleware.After)
+}
+
+func addOpDeleteBucketWebsiteValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteBucketWebsite{}, middleware.After)
+}
+
+func addOpDeleteObjectValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteObject{}, middleware.After)
+}
+
+func addOpDeleteObjectsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteObjects{}, middleware.After)
+}
+
+func addOpDeleteObjectTaggingValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteObjectTagging{}, middleware.After)
+}
+
+func addOpDeletePublicAccessBlockValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeletePublicAccessBlock{}, middleware.After)
+}
+
+func addOpGetBucketAccelerateConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketAccelerateConfiguration{}, middleware.After)
+}
+
+func addOpGetBucketAclValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketAcl{}, middleware.After)
+}
+
+func addOpGetBucketAnalyticsConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketAnalyticsConfiguration{}, middleware.After)
+}
+
+func addOpGetBucketCorsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketCors{}, middleware.After)
+}
+
+func addOpGetBucketEncryptionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketEncryption{}, middleware.After)
+}
+
+func addOpGetBucketIntelligentTieringConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketIntelligentTieringConfiguration{}, middleware.After)
+}
+
+func addOpGetBucketInventoryConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketInventoryConfiguration{}, middleware.After)
+}
+
+func addOpGetBucketLifecycleConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketLifecycleConfiguration{}, middleware.After)
+}
+
+func addOpGetBucketLocationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketLocation{}, middleware.After)
+}
+
+func addOpGetBucketLoggingValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketLogging{}, middleware.After)
+}
+
+func addOpGetBucketMetricsConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketMetricsConfiguration{}, middleware.After)
+}
+
+func addOpGetBucketNotificationConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketNotificationConfiguration{}, middleware.After)
+}
+
+func addOpGetBucketOwnershipControlsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketOwnershipControls{}, middleware.After)
+}
+
+func addOpGetBucketPolicyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketPolicy{}, middleware.After)
+}
+
+func addOpGetBucketPolicyStatusValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketPolicyStatus{}, middleware.After)
+}
+
+func addOpGetBucketReplicationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketReplication{}, middleware.After)
+}
+
+func addOpGetBucketRequestPaymentValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketRequestPayment{}, middleware.After)
+}
+
+func addOpGetBucketTaggingValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketTagging{}, middleware.After)
+}
+
+func addOpGetBucketVersioningValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketVersioning{}, middleware.After)
+}
+
+func addOpGetBucketWebsiteValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketWebsite{}, middleware.After)
+}
+
+func addOpGetObjectAclValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetObjectAcl{}, middleware.After)
+}
+
+func addOpGetObjectValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetObject{}, middleware.After)
+}
+
+func addOpGetObjectLegalHoldValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetObjectLegalHold{}, middleware.After)
+}
+
+func addOpGetObjectLockConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetObjectLockConfiguration{}, middleware.After)
+}
+
+func addOpGetObjectRetentionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetObjectRetention{}, middleware.After)
+}
+
+func addOpGetObjectTaggingValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetObjectTagging{}, middleware.After)
+}
+
+func addOpGetObjectTorrentValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetObjectTorrent{}, middleware.After)
+}
+
+func addOpGetPublicAccessBlockValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetPublicAccessBlock{}, middleware.After)
+}
+
+func addOpHeadBucketValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpHeadBucket{}, middleware.After)
+}
+
+func addOpHeadObjectValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpHeadObject{}, middleware.After)
+}
+
+func addOpListBucketAnalyticsConfigurationsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListBucketAnalyticsConfigurations{}, middleware.After)
+}
+
+func addOpListBucketIntelligentTieringConfigurationsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListBucketIntelligentTieringConfigurations{}, middleware.After)
+}
+
+func addOpListBucketInventoryConfigurationsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListBucketInventoryConfigurations{}, middleware.After)
+}
+
+func addOpListBucketMetricsConfigurationsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListBucketMetricsConfigurations{}, middleware.After)
+}
+
+func addOpListMultipartUploadsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListMultipartUploads{}, middleware.After)
+}
+
+func addOpListObjectsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListObjects{}, middleware.After)
+}
+
+func addOpListObjectsV2ValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListObjectsV2{}, middleware.After)
+}
+
+func addOpListObjectVersionsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListObjectVersions{}, middleware.After)
+}
+
+func addOpListPartsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListParts{}, middleware.After)
+}
+
+func addOpPutBucketAccelerateConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketAccelerateConfiguration{}, middleware.After)
+}
+
+func addOpPutBucketAclValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketAcl{}, middleware.After)
+}
+
+func addOpPutBucketAnalyticsConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketAnalyticsConfiguration{}, middleware.After)
+}
+
+func addOpPutBucketCorsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketCors{}, middleware.After)
+}
+
+func addOpPutBucketEncryptionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketEncryption{}, middleware.After)
+}
+
+func addOpPutBucketIntelligentTieringConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketIntelligentTieringConfiguration{}, middleware.After)
+}
+
+func addOpPutBucketInventoryConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketInventoryConfiguration{}, middleware.After)
+}
+
+func addOpPutBucketLifecycleConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketLifecycleConfiguration{}, middleware.After)
+}
+
+func addOpPutBucketLoggingValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketLogging{}, middleware.After)
+}
+
+func addOpPutBucketMetricsConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketMetricsConfiguration{}, middleware.After)
+}
+
+func addOpPutBucketNotificationConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketNotificationConfiguration{}, middleware.After)
+}
+
+func addOpPutBucketOwnershipControlsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketOwnershipControls{}, middleware.After)
+}
+
+func addOpPutBucketPolicyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketPolicy{}, middleware.After)
+}
+
+func addOpPutBucketReplicationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketReplication{}, middleware.After)
+}
+
+func addOpPutBucketRequestPaymentValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketRequestPayment{}, middleware.After)
+}
+
+func addOpPutBucketTaggingValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketTagging{}, middleware.After)
+}
+
+func addOpPutBucketVersioningValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketVersioning{}, middleware.After)
+}
+
+func addOpPutBucketWebsiteValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutBucketWebsite{}, middleware.After)
+}
+
+func addOpPutObjectAclValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutObjectAcl{}, middleware.After)
+}
+
+func addOpPutObjectValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutObject{}, middleware.After)
+}
+
+func addOpPutObjectLegalHoldValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutObjectLegalHold{}, middleware.After)
+}
+
+func addOpPutObjectLockConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutObjectLockConfiguration{}, middleware.After)
+}
+
+func addOpPutObjectRetentionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutObjectRetention{}, middleware.After)
+}
+
+func addOpPutObjectTaggingValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutObjectTagging{}, middleware.After)
+}
+
+func addOpPutPublicAccessBlockValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutPublicAccessBlock{}, middleware.After)
+}
+
+func addOpRestoreObjectValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpRestoreObject{}, middleware.After)
+}
+
+func addOpSelectObjectContentValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpSelectObjectContent{}, middleware.After)
+}
+
+func addOpUploadPartCopyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUploadPartCopy{}, middleware.After)
+}
+
+func addOpUploadPartValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUploadPart{}, middleware.After)
+}
+
+func addOpWriteGetObjectResponseValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpWriteGetObjectResponse{}, middleware.After)
+}
+
+func validateAccessControlPolicy(v *types.AccessControlPolicy) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AccessControlPolicy"}
+ if v.Grants != nil {
+ if err := validateGrants(v.Grants); err != nil {
+ invalidParams.AddNested("Grants", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateAccessControlTranslation(v *types.AccessControlTranslation) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AccessControlTranslation"}
+ if len(v.Owner) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Owner"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateAnalyticsAndOperator(v *types.AnalyticsAndOperator) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AnalyticsAndOperator"}
+ if v.Tags != nil {
+ if err := validateTagSet(v.Tags); err != nil {
+ invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateAnalyticsConfiguration(v *types.AnalyticsConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AnalyticsConfiguration"}
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if v.Filter != nil {
+ if err := validateAnalyticsFilter(v.Filter); err != nil {
+ invalidParams.AddNested("Filter", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.StorageClassAnalysis == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("StorageClassAnalysis"))
+ } else if v.StorageClassAnalysis != nil {
+ if err := validateStorageClassAnalysis(v.StorageClassAnalysis); err != nil {
+ invalidParams.AddNested("StorageClassAnalysis", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateAnalyticsExportDestination(v *types.AnalyticsExportDestination) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AnalyticsExportDestination"}
+ if v.S3BucketDestination == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("S3BucketDestination"))
+ } else if v.S3BucketDestination != nil {
+ if err := validateAnalyticsS3BucketDestination(v.S3BucketDestination); err != nil {
+ invalidParams.AddNested("S3BucketDestination", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateAnalyticsFilter(v types.AnalyticsFilter) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AnalyticsFilter"}
+ switch uv := v.(type) {
+ case *types.AnalyticsFilterMemberAnd:
+ if err := validateAnalyticsAndOperator(&uv.Value); err != nil {
+ invalidParams.AddNested("[And]", err.(smithy.InvalidParamsError))
+ }
+
+ case *types.AnalyticsFilterMemberTag:
+ if err := validateTag(&uv.Value); err != nil {
+ invalidParams.AddNested("[Tag]", err.(smithy.InvalidParamsError))
+ }
+
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateAnalyticsS3BucketDestination(v *types.AnalyticsS3BucketDestination) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AnalyticsS3BucketDestination"}
+ if len(v.Format) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Format"))
+ }
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateBucketLifecycleConfiguration(v *types.BucketLifecycleConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "BucketLifecycleConfiguration"}
+ if v.Rules == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Rules"))
+ } else if v.Rules != nil {
+ if err := validateLifecycleRules(v.Rules); err != nil {
+ invalidParams.AddNested("Rules", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateBucketLoggingStatus(v *types.BucketLoggingStatus) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "BucketLoggingStatus"}
+ if v.LoggingEnabled != nil {
+ if err := validateLoggingEnabled(v.LoggingEnabled); err != nil {
+ invalidParams.AddNested("LoggingEnabled", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateCORSConfiguration(v *types.CORSConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CORSConfiguration"}
+ if v.CORSRules == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CORSRules"))
+ } else if v.CORSRules != nil {
+ if err := validateCORSRules(v.CORSRules); err != nil {
+ invalidParams.AddNested("CORSRules", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateCORSRule(v *types.CORSRule) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CORSRule"}
+ if v.AllowedMethods == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AllowedMethods"))
+ }
+ if v.AllowedOrigins == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AllowedOrigins"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateCORSRules(v []types.CORSRule) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CORSRules"}
+ for i := range v {
+ if err := validateCORSRule(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateDelete(v *types.Delete) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Delete"}
+ if v.Objects == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Objects"))
+ } else if v.Objects != nil {
+ if err := validateObjectIdentifierList(v.Objects); err != nil {
+ invalidParams.AddNested("Objects", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateDestination(v *types.Destination) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Destination"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.AccessControlTranslation != nil {
+ if err := validateAccessControlTranslation(v.AccessControlTranslation); err != nil {
+ invalidParams.AddNested("AccessControlTranslation", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.ReplicationTime != nil {
+ if err := validateReplicationTime(v.ReplicationTime); err != nil {
+ invalidParams.AddNested("ReplicationTime", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.Metrics != nil {
+ if err := validateMetrics(v.Metrics); err != nil {
+ invalidParams.AddNested("Metrics", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateEncryption(v *types.Encryption) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Encryption"}
+ if len(v.EncryptionType) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("EncryptionType"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateErrorDocument(v *types.ErrorDocument) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ErrorDocument"}
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateExistingObjectReplication(v *types.ExistingObjectReplication) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ExistingObjectReplication"}
+ if len(v.Status) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Status"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateGlacierJobParameters(v *types.GlacierJobParameters) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GlacierJobParameters"}
+ if len(v.Tier) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Tier"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateGrant(v *types.Grant) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Grant"}
+ if v.Grantee != nil {
+ if err := validateGrantee(v.Grantee); err != nil {
+ invalidParams.AddNested("Grantee", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateGrantee(v *types.Grantee) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Grantee"}
+ if len(v.Type) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Type"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateGrants(v []types.Grant) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Grants"}
+ for i := range v {
+ if err := validateGrant(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateIndexDocument(v *types.IndexDocument) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "IndexDocument"}
+ if v.Suffix == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Suffix"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateIntelligentTieringAndOperator(v *types.IntelligentTieringAndOperator) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "IntelligentTieringAndOperator"}
+ if v.Tags != nil {
+ if err := validateTagSet(v.Tags); err != nil {
+ invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateIntelligentTieringConfiguration(v *types.IntelligentTieringConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "IntelligentTieringConfiguration"}
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if v.Filter != nil {
+ if err := validateIntelligentTieringFilter(v.Filter); err != nil {
+ invalidParams.AddNested("Filter", err.(smithy.InvalidParamsError))
+ }
+ }
+ if len(v.Status) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Status"))
+ }
+ if v.Tierings == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Tierings"))
+ } else if v.Tierings != nil {
+ if err := validateTieringList(v.Tierings); err != nil {
+ invalidParams.AddNested("Tierings", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateIntelligentTieringFilter(v *types.IntelligentTieringFilter) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "IntelligentTieringFilter"}
+ if v.Tag != nil {
+ if err := validateTag(v.Tag); err != nil {
+ invalidParams.AddNested("Tag", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.And != nil {
+ if err := validateIntelligentTieringAndOperator(v.And); err != nil {
+ invalidParams.AddNested("And", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateInventoryConfiguration(v *types.InventoryConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "InventoryConfiguration"}
+ if v.Destination == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Destination"))
+ } else if v.Destination != nil {
+ if err := validateInventoryDestination(v.Destination); err != nil {
+ invalidParams.AddNested("Destination", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.Filter != nil {
+ if err := validateInventoryFilter(v.Filter); err != nil {
+ invalidParams.AddNested("Filter", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if len(v.IncludedObjectVersions) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("IncludedObjectVersions"))
+ }
+ if v.Schedule == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Schedule"))
+ } else if v.Schedule != nil {
+ if err := validateInventorySchedule(v.Schedule); err != nil {
+ invalidParams.AddNested("Schedule", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateInventoryDestination(v *types.InventoryDestination) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "InventoryDestination"}
+ if v.S3BucketDestination == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("S3BucketDestination"))
+ } else if v.S3BucketDestination != nil {
+ if err := validateInventoryS3BucketDestination(v.S3BucketDestination); err != nil {
+ invalidParams.AddNested("S3BucketDestination", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateInventoryEncryption(v *types.InventoryEncryption) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "InventoryEncryption"}
+ if v.SSEKMS != nil {
+ if err := validateSSEKMS(v.SSEKMS); err != nil {
+ invalidParams.AddNested("SSEKMS", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateInventoryFilter(v *types.InventoryFilter) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "InventoryFilter"}
+ if v.Prefix == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Prefix"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateInventoryS3BucketDestination(v *types.InventoryS3BucketDestination) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "InventoryS3BucketDestination"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if len(v.Format) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Format"))
+ }
+ if v.Encryption != nil {
+ if err := validateInventoryEncryption(v.Encryption); err != nil {
+ invalidParams.AddNested("Encryption", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateInventorySchedule(v *types.InventorySchedule) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "InventorySchedule"}
+ if len(v.Frequency) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Frequency"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateLambdaFunctionConfiguration(v *types.LambdaFunctionConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "LambdaFunctionConfiguration"}
+ if v.LambdaFunctionArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LambdaFunctionArn"))
+ }
+ if v.Events == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Events"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateLambdaFunctionConfigurationList(v []types.LambdaFunctionConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "LambdaFunctionConfigurationList"}
+ for i := range v {
+ if err := validateLambdaFunctionConfiguration(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateLifecycleRule(v *types.LifecycleRule) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "LifecycleRule"}
+ if v.Filter != nil {
+ if err := validateLifecycleRuleFilter(v.Filter); err != nil {
+ invalidParams.AddNested("Filter", err.(smithy.InvalidParamsError))
+ }
+ }
+ if len(v.Status) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Status"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateLifecycleRuleAndOperator(v *types.LifecycleRuleAndOperator) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "LifecycleRuleAndOperator"}
+ if v.Tags != nil {
+ if err := validateTagSet(v.Tags); err != nil {
+ invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateLifecycleRuleFilter(v types.LifecycleRuleFilter) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "LifecycleRuleFilter"}
+ switch uv := v.(type) {
+ case *types.LifecycleRuleFilterMemberAnd:
+ if err := validateLifecycleRuleAndOperator(&uv.Value); err != nil {
+ invalidParams.AddNested("[And]", err.(smithy.InvalidParamsError))
+ }
+
+ case *types.LifecycleRuleFilterMemberTag:
+ if err := validateTag(&uv.Value); err != nil {
+ invalidParams.AddNested("[Tag]", err.(smithy.InvalidParamsError))
+ }
+
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateLifecycleRules(v []types.LifecycleRule) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "LifecycleRules"}
+ for i := range v {
+ if err := validateLifecycleRule(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateLoggingEnabled(v *types.LoggingEnabled) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "LoggingEnabled"}
+ if v.TargetBucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TargetBucket"))
+ }
+ if v.TargetGrants != nil {
+ if err := validateTargetGrants(v.TargetGrants); err != nil {
+ invalidParams.AddNested("TargetGrants", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.TargetPrefix == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TargetPrefix"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateMetrics(v *types.Metrics) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Metrics"}
+ if len(v.Status) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Status"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateMetricsAndOperator(v *types.MetricsAndOperator) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "MetricsAndOperator"}
+ if v.Tags != nil {
+ if err := validateTagSet(v.Tags); err != nil {
+ invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateMetricsConfiguration(v *types.MetricsConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "MetricsConfiguration"}
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if v.Filter != nil {
+ if err := validateMetricsFilter(v.Filter); err != nil {
+ invalidParams.AddNested("Filter", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateMetricsFilter(v types.MetricsFilter) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "MetricsFilter"}
+ switch uv := v.(type) {
+ case *types.MetricsFilterMemberAnd:
+ if err := validateMetricsAndOperator(&uv.Value); err != nil {
+ invalidParams.AddNested("[And]", err.(smithy.InvalidParamsError))
+ }
+
+ case *types.MetricsFilterMemberTag:
+ if err := validateTag(&uv.Value); err != nil {
+ invalidParams.AddNested("[Tag]", err.(smithy.InvalidParamsError))
+ }
+
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateNotificationConfiguration(v *types.NotificationConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "NotificationConfiguration"}
+ if v.TopicConfigurations != nil {
+ if err := validateTopicConfigurationList(v.TopicConfigurations); err != nil {
+ invalidParams.AddNested("TopicConfigurations", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.QueueConfigurations != nil {
+ if err := validateQueueConfigurationList(v.QueueConfigurations); err != nil {
+ invalidParams.AddNested("QueueConfigurations", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.LambdaFunctionConfigurations != nil {
+ if err := validateLambdaFunctionConfigurationList(v.LambdaFunctionConfigurations); err != nil {
+ invalidParams.AddNested("LambdaFunctionConfigurations", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateObjectIdentifier(v *types.ObjectIdentifier) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ObjectIdentifier"}
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateObjectIdentifierList(v []types.ObjectIdentifier) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ObjectIdentifierList"}
+ for i := range v {
+ if err := validateObjectIdentifier(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOutputLocation(v *types.OutputLocation) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "OutputLocation"}
+ if v.S3 != nil {
+ if err := validateS3Location(v.S3); err != nil {
+ invalidParams.AddNested("S3", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOwnershipControls(v *types.OwnershipControls) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "OwnershipControls"}
+ if v.Rules == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Rules"))
+ } else if v.Rules != nil {
+ if err := validateOwnershipControlsRules(v.Rules); err != nil {
+ invalidParams.AddNested("Rules", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOwnershipControlsRule(v *types.OwnershipControlsRule) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "OwnershipControlsRule"}
+ if len(v.ObjectOwnership) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("ObjectOwnership"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOwnershipControlsRules(v []types.OwnershipControlsRule) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "OwnershipControlsRules"}
+ for i := range v {
+ if err := validateOwnershipControlsRule(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateQueueConfiguration(v *types.QueueConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "QueueConfiguration"}
+ if v.QueueArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("QueueArn"))
+ }
+ if v.Events == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Events"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateQueueConfigurationList(v []types.QueueConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "QueueConfigurationList"}
+ for i := range v {
+ if err := validateQueueConfiguration(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateRedirectAllRequestsTo(v *types.RedirectAllRequestsTo) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "RedirectAllRequestsTo"}
+ if v.HostName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("HostName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateReplicaModifications(v *types.ReplicaModifications) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ReplicaModifications"}
+ if len(v.Status) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Status"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateReplicationConfiguration(v *types.ReplicationConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ReplicationConfiguration"}
+ if v.Role == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Role"))
+ }
+ if v.Rules == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Rules"))
+ } else if v.Rules != nil {
+ if err := validateReplicationRules(v.Rules); err != nil {
+ invalidParams.AddNested("Rules", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateReplicationRule(v *types.ReplicationRule) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ReplicationRule"}
+ if v.Filter != nil {
+ if err := validateReplicationRuleFilter(v.Filter); err != nil {
+ invalidParams.AddNested("Filter", err.(smithy.InvalidParamsError))
+ }
+ }
+ if len(v.Status) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Status"))
+ }
+ if v.SourceSelectionCriteria != nil {
+ if err := validateSourceSelectionCriteria(v.SourceSelectionCriteria); err != nil {
+ invalidParams.AddNested("SourceSelectionCriteria", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.ExistingObjectReplication != nil {
+ if err := validateExistingObjectReplication(v.ExistingObjectReplication); err != nil {
+ invalidParams.AddNested("ExistingObjectReplication", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.Destination == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Destination"))
+ } else if v.Destination != nil {
+ if err := validateDestination(v.Destination); err != nil {
+ invalidParams.AddNested("Destination", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateReplicationRuleAndOperator(v *types.ReplicationRuleAndOperator) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ReplicationRuleAndOperator"}
+ if v.Tags != nil {
+ if err := validateTagSet(v.Tags); err != nil {
+ invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateReplicationRuleFilter(v types.ReplicationRuleFilter) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ReplicationRuleFilter"}
+ switch uv := v.(type) {
+ case *types.ReplicationRuleFilterMemberAnd:
+ if err := validateReplicationRuleAndOperator(&uv.Value); err != nil {
+ invalidParams.AddNested("[And]", err.(smithy.InvalidParamsError))
+ }
+
+ case *types.ReplicationRuleFilterMemberTag:
+ if err := validateTag(&uv.Value); err != nil {
+ invalidParams.AddNested("[Tag]", err.(smithy.InvalidParamsError))
+ }
+
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateReplicationRules(v []types.ReplicationRule) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ReplicationRules"}
+ for i := range v {
+ if err := validateReplicationRule(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateReplicationTime(v *types.ReplicationTime) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ReplicationTime"}
+ if len(v.Status) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Status"))
+ }
+ if v.Time == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Time"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateRequestPaymentConfiguration(v *types.RequestPaymentConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "RequestPaymentConfiguration"}
+ if len(v.Payer) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Payer"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateRestoreRequest(v *types.RestoreRequest) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "RestoreRequest"}
+ if v.GlacierJobParameters != nil {
+ if err := validateGlacierJobParameters(v.GlacierJobParameters); err != nil {
+ invalidParams.AddNested("GlacierJobParameters", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.SelectParameters != nil {
+ if err := validateSelectParameters(v.SelectParameters); err != nil {
+ invalidParams.AddNested("SelectParameters", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.OutputLocation != nil {
+ if err := validateOutputLocation(v.OutputLocation); err != nil {
+ invalidParams.AddNested("OutputLocation", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateRoutingRule(v *types.RoutingRule) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "RoutingRule"}
+ if v.Redirect == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Redirect"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateRoutingRules(v []types.RoutingRule) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "RoutingRules"}
+ for i := range v {
+ if err := validateRoutingRule(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateS3Location(v *types.S3Location) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "S3Location"}
+ if v.BucketName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("BucketName"))
+ }
+ if v.Prefix == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Prefix"))
+ }
+ if v.Encryption != nil {
+ if err := validateEncryption(v.Encryption); err != nil {
+ invalidParams.AddNested("Encryption", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.AccessControlList != nil {
+ if err := validateGrants(v.AccessControlList); err != nil {
+ invalidParams.AddNested("AccessControlList", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.Tagging != nil {
+ if err := validateTagging(v.Tagging); err != nil {
+ invalidParams.AddNested("Tagging", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateSelectParameters(v *types.SelectParameters) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "SelectParameters"}
+ if v.InputSerialization == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("InputSerialization"))
+ }
+ if len(v.ExpressionType) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("ExpressionType"))
+ }
+ if v.Expression == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Expression"))
+ }
+ if v.OutputSerialization == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("OutputSerialization"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateServerSideEncryptionByDefault(v *types.ServerSideEncryptionByDefault) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ServerSideEncryptionByDefault"}
+ if len(v.SSEAlgorithm) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("SSEAlgorithm"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateServerSideEncryptionConfiguration(v *types.ServerSideEncryptionConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ServerSideEncryptionConfiguration"}
+ if v.Rules == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Rules"))
+ } else if v.Rules != nil {
+ if err := validateServerSideEncryptionRules(v.Rules); err != nil {
+ invalidParams.AddNested("Rules", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateServerSideEncryptionRule(v *types.ServerSideEncryptionRule) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ServerSideEncryptionRule"}
+ if v.ApplyServerSideEncryptionByDefault != nil {
+ if err := validateServerSideEncryptionByDefault(v.ApplyServerSideEncryptionByDefault); err != nil {
+ invalidParams.AddNested("ApplyServerSideEncryptionByDefault", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateServerSideEncryptionRules(v []types.ServerSideEncryptionRule) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ServerSideEncryptionRules"}
+ for i := range v {
+ if err := validateServerSideEncryptionRule(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateSourceSelectionCriteria(v *types.SourceSelectionCriteria) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "SourceSelectionCriteria"}
+ if v.SseKmsEncryptedObjects != nil {
+ if err := validateSseKmsEncryptedObjects(v.SseKmsEncryptedObjects); err != nil {
+ invalidParams.AddNested("SseKmsEncryptedObjects", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.ReplicaModifications != nil {
+ if err := validateReplicaModifications(v.ReplicaModifications); err != nil {
+ invalidParams.AddNested("ReplicaModifications", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateSSEKMS(v *types.SSEKMS) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "SSEKMS"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateSseKmsEncryptedObjects(v *types.SseKmsEncryptedObjects) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "SseKmsEncryptedObjects"}
+ if len(v.Status) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("Status"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateStorageClassAnalysis(v *types.StorageClassAnalysis) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "StorageClassAnalysis"}
+ if v.DataExport != nil {
+ if err := validateStorageClassAnalysisDataExport(v.DataExport); err != nil {
+ invalidParams.AddNested("DataExport", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateStorageClassAnalysisDataExport(v *types.StorageClassAnalysisDataExport) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "StorageClassAnalysisDataExport"}
+ if len(v.OutputSchemaVersion) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("OutputSchemaVersion"))
+ }
+ if v.Destination == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Destination"))
+ } else if v.Destination != nil {
+ if err := validateAnalyticsExportDestination(v.Destination); err != nil {
+ invalidParams.AddNested("Destination", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateTag(v *types.Tag) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Tag"}
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if v.Value == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Value"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateTagging(v *types.Tagging) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Tagging"}
+ if v.TagSet == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TagSet"))
+ } else if v.TagSet != nil {
+ if err := validateTagSet(v.TagSet); err != nil {
+ invalidParams.AddNested("TagSet", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateTagSet(v []types.Tag) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "TagSet"}
+ for i := range v {
+ if err := validateTag(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateTargetGrant(v *types.TargetGrant) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "TargetGrant"}
+ if v.Grantee != nil {
+ if err := validateGrantee(v.Grantee); err != nil {
+ invalidParams.AddNested("Grantee", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateTargetGrants(v []types.TargetGrant) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "TargetGrants"}
+ for i := range v {
+ if err := validateTargetGrant(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateTiering(v *types.Tiering) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Tiering"}
+ if len(v.AccessTier) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("AccessTier"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateTieringList(v []types.Tiering) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "TieringList"}
+ for i := range v {
+ if err := validateTiering(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateTopicConfiguration(v *types.TopicConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "TopicConfiguration"}
+ if v.TopicArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TopicArn"))
+ }
+ if v.Events == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Events"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateTopicConfigurationList(v []types.TopicConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "TopicConfigurationList"}
+ for i := range v {
+ if err := validateTopicConfiguration(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateWebsiteConfiguration(v *types.WebsiteConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "WebsiteConfiguration"}
+ if v.ErrorDocument != nil {
+ if err := validateErrorDocument(v.ErrorDocument); err != nil {
+ invalidParams.AddNested("ErrorDocument", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.IndexDocument != nil {
+ if err := validateIndexDocument(v.IndexDocument); err != nil {
+ invalidParams.AddNested("IndexDocument", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.RedirectAllRequestsTo != nil {
+ if err := validateRedirectAllRequestsTo(v.RedirectAllRequestsTo); err != nil {
+ invalidParams.AddNested("RedirectAllRequestsTo", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.RoutingRules != nil {
+ if err := validateRoutingRules(v.RoutingRules); err != nil {
+ invalidParams.AddNested("RoutingRules", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpAbortMultipartUploadInput(v *AbortMultipartUploadInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AbortMultipartUploadInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if v.UploadId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("UploadId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCompleteMultipartUploadInput(v *CompleteMultipartUploadInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CompleteMultipartUploadInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if v.UploadId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("UploadId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCopyObjectInput(v *CopyObjectInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CopyObjectInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.CopySource == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CopySource"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCreateBucketInput(v *CreateBucketInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateBucketInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCreateMultipartUploadInput(v *CreateMultipartUploadInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateMultipartUploadInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteBucketAnalyticsConfigurationInput(v *DeleteBucketAnalyticsConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteBucketAnalyticsConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteBucketCorsInput(v *DeleteBucketCorsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteBucketCorsInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteBucketEncryptionInput(v *DeleteBucketEncryptionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteBucketEncryptionInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteBucketInput(v *DeleteBucketInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteBucketInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteBucketIntelligentTieringConfigurationInput(v *DeleteBucketIntelligentTieringConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteBucketIntelligentTieringConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteBucketInventoryConfigurationInput(v *DeleteBucketInventoryConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteBucketInventoryConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteBucketLifecycleInput(v *DeleteBucketLifecycleInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteBucketLifecycleInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteBucketMetricsConfigurationInput(v *DeleteBucketMetricsConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteBucketMetricsConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteBucketOwnershipControlsInput(v *DeleteBucketOwnershipControlsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteBucketOwnershipControlsInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteBucketPolicyInput(v *DeleteBucketPolicyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteBucketPolicyInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteBucketReplicationInput(v *DeleteBucketReplicationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteBucketReplicationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteBucketTaggingInput(v *DeleteBucketTaggingInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteBucketTaggingInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteBucketWebsiteInput(v *DeleteBucketWebsiteInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteBucketWebsiteInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteObjectInput(v *DeleteObjectInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteObjectInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteObjectsInput(v *DeleteObjectsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteObjectsInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Delete == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Delete"))
+ } else if v.Delete != nil {
+ if err := validateDelete(v.Delete); err != nil {
+ invalidParams.AddNested("Delete", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteObjectTaggingInput(v *DeleteObjectTaggingInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteObjectTaggingInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeletePublicAccessBlockInput(v *DeletePublicAccessBlockInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeletePublicAccessBlockInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketAccelerateConfigurationInput(v *GetBucketAccelerateConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketAccelerateConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketAclInput(v *GetBucketAclInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketAclInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketAnalyticsConfigurationInput(v *GetBucketAnalyticsConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketAnalyticsConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketCorsInput(v *GetBucketCorsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketCorsInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketEncryptionInput(v *GetBucketEncryptionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketEncryptionInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketIntelligentTieringConfigurationInput(v *GetBucketIntelligentTieringConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketIntelligentTieringConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketInventoryConfigurationInput(v *GetBucketInventoryConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketInventoryConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketLifecycleConfigurationInput(v *GetBucketLifecycleConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketLifecycleConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketLocationInput(v *GetBucketLocationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketLocationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketLoggingInput(v *GetBucketLoggingInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketLoggingInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketMetricsConfigurationInput(v *GetBucketMetricsConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketMetricsConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketNotificationConfigurationInput(v *GetBucketNotificationConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketNotificationConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketOwnershipControlsInput(v *GetBucketOwnershipControlsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketOwnershipControlsInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketPolicyInput(v *GetBucketPolicyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketPolicyInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketPolicyStatusInput(v *GetBucketPolicyStatusInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketPolicyStatusInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketReplicationInput(v *GetBucketReplicationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketReplicationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketRequestPaymentInput(v *GetBucketRequestPaymentInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketRequestPaymentInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketTaggingInput(v *GetBucketTaggingInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketTaggingInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketVersioningInput(v *GetBucketVersioningInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketVersioningInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetBucketWebsiteInput(v *GetBucketWebsiteInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketWebsiteInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetObjectAclInput(v *GetObjectAclInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetObjectAclInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetObjectInput(v *GetObjectInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetObjectInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetObjectLegalHoldInput(v *GetObjectLegalHoldInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetObjectLegalHoldInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetObjectLockConfigurationInput(v *GetObjectLockConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetObjectLockConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetObjectRetentionInput(v *GetObjectRetentionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetObjectRetentionInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetObjectTaggingInput(v *GetObjectTaggingInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetObjectTaggingInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetObjectTorrentInput(v *GetObjectTorrentInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetObjectTorrentInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetPublicAccessBlockInput(v *GetPublicAccessBlockInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetPublicAccessBlockInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpHeadBucketInput(v *HeadBucketInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "HeadBucketInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpHeadObjectInput(v *HeadObjectInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "HeadObjectInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListBucketAnalyticsConfigurationsInput(v *ListBucketAnalyticsConfigurationsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListBucketAnalyticsConfigurationsInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListBucketIntelligentTieringConfigurationsInput(v *ListBucketIntelligentTieringConfigurationsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListBucketIntelligentTieringConfigurationsInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListBucketInventoryConfigurationsInput(v *ListBucketInventoryConfigurationsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListBucketInventoryConfigurationsInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListBucketMetricsConfigurationsInput(v *ListBucketMetricsConfigurationsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListBucketMetricsConfigurationsInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListMultipartUploadsInput(v *ListMultipartUploadsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListMultipartUploadsInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListObjectsInput(v *ListObjectsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListObjectsInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListObjectsV2Input(v *ListObjectsV2Input) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListObjectsV2Input"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListObjectVersionsInput(v *ListObjectVersionsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListObjectVersionsInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListPartsInput(v *ListPartsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListPartsInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if v.UploadId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("UploadId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketAccelerateConfigurationInput(v *PutBucketAccelerateConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketAccelerateConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.AccelerateConfiguration == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AccelerateConfiguration"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketAclInput(v *PutBucketAclInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketAclInput"}
+ if v.AccessControlPolicy != nil {
+ if err := validateAccessControlPolicy(v.AccessControlPolicy); err != nil {
+ invalidParams.AddNested("AccessControlPolicy", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketAnalyticsConfigurationInput(v *PutBucketAnalyticsConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketAnalyticsConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if v.AnalyticsConfiguration == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AnalyticsConfiguration"))
+ } else if v.AnalyticsConfiguration != nil {
+ if err := validateAnalyticsConfiguration(v.AnalyticsConfiguration); err != nil {
+ invalidParams.AddNested("AnalyticsConfiguration", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketCorsInput(v *PutBucketCorsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketCorsInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.CORSConfiguration == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CORSConfiguration"))
+ } else if v.CORSConfiguration != nil {
+ if err := validateCORSConfiguration(v.CORSConfiguration); err != nil {
+ invalidParams.AddNested("CORSConfiguration", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketEncryptionInput(v *PutBucketEncryptionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketEncryptionInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.ServerSideEncryptionConfiguration == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ServerSideEncryptionConfiguration"))
+ } else if v.ServerSideEncryptionConfiguration != nil {
+ if err := validateServerSideEncryptionConfiguration(v.ServerSideEncryptionConfiguration); err != nil {
+ invalidParams.AddNested("ServerSideEncryptionConfiguration", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketIntelligentTieringConfigurationInput(v *PutBucketIntelligentTieringConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketIntelligentTieringConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if v.IntelligentTieringConfiguration == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("IntelligentTieringConfiguration"))
+ } else if v.IntelligentTieringConfiguration != nil {
+ if err := validateIntelligentTieringConfiguration(v.IntelligentTieringConfiguration); err != nil {
+ invalidParams.AddNested("IntelligentTieringConfiguration", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketInventoryConfigurationInput(v *PutBucketInventoryConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketInventoryConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if v.InventoryConfiguration == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("InventoryConfiguration"))
+ } else if v.InventoryConfiguration != nil {
+ if err := validateInventoryConfiguration(v.InventoryConfiguration); err != nil {
+ invalidParams.AddNested("InventoryConfiguration", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketLifecycleConfigurationInput(v *PutBucketLifecycleConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketLifecycleConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.LifecycleConfiguration != nil {
+ if err := validateBucketLifecycleConfiguration(v.LifecycleConfiguration); err != nil {
+ invalidParams.AddNested("LifecycleConfiguration", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketLoggingInput(v *PutBucketLoggingInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketLoggingInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.BucketLoggingStatus == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("BucketLoggingStatus"))
+ } else if v.BucketLoggingStatus != nil {
+ if err := validateBucketLoggingStatus(v.BucketLoggingStatus); err != nil {
+ invalidParams.AddNested("BucketLoggingStatus", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketMetricsConfigurationInput(v *PutBucketMetricsConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketMetricsConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Id == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Id"))
+ }
+ if v.MetricsConfiguration == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("MetricsConfiguration"))
+ } else if v.MetricsConfiguration != nil {
+ if err := validateMetricsConfiguration(v.MetricsConfiguration); err != nil {
+ invalidParams.AddNested("MetricsConfiguration", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketNotificationConfigurationInput(v *PutBucketNotificationConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketNotificationConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.NotificationConfiguration == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("NotificationConfiguration"))
+ } else if v.NotificationConfiguration != nil {
+ if err := validateNotificationConfiguration(v.NotificationConfiguration); err != nil {
+ invalidParams.AddNested("NotificationConfiguration", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketOwnershipControlsInput(v *PutBucketOwnershipControlsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketOwnershipControlsInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.OwnershipControls == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("OwnershipControls"))
+ } else if v.OwnershipControls != nil {
+ if err := validateOwnershipControls(v.OwnershipControls); err != nil {
+ invalidParams.AddNested("OwnershipControls", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketPolicyInput(v *PutBucketPolicyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketPolicyInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Policy == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Policy"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketReplicationInput(v *PutBucketReplicationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketReplicationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.ReplicationConfiguration == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ReplicationConfiguration"))
+ } else if v.ReplicationConfiguration != nil {
+ if err := validateReplicationConfiguration(v.ReplicationConfiguration); err != nil {
+ invalidParams.AddNested("ReplicationConfiguration", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketRequestPaymentInput(v *PutBucketRequestPaymentInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketRequestPaymentInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.RequestPaymentConfiguration == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("RequestPaymentConfiguration"))
+ } else if v.RequestPaymentConfiguration != nil {
+ if err := validateRequestPaymentConfiguration(v.RequestPaymentConfiguration); err != nil {
+ invalidParams.AddNested("RequestPaymentConfiguration", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketTaggingInput(v *PutBucketTaggingInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketTaggingInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Tagging == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Tagging"))
+ } else if v.Tagging != nil {
+ if err := validateTagging(v.Tagging); err != nil {
+ invalidParams.AddNested("Tagging", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketVersioningInput(v *PutBucketVersioningInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketVersioningInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.VersioningConfiguration == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("VersioningConfiguration"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutBucketWebsiteInput(v *PutBucketWebsiteInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutBucketWebsiteInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.WebsiteConfiguration == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("WebsiteConfiguration"))
+ } else if v.WebsiteConfiguration != nil {
+ if err := validateWebsiteConfiguration(v.WebsiteConfiguration); err != nil {
+ invalidParams.AddNested("WebsiteConfiguration", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutObjectAclInput(v *PutObjectAclInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutObjectAclInput"}
+ if v.AccessControlPolicy != nil {
+ if err := validateAccessControlPolicy(v.AccessControlPolicy); err != nil {
+ invalidParams.AddNested("AccessControlPolicy", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutObjectInput(v *PutObjectInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutObjectInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutObjectLegalHoldInput(v *PutObjectLegalHoldInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutObjectLegalHoldInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutObjectLockConfigurationInput(v *PutObjectLockConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutObjectLockConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutObjectRetentionInput(v *PutObjectRetentionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutObjectRetentionInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutObjectTaggingInput(v *PutObjectTaggingInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutObjectTaggingInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if v.Tagging == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Tagging"))
+ } else if v.Tagging != nil {
+ if err := validateTagging(v.Tagging); err != nil {
+ invalidParams.AddNested("Tagging", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutPublicAccessBlockInput(v *PutPublicAccessBlockInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutPublicAccessBlockInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.PublicAccessBlockConfiguration == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("PublicAccessBlockConfiguration"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpRestoreObjectInput(v *RestoreObjectInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "RestoreObjectInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if v.RestoreRequest != nil {
+ if err := validateRestoreRequest(v.RestoreRequest); err != nil {
+ invalidParams.AddNested("RestoreRequest", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpSelectObjectContentInput(v *SelectObjectContentInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "SelectObjectContentInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if v.Expression == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Expression"))
+ }
+ if len(v.ExpressionType) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("ExpressionType"))
+ }
+ if v.InputSerialization == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("InputSerialization"))
+ }
+ if v.OutputSerialization == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("OutputSerialization"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUploadPartCopyInput(v *UploadPartCopyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UploadPartCopyInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.CopySource == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CopySource"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if v.UploadId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("UploadId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUploadPartInput(v *UploadPartInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UploadPartInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if v.UploadId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("UploadId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpWriteGetObjectResponseInput(v *WriteGetObjectResponseInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "WriteGetObjectResponseInput"}
+ if v.RequestRoute == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("RequestRoute"))
+ }
+ if v.RequestToken == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("RequestToken"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
new file mode 100644
index 000000000..f58d0adb9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
@@ -0,0 +1,182 @@
+# v1.11.23 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.22 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.21 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.20 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.19 (2022-08-30)
+
+* **Documentation**: Documentation updates for the AWS IAM Identity Center Portal CLI Reference.
+
+# v1.11.18 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.17 (2022-08-15)
+
+* **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
+
+# v1.11.16 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.15 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.14 (2022-08-08)
+
+* **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.13 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.12 (2022-07-11)
+
+* No change notes available for this release.
+
+# v1.11.11 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.10 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.9 (2022-06-16)
+
+* No change notes available for this release.
+
+# v1.11.8 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.7 (2022-05-26)
+
+* No change notes available for this release.
+
+# v1.11.6 (2022-05-25)
+
+* No change notes available for this release.
+
+# v1.11.5 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.3 (2022-03-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.2 (2022-03-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.1 (2022-03-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.0 (2022-03-08)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.0 (2022-02-24)
+
+* **Feature**: API client updated
+* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.0 (2022-01-14)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Documentation**: Updated API models
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.0 (2022-01-07)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.0 (2021-12-21)
+
+* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens.
+
+# v1.6.2 (2021-12-02)
+
+* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514))
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.1 (2021-11-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.0 (2021-11-06)
+
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Feature**: Updated service to latest API model.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.0 (2021-10-21)
+
+* **Feature**: Updated to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.2 (2021-10-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.1 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2021-08-27)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.3 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.2 (2021-08-04)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.1 (2021-07-15)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2021-06-25)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.1 (2021-05-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/aws/aws-sdk-go-v2/service/sso/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go
new file mode 100644
index 000000000..7bb069844
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go
@@ -0,0 +1,433 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sso
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/defaults"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ smithy "github.com/aws/smithy-go"
+ smithydocument "github.com/aws/smithy-go/document"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net"
+ "net/http"
+ "time"
+)
+
+const ServiceID = "SSO"
+const ServiceAPIVersion = "2019-06-10"
+
+// Client provides the API client to make operations call for AWS Single Sign-On.
+type Client struct {
+ options Options
+}
+
+// New returns an initialized Client based on the functional options. Provide
+// additional functional options to further configure the behavior of the client,
+// such as changing the client's endpoint or adding custom middleware behavior.
+func New(options Options, optFns ...func(*Options)) *Client {
+ options = options.Copy()
+
+ resolveDefaultLogger(&options)
+
+ setResolvedDefaultsMode(&options)
+
+ resolveRetryer(&options)
+
+ resolveHTTPClient(&options)
+
+ resolveHTTPSignerV4(&options)
+
+ resolveDefaultEndpointConfiguration(&options)
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ client := &Client{
+ options: options,
+ }
+
+ return client
+}
+
+type Options struct {
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // Configures the events that will be sent to the configured logger.
+ ClientLogMode aws.ClientLogMode
+
+ // The credentials object to use when signing requests.
+ Credentials aws.CredentialsProvider
+
+ // The configuration DefaultsMode that the SDK should use when constructing the
+ // clients initial default settings.
+ DefaultsMode aws.DefaultsMode
+
+ // The endpoint options to be used when attempting to resolve an endpoint.
+ EndpointOptions EndpointResolverOptions
+
+ // The service endpoint resolver.
+ EndpointResolver EndpointResolver
+
+ // Signature Version 4 (SigV4) Signer
+ HTTPSignerV4 HTTPSignerV4
+
+ // The logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // The region to send requests to. (Required)
+ Region string
+
+ // RetryMaxAttempts specifies the maximum number attempts an API client will call
+ // an operation that fails with a retryable error. A value of 0 is ignored, and
+ // will not be used to configure the API client created default retryer, or modify
+ // per operation call's retry max attempts. When creating a new API Clients this
+ // member will only be used if the Retryer Options member is nil. This value will
+ // be ignored if Retryer is not nil. If specified in an operation call's functional
+ // options with a value that is different than the constructed client's Options,
+ // the Client's Retryer will be wrapped to use the operation's specific
+ // RetryMaxAttempts value.
+ RetryMaxAttempts int
+
+ // RetryMode specifies the retry mode the API client will be created with, if
+ // Retryer option is not also specified. When creating a new API Clients this
+ // member will only be used if the Retryer Options member is nil. This value will
+ // be ignored if Retryer is not nil. Currently does not support per operation call
+ // overrides, may in the future.
+ RetryMode aws.RetryMode
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer. The kind of
+ // default retry created by the API client can be changed with the RetryMode
+ // option.
+ Retryer aws.Retryer
+
+ // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
+ // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You
+ // should not populate this structure programmatically, or rely on the values here
+ // within your applications.
+ RuntimeEnvironment aws.RuntimeEnvironment
+
+ // The initial DefaultsMode used when the client options were constructed. If the
+ // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
+ // value was at that point in time. Currently does not support per operation call
+ // overrides, may in the future.
+ resolvedDefaultsMode aws.DefaultsMode
+
+ // The HTTP client to invoke API calls with. Defaults to client's default HTTP
+ // implementation if nil.
+ HTTPClient HTTPClient
+}
+
+// WithAPIOptions returns a functional option for setting the Client's APIOptions
+// option.
+func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, optFns...)
+ }
+}
+
+// WithEndpointResolver returns a functional option for setting the Client's
+// EndpointResolver option.
+func WithEndpointResolver(v EndpointResolver) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolver = v
+ }
+}
+
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// Copy creates a clone where the APIOptions list is deep copied.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
+ copy(to.APIOptions, o.APIOptions)
+
+ return to
+}
+func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
+ ctx = middleware.ClearStackValues(ctx)
+ stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
+ options := c.options.Copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ finalizeRetryMaxAttemptOptions(&options, *c)
+
+ finalizeClientEndpointResolverOptions(&options)
+
+ for _, fn := range stackFns {
+ if err := fn(stack, options); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ for _, fn := range options.APIOptions {
+ if err := fn(stack); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack)
+ result, metadata, err = handler.Handle(ctx, params)
+ if err != nil {
+ err = &smithy.OperationError{
+ ServiceID: ServiceID,
+ OperationName: opID,
+ Err: err,
+ }
+ }
+ return result, metadata, err
+}
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
+
+func resolveDefaultLogger(o *Options) {
+ if o.Logger != nil {
+ return
+ }
+ o.Logger = logging.Nop{}
+}
+
+func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
+ return middleware.AddSetLoggerMiddleware(stack, o.Logger)
+}
+
+func setResolvedDefaultsMode(o *Options) {
+ if len(o.resolvedDefaultsMode) > 0 {
+ return
+ }
+
+ var mode aws.DefaultsMode
+ mode.SetFromString(string(o.DefaultsMode))
+
+ if mode == aws.DefaultsModeAuto {
+ mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
+ }
+
+ o.resolvedDefaultsMode = mode
+}
+
+// NewFromConfig returns a new client from the provided config.
+func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
+ opts := Options{
+ Region: cfg.Region,
+ DefaultsMode: cfg.DefaultsMode,
+ RuntimeEnvironment: cfg.RuntimeEnvironment,
+ HTTPClient: cfg.HTTPClient,
+ Credentials: cfg.Credentials,
+ APIOptions: cfg.APIOptions,
+ Logger: cfg.Logger,
+ ClientLogMode: cfg.ClientLogMode,
+ }
+ resolveAWSRetryerProvider(cfg, &opts)
+ resolveAWSRetryMaxAttempts(cfg, &opts)
+ resolveAWSRetryMode(cfg, &opts)
+ resolveAWSEndpointResolver(cfg, &opts)
+ resolveUseDualStackEndpoint(cfg, &opts)
+ resolveUseFIPSEndpoint(cfg, &opts)
+ return New(opts, optFns...)
+}
+
+func resolveHTTPClient(o *Options) {
+ var buildable *awshttp.BuildableClient
+
+ if o.HTTPClient != nil {
+ var ok bool
+ buildable, ok = o.HTTPClient.(*awshttp.BuildableClient)
+ if !ok {
+ return
+ }
+ } else {
+ buildable = awshttp.NewBuildableClient()
+ }
+
+ modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
+ if err == nil {
+ buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
+ if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
+ dialer.Timeout = dialerTimeout
+ }
+ })
+
+ buildable = buildable.WithTransportOptions(func(transport *http.Transport) {
+ if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok {
+ transport.TLSHandshakeTimeout = tlsHandshakeTimeout
+ }
+ })
+ }
+
+ o.HTTPClient = buildable
+}
+
+func resolveRetryer(o *Options) {
+ if o.Retryer != nil {
+ return
+ }
+
+ if len(o.RetryMode) == 0 {
+ modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
+ if err == nil {
+ o.RetryMode = modeConfig.RetryMode
+ }
+ }
+ if len(o.RetryMode) == 0 {
+ o.RetryMode = aws.RetryModeStandard
+ }
+
+ var standardOptions []func(*retry.StandardOptions)
+ if v := o.RetryMaxAttempts; v != 0 {
+ standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
+ so.MaxAttempts = v
+ })
+ }
+
+ switch o.RetryMode {
+ case aws.RetryModeAdaptive:
+ var adaptiveOptions []func(*retry.AdaptiveModeOptions)
+ if len(standardOptions) != 0 {
+ adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
+ ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
+ })
+ }
+ o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
+
+ default:
+ o.Retryer = retry.NewStandard(standardOptions...)
+ }
+}
+
+func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
+ if cfg.Retryer == nil {
+ return
+ }
+ o.Retryer = cfg.Retryer()
+}
+
+func resolveAWSRetryMode(cfg aws.Config, o *Options) {
+ if len(cfg.RetryMode) == 0 {
+ return
+ }
+ o.RetryMode = cfg.RetryMode
+}
+func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
+ if cfg.RetryMaxAttempts == 0 {
+ return
+ }
+ o.RetryMaxAttempts = cfg.RetryMaxAttempts
+}
+
+func finalizeRetryMaxAttemptOptions(o *Options, client Client) {
+ if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
+ return
+ }
+
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
+}
+
+func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
+ if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
+ return
+ }
+ o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver())
+}
+
+func addClientUserAgent(stack *middleware.Stack) error {
+ return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "sso", goModuleVersion)(stack)
+}
+
+func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error {
+ mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: o.Credentials,
+ Signer: o.HTTPSignerV4,
+ LogSigning: o.ClientLogMode.IsSigning(),
+ })
+ return stack.Finalize.Add(mw, middleware.After)
+}
+
+type HTTPSignerV4 interface {
+ SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
+}
+
+func resolveHTTPSignerV4(o *Options) {
+ if o.HTTPSignerV4 != nil {
+ return
+ }
+ o.HTTPSignerV4 = newDefaultV4Signer(*o)
+}
+
+func newDefaultV4Signer(o Options) *v4.Signer {
+ return v4.NewSigner(func(so *v4.SignerOptions) {
+ so.Logger = o.Logger
+ so.LogSigning = o.ClientLogMode.IsSigning()
+ })
+}
+
+func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
+ mo := retry.AddRetryMiddlewaresOptions{
+ Retryer: o.Retryer,
+ LogRetryAttempts: o.ClientLogMode.IsRetries(),
+ }
+ return retry.AddRetryMiddlewares(stack, mo)
+}
+
+// resolves dual-stack endpoint configuration
+func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseDualStackEndpoint = value
+ }
+ return nil
+}
+
+// resolves FIPS endpoint configuration
+func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseFIPSEndpoint = value
+ }
+ return nil
+}
+
+func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
+ return awsmiddleware.AddRequestIDRetrieverMiddleware(stack)
+}
+
+func addResponseErrorMiddleware(stack *middleware.Stack) error {
+ return awshttp.AddResponseErrorMiddleware(stack)
+}
+
+func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
+ return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
+ LogRequest: o.ClientLogMode.IsRequest(),
+ LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(),
+ LogResponse: o.ClientLogMode.IsResponse(),
+ LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
+ }, middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go
new file mode 100644
index 000000000..1c2b7499d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go
@@ -0,0 +1,127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sso
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/sso/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns the STS short-term credentials for a given role name that is assigned to
+// the user.
+func (c *Client) GetRoleCredentials(ctx context.Context, params *GetRoleCredentialsInput, optFns ...func(*Options)) (*GetRoleCredentialsOutput, error) {
+ if params == nil {
+ params = &GetRoleCredentialsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetRoleCredentials", params, optFns, c.addOperationGetRoleCredentialsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetRoleCredentialsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetRoleCredentialsInput struct {
+
+ // The token issued by the CreateToken API call. For more information, see
+ // CreateToken
+ // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
+ // in the IAM Identity Center OIDC API Reference Guide.
+ //
+ // This member is required.
+ AccessToken *string
+
+ // The identifier for the AWS account that is assigned to the user.
+ //
+ // This member is required.
+ AccountId *string
+
+ // The friendly name of the role that is assigned to the user.
+ //
+ // This member is required.
+ RoleName *string
+
+ noSmithyDocumentSerde
+}
+
+type GetRoleCredentialsOutput struct {
+
+ // The credentials for the role that is assigned to the user.
+ RoleCredentials *types.RoleCredentials
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetRoleCredentials{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetRoleCredentials{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpGetRoleCredentialsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRoleCredentials(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetRoleCredentials(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetRoleCredentials",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go
new file mode 100644
index 000000000..4fffc77af
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go
@@ -0,0 +1,223 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sso
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/sso/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Lists all roles that are assigned to the user for a given AWS account.
+func (c *Client) ListAccountRoles(ctx context.Context, params *ListAccountRolesInput, optFns ...func(*Options)) (*ListAccountRolesOutput, error) {
+ if params == nil {
+ params = &ListAccountRolesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListAccountRoles", params, optFns, c.addOperationListAccountRolesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListAccountRolesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListAccountRolesInput struct {
+
+ // The token issued by the CreateToken API call. For more information, see
+ // CreateToken
+ // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
+ // in the IAM Identity Center OIDC API Reference Guide.
+ //
+ // This member is required.
+ AccessToken *string
+
+ // The identifier for the AWS account that is assigned to the user.
+ //
+ // This member is required.
+ AccountId *string
+
+ // The number of items that clients can request per page.
+ MaxResults *int32
+
+ // The page token from the previous response output when you request subsequent
+ // pages.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type ListAccountRolesOutput struct {
+
+ // The page token client that is used to retrieve the list of accounts.
+ NextToken *string
+
+ // A paginated response with the list of roles and the next token if more results
+ // are available.
+ RoleList []types.RoleInfo
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpListAccountRoles{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAccountRoles{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpListAccountRolesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountRoles(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListAccountRolesAPIClient is a client that implements the ListAccountRoles
+// operation.
+type ListAccountRolesAPIClient interface {
+ ListAccountRoles(context.Context, *ListAccountRolesInput, ...func(*Options)) (*ListAccountRolesOutput, error)
+}
+
+var _ ListAccountRolesAPIClient = (*Client)(nil)
+
+// ListAccountRolesPaginatorOptions is the paginator options for ListAccountRoles
+type ListAccountRolesPaginatorOptions struct {
+ // The number of items that clients can request per page.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListAccountRolesPaginator is a paginator for ListAccountRoles
+type ListAccountRolesPaginator struct {
+ options ListAccountRolesPaginatorOptions
+ client ListAccountRolesAPIClient
+ params *ListAccountRolesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListAccountRolesPaginator returns a new ListAccountRolesPaginator
+func NewListAccountRolesPaginator(client ListAccountRolesAPIClient, params *ListAccountRolesInput, optFns ...func(*ListAccountRolesPaginatorOptions)) *ListAccountRolesPaginator {
+ if params == nil {
+ params = &ListAccountRolesInput{}
+ }
+
+ options := ListAccountRolesPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListAccountRolesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.NextToken,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListAccountRolesPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListAccountRoles page.
+func (p *ListAccountRolesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAccountRolesOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.NextToken = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxResults = limit
+
+ result, err := p.client.ListAccountRoles(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextToken
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+func newServiceMetadataMiddleware_opListAccountRoles(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListAccountRoles",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go
new file mode 100644
index 000000000..e717a426c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go
@@ -0,0 +1,221 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sso
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/sso/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Lists all AWS accounts assigned to the user. These AWS accounts are assigned by
+// the administrator of the account. For more information, see Assign User Access
+// (https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers)
+// in the IAM Identity Center User Guide. This operation returns a paginated
+// response.
+func (c *Client) ListAccounts(ctx context.Context, params *ListAccountsInput, optFns ...func(*Options)) (*ListAccountsOutput, error) {
+ if params == nil {
+ params = &ListAccountsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListAccounts", params, optFns, c.addOperationListAccountsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListAccountsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListAccountsInput struct {
+
+ // The token issued by the CreateToken API call. For more information, see
+ // CreateToken
+ // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
+ // in the IAM Identity Center OIDC API Reference Guide.
+ //
+ // This member is required.
+ AccessToken *string
+
+ // This is the number of items clients can request per page.
+ MaxResults *int32
+
+ // (Optional) When requesting subsequent pages, this is the page token from the
+ // previous response output.
+ NextToken *string
+
+ noSmithyDocumentSerde
+}
+
+type ListAccountsOutput struct {
+
+ // A paginated response with the list of account information and the next token if
+ // more results are available.
+ AccountList []types.AccountInfo
+
+ // The page token client that is used to retrieve the list of accounts.
+ NextToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpListAccounts{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAccounts{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpListAccountsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccounts(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListAccountsAPIClient is a client that implements the ListAccounts operation.
+type ListAccountsAPIClient interface {
+ ListAccounts(context.Context, *ListAccountsInput, ...func(*Options)) (*ListAccountsOutput, error)
+}
+
+var _ ListAccountsAPIClient = (*Client)(nil)
+
+// ListAccountsPaginatorOptions is the paginator options for ListAccounts
+type ListAccountsPaginatorOptions struct {
+ // This is the number of items clients can request per page.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListAccountsPaginator is a paginator for ListAccounts
+type ListAccountsPaginator struct {
+ options ListAccountsPaginatorOptions
+ client ListAccountsAPIClient
+ params *ListAccountsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListAccountsPaginator returns a new ListAccountsPaginator
+func NewListAccountsPaginator(client ListAccountsAPIClient, params *ListAccountsInput, optFns ...func(*ListAccountsPaginatorOptions)) *ListAccountsPaginator {
+ if params == nil {
+ params = &ListAccountsInput{}
+ }
+
+ options := ListAccountsPaginatorOptions{}
+ if params.MaxResults != nil {
+ options.Limit = *params.MaxResults
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListAccountsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.NextToken,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListAccountsPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListAccounts page.
+func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAccountsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.NextToken = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxResults = limit
+
+ result, err := p.client.ListAccounts(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextToken
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+func newServiceMetadataMiddleware_opListAccounts(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListAccounts",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go
new file mode 100644
index 000000000..8b9b44745
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go
@@ -0,0 +1,123 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sso
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Removes the locally stored SSO tokens from the client-side cache and sends an
+// API call to the IAM Identity Center service to invalidate the corresponding
+// server-side IAM Identity Center sign in session. If a user uses IAM Identity
+// Center to access the AWS CLI, the user’s IAM Identity Center sign in session is
+// used to obtain an IAM session, as specified in the corresponding IAM Identity
+// Center permission set. More specifically, IAM Identity Center assumes an IAM
+// role in the target account on behalf of the user, and the corresponding
+// temporary AWS credentials are returned to the client. After user logout, any
+// existing IAM role sessions that were created by using IAM Identity Center
+// permission sets continue based on the duration configured in the permission set.
+// For more information, see User authentications
+// (https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html) in
+// the IAM Identity Center User Guide.
+func (c *Client) Logout(ctx context.Context, params *LogoutInput, optFns ...func(*Options)) (*LogoutOutput, error) {
+ if params == nil {
+ params = &LogoutInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "Logout", params, optFns, c.addOperationLogoutMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*LogoutOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type LogoutInput struct {
+
+ // The token issued by the CreateToken API call. For more information, see
+ // CreateToken
+ // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
+ // in the IAM Identity Center OIDC API Reference Guide.
+ //
+ // This member is required.
+ AccessToken *string
+
+ noSmithyDocumentSerde
+}
+
+type LogoutOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpLogout{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpLogout{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpLogoutValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opLogout(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opLogout(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "Logout",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go
new file mode 100644
index 000000000..6a1851da2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go
@@ -0,0 +1,1151 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sso
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson"
+ "github.com/aws/aws-sdk-go-v2/service/sso/types"
+ smithy "github.com/aws/smithy-go"
+ smithyio "github.com/aws/smithy-go/io"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+ "io/ioutil"
+ "strings"
+)
+
+type awsRestjson1_deserializeOpGetRoleCredentials struct {
+}
+
+func (*awsRestjson1_deserializeOpGetRoleCredentials) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetRoleCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetRoleCredentials(response, &metadata)
+ }
+ output := &GetRoleCredentialsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetRoleCredentialsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetRoleCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ code := response.Header.Get("X-Amzn-ErrorType")
+ if len(code) != 0 {
+ errorCode = restjson.SanitizeErrorCode(code)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ code, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(code) != 0 {
+ errorCode = restjson.SanitizeErrorCode(code)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidRequestException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ case strings.EqualFold("UnauthorizedException", errorCode):
+ return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetRoleCredentialsOutput(v **GetRoleCredentialsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetRoleCredentialsOutput
+ if *v == nil {
+ sv = &GetRoleCredentialsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "roleCredentials":
+ if err := awsRestjson1_deserializeDocumentRoleCredentials(&sv.RoleCredentials, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpListAccountRoles struct {
+}
+
+func (*awsRestjson1_deserializeOpListAccountRoles) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpListAccountRoles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorListAccountRoles(response, &metadata)
+ }
+ output := &ListAccountRolesOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentListAccountRolesOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorListAccountRoles(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ code := response.Header.Get("X-Amzn-ErrorType")
+ if len(code) != 0 {
+ errorCode = restjson.SanitizeErrorCode(code)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ code, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(code) != 0 {
+ errorCode = restjson.SanitizeErrorCode(code)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidRequestException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ case strings.EqualFold("UnauthorizedException", errorCode):
+ return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentListAccountRolesOutput(v **ListAccountRolesOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListAccountRolesOutput
+ if *v == nil {
+ sv = &ListAccountRolesOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "nextToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected NextTokenType to be of type string, got %T instead", value)
+ }
+ sv.NextToken = ptr.String(jtv)
+ }
+
+ case "roleList":
+ if err := awsRestjson1_deserializeDocumentRoleListType(&sv.RoleList, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpListAccounts struct {
+}
+
+func (*awsRestjson1_deserializeOpListAccounts) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpListAccounts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorListAccounts(response, &metadata)
+ }
+ output := &ListAccountsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentListAccountsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorListAccounts(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ code := response.Header.Get("X-Amzn-ErrorType")
+ if len(code) != 0 {
+ errorCode = restjson.SanitizeErrorCode(code)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ code, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(code) != 0 {
+ errorCode = restjson.SanitizeErrorCode(code)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidRequestException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ case strings.EqualFold("UnauthorizedException", errorCode):
+ return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentListAccountsOutput(v **ListAccountsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListAccountsOutput
+ if *v == nil {
+ sv = &ListAccountsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "accountList":
+ if err := awsRestjson1_deserializeDocumentAccountListType(&sv.AccountList, value); err != nil {
+ return err
+ }
+
+ case "nextToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected NextTokenType to be of type string, got %T instead", value)
+ }
+ sv.NextToken = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpLogout struct {
+}
+
+func (*awsRestjson1_deserializeOpLogout) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpLogout) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorLogout(response, &metadata)
+ }
+ output := &LogoutOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorLogout(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ code := response.Header.Get("X-Amzn-ErrorType")
+ if len(code) != 0 {
+ errorCode = restjson.SanitizeErrorCode(code)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ code, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(code) != 0 {
+ errorCode = restjson.SanitizeErrorCode(code)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidRequestException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ case strings.EqualFold("UnauthorizedException", errorCode):
+ return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidRequestException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidRequestException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ResourceNotFoundException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorTooManyRequestsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.TooManyRequestsException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentTooManyRequestsException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorUnauthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.UnauthorizedException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentUnauthorizedException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeDocumentAccountInfo(v **types.AccountInfo, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.AccountInfo
+ if *v == nil {
+ sv = &types.AccountInfo{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "accountId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected AccountIdType to be of type string, got %T instead", value)
+ }
+ sv.AccountId = ptr.String(jtv)
+ }
+
+ case "accountName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected AccountNameType to be of type string, got %T instead", value)
+ }
+ sv.AccountName = ptr.String(jtv)
+ }
+
+ case "emailAddress":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EmailAddressType to be of type string, got %T instead", value)
+ }
+ sv.EmailAddress = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentAccountListType(v *[]types.AccountInfo, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.AccountInfo
+ if *v == nil {
+ cv = []types.AccountInfo{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.AccountInfo
+ destAddr := &col
+ if err := awsRestjson1_deserializeDocumentAccountInfo(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidRequestException(v **types.InvalidRequestException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidRequestException
+ if *v == nil {
+ sv = &types.InvalidRequestException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ResourceNotFoundException
+ if *v == nil {
+ sv = &types.ResourceNotFoundException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentRoleCredentials(v **types.RoleCredentials, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.RoleCredentials
+ if *v == nil {
+ sv = &types.RoleCredentials{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "accessKeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected AccessKeyType to be of type string, got %T instead", value)
+ }
+ sv.AccessKeyId = ptr.String(jtv)
+ }
+
+ case "expiration":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected ExpirationTimestampType to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.Expiration = i64
+ }
+
+ case "secretAccessKey":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected SecretAccessKeyType to be of type string, got %T instead", value)
+ }
+ sv.SecretAccessKey = ptr.String(jtv)
+ }
+
+ case "sessionToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected SessionTokenType to be of type string, got %T instead", value)
+ }
+ sv.SessionToken = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentRoleInfo(v **types.RoleInfo, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.RoleInfo
+ if *v == nil {
+ sv = &types.RoleInfo{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "accountId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected AccountIdType to be of type string, got %T instead", value)
+ }
+ sv.AccountId = ptr.String(jtv)
+ }
+
+ case "roleName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RoleNameType to be of type string, got %T instead", value)
+ }
+ sv.RoleName = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentRoleListType(v *[]types.RoleInfo, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.RoleInfo
+ if *v == nil {
+ cv = []types.RoleInfo{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.RoleInfo
+ destAddr := &col
+ if err := awsRestjson1_deserializeDocumentRoleInfo(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentTooManyRequestsException(v **types.TooManyRequestsException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.TooManyRequestsException
+ if *v == nil {
+ sv = &types.TooManyRequestsException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentUnauthorizedException(v **types.UnauthorizedException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.UnauthorizedException
+ if *v == nil {
+ sv = &types.UnauthorizedException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go
new file mode 100644
index 000000000..f981b154f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go
@@ -0,0 +1,22 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+// Package sso provides the API client, operations, and parameter types for AWS
+// Single Sign-On.
+//
+// AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web
+// service that makes it easy for you to assign user access to IAM Identity Center
+// resources such as the AWS access portal. Users can get AWS account applications
+// and roles assigned to them and get federated into the application. Although AWS
+// Single Sign-On was renamed, the sso and identitystore API namespaces will
+// continue to retain their original name for backward compatibility purposes. For
+// more information, see IAM Identity Center rename
+// (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed).
+// This reference guide describes the IAM Identity Center Portal operations that
+// you can call programatically and includes detailed information on data types and
+// errors. AWS provides SDKs that consist of libraries and sample code for various
+// programming languages and platforms, such as Java, Ruby, .Net, iOS, or Android.
+// The SDKs provide a convenient way to create programmatic access to IAM Identity
+// Center and other AWS services. For more information about the AWS SDKs,
+// including how to download and install them, see Tools for Amazon Web Services
+// (http://aws.amazon.com/tools/).
+package sso
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go
new file mode 100644
index 000000000..43c06f11a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go
@@ -0,0 +1,200 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sso
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalendpoints "github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/url"
+ "strings"
+)
+
+// EndpointResolverOptions is the service endpoint resolver options
+type EndpointResolverOptions = internalendpoints.Options
+
+// EndpointResolver interface for resolving service endpoints.
+type EndpointResolver interface {
+ ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+}
+
+var _ EndpointResolver = &internalendpoints.Resolver{}
+
+// NewDefaultEndpointResolver constructs a new service endpoint resolver
+func NewDefaultEndpointResolver() *internalendpoints.Resolver {
+ return internalendpoints.New()
+}
+
+// EndpointResolverFunc is a helper utility that wraps a function so it satisfies
+// the EndpointResolver interface. This is useful when you want to add additional
+// endpoint resolving logic, or stub out specific endpoints with custom values.
+type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+
+func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ return fn(region, options)
+}
+
+func resolveDefaultEndpointConfiguration(o *Options) {
+ if o.EndpointResolver != nil {
+ return
+ }
+ o.EndpointResolver = NewDefaultEndpointResolver()
+}
+
+// EndpointResolverFromURL returns an EndpointResolver configured using the
+// provided endpoint url. By default, the resolved endpoint resolver uses the
+// client region as signing region, and the endpoint source is set to
+// EndpointSourceCustom.You can provide functional options to configure endpoint
+// values for the resolved endpoint.
+func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver {
+ e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom}
+ for _, fn := range optFns {
+ fn(&e)
+ }
+
+ return EndpointResolverFunc(
+ func(region string, options EndpointResolverOptions) (aws.Endpoint, error) {
+ if len(e.SigningRegion) == 0 {
+ e.SigningRegion = region
+ }
+ return e, nil
+ },
+ )
+}
+
+type ResolveEndpoint struct {
+ Resolver EndpointResolver
+ Options EndpointResolverOptions
+}
+
+func (*ResolveEndpoint) ID() string {
+ return "ResolveEndpoint"
+}
+
+func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.Resolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ eo := m.Options
+ eo.Logger = middleware.GetLogger(ctx)
+
+ var endpoint aws.Endpoint
+ endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL, err = url.Parse(endpoint.URL)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err)
+ }
+
+ if len(awsmiddleware.GetSigningName(ctx)) == 0 {
+ signingName := endpoint.SigningName
+ if len(signingName) == 0 {
+ signingName = "awsssoportal"
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ }
+ ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source)
+ ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable)
+ ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
+ ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID)
+ return next.HandleSerialize(ctx, in)
+}
+func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Serialize.Insert(&ResolveEndpoint{
+ Resolver: o.EndpointResolver,
+ Options: o.EndpointOptions,
+ }, "OperationSerializer", middleware.Before)
+}
+
+func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
+ _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID())
+ return err
+}
+
+type wrappedEndpointResolver struct {
+ awsResolver aws.EndpointResolverWithOptions
+ resolver EndpointResolver
+}
+
+func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ if w.awsResolver == nil {
+ goto fallback
+ }
+ endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options)
+ if err == nil {
+ return endpoint, nil
+ }
+
+ if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) {
+ return endpoint, err
+ }
+
+fallback:
+ if w.resolver == nil {
+ return endpoint, fmt.Errorf("default endpoint resolver provided was nil")
+ }
+ return w.resolver.ResolveEndpoint(region, options)
+}
+
+type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
+
+func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) {
+ return a(service, region)
+}
+
+var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
+
+// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver.
+// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided
+// fallbackResolver for resolution.
+//
+// fallbackResolver must not be nil
+func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver {
+ var resolver aws.EndpointResolverWithOptions
+
+ if awsResolverWithOptions != nil {
+ resolver = awsResolverWithOptions
+ } else if awsResolver != nil {
+ resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint)
+ }
+
+ return &wrappedEndpointResolver{
+ awsResolver: resolver,
+ resolver: fallbackResolver,
+ }
+}
+
+func finalizeClientEndpointResolverOptions(options *Options) {
+ options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage()
+
+ if len(options.EndpointOptions.ResolvedRegion) == 0 {
+ const fipsInfix = "-fips-"
+ const fipsPrefix = "fips-"
+ const fipsSuffix = "-fips"
+
+ if strings.Contains(options.Region, fipsInfix) ||
+ strings.Contains(options.Region, fipsPrefix) ||
+ strings.Contains(options.Region, fipsSuffix) {
+ options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
+ options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
+ options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled
+ }
+ }
+
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json
new file mode 100644
index 000000000..5be0e34cd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json
@@ -0,0 +1,30 @@
+{
+ "dependencies": {
+ "github.com/aws/aws-sdk-go-v2": "v1.4.0",
+ "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000",
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000",
+ "github.com/aws/smithy-go": "v1.4.0"
+ },
+ "files": [
+ "api_client.go",
+ "api_client_test.go",
+ "api_op_GetRoleCredentials.go",
+ "api_op_ListAccountRoles.go",
+ "api_op_ListAccounts.go",
+ "api_op_Logout.go",
+ "deserializers.go",
+ "doc.go",
+ "endpoints.go",
+ "generated.json",
+ "internal/endpoints/endpoints.go",
+ "internal/endpoints/endpoints_test.go",
+ "protocol_test.go",
+ "serializers.go",
+ "types/errors.go",
+ "types/types.go",
+ "validators.go"
+ ],
+ "go": "1.15",
+ "module": "github.com/aws/aws-sdk-go-v2/service/sso",
+ "unstable": false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
new file mode 100644
index 000000000..268b841f6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package sso
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.11.23"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go
new file mode 100644
index 000000000..aeac293ea
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go
@@ -0,0 +1,422 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package endpoints
+
+import (
+ "github.com/aws/aws-sdk-go-v2/aws"
+ endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
+ "github.com/aws/smithy-go/logging"
+ "regexp"
+)
+
+// Options is the endpoint resolver configuration options
+type Options struct {
+ // Logger is a logging implementation that log events should be sent to.
+ Logger logging.Logger
+
+ // LogDeprecated indicates that deprecated endpoints should be logged to the
+ // provided logger.
+ LogDeprecated bool
+
+ // ResolvedRegion is used to override the region to be resolved, rather then the
+ // using the value passed to the ResolveEndpoint method. This value is used by the
+ // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative
+ // name. You must not set this value directly in your application.
+ ResolvedRegion string
+
+ // DisableHTTPS informs the resolver to return an endpoint that does not use the
+ // HTTPS scheme.
+ DisableHTTPS bool
+
+ // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint.
+ UseDualStackEndpoint aws.DualStackEndpointState
+
+ // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
+ UseFIPSEndpoint aws.FIPSEndpointState
+}
+
+func (o Options) GetResolvedRegion() string {
+ return o.ResolvedRegion
+}
+
+func (o Options) GetDisableHTTPS() bool {
+ return o.DisableHTTPS
+}
+
+func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState {
+ return o.UseDualStackEndpoint
+}
+
+func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState {
+ return o.UseFIPSEndpoint
+}
+
+func transformToSharedOptions(options Options) endpoints.Options {
+ return endpoints.Options{
+ Logger: options.Logger,
+ LogDeprecated: options.LogDeprecated,
+ ResolvedRegion: options.ResolvedRegion,
+ DisableHTTPS: options.DisableHTTPS,
+ UseDualStackEndpoint: options.UseDualStackEndpoint,
+ UseFIPSEndpoint: options.UseFIPSEndpoint,
+ }
+}
+
+// Resolver SSO endpoint resolver
+type Resolver struct {
+ partitions endpoints.Partitions
+}
+
+// ResolveEndpoint resolves the service endpoint for the given region and options
+func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) {
+ if len(region) == 0 {
+ return endpoint, &aws.MissingRegionError{}
+ }
+
+ opt := transformToSharedOptions(options)
+ return r.partitions.ResolveEndpoint(region, opt)
+}
+
+// New returns a new Resolver
+func New() *Resolver {
+ return &Resolver{
+ partitions: defaultPartitions,
+ }
+}
+
+var partitionRegexp = struct {
+ Aws *regexp.Regexp
+ AwsCn *regexp.Regexp
+ AwsIso *regexp.Regexp
+ AwsIsoB *regexp.Regexp
+ AwsUsGov *regexp.Regexp
+}{
+
+ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"),
+ AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
+ AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
+ AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
+ AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
+}
+
+var defaultPartitions = endpoints.Partitions{
+ {
+ ID: "aws",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "portal.sso.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "portal.sso-fips.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "portal.sso-fips.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "portal.sso.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.Aws,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "ap-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.ap-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-east-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.ap-northeast-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-2",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.ap-northeast-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-3",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.ap-northeast-3.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-northeast-3",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-south-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.ap-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.ap-southeast-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-2",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.ap-southeast-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ca-central-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.ca-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-central-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.eu-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-north-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.eu-north-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-south-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.eu-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-south-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.eu-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-2",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.eu-west-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-3",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.eu-west-3.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "me-south-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.me-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "me-south-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "sa-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.sa-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.us-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-2",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.us-east-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-2",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.us-west-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ {
+ ID: "aws-cn",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "portal.sso.{region}.api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "portal.sso-fips.{region}.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "portal.sso-fips.{region}.api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "portal.sso.{region}.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsCn,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "portal.sso-fips.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "portal.sso.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIso,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso-b",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "portal.sso-fips.{region}.sc2s.sgov.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "portal.sso.{region}.sc2s.sgov.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoB,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-us-gov",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "portal.sso.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "portal.sso-fips.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "portal.sso-fips.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "portal.sso.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsUsGov,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "us-gov-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.us-gov-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "portal.sso.us-gov-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go
new file mode 100644
index 000000000..29e320811
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go
@@ -0,0 +1,256 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sso
+
+import (
+ "context"
+ "fmt"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/encoding/httpbinding"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+type awsRestjson1_serializeOpGetRoleCredentials struct {
+}
+
+func (*awsRestjson1_serializeOpGetRoleCredentials) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetRoleCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetRoleCredentialsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/federation/credentials")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetRoleCredentialsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetRoleCredentialsInput(v *GetRoleCredentialsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.AccessToken != nil && len(*v.AccessToken) > 0 {
+ locationName := "X-Amz-Sso_bearer_token"
+ encoder.SetHeader(locationName).String(*v.AccessToken)
+ }
+
+ if v.AccountId != nil {
+ encoder.SetQuery("account_id").String(*v.AccountId)
+ }
+
+ if v.RoleName != nil {
+ encoder.SetQuery("role_name").String(*v.RoleName)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpListAccountRoles struct {
+}
+
+func (*awsRestjson1_serializeOpListAccountRoles) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpListAccountRoles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListAccountRolesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/assignment/roles")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsListAccountRolesInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsListAccountRolesInput(v *ListAccountRolesInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.AccessToken != nil && len(*v.AccessToken) > 0 {
+ locationName := "X-Amz-Sso_bearer_token"
+ encoder.SetHeader(locationName).String(*v.AccessToken)
+ }
+
+ if v.AccountId != nil {
+ encoder.SetQuery("account_id").String(*v.AccountId)
+ }
+
+ if v.MaxResults != nil {
+ encoder.SetQuery("max_result").Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ encoder.SetQuery("next_token").String(*v.NextToken)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpListAccounts struct {
+}
+
+func (*awsRestjson1_serializeOpListAccounts) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpListAccounts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListAccountsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/assignment/accounts")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsListAccountsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsListAccountsInput(v *ListAccountsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.AccessToken != nil && len(*v.AccessToken) > 0 {
+ locationName := "X-Amz-Sso_bearer_token"
+ encoder.SetHeader(locationName).String(*v.AccessToken)
+ }
+
+ if v.MaxResults != nil {
+ encoder.SetQuery("max_result").Integer(*v.MaxResults)
+ }
+
+ if v.NextToken != nil {
+ encoder.SetQuery("next_token").String(*v.NextToken)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpLogout struct {
+}
+
+func (*awsRestjson1_serializeOpLogout) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpLogout) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*LogoutInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/logout")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsLogoutInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsLogoutInput(v *LogoutInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.AccessToken != nil && len(*v.AccessToken) > 0 {
+ locationName := "X-Amz-Sso_bearer_token"
+ encoder.SetHeader(locationName).String(*v.AccessToken)
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/errors.go
new file mode 100644
index 000000000..1401d585c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/errors.go
@@ -0,0 +1,87 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ "fmt"
+ smithy "github.com/aws/smithy-go"
+)
+
+// Indicates that a problem occurred with the input to the request. For example, a
+// required parameter might be missing or out of range.
+type InvalidRequestException struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidRequestException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidRequestException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidRequestException) ErrorCode() string { return "InvalidRequestException" }
+func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The specified resource doesn't exist.
+type ResourceNotFoundException struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ResourceNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ResourceNotFoundException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" }
+func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that the request is being made too frequently and is more than what
+// the server can handle.
+type TooManyRequestsException struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *TooManyRequestsException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *TooManyRequestsException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *TooManyRequestsException) ErrorCode() string { return "TooManyRequestsException" }
+func (e *TooManyRequestsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that the request is not authorized. This can happen due to an invalid
+// access token in the request.
+type UnauthorizedException struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *UnauthorizedException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *UnauthorizedException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *UnauthorizedException) ErrorCode() string { return "UnauthorizedException" }
+func (e *UnauthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/types.go
new file mode 100644
index 000000000..051056b75
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/types.go
@@ -0,0 +1,64 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ smithydocument "github.com/aws/smithy-go/document"
+)
+
+// Provides information about your AWS account.
+type AccountInfo struct {
+
+ // The identifier of the AWS account that is assigned to the user.
+ AccountId *string
+
+ // The display name of the AWS account that is assigned to the user.
+ AccountName *string
+
+ // The email address of the AWS account that is assigned to the user.
+ EmailAddress *string
+
+ noSmithyDocumentSerde
+}
+
+// Provides information about the role credentials that are assigned to the user.
+type RoleCredentials struct {
+
+ // The identifier used for the temporary security credentials. For more
+ // information, see Using Temporary Security Credentials to Request Access to AWS
+ // Resources
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
+ // in the AWS IAM User Guide.
+ AccessKeyId *string
+
+ // The date on which temporary security credentials expire.
+ Expiration int64
+
+ // The key that is used to sign the request. For more information, see Using
+ // Temporary Security Credentials to Request Access to AWS Resources
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
+ // in the AWS IAM User Guide.
+ SecretAccessKey *string
+
+ // The token used for temporary credentials. For more information, see Using
+ // Temporary Security Credentials to Request Access to AWS Resources
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
+ // in the AWS IAM User Guide.
+ SessionToken *string
+
+ noSmithyDocumentSerde
+}
+
+// Provides information about the role that is assigned to the user.
+type RoleInfo struct {
+
+ // The identifier of the AWS account assigned to the user.
+ AccountId *string
+
+ // The friendly name of the role that is assigned to the user.
+ RoleName *string
+
+ noSmithyDocumentSerde
+}
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/validators.go
new file mode 100644
index 000000000..f6bf461f7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/validators.go
@@ -0,0 +1,175 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sso
+
+import (
+ "context"
+ "fmt"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+)
+
+type validateOpGetRoleCredentials struct {
+}
+
+func (*validateOpGetRoleCredentials) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetRoleCredentials) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetRoleCredentialsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetRoleCredentialsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListAccountRoles struct {
+}
+
+func (*validateOpListAccountRoles) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListAccountRoles) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListAccountRolesInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListAccountRolesInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListAccounts struct {
+}
+
+func (*validateOpListAccounts) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListAccounts) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListAccountsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListAccountsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpLogout struct {
+}
+
+func (*validateOpLogout) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpLogout) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*LogoutInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpLogoutInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+func addOpGetRoleCredentialsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetRoleCredentials{}, middleware.After)
+}
+
+func addOpListAccountRolesValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListAccountRoles{}, middleware.After)
+}
+
+func addOpListAccountsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListAccounts{}, middleware.After)
+}
+
+func addOpLogoutValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpLogout{}, middleware.After)
+}
+
+func validateOpGetRoleCredentialsInput(v *GetRoleCredentialsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetRoleCredentialsInput"}
+ if v.RoleName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("RoleName"))
+ }
+ if v.AccountId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AccountId"))
+ }
+ if v.AccessToken == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AccessToken"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListAccountRolesInput(v *ListAccountRolesInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListAccountRolesInput"}
+ if v.AccessToken == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AccessToken"))
+ }
+ if v.AccountId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AccountId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListAccountsInput(v *ListAccountsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListAccountsInput"}
+ if v.AccessToken == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AccessToken"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpLogoutInput(v *LogoutInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "LogoutInput"}
+ if v.AccessToken == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AccessToken"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md
new file mode 100644
index 000000000..25eabe16c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md
@@ -0,0 +1,168 @@
+# v1.13.5 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.4 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.3 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.2 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.1 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.0 (2022-08-25)
+
+* **Feature**: Updated required request parameters on IAM Identity Center's OIDC CreateToken action.
+
+# v1.12.14 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.13 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.12 (2022-08-08)
+
+* **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.11 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.10 (2022-07-11)
+
+* No change notes available for this release.
+
+# v1.12.9 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.8 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.7 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.6 (2022-05-27)
+
+* No change notes available for this release.
+
+# v1.12.5 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.3 (2022-03-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.2 (2022-03-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.1 (2022-03-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.0 (2022-03-08)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.0 (2022-02-24)
+
+* **Feature**: API client updated
+* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.0 (2022-01-14)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.0 (2022-01-07)
+
+* **Feature**: API client updated
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.2 (2021-12-02)
+
+* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514))
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.1 (2021-11-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.0 (2021-11-06)
+
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.0 (2021-10-21)
+
+* **Feature**: Updated to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.0 (2021-10-11)
+
+* **Feature**: API client updated
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.0 (2021-09-17)
+
+* **Feature**: Updated API client and endpoints to latest revision.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2021-08-27)
+
+* **Feature**: Updated API model to latest revision.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.3 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.2 (2021-08-04)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.1 (2021-07-15)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2021-06-25)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.1 (2021-05-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.2.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/aws/aws-sdk-go-v2/service/ssooidc/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go
new file mode 100644
index 000000000..5e0a85a2c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go
@@ -0,0 +1,433 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/defaults"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ smithy "github.com/aws/smithy-go"
+ smithydocument "github.com/aws/smithy-go/document"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net"
+ "net/http"
+ "time"
+)
+
+const ServiceID = "SSO OIDC"
+const ServiceAPIVersion = "2019-06-10"
+
+// Client provides the API client to make operations call for AWS SSO OIDC.
+type Client struct {
+ options Options
+}
+
+// New returns an initialized Client based on the functional options. Provide
+// additional functional options to further configure the behavior of the client,
+// such as changing the client's endpoint or adding custom middleware behavior.
+func New(options Options, optFns ...func(*Options)) *Client {
+ options = options.Copy()
+
+ resolveDefaultLogger(&options)
+
+ setResolvedDefaultsMode(&options)
+
+ resolveRetryer(&options)
+
+ resolveHTTPClient(&options)
+
+ resolveHTTPSignerV4(&options)
+
+ resolveDefaultEndpointConfiguration(&options)
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ client := &Client{
+ options: options,
+ }
+
+ return client
+}
+
+type Options struct {
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // Configures the events that will be sent to the configured logger.
+ ClientLogMode aws.ClientLogMode
+
+ // The credentials object to use when signing requests.
+ Credentials aws.CredentialsProvider
+
+ // The configuration DefaultsMode that the SDK should use when constructing the
+ // clients initial default settings.
+ DefaultsMode aws.DefaultsMode
+
+ // The endpoint options to be used when attempting to resolve an endpoint.
+ EndpointOptions EndpointResolverOptions
+
+ // The service endpoint resolver.
+ EndpointResolver EndpointResolver
+
+ // Signature Version 4 (SigV4) Signer
+ HTTPSignerV4 HTTPSignerV4
+
+ // The logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // The region to send requests to. (Required)
+ Region string
+
+ // RetryMaxAttempts specifies the maximum number attempts an API client will call
+ // an operation that fails with a retryable error. A value of 0 is ignored, and
+ // will not be used to configure the API client created default retryer, or modify
+ // per operation call's retry max attempts. When creating a new API Clients this
+ // member will only be used if the Retryer Options member is nil. This value will
+ // be ignored if Retryer is not nil. If specified in an operation call's functional
+ // options with a value that is different than the constructed client's Options,
+ // the Client's Retryer will be wrapped to use the operation's specific
+ // RetryMaxAttempts value.
+ RetryMaxAttempts int
+
+ // RetryMode specifies the retry mode the API client will be created with, if
+ // Retryer option is not also specified. When creating a new API Clients this
+ // member will only be used if the Retryer Options member is nil. This value will
+ // be ignored if Retryer is not nil. Currently does not support per operation call
+ // overrides, may in the future.
+ RetryMode aws.RetryMode
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer. The kind of
+ // default retry created by the API client can be changed with the RetryMode
+ // option.
+ Retryer aws.Retryer
+
+ // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
+ // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You
+ // should not populate this structure programmatically, or rely on the values here
+ // within your applications.
+ RuntimeEnvironment aws.RuntimeEnvironment
+
+ // The initial DefaultsMode used when the client options were constructed. If the
+ // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
+ // value was at that point in time. Currently does not support per operation call
+ // overrides, may in the future.
+ resolvedDefaultsMode aws.DefaultsMode
+
+ // The HTTP client to invoke API calls with. Defaults to client's default HTTP
+ // implementation if nil.
+ HTTPClient HTTPClient
+}
+
+// WithAPIOptions returns a functional option for setting the Client's APIOptions
+// option.
+func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, optFns...)
+ }
+}
+
+// WithEndpointResolver returns a functional option for setting the Client's
+// EndpointResolver option.
+func WithEndpointResolver(v EndpointResolver) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolver = v
+ }
+}
+
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// Copy creates a clone where the APIOptions list is deep copied.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
+ copy(to.APIOptions, o.APIOptions)
+
+ return to
+}
+func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
+ ctx = middleware.ClearStackValues(ctx)
+ stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
+ options := c.options.Copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ finalizeRetryMaxAttemptOptions(&options, *c)
+
+ finalizeClientEndpointResolverOptions(&options)
+
+ for _, fn := range stackFns {
+ if err := fn(stack, options); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ for _, fn := range options.APIOptions {
+ if err := fn(stack); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack)
+ result, metadata, err = handler.Handle(ctx, params)
+ if err != nil {
+ err = &smithy.OperationError{
+ ServiceID: ServiceID,
+ OperationName: opID,
+ Err: err,
+ }
+ }
+ return result, metadata, err
+}
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
+
+func resolveDefaultLogger(o *Options) {
+ if o.Logger != nil {
+ return
+ }
+ o.Logger = logging.Nop{}
+}
+
+func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
+ return middleware.AddSetLoggerMiddleware(stack, o.Logger)
+}
+
+func setResolvedDefaultsMode(o *Options) {
+ if len(o.resolvedDefaultsMode) > 0 {
+ return
+ }
+
+ var mode aws.DefaultsMode
+ mode.SetFromString(string(o.DefaultsMode))
+
+ if mode == aws.DefaultsModeAuto {
+ mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
+ }
+
+ o.resolvedDefaultsMode = mode
+}
+
+// NewFromConfig returns a new client from the provided config.
+func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
+ opts := Options{
+ Region: cfg.Region,
+ DefaultsMode: cfg.DefaultsMode,
+ RuntimeEnvironment: cfg.RuntimeEnvironment,
+ HTTPClient: cfg.HTTPClient,
+ Credentials: cfg.Credentials,
+ APIOptions: cfg.APIOptions,
+ Logger: cfg.Logger,
+ ClientLogMode: cfg.ClientLogMode,
+ }
+ resolveAWSRetryerProvider(cfg, &opts)
+ resolveAWSRetryMaxAttempts(cfg, &opts)
+ resolveAWSRetryMode(cfg, &opts)
+ resolveAWSEndpointResolver(cfg, &opts)
+ resolveUseDualStackEndpoint(cfg, &opts)
+ resolveUseFIPSEndpoint(cfg, &opts)
+ return New(opts, optFns...)
+}
+
+func resolveHTTPClient(o *Options) {
+ var buildable *awshttp.BuildableClient
+
+ if o.HTTPClient != nil {
+ var ok bool
+ buildable, ok = o.HTTPClient.(*awshttp.BuildableClient)
+ if !ok {
+ return
+ }
+ } else {
+ buildable = awshttp.NewBuildableClient()
+ }
+
+ modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
+ if err == nil {
+ buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
+ if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
+ dialer.Timeout = dialerTimeout
+ }
+ })
+
+ buildable = buildable.WithTransportOptions(func(transport *http.Transport) {
+ if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok {
+ transport.TLSHandshakeTimeout = tlsHandshakeTimeout
+ }
+ })
+ }
+
+ o.HTTPClient = buildable
+}
+
+func resolveRetryer(o *Options) {
+ if o.Retryer != nil {
+ return
+ }
+
+ if len(o.RetryMode) == 0 {
+ modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
+ if err == nil {
+ o.RetryMode = modeConfig.RetryMode
+ }
+ }
+ if len(o.RetryMode) == 0 {
+ o.RetryMode = aws.RetryModeStandard
+ }
+
+ var standardOptions []func(*retry.StandardOptions)
+ if v := o.RetryMaxAttempts; v != 0 {
+ standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
+ so.MaxAttempts = v
+ })
+ }
+
+ switch o.RetryMode {
+ case aws.RetryModeAdaptive:
+ var adaptiveOptions []func(*retry.AdaptiveModeOptions)
+ if len(standardOptions) != 0 {
+ adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
+ ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
+ })
+ }
+ o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
+
+ default:
+ o.Retryer = retry.NewStandard(standardOptions...)
+ }
+}
+
+func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
+ if cfg.Retryer == nil {
+ return
+ }
+ o.Retryer = cfg.Retryer()
+}
+
+func resolveAWSRetryMode(cfg aws.Config, o *Options) {
+ if len(cfg.RetryMode) == 0 {
+ return
+ }
+ o.RetryMode = cfg.RetryMode
+}
+func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
+ if cfg.RetryMaxAttempts == 0 {
+ return
+ }
+ o.RetryMaxAttempts = cfg.RetryMaxAttempts
+}
+
+func finalizeRetryMaxAttemptOptions(o *Options, client Client) {
+ if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
+ return
+ }
+
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
+}
+
+func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
+ if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
+ return
+ }
+ o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver())
+}
+
+func addClientUserAgent(stack *middleware.Stack) error {
+ return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "ssooidc", goModuleVersion)(stack)
+}
+
+func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error {
+ mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: o.Credentials,
+ Signer: o.HTTPSignerV4,
+ LogSigning: o.ClientLogMode.IsSigning(),
+ })
+ return stack.Finalize.Add(mw, middleware.After)
+}
+
+type HTTPSignerV4 interface {
+ SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
+}
+
+func resolveHTTPSignerV4(o *Options) {
+ if o.HTTPSignerV4 != nil {
+ return
+ }
+ o.HTTPSignerV4 = newDefaultV4Signer(*o)
+}
+
+func newDefaultV4Signer(o Options) *v4.Signer {
+ return v4.NewSigner(func(so *v4.SignerOptions) {
+ so.Logger = o.Logger
+ so.LogSigning = o.ClientLogMode.IsSigning()
+ })
+}
+
+func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
+ mo := retry.AddRetryMiddlewaresOptions{
+ Retryer: o.Retryer,
+ LogRetryAttempts: o.ClientLogMode.IsRetries(),
+ }
+ return retry.AddRetryMiddlewares(stack, mo)
+}
+
+// resolves dual-stack endpoint configuration
+func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseDualStackEndpoint = value
+ }
+ return nil
+}
+
+// resolves FIPS endpoint configuration
+func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseFIPSEndpoint = value
+ }
+ return nil
+}
+
+func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
+ return awsmiddleware.AddRequestIDRetrieverMiddleware(stack)
+}
+
+func addResponseErrorMiddleware(stack *middleware.Stack) error {
+ return awshttp.AddResponseErrorMiddleware(stack)
+}
+
+func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
+ return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
+ LogRequest: o.ClientLogMode.IsRequest(),
+ LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(),
+ LogResponse: o.ClientLogMode.IsResponse(),
+ LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
+ }, middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go
new file mode 100644
index 000000000..c6e64a13d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go
@@ -0,0 +1,162 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates and returns an access token for the authorized client. The access token
+// issued will be used to fetch short-term credentials for the assigned roles in
+// the AWS account.
+func (c *Client) CreateToken(ctx context.Context, params *CreateTokenInput, optFns ...func(*Options)) (*CreateTokenOutput, error) {
+ if params == nil {
+ params = &CreateTokenInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateToken", params, optFns, c.addOperationCreateTokenMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateTokenOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateTokenInput struct {
+
+ // The unique identifier string for each client. This value should come from the
+ // persisted result of the RegisterClient API.
+ //
+ // This member is required.
+ ClientId *string
+
+ // A secret string generated for the client. This value should come from the
+ // persisted result of the RegisterClient API.
+ //
+ // This member is required.
+ ClientSecret *string
+
+ // Supports grant types for authorization code, refresh token, and device code
+ // request.
+ //
+ // This member is required.
+ GrantType *string
+
+ // The authorization code received from the authorization service. This parameter
+ // is required to perform an authorization grant request to get access to a token.
+ Code *string
+
+ // Used only when calling this API for the device code grant type. This short-term
+ // code is used to identify this authentication attempt. This should come from an
+ // in-memory reference to the result of the StartDeviceAuthorization API.
+ DeviceCode *string
+
+ // The location of the application that will receive the authorization code. Users
+ // authorize the service to send the request to this location.
+ RedirectUri *string
+
+ // The token used to obtain an access token in the event that the access token is
+ // invalid or expired. This token is not issued by the service.
+ RefreshToken *string
+
+ // The list of scopes that is defined by the client. Upon authorization, this list
+ // is used to restrict permissions when granting an access token.
+ Scope []string
+
+ noSmithyDocumentSerde
+}
+
+type CreateTokenOutput struct {
+
+ // An opaque token to access AWS SSO resources assigned to a user.
+ AccessToken *string
+
+ // Indicates the time in seconds when an access token will expire.
+ ExpiresIn int32
+
+ // The identifier of the user that associated with the access token, if present.
+ IdToken *string
+
+ // A token that, if present, can be used to refresh a previously issued access
+ // token that might have expired.
+ RefreshToken *string
+
+ // Used to notify the client that the returned token is an access token. The
+ // supported type is BearerToken.
+ TokenType *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateToken{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateToken{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpCreateTokenValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateToken(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCreateToken(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CreateToken",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go
new file mode 100644
index 000000000..096b35df2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go
@@ -0,0 +1,141 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Registers a client with AWS SSO. This allows clients to initiate device
+// authorization. The output should be persisted for reuse through many
+// authentication requests.
+func (c *Client) RegisterClient(ctx context.Context, params *RegisterClientInput, optFns ...func(*Options)) (*RegisterClientOutput, error) {
+ if params == nil {
+ params = &RegisterClientInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RegisterClient", params, optFns, c.addOperationRegisterClientMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RegisterClientOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RegisterClientInput struct {
+
+ // The friendly name of the client.
+ //
+ // This member is required.
+ ClientName *string
+
+ // The type of client. The service supports only public as a client type. Anything
+ // other than public will be rejected by the service.
+ //
+ // This member is required.
+ ClientType *string
+
+ // The list of scopes that are defined by the client. Upon authorization, this list
+ // is used to restrict permissions when granting an access token.
+ Scopes []string
+
+ noSmithyDocumentSerde
+}
+
+type RegisterClientOutput struct {
+
+ // The endpoint where the client can request authorization.
+ AuthorizationEndpoint *string
+
+ // The unique identifier string for each client. This client uses this identifier
+ // to get authenticated by the service in subsequent calls.
+ ClientId *string
+
+ // Indicates the time at which the clientId and clientSecret were issued.
+ ClientIdIssuedAt int64
+
+ // A secret string generated for the client. The client will use this string to get
+ // authenticated by the service in subsequent calls.
+ ClientSecret *string
+
+ // Indicates the time at which the clientId and clientSecret will become invalid.
+ ClientSecretExpiresAt int64
+
+ // The endpoint where the client can get an access token.
+ TokenEndpoint *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpRegisterClient{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRegisterClient{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpRegisterClientValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterClient(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opRegisterClient(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "RegisterClient",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go
new file mode 100644
index 000000000..0d893b431
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go
@@ -0,0 +1,150 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Initiates device authorization by requesting a pair of verification codes from
+// the authorization service.
+func (c *Client) StartDeviceAuthorization(ctx context.Context, params *StartDeviceAuthorizationInput, optFns ...func(*Options)) (*StartDeviceAuthorizationOutput, error) {
+ if params == nil {
+ params = &StartDeviceAuthorizationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "StartDeviceAuthorization", params, optFns, c.addOperationStartDeviceAuthorizationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*StartDeviceAuthorizationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type StartDeviceAuthorizationInput struct {
+
+ // The unique identifier string for the client that is registered with AWS SSO.
+ // This value should come from the persisted result of the RegisterClient API
+ // operation.
+ //
+ // This member is required.
+ ClientId *string
+
+ // A secret string that is generated for the client. This value should come from
+ // the persisted result of the RegisterClient API operation.
+ //
+ // This member is required.
+ ClientSecret *string
+
+ // The URL for the AWS SSO user portal. For more information, see Using the User
+ // Portal
+ // (https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html)
+ // in the AWS Single Sign-On User Guide.
+ //
+ // This member is required.
+ StartUrl *string
+
+ noSmithyDocumentSerde
+}
+
+type StartDeviceAuthorizationOutput struct {
+
+ // The short-lived code that is used by the device when polling for a session
+ // token.
+ DeviceCode *string
+
+ // Indicates the number of seconds in which the verification code will become
+ // invalid.
+ ExpiresIn int32
+
+ // Indicates the number of seconds the client must wait between attempts when
+ // polling for a session.
+ Interval int32
+
+ // A one-time user verification code. This is needed to authorize an in-use device.
+ UserCode *string
+
+ // The URI of the verification page that takes the userCode to authorize the
+ // device.
+ VerificationUri *string
+
+ // An alternate URL that the client can use to automatically launch a browser. This
+ // process skips the manual step in which the user visits the verification page and
+ // enters their code.
+ VerificationUriComplete *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpStartDeviceAuthorization{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartDeviceAuthorization{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpStartDeviceAuthorizationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartDeviceAuthorization(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opStartDeviceAuthorization(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "StartDeviceAuthorization",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go
new file mode 100644
index 000000000..e9939aff0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go
@@ -0,0 +1,1689 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson"
+ "github.com/aws/aws-sdk-go-v2/service/ssooidc/types"
+ smithy "github.com/aws/smithy-go"
+ smithyio "github.com/aws/smithy-go/io"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+ "strings"
+)
+
+type awsRestjson1_deserializeOpCreateToken struct {
+}
+
+func (*awsRestjson1_deserializeOpCreateToken) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpCreateToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorCreateToken(response, &metadata)
+ }
+ output := &CreateTokenOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentCreateTokenOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorCreateToken(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ code := response.Header.Get("X-Amzn-ErrorType")
+ if len(code) != 0 {
+ errorCode = restjson.SanitizeErrorCode(code)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ code, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(code) != 0 {
+ errorCode = restjson.SanitizeErrorCode(code)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("AccessDeniedException", errorCode):
+ return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody)
+
+ case strings.EqualFold("AuthorizationPendingException", errorCode):
+ return awsRestjson1_deserializeErrorAuthorizationPendingException(response, errorBody)
+
+ case strings.EqualFold("ExpiredTokenException", errorCode):
+ return awsRestjson1_deserializeErrorExpiredTokenException(response, errorBody)
+
+ case strings.EqualFold("InternalServerException", errorCode):
+ return awsRestjson1_deserializeErrorInternalServerException(response, errorBody)
+
+ case strings.EqualFold("InvalidClientException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidClientException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidGrantException(response, errorBody)
+
+ case strings.EqualFold("InvalidRequestException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
+
+ case strings.EqualFold("InvalidScopeException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidScopeException(response, errorBody)
+
+ case strings.EqualFold("SlowDownException", errorCode):
+ return awsRestjson1_deserializeErrorSlowDownException(response, errorBody)
+
+ case strings.EqualFold("UnauthorizedClientException", errorCode):
+ return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedGrantTypeException", errorCode):
+ return awsRestjson1_deserializeErrorUnsupportedGrantTypeException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentCreateTokenOutput(v **CreateTokenOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *CreateTokenOutput
+ if *v == nil {
+ sv = &CreateTokenOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "accessToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected AccessToken to be of type string, got %T instead", value)
+ }
+ sv.AccessToken = ptr.String(jtv)
+ }
+
+ case "expiresIn":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected ExpirationInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ExpiresIn = int32(i64)
+ }
+
+ case "idToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected IdToken to be of type string, got %T instead", value)
+ }
+ sv.IdToken = ptr.String(jtv)
+ }
+
+ case "refreshToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RefreshToken to be of type string, got %T instead", value)
+ }
+ sv.RefreshToken = ptr.String(jtv)
+ }
+
+ case "tokenType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected TokenType to be of type string, got %T instead", value)
+ }
+ sv.TokenType = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpRegisterClient struct {
+}
+
+func (*awsRestjson1_deserializeOpRegisterClient) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpRegisterClient) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorRegisterClient(response, &metadata)
+ }
+ output := &RegisterClientOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentRegisterClientOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorRegisterClient(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ code := response.Header.Get("X-Amzn-ErrorType")
+ if len(code) != 0 {
+ errorCode = restjson.SanitizeErrorCode(code)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ code, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(code) != 0 {
+ errorCode = restjson.SanitizeErrorCode(code)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InternalServerException", errorCode):
+ return awsRestjson1_deserializeErrorInternalServerException(response, errorBody)
+
+ case strings.EqualFold("InvalidClientMetadataException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidClientMetadataException(response, errorBody)
+
+ case strings.EqualFold("InvalidRequestException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
+
+ case strings.EqualFold("InvalidScopeException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidScopeException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentRegisterClientOutput(v **RegisterClientOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *RegisterClientOutput
+ if *v == nil {
+ sv = &RegisterClientOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "authorizationEndpoint":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected URI to be of type string, got %T instead", value)
+ }
+ sv.AuthorizationEndpoint = ptr.String(jtv)
+ }
+
+ case "clientId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ClientId to be of type string, got %T instead", value)
+ }
+ sv.ClientId = ptr.String(jtv)
+ }
+
+ case "clientIdIssuedAt":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected LongTimeStampType to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ClientIdIssuedAt = i64
+ }
+
+ case "clientSecret":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ClientSecret to be of type string, got %T instead", value)
+ }
+ sv.ClientSecret = ptr.String(jtv)
+ }
+
+ case "clientSecretExpiresAt":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected LongTimeStampType to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ClientSecretExpiresAt = i64
+ }
+
+ case "tokenEndpoint":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected URI to be of type string, got %T instead", value)
+ }
+ sv.TokenEndpoint = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpStartDeviceAuthorization struct {
+}
+
+func (*awsRestjson1_deserializeOpStartDeviceAuthorization) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpStartDeviceAuthorization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorStartDeviceAuthorization(response, &metadata)
+ }
+ output := &StartDeviceAuthorizationOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentStartDeviceAuthorizationOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorStartDeviceAuthorization(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ code := response.Header.Get("X-Amzn-ErrorType")
+ if len(code) != 0 {
+ errorCode = restjson.SanitizeErrorCode(code)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ code, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(code) != 0 {
+ errorCode = restjson.SanitizeErrorCode(code)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InternalServerException", errorCode):
+ return awsRestjson1_deserializeErrorInternalServerException(response, errorBody)
+
+ case strings.EqualFold("InvalidClientException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidClientException(response, errorBody)
+
+ case strings.EqualFold("InvalidRequestException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody)
+
+ case strings.EqualFold("SlowDownException", errorCode):
+ return awsRestjson1_deserializeErrorSlowDownException(response, errorBody)
+
+ case strings.EqualFold("UnauthorizedClientException", errorCode):
+ return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentStartDeviceAuthorizationOutput(v **StartDeviceAuthorizationOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *StartDeviceAuthorizationOutput
+ if *v == nil {
+ sv = &StartDeviceAuthorizationOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "deviceCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected DeviceCode to be of type string, got %T instead", value)
+ }
+ sv.DeviceCode = ptr.String(jtv)
+ }
+
+ case "expiresIn":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected ExpirationInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ExpiresIn = int32(i64)
+ }
+
+ case "interval":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected IntervalInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.Interval = int32(i64)
+ }
+
+ case "userCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected UserCode to be of type string, got %T instead", value)
+ }
+ sv.UserCode = ptr.String(jtv)
+ }
+
+ case "verificationUri":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected URI to be of type string, got %T instead", value)
+ }
+ sv.VerificationUri = ptr.String(jtv)
+ }
+
+ case "verificationUriComplete":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected URI to be of type string, got %T instead", value)
+ }
+ sv.VerificationUriComplete = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.AccessDeniedException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorAuthorizationPendingException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.AuthorizationPendingException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentAuthorizationPendingException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorExpiredTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ExpiredTokenException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentExpiredTokenException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InternalServerException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidClientException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidClientException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidClientMetadataException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidClientMetadataException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidClientMetadataException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidGrantException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidGrantException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidGrantException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidRequestException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidRequestException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidScopeException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidScopeException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidScopeException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorSlowDownException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.SlowDownException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentSlowDownException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorUnauthorizedClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.UnauthorizedClientException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentUnauthorizedClientException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorUnsupportedGrantTypeException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.UnsupportedGrantTypeException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentUnsupportedGrantTypeException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.AccessDeniedException
+ if *v == nil {
+ sv = &types.AccessDeniedException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentAuthorizationPendingException(v **types.AuthorizationPendingException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.AuthorizationPendingException
+ if *v == nil {
+ sv = &types.AuthorizationPendingException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentExpiredTokenException(v **types.ExpiredTokenException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ExpiredTokenException
+ if *v == nil {
+ sv = &types.ExpiredTokenException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InternalServerException
+ if *v == nil {
+ sv = &types.InternalServerException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidClientException(v **types.InvalidClientException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidClientException
+ if *v == nil {
+ sv = &types.InvalidClientException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidClientMetadataException(v **types.InvalidClientMetadataException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidClientMetadataException
+ if *v == nil {
+ sv = &types.InvalidClientMetadataException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidGrantException(v **types.InvalidGrantException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidGrantException
+ if *v == nil {
+ sv = &types.InvalidGrantException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidRequestException(v **types.InvalidRequestException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidRequestException
+ if *v == nil {
+ sv = &types.InvalidRequestException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidScopeException(v **types.InvalidScopeException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidScopeException
+ if *v == nil {
+ sv = &types.InvalidScopeException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentSlowDownException(v **types.SlowDownException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.SlowDownException
+ if *v == nil {
+ sv = &types.SlowDownException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentUnauthorizedClientException(v **types.UnauthorizedClientException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.UnauthorizedClientException
+ if *v == nil {
+ sv = &types.UnauthorizedClientException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentUnsupportedGrantTypeException(v **types.UnsupportedGrantTypeException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.UnsupportedGrantTypeException
+ if *v == nil {
+ sv = &types.UnsupportedGrantTypeException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "error":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Error to be of type string, got %T instead", value)
+ }
+ sv.Error_ = ptr.String(jtv)
+ }
+
+ case "error_description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value)
+ }
+ sv.Error_description = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go
new file mode 100644
index 000000000..79c458291
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go
@@ -0,0 +1,22 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+// Package ssooidc provides the API client, operations, and parameter types for AWS
+// SSO OIDC.
+//
+// AWS Single Sign-On (SSO) OpenID Connect (OIDC) is a web service that enables a
+// client (such as AWS CLI or a native application) to register with AWS SSO. The
+// service also enables the client to fetch the user’s access token upon successful
+// authentication and authorization with AWS SSO. This service conforms with the
+// OAuth 2.0 based implementation of the device authorization grant standard
+// (https://tools.ietf.org/html/rfc8628 (https://tools.ietf.org/html/rfc8628)). For
+// general information about AWS SSO, see What is AWS Single Sign-On?
+// (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) in the
+// AWS SSO User Guide. This API reference guide describes the AWS SSO OIDC
+// operations that you can call programatically and includes detailed information
+// on data types and errors. AWS provides SDKs that consist of libraries and sample
+// code for various programming languages and platforms such as Java, Ruby, .Net,
+// iOS, and Android. The SDKs provide a convenient way to create programmatic
+// access to AWS SSO and other AWS services. For more information about the AWS
+// SDKs, including how to download and install them, see Tools for Amazon Web
+// Services (http://aws.amazon.com/tools/).
+package ssooidc
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go
new file mode 100644
index 000000000..35cd21f18
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go
@@ -0,0 +1,200 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalendpoints "github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/url"
+ "strings"
+)
+
+// EndpointResolverOptions is the service endpoint resolver options
+type EndpointResolverOptions = internalendpoints.Options
+
+// EndpointResolver interface for resolving service endpoints.
+type EndpointResolver interface {
+ ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+}
+
+var _ EndpointResolver = &internalendpoints.Resolver{}
+
+// NewDefaultEndpointResolver constructs a new service endpoint resolver
+func NewDefaultEndpointResolver() *internalendpoints.Resolver {
+ return internalendpoints.New()
+}
+
+// EndpointResolverFunc is a helper utility that wraps a function so it satisfies
+// the EndpointResolver interface. This is useful when you want to add additional
+// endpoint resolving logic, or stub out specific endpoints with custom values.
+type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+
+func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ return fn(region, options)
+}
+
+func resolveDefaultEndpointConfiguration(o *Options) {
+ if o.EndpointResolver != nil {
+ return
+ }
+ o.EndpointResolver = NewDefaultEndpointResolver()
+}
+
+// EndpointResolverFromURL returns an EndpointResolver configured using the
+// provided endpoint url. By default, the resolved endpoint resolver uses the
+// client region as signing region, and the endpoint source is set to
+// EndpointSourceCustom.You can provide functional options to configure endpoint
+// values for the resolved endpoint.
+func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver {
+ e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom}
+ for _, fn := range optFns {
+ fn(&e)
+ }
+
+ return EndpointResolverFunc(
+ func(region string, options EndpointResolverOptions) (aws.Endpoint, error) {
+ if len(e.SigningRegion) == 0 {
+ e.SigningRegion = region
+ }
+ return e, nil
+ },
+ )
+}
+
+type ResolveEndpoint struct {
+ Resolver EndpointResolver
+ Options EndpointResolverOptions
+}
+
+func (*ResolveEndpoint) ID() string {
+ return "ResolveEndpoint"
+}
+
+func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.Resolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ eo := m.Options
+ eo.Logger = middleware.GetLogger(ctx)
+
+ var endpoint aws.Endpoint
+ endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL, err = url.Parse(endpoint.URL)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err)
+ }
+
+ if len(awsmiddleware.GetSigningName(ctx)) == 0 {
+ signingName := endpoint.SigningName
+ if len(signingName) == 0 {
+ signingName = "awsssooidc"
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ }
+ ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source)
+ ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable)
+ ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
+ ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID)
+ return next.HandleSerialize(ctx, in)
+}
+func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Serialize.Insert(&ResolveEndpoint{
+ Resolver: o.EndpointResolver,
+ Options: o.EndpointOptions,
+ }, "OperationSerializer", middleware.Before)
+}
+
+func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
+ _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID())
+ return err
+}
+
+type wrappedEndpointResolver struct {
+ awsResolver aws.EndpointResolverWithOptions
+ resolver EndpointResolver
+}
+
+func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ if w.awsResolver == nil {
+ goto fallback
+ }
+ endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options)
+ if err == nil {
+ return endpoint, nil
+ }
+
+ if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) {
+ return endpoint, err
+ }
+
+fallback:
+ if w.resolver == nil {
+ return endpoint, fmt.Errorf("default endpoint resolver provided was nil")
+ }
+ return w.resolver.ResolveEndpoint(region, options)
+}
+
+type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
+
+func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) {
+ return a(service, region)
+}
+
+var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
+
+// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver.
+// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided
+// fallbackResolver for resolution.
+//
+// fallbackResolver must not be nil
+func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver {
+ var resolver aws.EndpointResolverWithOptions
+
+ if awsResolverWithOptions != nil {
+ resolver = awsResolverWithOptions
+ } else if awsResolver != nil {
+ resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint)
+ }
+
+ return &wrappedEndpointResolver{
+ awsResolver: resolver,
+ resolver: fallbackResolver,
+ }
+}
+
+func finalizeClientEndpointResolverOptions(options *Options) {
+ options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage()
+
+ if len(options.EndpointOptions.ResolvedRegion) == 0 {
+ const fipsInfix = "-fips-"
+ const fipsPrefix = "fips-"
+ const fipsSuffix = "-fips"
+
+ if strings.Contains(options.Region, fipsInfix) ||
+ strings.Contains(options.Region, fipsPrefix) ||
+ strings.Contains(options.Region, fipsSuffix) {
+ options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
+ options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
+ options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled
+ }
+ }
+
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json
new file mode 100644
index 000000000..4afe3223e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json
@@ -0,0 +1,29 @@
+{
+ "dependencies": {
+ "github.com/aws/aws-sdk-go-v2": "v1.4.0",
+ "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000",
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000",
+ "github.com/aws/smithy-go": "v1.4.0"
+ },
+ "files": [
+ "api_client.go",
+ "api_client_test.go",
+ "api_op_CreateToken.go",
+ "api_op_RegisterClient.go",
+ "api_op_StartDeviceAuthorization.go",
+ "deserializers.go",
+ "doc.go",
+ "endpoints.go",
+ "generated.json",
+ "internal/endpoints/endpoints.go",
+ "internal/endpoints/endpoints_test.go",
+ "protocol_test.go",
+ "serializers.go",
+ "types/errors.go",
+ "types/types.go",
+ "validators.go"
+ ],
+ "go": "1.15",
+ "module": "github.com/aws/aws-sdk-go-v2/service/ssooidc",
+ "unstable": false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go
new file mode 100644
index 000000000..67b861e2f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package ssooidc
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.13.5"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go
new file mode 100644
index 000000000..090c04b3d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go
@@ -0,0 +1,422 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package endpoints
+
+import (
+ "github.com/aws/aws-sdk-go-v2/aws"
+ endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
+ "github.com/aws/smithy-go/logging"
+ "regexp"
+)
+
+// Options is the endpoint resolver configuration options
+type Options struct {
+ // Logger is a logging implementation that log events should be sent to.
+ Logger logging.Logger
+
+ // LogDeprecated indicates that deprecated endpoints should be logged to the
+ // provided logger.
+ LogDeprecated bool
+
+ // ResolvedRegion is used to override the region to be resolved, rather then the
+ // using the value passed to the ResolveEndpoint method. This value is used by the
+ // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative
+ // name. You must not set this value directly in your application.
+ ResolvedRegion string
+
+ // DisableHTTPS informs the resolver to return an endpoint that does not use the
+ // HTTPS scheme.
+ DisableHTTPS bool
+
+ // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint.
+ UseDualStackEndpoint aws.DualStackEndpointState
+
+ // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
+ UseFIPSEndpoint aws.FIPSEndpointState
+}
+
+func (o Options) GetResolvedRegion() string {
+ return o.ResolvedRegion
+}
+
+func (o Options) GetDisableHTTPS() bool {
+ return o.DisableHTTPS
+}
+
+func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState {
+ return o.UseDualStackEndpoint
+}
+
+func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState {
+ return o.UseFIPSEndpoint
+}
+
+func transformToSharedOptions(options Options) endpoints.Options {
+ return endpoints.Options{
+ Logger: options.Logger,
+ LogDeprecated: options.LogDeprecated,
+ ResolvedRegion: options.ResolvedRegion,
+ DisableHTTPS: options.DisableHTTPS,
+ UseDualStackEndpoint: options.UseDualStackEndpoint,
+ UseFIPSEndpoint: options.UseFIPSEndpoint,
+ }
+}
+
+// Resolver SSO OIDC endpoint resolver
+type Resolver struct {
+ partitions endpoints.Partitions
+}
+
+// ResolveEndpoint resolves the service endpoint for the given region and options
+func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) {
+ if len(region) == 0 {
+ return endpoint, &aws.MissingRegionError{}
+ }
+
+ opt := transformToSharedOptions(options)
+ return r.partitions.ResolveEndpoint(region, opt)
+}
+
+// New returns a new Resolver
+func New() *Resolver {
+ return &Resolver{
+ partitions: defaultPartitions,
+ }
+}
+
+var partitionRegexp = struct {
+ Aws *regexp.Regexp
+ AwsCn *regexp.Regexp
+ AwsIso *regexp.Regexp
+ AwsIsoB *regexp.Regexp
+ AwsUsGov *regexp.Regexp
+}{
+
+ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"),
+ AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
+ AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
+ AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
+ AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
+}
+
+var defaultPartitions = endpoints.Partitions{
+ {
+ ID: "aws",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "oidc.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "oidc.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.Aws,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "ap-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ap-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-east-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ap-northeast-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-northeast-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-2",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ap-northeast-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-northeast-2",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-3",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ap-northeast-3.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-northeast-3",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-south-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ap-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-south-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ap-southeast-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-southeast-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-2",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ap-southeast-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-southeast-2",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ca-central-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.ca-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ca-central-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-central-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.eu-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-central-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-north-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.eu-north-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-north-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-south-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.eu-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-south-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.eu-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-2",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.eu-west-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-west-2",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-3",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.eu-west-3.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-west-3",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "me-south-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.me-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "me-south-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "sa-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.sa-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "sa-east-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.us-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-2",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.us-east-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-2",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-2",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.us-west-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
+ {
+ ID: "aws-cn",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "oidc.{region}.api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "oidc.{region}.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsCn,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "oidc.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIso,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso-b",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.sc2s.sgov.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "oidc.{region}.sc2s.sgov.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoB,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-us-gov",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "oidc.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "oidc-fips.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "oidc.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsUsGov,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "us-gov-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.us-gov-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-east-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "oidc.us-gov-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
+ },
+ },
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go
new file mode 100644
index 000000000..a8cfd7b46
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go
@@ -0,0 +1,288 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/encoding/httpbinding"
+ smithyjson "github.com/aws/smithy-go/encoding/json"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+type awsRestjson1_serializeOpCreateToken struct {
+}
+
+func (*awsRestjson1_serializeOpCreateToken) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpCreateToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateTokenInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/token")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentCreateTokenInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsCreateTokenInput(v *CreateTokenInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentCreateTokenInput(v *CreateTokenInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.ClientId != nil {
+ ok := object.Key("clientId")
+ ok.String(*v.ClientId)
+ }
+
+ if v.ClientSecret != nil {
+ ok := object.Key("clientSecret")
+ ok.String(*v.ClientSecret)
+ }
+
+ if v.Code != nil {
+ ok := object.Key("code")
+ ok.String(*v.Code)
+ }
+
+ if v.DeviceCode != nil {
+ ok := object.Key("deviceCode")
+ ok.String(*v.DeviceCode)
+ }
+
+ if v.GrantType != nil {
+ ok := object.Key("grantType")
+ ok.String(*v.GrantType)
+ }
+
+ if v.RedirectUri != nil {
+ ok := object.Key("redirectUri")
+ ok.String(*v.RedirectUri)
+ }
+
+ if v.RefreshToken != nil {
+ ok := object.Key("refreshToken")
+ ok.String(*v.RefreshToken)
+ }
+
+ if v.Scope != nil {
+ ok := object.Key("scope")
+ if err := awsRestjson1_serializeDocumentScopes(v.Scope, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpRegisterClient struct {
+}
+
+func (*awsRestjson1_serializeOpRegisterClient) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpRegisterClient) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*RegisterClientInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/client/register")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentRegisterClientInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsRegisterClientInput(v *RegisterClientInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentRegisterClientInput(v *RegisterClientInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.ClientName != nil {
+ ok := object.Key("clientName")
+ ok.String(*v.ClientName)
+ }
+
+ if v.ClientType != nil {
+ ok := object.Key("clientType")
+ ok.String(*v.ClientType)
+ }
+
+ if v.Scopes != nil {
+ ok := object.Key("scopes")
+ if err := awsRestjson1_serializeDocumentScopes(v.Scopes, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpStartDeviceAuthorization struct {
+}
+
+func (*awsRestjson1_serializeOpStartDeviceAuthorization) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpStartDeviceAuthorization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*StartDeviceAuthorizationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/device_authorization")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentStartDeviceAuthorizationInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsStartDeviceAuthorizationInput(v *StartDeviceAuthorizationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentStartDeviceAuthorizationInput(v *StartDeviceAuthorizationInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.ClientId != nil {
+ ok := object.Key("clientId")
+ ok.String(*v.ClientId)
+ }
+
+ if v.ClientSecret != nil {
+ ok := object.Key("clientSecret")
+ ok.String(*v.ClientSecret)
+ }
+
+ if v.StartUrl != nil {
+ ok := object.Key("startUrl")
+ ok.String(*v.StartUrl)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentScopes(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go
new file mode 100644
index 000000000..beef5aaa3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go
@@ -0,0 +1,282 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ "fmt"
+ smithy "github.com/aws/smithy-go"
+)
+
+// You do not have sufficient access to perform this action.
+type AccessDeniedException struct {
+ Message *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *AccessDeniedException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *AccessDeniedException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" }
+func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that a request to authorize a client with an access user session token
+// is pending.
+type AuthorizationPendingException struct {
+ Message *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *AuthorizationPendingException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *AuthorizationPendingException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *AuthorizationPendingException) ErrorCode() string { return "AuthorizationPendingException" }
+func (e *AuthorizationPendingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that the token issued by the service is expired and is no longer
+// valid.
+type ExpiredTokenException struct {
+ Message *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ExpiredTokenException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ExpiredTokenException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ExpiredTokenException) ErrorCode() string { return "ExpiredTokenException" }
+func (e *ExpiredTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that an error from the service occurred while trying to process a
+// request.
+type InternalServerException struct {
+ Message *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InternalServerException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InternalServerException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InternalServerException) ErrorCode() string { return "InternalServerException" }
+func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// Indicates that the clientId or clientSecret in the request is invalid. For
+// example, this can occur when a client sends an incorrect clientId or an expired
+// clientSecret.
+type InvalidClientException struct {
+ Message *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidClientException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidClientException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidClientException) ErrorCode() string { return "InvalidClientException" }
+func (e *InvalidClientException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that the client information sent in the request during registration is
+// invalid.
+type InvalidClientMetadataException struct {
+ Message *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidClientMetadataException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidClientMetadataException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidClientMetadataException) ErrorCode() string { return "InvalidClientMetadataException" }
+func (e *InvalidClientMetadataException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that a request contains an invalid grant. This can occur if a client
+// makes a CreateToken request with an invalid grant type.
+type InvalidGrantException struct {
+ Message *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidGrantException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidGrantException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidGrantException) ErrorCode() string { return "InvalidGrantException" }
+func (e *InvalidGrantException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that something is wrong with the input to the request. For example, a
+// required parameter might be missing or out of range.
+type InvalidRequestException struct {
+ Message *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidRequestException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidRequestException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidRequestException) ErrorCode() string { return "InvalidRequestException" }
+func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that the scope provided in the request is invalid.
+type InvalidScopeException struct {
+ Message *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidScopeException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidScopeException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidScopeException) ErrorCode() string { return "InvalidScopeException" }
+func (e *InvalidScopeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that the client is making the request too frequently and is more than
+// the service can handle.
+type SlowDownException struct {
+ Message *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *SlowDownException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *SlowDownException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *SlowDownException) ErrorCode() string { return "SlowDownException" }
+func (e *SlowDownException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that the client is not currently authorized to make the request. This
+// can happen when a clientId is not issued for a public client.
+type UnauthorizedClientException struct {
+ Message *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *UnauthorizedClientException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *UnauthorizedClientException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *UnauthorizedClientException) ErrorCode() string { return "UnauthorizedClientException" }
+func (e *UnauthorizedClientException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Indicates that the grant type in the request is not supported by the service.
+type UnsupportedGrantTypeException struct {
+ Message *string
+
+ Error_ *string
+ Error_description *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *UnsupportedGrantTypeException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *UnsupportedGrantTypeException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *UnsupportedGrantTypeException) ErrorCode() string { return "UnsupportedGrantTypeException" }
+func (e *UnsupportedGrantTypeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/types.go
new file mode 100644
index 000000000..0ec0789f8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/types.go
@@ -0,0 +1,9 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ smithydocument "github.com/aws/smithy-go/document"
+)
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/validators.go
new file mode 100644
index 000000000..5a309484e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/validators.go
@@ -0,0 +1,142 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package ssooidc
+
+import (
+ "context"
+ "fmt"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+)
+
+type validateOpCreateToken struct {
+}
+
+func (*validateOpCreateToken) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateTokenInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateTokenInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpRegisterClient struct {
+}
+
+func (*validateOpRegisterClient) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpRegisterClient) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*RegisterClientInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpRegisterClientInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpStartDeviceAuthorization struct {
+}
+
+func (*validateOpStartDeviceAuthorization) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpStartDeviceAuthorization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*StartDeviceAuthorizationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpStartDeviceAuthorizationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+func addOpCreateTokenValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateToken{}, middleware.After)
+}
+
+func addOpRegisterClientValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpRegisterClient{}, middleware.After)
+}
+
+func addOpStartDeviceAuthorizationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpStartDeviceAuthorization{}, middleware.After)
+}
+
+func validateOpCreateTokenInput(v *CreateTokenInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateTokenInput"}
+ if v.ClientId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ClientId"))
+ }
+ if v.ClientSecret == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ClientSecret"))
+ }
+ if v.GrantType == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("GrantType"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpRegisterClientInput(v *RegisterClientInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "RegisterClientInput"}
+ if v.ClientName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ClientName"))
+ }
+ if v.ClientType == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ClientType"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpStartDeviceAuthorizationInput(v *StartDeviceAuthorizationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "StartDeviceAuthorizationInput"}
+ if v.ClientId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ClientId"))
+ }
+ if v.ClientSecret == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ClientSecret"))
+ }
+ if v.StartUrl == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("StartUrl"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
new file mode 100644
index 000000000..6c66c2137
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
@@ -0,0 +1,176 @@
+# v1.16.19 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.18 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.17 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.16 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.15 (2022-08-30)
+
+* No change notes available for this release.
+
+# v1.16.14 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.13 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.12 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.11 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.10 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.9 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.8 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.7 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.6 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.5 (2022-05-16)
+
+* **Documentation**: Documentation updates for AWS Security Token Service.
+
+# v1.16.4 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.3 (2022-03-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.2 (2022-03-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.1 (2022-03-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.0 (2022-03-08)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Documentation**: Updated service client model to latest release.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.0 (2022-02-24)
+
+* **Feature**: API client updated
+* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.0 (2022-01-14)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.0 (2022-01-07)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.0 (2021-12-21)
+
+* **Feature**: Updated to latest service endpoints
+
+# v1.11.1 (2021-12-02)
+
+* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514))
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.0 (2021-11-30)
+
+* **Feature**: API client updated
+
+# v1.10.1 (2021-11-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.0 (2021-11-12)
+
+* **Feature**: Service clients now support custom endpoints that have an initial URI path defined.
+
+# v1.9.0 (2021-11-06)
+
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.0 (2021-10-21)
+
+* **Feature**: API client updated
+* **Feature**: Updated to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.2 (2021-10-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.1 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.0 (2021-08-27)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.2 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.1 (2021-08-04)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.0 (2021-07-15)
+
+* **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model.
+* **Documentation**: Updated service model to latest revision.
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.0 (2021-06-25)
+
+* **Feature**: API client updated
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.1 (2021-05-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/aws/aws-sdk-go-v2/service/sts/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
new file mode 100644
index 000000000..3041fc467
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
@@ -0,0 +1,537 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/defaults"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/query"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ presignedurlcust "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url"
+ smithy "github.com/aws/smithy-go"
+ smithydocument "github.com/aws/smithy-go/document"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net"
+ "net/http"
+ "time"
+)
+
+const ServiceID = "STS"
+const ServiceAPIVersion = "2011-06-15"
+
+// Client provides the API client to make operations call for AWS Security Token
+// Service.
+type Client struct {
+ options Options
+}
+
+// New returns an initialized Client based on the functional options. Provide
+// additional functional options to further configure the behavior of the client,
+// such as changing the client's endpoint or adding custom middleware behavior.
+func New(options Options, optFns ...func(*Options)) *Client {
+ options = options.Copy()
+
+ resolveDefaultLogger(&options)
+
+ setResolvedDefaultsMode(&options)
+
+ resolveRetryer(&options)
+
+ resolveHTTPClient(&options)
+
+ resolveHTTPSignerV4(&options)
+
+ resolveDefaultEndpointConfiguration(&options)
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ client := &Client{
+ options: options,
+ }
+
+ return client
+}
+
+type Options struct {
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // Configures the events that will be sent to the configured logger.
+ ClientLogMode aws.ClientLogMode
+
+ // The credentials object to use when signing requests.
+ Credentials aws.CredentialsProvider
+
+ // The configuration DefaultsMode that the SDK should use when constructing the
+ // clients initial default settings.
+ DefaultsMode aws.DefaultsMode
+
+ // The endpoint options to be used when attempting to resolve an endpoint.
+ EndpointOptions EndpointResolverOptions
+
+ // The service endpoint resolver.
+ EndpointResolver EndpointResolver
+
+ // Signature Version 4 (SigV4) Signer
+ HTTPSignerV4 HTTPSignerV4
+
+ // The logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // The region to send requests to. (Required)
+ Region string
+
+ // RetryMaxAttempts specifies the maximum number attempts an API client will call
+ // an operation that fails with a retryable error. A value of 0 is ignored, and
+ // will not be used to configure the API client created default retryer, or modify
+ // per operation call's retry max attempts. When creating a new API Clients this
+ // member will only be used if the Retryer Options member is nil. This value will
+ // be ignored if Retryer is not nil. If specified in an operation call's functional
+ // options with a value that is different than the constructed client's Options,
+ // the Client's Retryer will be wrapped to use the operation's specific
+ // RetryMaxAttempts value.
+ RetryMaxAttempts int
+
+ // RetryMode specifies the retry mode the API client will be created with, if
+ // Retryer option is not also specified. When creating a new API Clients this
+ // member will only be used if the Retryer Options member is nil. This value will
+ // be ignored if Retryer is not nil. Currently does not support per operation call
+ // overrides, may in the future.
+ RetryMode aws.RetryMode
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer. The kind of
+ // default retry created by the API client can be changed with the RetryMode
+ // option.
+ Retryer aws.Retryer
+
+ // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
+ // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You
+ // should not populate this structure programmatically, or rely on the values here
+ // within your applications.
+ RuntimeEnvironment aws.RuntimeEnvironment
+
+ // The initial DefaultsMode used when the client options were constructed. If the
+ // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
+ // value was at that point in time. Currently does not support per operation call
+ // overrides, may in the future.
+ resolvedDefaultsMode aws.DefaultsMode
+
+ // The HTTP client to invoke API calls with. Defaults to client's default HTTP
+ // implementation if nil.
+ HTTPClient HTTPClient
+}
+
+// WithAPIOptions returns a functional option for setting the Client's APIOptions
+// option.
+func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, optFns...)
+ }
+}
+
+// WithEndpointResolver returns a functional option for setting the Client's
+// EndpointResolver option.
+func WithEndpointResolver(v EndpointResolver) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolver = v
+ }
+}
+
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// Copy creates a clone where the APIOptions list is deep copied.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
+ copy(to.APIOptions, o.APIOptions)
+
+ return to
+}
+func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
+ ctx = middleware.ClearStackValues(ctx)
+ stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
+ options := c.options.Copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ finalizeRetryMaxAttemptOptions(&options, *c)
+
+ finalizeClientEndpointResolverOptions(&options)
+
+ for _, fn := range stackFns {
+ if err := fn(stack, options); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ for _, fn := range options.APIOptions {
+ if err := fn(stack); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack)
+ result, metadata, err = handler.Handle(ctx, params)
+ if err != nil {
+ err = &smithy.OperationError{
+ ServiceID: ServiceID,
+ OperationName: opID,
+ Err: err,
+ }
+ }
+ return result, metadata, err
+}
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
+
+func resolveDefaultLogger(o *Options) {
+ if o.Logger != nil {
+ return
+ }
+ o.Logger = logging.Nop{}
+}
+
+func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
+ return middleware.AddSetLoggerMiddleware(stack, o.Logger)
+}
+
+func setResolvedDefaultsMode(o *Options) {
+ if len(o.resolvedDefaultsMode) > 0 {
+ return
+ }
+
+ var mode aws.DefaultsMode
+ mode.SetFromString(string(o.DefaultsMode))
+
+ if mode == aws.DefaultsModeAuto {
+ mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
+ }
+
+ o.resolvedDefaultsMode = mode
+}
+
+// NewFromConfig returns a new client from the provided config.
+func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
+ opts := Options{
+ Region: cfg.Region,
+ DefaultsMode: cfg.DefaultsMode,
+ RuntimeEnvironment: cfg.RuntimeEnvironment,
+ HTTPClient: cfg.HTTPClient,
+ Credentials: cfg.Credentials,
+ APIOptions: cfg.APIOptions,
+ Logger: cfg.Logger,
+ ClientLogMode: cfg.ClientLogMode,
+ }
+ resolveAWSRetryerProvider(cfg, &opts)
+ resolveAWSRetryMaxAttempts(cfg, &opts)
+ resolveAWSRetryMode(cfg, &opts)
+ resolveAWSEndpointResolver(cfg, &opts)
+ resolveUseDualStackEndpoint(cfg, &opts)
+ resolveUseFIPSEndpoint(cfg, &opts)
+ return New(opts, optFns...)
+}
+
+func resolveHTTPClient(o *Options) {
+ var buildable *awshttp.BuildableClient
+
+ if o.HTTPClient != nil {
+ var ok bool
+ buildable, ok = o.HTTPClient.(*awshttp.BuildableClient)
+ if !ok {
+ return
+ }
+ } else {
+ buildable = awshttp.NewBuildableClient()
+ }
+
+ modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
+ if err == nil {
+ buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
+ if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
+ dialer.Timeout = dialerTimeout
+ }
+ })
+
+ buildable = buildable.WithTransportOptions(func(transport *http.Transport) {
+ if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok {
+ transport.TLSHandshakeTimeout = tlsHandshakeTimeout
+ }
+ })
+ }
+
+ o.HTTPClient = buildable
+}
+
+func resolveRetryer(o *Options) {
+ if o.Retryer != nil {
+ return
+ }
+
+ if len(o.RetryMode) == 0 {
+ modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
+ if err == nil {
+ o.RetryMode = modeConfig.RetryMode
+ }
+ }
+ if len(o.RetryMode) == 0 {
+ o.RetryMode = aws.RetryModeStandard
+ }
+
+ var standardOptions []func(*retry.StandardOptions)
+ if v := o.RetryMaxAttempts; v != 0 {
+ standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
+ so.MaxAttempts = v
+ })
+ }
+
+ switch o.RetryMode {
+ case aws.RetryModeAdaptive:
+ var adaptiveOptions []func(*retry.AdaptiveModeOptions)
+ if len(standardOptions) != 0 {
+ adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
+ ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
+ })
+ }
+ o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
+
+ default:
+ o.Retryer = retry.NewStandard(standardOptions...)
+ }
+}
+
+func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
+ if cfg.Retryer == nil {
+ return
+ }
+ o.Retryer = cfg.Retryer()
+}
+
+func resolveAWSRetryMode(cfg aws.Config, o *Options) {
+ if len(cfg.RetryMode) == 0 {
+ return
+ }
+ o.RetryMode = cfg.RetryMode
+}
+func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
+ if cfg.RetryMaxAttempts == 0 {
+ return
+ }
+ o.RetryMaxAttempts = cfg.RetryMaxAttempts
+}
+
+func finalizeRetryMaxAttemptOptions(o *Options, client Client) {
+ if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
+ return
+ }
+
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
+}
+
+func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
+ if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
+ return
+ }
+ o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver())
+}
+
+func addClientUserAgent(stack *middleware.Stack) error {
+ return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "sts", goModuleVersion)(stack)
+}
+
+func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error {
+ mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: o.Credentials,
+ Signer: o.HTTPSignerV4,
+ LogSigning: o.ClientLogMode.IsSigning(),
+ })
+ return stack.Finalize.Add(mw, middleware.After)
+}
+
+type HTTPSignerV4 interface {
+ SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
+}
+
+func resolveHTTPSignerV4(o *Options) {
+ if o.HTTPSignerV4 != nil {
+ return
+ }
+ o.HTTPSignerV4 = newDefaultV4Signer(*o)
+}
+
+func newDefaultV4Signer(o Options) *v4.Signer {
+ return v4.NewSigner(func(so *v4.SignerOptions) {
+ so.Logger = o.Logger
+ so.LogSigning = o.ClientLogMode.IsSigning()
+ })
+}
+
+func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
+ mo := retry.AddRetryMiddlewaresOptions{
+ Retryer: o.Retryer,
+ LogRetryAttempts: o.ClientLogMode.IsRetries(),
+ }
+ return retry.AddRetryMiddlewares(stack, mo)
+}
+
+// resolves dual-stack endpoint configuration
+func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseDualStackEndpoint = value
+ }
+ return nil
+}
+
+// resolves FIPS endpoint configuration
+func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseFIPSEndpoint = value
+ }
+ return nil
+}
+
+func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
+ return awsmiddleware.AddRequestIDRetrieverMiddleware(stack)
+}
+
+func addResponseErrorMiddleware(stack *middleware.Stack) error {
+ return awshttp.AddResponseErrorMiddleware(stack)
+}
+
+// HTTPPresignerV4 represents presigner interface used by presign url client
+type HTTPPresignerV4 interface {
+ PresignHTTP(
+ ctx context.Context, credentials aws.Credentials, r *http.Request,
+ payloadHash string, service string, region string, signingTime time.Time,
+ optFns ...func(*v4.SignerOptions),
+ ) (url string, signedHeader http.Header, err error)
+}
+
+// PresignOptions represents the presign client options
+type PresignOptions struct {
+
+ // ClientOptions are list of functional options to mutate client options used by
+ // the presign client.
+ ClientOptions []func(*Options)
+
+ // Presigner is the presigner used by the presign url client
+ Presigner HTTPPresignerV4
+}
+
+func (o PresignOptions) copy() PresignOptions {
+ clientOptions := make([]func(*Options), len(o.ClientOptions))
+ copy(clientOptions, o.ClientOptions)
+ o.ClientOptions = clientOptions
+ return o
+}
+
+// WithPresignClientFromClientOptions is a helper utility to retrieve a function
+// that takes PresignOption as input
+func WithPresignClientFromClientOptions(optFns ...func(*Options)) func(*PresignOptions) {
+ return withPresignClientFromClientOptions(optFns).options
+}
+
+type withPresignClientFromClientOptions []func(*Options)
+
+func (w withPresignClientFromClientOptions) options(o *PresignOptions) {
+ o.ClientOptions = append(o.ClientOptions, w...)
+}
+
+// PresignClient represents the presign url client
+type PresignClient struct {
+ client *Client
+ options PresignOptions
+}
+
+// NewPresignClient generates a presign client using provided API Client and
+// presign options
+func NewPresignClient(c *Client, optFns ...func(*PresignOptions)) *PresignClient {
+ var options PresignOptions
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ if len(options.ClientOptions) != 0 {
+ c = New(c.options, options.ClientOptions...)
+ }
+
+ if options.Presigner == nil {
+ options.Presigner = newDefaultV4Signer(c.options)
+ }
+
+ return &PresignClient{
+ client: c,
+ options: options,
+ }
+}
+
+func withNopHTTPClientAPIOption(o *Options) {
+ o.HTTPClient = smithyhttp.NopClient{}
+}
+
+type presignConverter PresignOptions
+
+func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, options Options) (err error) {
+ stack.Finalize.Clear()
+ stack.Deserialize.Clear()
+ stack.Build.Remove((*awsmiddleware.ClientRequestID)(nil).ID())
+ stack.Build.Remove("UserAgent")
+ pmw := v4.NewPresignHTTPRequestMiddleware(v4.PresignHTTPRequestMiddlewareOptions{
+ CredentialsProvider: options.Credentials,
+ Presigner: c.Presigner,
+ LogSigning: options.ClientLogMode.IsSigning(),
+ })
+ err = stack.Finalize.Add(pmw, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = smithyhttp.AddNoPayloadDefaultContentTypeRemover(stack); err != nil {
+ return err
+ }
+ // convert request to a GET request
+ err = query.AddAsGetRequestMiddleware(stack)
+ if err != nil {
+ return err
+ }
+ err = presignedurlcust.AddAsIsPresigingMiddleware(stack)
+ if err != nil {
+ return err
+ }
+ return nil
+}
+
+func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
+ return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
+ LogRequest: o.ClientLogMode.IsRequest(),
+ LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(),
+ LogResponse: o.ClientLogMode.IsResponse(),
+ LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
+ }, middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
new file mode 100644
index 000000000..7d00b6bd7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
@@ -0,0 +1,417 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ "github.com/aws/aws-sdk-go-v2/service/sts/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a set of temporary security credentials that you can use to access
+// Amazon Web Services resources that you might not normally have access to. These
+// temporary credentials consist of an access key ID, a secret access key, and a
+// security token. Typically, you use AssumeRole within your account or for
+// cross-account access. For a comparison of AssumeRole with other API operations
+// that produce temporary credentials, see Requesting Temporary Security
+// Credentials
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
+// and Comparing the Amazon Web Services STS API operations
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
+// in the IAM User Guide. Permissions The temporary security credentials created by
+// AssumeRole can be used to make API calls to any Amazon Web Services service with
+// the following exception: You cannot call the Amazon Web Services STS
+// GetFederationToken or GetSessionToken API operations. (Optional) You can pass
+// inline or managed session policies
+// (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 plaintext that you use for both inline 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 Amazon Web
+// Services 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. When you create a role, you create two policies: A role
+// trust policy that specifies who can assume the role and a permissions policy
+// that specifies what can be done with the role. You specify the trusted principal
+// who is allowed to assume the role in the role trust policy. To assume a role
+// from a different account, your Amazon Web Services account must be trusted by
+// the role. The trust relationship is defined in the role's trust policy when the
+// role is created. That trust policy states which accounts are allowed to delegate
+// that access to users in the account. A user who wants to access a role in a
+// different account must also have permissions that are delegated from the user
+// account administrator. The administrator must attach a policy that allows the
+// user to call AssumeRole for the ARN of the role in the other account. To allow a
+// user to assume a role in the same account, you can do either of the
+// following:
+//
+// * Attach a policy to the user that allows the user to call
+// AssumeRole (as long as the role's trust policy trusts the account).
+//
+// * Add the
+// user as a principal directly in the role's trust policy.
+//
+// You can do either
+// because the role’s trust policy acts as an IAM resource-based policy. When a
+// resource-based policy grants access to a principal in the same account, no
+// additional identity-based policy is required. For more information about trust
+// policies and resource-based policies, 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 when you call AssumeRole. This is
+// useful for cross-account scenarios to ensure that the user that assumes the role
+// has been authenticated with an Amazon Web Services MFA device. In that scenario,
+// the trust policy of the role being assumed includes a condition that tests for
+// MFA authentication. If the caller does not include valid MFA information, the
+// request to assume the role is denied. The condition in a trust policy that tests
+// for MFA authentication might look like the following example. "Condition":
+// {"Bool": {"aws:MultiFactorAuthPresent": true}} For more information, see
+// Configuring MFA-Protected API Access
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html) in the
+// IAM User Guide guide. To use MFA with AssumeRole, you pass values for the
+// SerialNumber and TokenCode parameters. The SerialNumber value identifies the
+// user's hardware or virtual MFA device. The TokenCode is the time-based one-time
+// password (TOTP) that the MFA device produces.
+func (c *Client) AssumeRole(ctx context.Context, params *AssumeRoleInput, optFns ...func(*Options)) (*AssumeRoleOutput, error) {
+ if params == nil {
+ params = &AssumeRoleInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssumeRole", params, optFns, c.addOperationAssumeRoleMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssumeRoleOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssumeRoleInput struct {
+
+ // The Amazon Resource Name (ARN) of the role to assume.
+ //
+ // This member is required.
+ RoleArn *string
+
+ // An identifier for the assumed role session. Use the role session name to
+ // uniquely identify a session when the same role is assumed by different
+ // principals or for different reasons. In cross-account scenarios, the role
+ // session name is visible to, and can be logged by the account that owns the role.
+ // The role session name is also used in the ARN of the assumed role principal.
+ // This means that subsequent cross-account API requests that use the temporary
+ // security credentials will expose the role session name to the external account
+ // in their CloudTrail logs. The regex used to validate this parameter is a string
+ // of characters consisting of upper- and lower-case alphanumeric characters with
+ // no spaces. You can also include underscores or any of the following characters:
+ // =,.@-
+ //
+ // This member is required.
+ RoleSessionName *string
+
+ // The duration, in seconds, of the role session. The value specified can range
+ // from 900 seconds (15 minutes) up to the maximum session duration set for the
+ // role. The maximum session duration setting can have a value from 1 hour to 12
+ // hours. If you specify a value higher than this setting or the administrator
+ // setting (whichever is lower), the operation fails. For example, if you specify a
+ // session duration of 12 hours, but your administrator set the maximum session
+ // duration to 6 hours, your operation fails. Role chaining limits your Amazon Web
+ // Services CLI or Amazon Web Services API role session to a maximum of one hour.
+ // When you use the AssumeRole API operation to assume a role, you can specify the
+ // duration of your role session with the DurationSeconds parameter. You can
+ // specify a parameter value of up to 43200 seconds (12 hours), depending on the
+ // maximum session duration setting for your role. However, if you assume a role
+ // using role chaining and provide a DurationSeconds parameter value greater than
+ // one hour, the operation fails. To learn how to view the maximum value for your
+ // role, see View the Maximum Session Duration Setting for a Role
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
+ // in the IAM User Guide. By default, the value is set to 3600 seconds. The
+ // DurationSeconds parameter is separate from the duration of a console session
+ // that you might request using the returned credentials. The request to the
+ // federation endpoint for a console sign-in token takes a SessionDuration
+ // parameter that specifies the maximum length of the console session. For more
+ // information, see Creating a URL that Enables Federated Users to Access the
+ // Amazon Web Services Management Console
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
+ // in the IAM User Guide.
+ DurationSeconds *int32
+
+ // A unique identifier that might be required when you assume a role in another
+ // account. If the administrator of the account to which the role belongs provided
+ // you with an external ID, then provide that value in the ExternalId parameter.
+ // This value can be any string, such as a passphrase or account number. A
+ // cross-account role is usually set up to trust everyone in an account. Therefore,
+ // the administrator of the trusting account might send an external ID to the
+ // administrator of the trusted account. That way, only someone with the ID can
+ // assume the role, rather than everyone in the account. For more information about
+ // the external ID, see How to Use an External ID When Granting Access to Your
+ // Amazon Web Services Resources to a Third Party
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html)
+ // in the IAM User Guide. The regex used to validate this parameter is a string of
+ // characters consisting of upper- and lower-case alphanumeric characters with no
+ // spaces. You can also include underscores or any of the following characters:
+ // =,.@:/-
+ ExternalId *string
+
+ // An IAM policy in JSON format that you want to use as an inline session policy.
+ // This parameter is optional. 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 Amazon Web Services 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. The plaintext that you use for both inline and managed
+ // session policies 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. An Amazon Web
+ // Services 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 plaintext 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
+
+ // The Amazon Resource Names (ARNs) of the IAM managed policies that 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 plaintext that you use for both inline and managed session
+ // policies can't exceed 2,048 characters. For more information about ARNs, see
+ // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces
+ // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in
+ // the Amazon Web Services General Reference. An Amazon Web Services 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 plaintext 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 Amazon Web Services 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 []types.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. The
+ // value is either the serial number for a hardware device (such as GAHT12345678)
+ // or an Amazon Resource Name (ARN) for a virtual device (such as
+ // arn:aws:iam::123456789012:mfa/user). The regex used to validate this parameter
+ // is a string of characters consisting of upper- and lower-case alphanumeric
+ // characters with no spaces. You can also include underscores or any of the
+ // following characters: =,.@-
+ SerialNumber *string
+
+ // The source identity specified by the principal that is calling the AssumeRole
+ // operation. You can require users to specify a source identity when they assume a
+ // role. You do this by using the sts:SourceIdentity condition key in a role trust
+ // policy. You can use source identity information in CloudTrail logs to determine
+ // who took actions with a role. You can use the aws:SourceIdentity condition key
+ // to further control access to Amazon Web Services resources based on the value of
+ // source identity. For more information about using source identity, see Monitor
+ // and control actions taken with assumed roles
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
+ // in the IAM User Guide. The regex used to validate this parameter is a string of
+ // characters consisting of upper- and lower-case alphanumeric characters with no
+ // spaces. You can also include underscores or any of the following characters:
+ // =,.@-. You cannot use a value that begins with the text aws:. This prefix is
+ // reserved for Amazon Web Services internal use.
+ SourceIdentity *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 Amazon Web Services 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 plaintext 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 Amazon Web Services 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 plaintext
+ // 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 CloudTrail
+ // logs. For more information, see Viewing Session Tags in CloudTrail
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs)
+ // in the IAM User Guide.
+ Tags []types.Tag
+
+ // The value provided by the MFA device, if the trust policy of the role being
+ // assumed requires MFA. (In other words, if the policy includes a condition that
+ // tests for MFA). If the role being assumed requires MFA and if the TokenCode
+ // value is missing or expired, the AssumeRole call returns an "access denied"
+ // error. The format for this parameter, as described by its regex pattern, is a
+ // sequence of six numeric digits.
+ TokenCode *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
+
+ noSmithyDocumentSerde
+}
+
+// Contains the response to a successful AssumeRole request, including temporary
+// Amazon Web Services credentials that can be used to make Amazon Web Services
+// requests.
+type AssumeRoleOutput struct {
+
+ // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers
+ // that you can use to refer to the resulting temporary security credentials. For
+ // example, you can reference these credentials as a principal in a resource-based
+ // policy by using the ARN or assumed role ID. The ARN and ID include the
+ // RoleSessionName that you specified when you called AssumeRole.
+ AssumedRoleUser *types.AssumedRoleUser
+
+ // The temporary security credentials, which include an access key ID, a secret
+ // access key, and a security (or session) token. The size of the security token
+ // that STS API operations return is not fixed. We strongly recommend that you make
+ // no assumptions about the maximum size.
+ Credentials *types.Credentials
+
+ // 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 *int32
+
+ // The source identity specified by the principal that is calling the AssumeRole
+ // operation. You can require users to specify a source identity when they assume a
+ // role. You do this by using the sts:SourceIdentity condition key in a role trust
+ // policy. You can use source identity information in CloudTrail logs to determine
+ // who took actions with a role. You can use the aws:SourceIdentity condition key
+ // to further control access to Amazon Web Services resources based on the value of
+ // source identity. For more information about using source identity, see Monitor
+ // and control actions taken with assumed roles
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
+ // in the IAM User Guide. The regex used to validate this parameter is a string of
+ // characters consisting of upper- and lower-case alphanumeric characters with no
+ // spaces. You can also include underscores or any of the following characters:
+ // =,.@-
+ SourceIdentity *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRole{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAssumeRole{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpAssumeRoleValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRole(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opAssumeRole(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "sts",
+ OperationName: "AssumeRole",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
new file mode 100644
index 000000000..e12315e4c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
@@ -0,0 +1,377 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/sts/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a set of temporary security credentials for users who have been
+// authenticated via a SAML authentication response. This operation provides a
+// mechanism for tying an enterprise identity store or directory to role-based
+// Amazon Web Services access without user-specific credentials or configuration.
+// For a comparison of AssumeRoleWithSAML with the other API operations that
+// produce temporary credentials, see Requesting Temporary Security Credentials
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
+// and Comparing the Amazon Web Services STS API operations
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
+// in the IAM User Guide. The temporary security credentials returned by this
+// operation consist of an access key ID, a secret access key, and a security
+// token. Applications can use these temporary security credentials to sign calls
+// to Amazon Web Services 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 duration that you specify, or
+// until the time specified in the SAML authentication response's
+// SessionNotOnOrAfter value, whichever is shorter. You can provide a
+// DurationSeconds value from 900 seconds (15 minutes) up to the maximum session
+// duration setting for the role. This setting can have a value from 1 hour to 12
+// hours. To learn how to view the maximum value for your role, see View the
+// Maximum Session Duration Setting for a Role
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
+// in the IAM User Guide. The maximum session duration limit applies when you use
+// the AssumeRole* API operations or the assume-role* CLI commands. However the
+// limit does not apply when you use those operations to create a console 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. Role chaining
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining)
+// limits your CLI or Amazon Web Services API role session to a maximum of one
+// hour. When you use the AssumeRole API operation to assume a role, you can
+// specify the duration of your role session with the DurationSeconds parameter.
+// You can specify a parameter value of up to 43200 seconds (12 hours), depending
+// on the maximum session duration setting for your role. However, if you assume a
+// role using role chaining and provide a DurationSeconds parameter value greater
+// than one hour, the operation fails. Permissions The temporary security
+// credentials created by AssumeRoleWithSAML can be used to make API calls to any
+// Amazon Web Services service with the following exception: you cannot call the
+// STS GetFederationToken or GetSessionToken API operations. (Optional) You can
+// pass inline or managed session policies
+// (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 plaintext that you use for both inline 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 Amazon Web
+// Services 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. Calling AssumeRoleWithSAML does not require the use of
+// Amazon Web Services 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. Calling AssumeRoleWithSAML can
+// result in an entry in your 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). 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 plaintext 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 Amazon Web Services 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 plaintext
+// 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 Amazon Web Services. Additionally, you must use
+// Identity and Access Management (IAM) to create a SAML provider entity in your
+// Amazon Web Services 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:
+//
+// * About SAML 2.0-based
+// Federation
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html)
+// in the IAM User Guide.
+//
+// * Creating SAML Identity Providers
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html)
+// in the IAM User Guide.
+//
+// * Configuring a Relying Party and Claims
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html)
+// in the IAM User Guide.
+//
+// * Creating a Role for SAML 2.0 Federation
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html)
+// in the IAM User Guide.
+func (c *Client) AssumeRoleWithSAML(ctx context.Context, params *AssumeRoleWithSAMLInput, optFns ...func(*Options)) (*AssumeRoleWithSAMLOutput, error) {
+ if params == nil {
+ params = &AssumeRoleWithSAMLInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssumeRoleWithSAML", params, optFns, c.addOperationAssumeRoleWithSAMLMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssumeRoleWithSAMLOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssumeRoleWithSAMLInput struct {
+
+ // The Amazon Resource Name (ARN) of the SAML provider in IAM that describes the
+ // IdP.
+ //
+ // This member is required.
+ PrincipalArn *string
+
+ // The Amazon Resource Name (ARN) of the role that the caller is assuming.
+ //
+ // This member is required.
+ RoleArn *string
+
+ // The base64 encoded SAML authentication response provided by the IdP. For more
+ // information, see Configuring a Relying Party and Adding Claims
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html)
+ // in the IAM User Guide.
+ //
+ // This member is required.
+ SAMLAssertion *string
+
+ // The duration, in seconds, of the role session. Your role session lasts for the
+ // duration that you specify for the DurationSeconds parameter, or until the time
+ // specified in the SAML authentication response's SessionNotOnOrAfter value,
+ // whichever is shorter. You can provide a DurationSeconds value from 900 seconds
+ // (15 minutes) up to the maximum session duration setting for the role. This
+ // setting can have a value from 1 hour to 12 hours. If you specify a value higher
+ // than this setting, the operation fails. For example, if you specify a session
+ // duration of 12 hours, but your administrator set the maximum session duration to
+ // 6 hours, your operation fails. To learn how to view the maximum value for your
+ // role, see View the Maximum Session Duration Setting for a Role
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
+ // in the IAM User Guide. By default, the value is set to 3600 seconds. The
+ // DurationSeconds parameter is separate from the duration of a console session
+ // that you might request using the returned credentials. The request to the
+ // federation endpoint for a console sign-in token takes a SessionDuration
+ // parameter that specifies the maximum length of the console session. For more
+ // information, see Creating a URL that Enables Federated Users to Access the
+ // Amazon Web Services Management Console
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
+ // in the IAM User Guide.
+ DurationSeconds *int32
+
+ // An IAM policy in JSON format that you want to use as an inline session policy.
+ // This parameter is optional. 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 Amazon Web Services 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. The plaintext that you use for both inline and managed
+ // session policies 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. An Amazon Web
+ // Services 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 plaintext 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
+
+ // The Amazon Resource Names (ARNs) of the IAM managed policies that 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 plaintext that you use for both inline and managed session
+ // policies can't exceed 2,048 characters. For more information about ARNs, see
+ // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces
+ // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in
+ // the Amazon Web Services General Reference. An Amazon Web Services 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 plaintext 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 Amazon Web Services 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 []types.PolicyDescriptorType
+
+ noSmithyDocumentSerde
+}
+
+// Contains the response to a successful AssumeRoleWithSAML request, including
+// temporary Amazon Web Services credentials that can be used to make Amazon Web
+// Services requests.
+type AssumeRoleWithSAMLOutput struct {
+
+ // The identifiers for the temporary security credentials that the operation
+ // returns.
+ AssumedRoleUser *types.AssumedRoleUser
+
+ // The value of the Recipient attribute of the SubjectConfirmationData element of
+ // the SAML assertion.
+ Audience *string
+
+ // The temporary security credentials, which include an access key ID, a secret
+ // access key, and a security (or session) token. The size of the security token
+ // that STS API operations return is not fixed. We strongly recommend that you make
+ // no assumptions about the maximum size.
+ Credentials *types.Credentials
+
+ // The value of the Issuer element of the SAML assertion.
+ Issuer *string
+
+ // A hash value based on the concatenation of the following:
+ //
+ // * The Issuer response
+ // value.
+ //
+ // * The Amazon Web Services account ID.
+ //
+ // * The friendly name (the last
+ // part of the ARN) of the SAML provider in IAM.
+ //
+ // The combination of NameQualifier
+ // and Subject can be used to uniquely identify a federated user. The following
+ // pseudocode shows how the hash value is calculated: BASE64 ( SHA1 (
+ // "https://example.com/saml" + "123456789012" + "/MySAMLIdP" ) )
+ NameQualifier *string
+
+ // 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 *int32
+
+ // The value in the SourceIdentity attribute in the SAML assertion. You can require
+ // users to set a source identity value when they assume a role. You do this by
+ // using the sts:SourceIdentity condition key in a role trust policy. That way,
+ // actions that are taken with the role are associated with that user. After the
+ // source identity is set, the value cannot be changed. It is present in the
+ // request for all actions that are taken by the role and persists across chained
+ // role
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining)
+ // sessions. You can configure your SAML identity provider to use an attribute
+ // associated with your users, like user name or email, as the source identity when
+ // calling AssumeRoleWithSAML. You do this by adding an attribute to the SAML
+ // assertion. For more information about using source identity, see Monitor and
+ // control actions taken with assumed roles
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
+ // in the IAM User Guide. The regex used to validate this parameter is a string of
+ // characters consisting of upper- and lower-case alphanumeric characters with no
+ // spaces. You can also include underscores or any of the following characters:
+ // =,.@-
+ SourceIdentity *string
+
+ // The value of the NameID element in the Subject element of the SAML assertion.
+ Subject *string
+
+ // The format of the name ID, as defined by the Format attribute in the NameID
+ // element of the SAML assertion. Typical examples of the format are transient or
+ // persistent. If the format includes the prefix
+ // urn:oasis:names:tc:SAML:2.0:nameid-format, that prefix is removed. For example,
+ // urn:oasis:names:tc:SAML:2.0:nameid-format:transient is returned as transient. If
+ // the format includes any other prefix, the format is returned with no
+ // modifications.
+ SubjectType *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoleWithSAML{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAssumeRoleWithSAML{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpAssumeRoleWithSAMLValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoleWithSAML(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opAssumeRoleWithSAML(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "sts",
+ OperationName: "AssumeRoleWithSAML",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
new file mode 100644
index 000000000..2e8b51c98
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
@@ -0,0 +1,395 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/sts/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a set of temporary security credentials for users who have been
+// authenticated in a mobile or web application with a web identity provider.
+// Example providers include the OAuth 2.0 providers Login with Amazon and
+// Facebook, or any OpenID Connect-compatible identity provider such as Google or
+// Amazon Cognito federated identities
+// (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html).
+// For mobile applications, we recommend that you use Amazon Cognito. You can use
+// Amazon Cognito with the Amazon Web Services SDK for iOS Developer Guide
+// (http://aws.amazon.com/sdkforios/) and the Amazon Web Services SDK for Android
+// Developer Guide (http://aws.amazon.com/sdkforandroid/) to uniquely identify a
+// user. You can also supply the user with a consistent identity throughout the
+// lifetime of an application. To learn more about Amazon Cognito, see Amazon
+// Cognito Overview
+// (https://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-auth.html#d0e840)
+// in Amazon Web Services SDK for Android Developer Guide and Amazon Cognito
+// Overview
+// (https://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664)
+// in the Amazon Web Services SDK for iOS Developer Guide. Calling
+// AssumeRoleWithWebIdentity does not require the use of Amazon Web Services
+// security credentials. Therefore, you can distribute an application (for example,
+// on mobile devices) that requests temporary security credentials without
+// including long-term Amazon Web Services credentials in the application. You also
+// don't need to deploy server-based proxy services that use long-term Amazon Web
+// Services credentials. Instead, the identity of the caller is validated by using
+// a token from the web identity provider. For a comparison of
+// AssumeRoleWithWebIdentity with the other API operations that produce temporary
+// credentials, see Requesting Temporary Security Credentials
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
+// and Comparing the Amazon Web Services STS API operations
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
+// in the IAM User Guide. The temporary security credentials returned by this API
+// consist of an access key ID, a secret access key, and a security token.
+// Applications can use these temporary security credentials to sign calls to
+// Amazon Web Services 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 seconds (15 minutes)
+// up to the maximum session duration setting for the role. This setting can have a
+// value from 1 hour to 12 hours. To learn how to view the maximum value for your
+// role, see View the Maximum Session Duration Setting for a Role
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
+// in the IAM User Guide. The maximum session duration limit applies when you use
+// the AssumeRole* API operations or the assume-role* CLI commands. However the
+// limit does not apply when you use those operations to create a console 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 Amazon Web
+// Services service with the following exception: you cannot call the STS
+// GetFederationToken or GetSessionToken API operations. (Optional) You can pass
+// inline or managed session policies
+// (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 plaintext that you use for both inline 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 Amazon Web
+// Services 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. 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 plaintext 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 Amazon Web Services 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 plaintext
+// 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 the identity provider that is
+// associated with the identity token. In other words, the identity provider must
+// be specified in the role's trust policy. Calling AssumeRoleWithWebIdentity can
+// result in an entry in your CloudTrail logs. The entry includes the Subject
+// (http://openid.net/specs/openid-connect-core-1_0.html#Claims) of the provided
+// web identity token. We recommend that you avoid using any personally
+// identifiable information (PII) in this field. For example, you could instead use
+// a GUID or a pairwise identifier, as suggested in the OIDC specification
+// (http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes). For more
+// information about how to use web identity federation and the
+// AssumeRoleWithWebIdentity API, see the following resources:
+//
+// * Using Web
+// Identity Federation API Operations for Mobile Apps
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html)
+// and Federation Through a Web-based Identity Provider
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity).
+//
+// *
+// Web Identity Federation Playground
+// (https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/).
+// Walk through the process of authenticating through Login with Amazon, Facebook,
+// or Google, getting temporary security credentials, and then using those
+// credentials to make a request to Amazon Web Services.
+//
+// * Amazon Web Services SDK
+// for iOS Developer Guide (http://aws.amazon.com/sdkforios/) and Amazon Web
+// Services SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/).
+// These toolkits contain sample apps that show how to invoke the identity
+// 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 how to
+// use web identity federation to get access to content in Amazon S3.
+func (c *Client) AssumeRoleWithWebIdentity(ctx context.Context, params *AssumeRoleWithWebIdentityInput, optFns ...func(*Options)) (*AssumeRoleWithWebIdentityOutput, error) {
+ if params == nil {
+ params = &AssumeRoleWithWebIdentityInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssumeRoleWithWebIdentity", params, optFns, c.addOperationAssumeRoleWithWebIdentityMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssumeRoleWithWebIdentityOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssumeRoleWithWebIdentityInput struct {
+
+ // The Amazon Resource Name (ARN) of the role that the caller is assuming.
+ //
+ // This member is required.
+ RoleArn *string
+
+ // An identifier for the assumed role session. Typically, you pass the name or
+ // identifier that is associated with the user who is using your application. That
+ // way, the temporary security credentials that your application will use are
+ // associated with that user. This session name is included as part of the ARN and
+ // assumed role ID in the AssumedRoleUser response element. The regex used to
+ // validate this parameter is a string of characters consisting of upper- and
+ // lower-case alphanumeric characters with no spaces. You can also include
+ // underscores or any of the following characters: =,.@-
+ //
+ // This member is required.
+ RoleSessionName *string
+
+ // The OAuth 2.0 access token or OpenID Connect ID token that is provided by the
+ // identity provider. Your application must get this token by authenticating the
+ // user who is using your application with a web identity provider before the
+ // application makes an AssumeRoleWithWebIdentity call.
+ //
+ // This member is required.
+ WebIdentityToken *string
+
+ // The duration, in seconds, of the role session. The value can range from 900
+ // seconds (15 minutes) up to the maximum session duration setting for the role.
+ // This setting can have a value from 1 hour to 12 hours. If you specify a value
+ // higher than this setting, the operation fails. For example, if you specify a
+ // session duration of 12 hours, but your administrator set the maximum session
+ // duration to 6 hours, your operation fails. To learn how to view the maximum
+ // value for your role, see View the Maximum Session Duration Setting for a Role
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
+ // in the IAM User Guide. By default, the value is set to 3600 seconds. The
+ // DurationSeconds parameter is separate from the duration of a console session
+ // that you might request using the returned credentials. The request to the
+ // federation endpoint for a console sign-in token takes a SessionDuration
+ // parameter that specifies the maximum length of the console session. For more
+ // information, see Creating a URL that Enables Federated Users to Access the
+ // Amazon Web Services Management Console
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
+ // in the IAM User Guide.
+ DurationSeconds *int32
+
+ // An IAM policy in JSON format that you want to use as an inline session policy.
+ // This parameter is optional. 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 Amazon Web Services 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. The plaintext that you use for both inline and managed
+ // session policies 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. An Amazon Web
+ // Services 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 plaintext 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
+
+ // The Amazon Resource Names (ARNs) of the IAM managed policies that 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 plaintext that you use for both inline and managed session
+ // policies can't exceed 2,048 characters. For more information about ARNs, see
+ // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces
+ // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in
+ // the Amazon Web Services General Reference. An Amazon Web Services 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 plaintext 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 Amazon Web Services 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 []types.PolicyDescriptorType
+
+ // The fully qualified host component of the domain name of the OAuth 2.0 identity
+ // provider. Do not specify this value for an OpenID Connect identity provider.
+ // Currently www.amazon.com and graph.facebook.com are the only supported identity
+ // providers for OAuth 2.0 access tokens. Do not include URL schemes and port
+ // numbers. Do not specify this value for OpenID Connect ID tokens.
+ ProviderId *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the response to a successful AssumeRoleWithWebIdentity request,
+// including temporary Amazon Web Services credentials that can be used to make
+// Amazon Web Services requests.
+type AssumeRoleWithWebIdentityOutput struct {
+
+ // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers
+ // that you can use to refer to the resulting temporary security credentials. For
+ // example, you can reference these credentials as a principal in a resource-based
+ // policy by using the ARN or assumed role ID. The ARN and ID include the
+ // RoleSessionName that you specified when you called AssumeRole.
+ AssumedRoleUser *types.AssumedRoleUser
+
+ // The intended audience (also known as client ID) of the web identity token. This
+ // is traditionally the client identifier issued to the application that requested
+ // the web identity token.
+ Audience *string
+
+ // The temporary security credentials, which include an access key ID, a secret
+ // access key, and a security token. The size of the security token that STS API
+ // operations return is not fixed. We strongly recommend that you make no
+ // assumptions about the maximum size.
+ Credentials *types.Credentials
+
+ // 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 *int32
+
+ // The issuing authority of the web identity token presented. For OpenID Connect ID
+ // tokens, this contains the value of the iss field. For OAuth 2.0 access tokens,
+ // this contains the value of the ProviderId parameter that was passed in the
+ // AssumeRoleWithWebIdentity request.
+ Provider *string
+
+ // The value of the source identity that is returned in the JSON web token (JWT)
+ // from the identity provider. You can require users to set a source identity value
+ // when they assume a role. You do this by using the sts:SourceIdentity condition
+ // key in a role trust policy. That way, actions that are taken with the role are
+ // associated with that user. After the source identity is set, the value cannot be
+ // changed. It is present in the request for all actions that are taken by the role
+ // and persists across chained role
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining)
+ // sessions. You can configure your identity provider to use an attribute
+ // associated with your users, like user name or email, as the source identity when
+ // calling AssumeRoleWithWebIdentity. You do this by adding a claim to the JSON web
+ // token. To learn more about OIDC tokens and claims, see Using Tokens with User
+ // Pools
+ // (https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html)
+ // in the Amazon Cognito Developer Guide. For more information about using source
+ // identity, see Monitor and control actions taken with assumed roles
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
+ // in the IAM User Guide. The regex used to validate this parameter is a string of
+ // characters consisting of upper- and lower-case alphanumeric characters with no
+ // spaces. You can also include underscores or any of the following characters:
+ // =,.@-
+ SourceIdentity *string
+
+ // The unique user identifier that is returned by the identity provider. This
+ // identifier is associated with the WebIdentityToken that was submitted with the
+ // AssumeRoleWithWebIdentity call. The identifier is typically unique to the user
+ // and the application that acquired the WebIdentityToken (pairwise identifier).
+ // For OpenID Connect ID tokens, this field contains the value returned by the
+ // identity provider as the token's sub (Subject) claim.
+ SubjectFromWebIdentityToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoleWithWebIdentity{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAssumeRoleWithWebIdentity{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpAssumeRoleWithWebIdentityValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoleWithWebIdentity(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opAssumeRoleWithWebIdentity(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "sts",
+ OperationName: "AssumeRoleWithWebIdentity",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go
new file mode 100644
index 000000000..b7a637d42
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go
@@ -0,0 +1,155 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Decodes additional information about the authorization status of a request from
+// an encoded message returned in response to an Amazon Web Services request. For
+// example, if a user is not authorized to perform an operation that he or she has
+// requested, the request returns a Client.UnauthorizedOperation response (an HTTP
+// 403 response). Some Amazon Web Services operations additionally return an
+// encoded message that can provide details about this authorization failure. Only
+// certain Amazon Web Services operations return an encoded authorization message.
+// The documentation for an individual operation indicates whether that operation
+// returns an encoded message in addition to returning an HTTP code. The message is
+// encoded because the details of the authorization status can contain privileged
+// information that the user who requested the operation should not see. To decode
+// an authorization status message, a user must be granted permissions through an
+// IAM policy
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) to
+// request the DecodeAuthorizationMessage (sts:DecodeAuthorizationMessage) action.
+// The decoded message includes the following type of information:
+//
+// * Whether the
+// request was denied due to an explicit deny or due to the absence of an explicit
+// allow. For more information, see Determining Whether a Request is Allowed or
+// Denied
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow)
+// in the IAM User Guide.
+//
+// * The principal who made the request.
+//
+// * The requested
+// action.
+//
+// * The requested resource.
+//
+// * The values of condition keys in the
+// context of the user's request.
+func (c *Client) DecodeAuthorizationMessage(ctx context.Context, params *DecodeAuthorizationMessageInput, optFns ...func(*Options)) (*DecodeAuthorizationMessageOutput, error) {
+ if params == nil {
+ params = &DecodeAuthorizationMessageInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DecodeAuthorizationMessage", params, optFns, c.addOperationDecodeAuthorizationMessageMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DecodeAuthorizationMessageOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DecodeAuthorizationMessageInput struct {
+
+ // The encoded message that was returned with the response.
+ //
+ // This member is required.
+ EncodedMessage *string
+
+ noSmithyDocumentSerde
+}
+
+// A document that contains additional information about the authorization status
+// of a request from an encoded message that is returned in response to an Amazon
+// Web Services request.
+type DecodeAuthorizationMessageOutput struct {
+
+ // The API returns a response with the decoded message.
+ DecodedMessage *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpDecodeAuthorizationMessage{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDecodeAuthorizationMessage{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpDecodeAuthorizationMessageValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDecodeAuthorizationMessage(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDecodeAuthorizationMessage(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "sts",
+ OperationName: "DecodeAuthorizationMessage",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go
new file mode 100644
index 000000000..b86a425d0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go
@@ -0,0 +1,141 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns the account identifier for the specified access key ID. Access keys
+// consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE) and a
+// secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY). For
+// more information about access keys, see Managing Access Keys for IAM Users
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)
+// in the IAM User Guide. When you pass an access key ID to this operation, it
+// returns the ID of the Amazon Web Services account to which the keys belong.
+// Access key IDs beginning with AKIA are long-term credentials for an IAM user or
+// the Amazon Web Services account root user. Access key IDs beginning with ASIA
+// are temporary credentials that are created using STS operations. If the account
+// in the response belongs to you, you can sign in as the root user and review your
+// root user access keys. Then, you can 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)
+// 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 perform an operation. Providing a deleted access key might return
+// an error that the key doesn't exist.
+func (c *Client) GetAccessKeyInfo(ctx context.Context, params *GetAccessKeyInfoInput, optFns ...func(*Options)) (*GetAccessKeyInfoOutput, error) {
+ if params == nil {
+ params = &GetAccessKeyInfoInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetAccessKeyInfo", params, optFns, c.addOperationGetAccessKeyInfoMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetAccessKeyInfoOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+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 lowercase
+ // letter or digit.
+ //
+ // This member is required.
+ AccessKeyId *string
+
+ noSmithyDocumentSerde
+}
+
+type GetAccessKeyInfoOutput struct {
+
+ // The number used to identify the Amazon Web Services account.
+ Account *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpGetAccessKeyInfo{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetAccessKeyInfo{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpGetAccessKeyInfoValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccessKeyInfo(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetAccessKeyInfo(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "sts",
+ OperationName: "GetAccessKeyInfo",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go
new file mode 100644
index 000000000..a7f96c220
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go
@@ -0,0 +1,156 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns details about the IAM user or role whose credentials are used to call
+// the operation. No permissions are required to perform this operation. If an
+// administrator adds a policy to your IAM user or role that explicitly denies
+// access to the 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)
+// in the IAM User Guide.
+func (c *Client) GetCallerIdentity(ctx context.Context, params *GetCallerIdentityInput, optFns ...func(*Options)) (*GetCallerIdentityOutput, error) {
+ if params == nil {
+ params = &GetCallerIdentityInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetCallerIdentity", params, optFns, c.addOperationGetCallerIdentityMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetCallerIdentityOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetCallerIdentityInput struct {
+ noSmithyDocumentSerde
+}
+
+// Contains the response to a successful GetCallerIdentity request, including
+// information about the entity making the request.
+type GetCallerIdentityOutput struct {
+
+ // The Amazon Web Services account ID number of the account that owns or contains
+ // the calling entity.
+ Account *string
+
+ // The Amazon Web Services ARN associated with the calling entity.
+ Arn *string
+
+ // The unique identifier of the calling entity. The exact value depends on the type
+ // of entity that is making the call. The values returned are those listed in the
+ // aws:userid column in the Principal table
+ // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable)
+ // found on the Policy Variables reference page in the IAM User Guide.
+ UserId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpGetCallerIdentity{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetCallerIdentity{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCallerIdentity(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetCallerIdentity(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "sts",
+ OperationName: "GetCallerIdentity",
+ }
+}
+
+// PresignGetCallerIdentity is used to generate a presigned HTTP Request which
+// contains presigned URL, signed headers and HTTP method used.
+func (c *PresignClient) PresignGetCallerIdentity(ctx context.Context, params *GetCallerIdentityInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) {
+ if params == nil {
+ params = &GetCallerIdentityInput{}
+ }
+ options := c.options.copy()
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption)
+
+ result, _, err := c.client.invokeOperation(ctx, "GetCallerIdentity", params, clientOptFns,
+ c.client.addOperationGetCallerIdentityMiddlewares,
+ presignConverter(options).convertToPresignMiddleware,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*v4.PresignedHTTPRequest)
+ return out, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go
new file mode 100644
index 000000000..01a3d411b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go
@@ -0,0 +1,324 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ "github.com/aws/aws-sdk-go-v2/service/sts/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a set of temporary security credentials (consisting of an access key ID,
+// a secret access key, and a security token) for a federated user. A typical use
+// is in a proxy application that gets temporary security credentials on behalf of
+// distributed applications inside a corporate network. You must call the
+// GetFederationToken operation using the long-term security credentials of an IAM
+// user. As a result, this call is appropriate in contexts where those credentials
+// can be safely stored, usually in a server-based application. For a comparison of
+// GetFederationToken with the other API operations that produce temporary
+// credentials, see Requesting Temporary Security Credentials
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
+// and Comparing the Amazon Web Services STS API operations
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
+// in the IAM User Guide. You can create a mobile-based or browser-based app that
+// can authenticate users using a web identity provider like Login with Amazon,
+// Facebook, Google, 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)
+// in the IAM User Guide. You can also call GetFederationToken using the security
+// credentials of an Amazon Web Services account root user, but we do not recommend
+// it. Instead, we recommend that you create an IAM user for the purpose of the
+// proxy application. Then attach a policy to the IAM user that limits federated
+// users to only the actions and resources that they need to access. For more
+// information, see IAM Best 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 session duration is 43,200 seconds (12 hours).
+// Temporary credentials obtained by using the Amazon Web Services account root
+// user credentials have a maximum duration of 3,600 seconds (1 hour). Permissions
+// You can use the temporary credentials created by GetFederationToken in any
+// Amazon Web Services service except the following:
+//
+// * You cannot call any IAM
+// operations using the CLI or the Amazon Web Services API.
+//
+// * 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 plaintext that you use for both inline 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. 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. You can create a mobile-based or browser-based app that can
+// authenticate users using a web identity provider like Login with Amazon,
+// Facebook, Google, 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)
+// 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.
+func (c *Client) GetFederationToken(ctx context.Context, params *GetFederationTokenInput, optFns ...func(*Options)) (*GetFederationTokenOutput, error) {
+ if params == nil {
+ params = &GetFederationTokenInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetFederationToken", params, optFns, c.addOperationGetFederationTokenMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetFederationTokenOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetFederationTokenInput struct {
+
+ // The name of the federated user. The name is used as an identifier for the
+ // temporary security credentials (such as Bob). For example, you can reference the
+ // federated user name in a resource-based policy, such as in an Amazon S3 bucket
+ // policy. The regex used to validate this parameter is a string of characters
+ // consisting of upper- and lower-case alphanumeric characters with no spaces. You
+ // can also include underscores or any of the following characters: =,.@-
+ //
+ // This member is required.
+ Name *string
+
+ // The duration, in seconds, that the session should last. Acceptable durations for
+ // federation sessions range from 900 seconds (15 minutes) to 129,600 seconds (36
+ // hours), with 43,200 seconds (12 hours) as the default. Sessions obtained using
+ // Amazon Web Services account root user credentials are restricted to a maximum of
+ // 3,600 seconds (one hour). If the specified duration is longer than one hour, the
+ // session obtained by using root user credentials defaults to one hour.
+ DurationSeconds *int32
+
+ // An IAM policy in JSON format that you want to use as an inline session policy.
+ // 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. This parameter is optional. However, if you do not
+ // pass any session policies, 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. 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 plaintext that you use for both inline and managed session policies 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. An Amazon Web Services 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 plaintext
+ // 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
+
+ // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
+ // use as a managed session policy. The policies must exist in the same account as
+ // the IAM user that is requesting federated access. 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 plaintext that you use for both inline 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 Amazon Web Services Service Namespaces
+ // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in
+ // the Amazon Web Services General Reference. This parameter is optional. However,
+ // if you do not pass any session policies, 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. 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 Amazon Web Services 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 plaintext 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 []types.PolicyDescriptorType
+
+ // 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 plaintext 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 Amazon Web Services 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 plaintext
+ // 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 []types.Tag
+
+ noSmithyDocumentSerde
+}
+
+// Contains the response to a successful GetFederationToken request, including
+// temporary Amazon Web Services credentials that can be used to make Amazon Web
+// Services requests.
+type GetFederationTokenOutput struct {
+
+ // The temporary security credentials, which include an access key ID, a secret
+ // access key, and a security (or session) token. The size of the security token
+ // that STS API operations return is not fixed. We strongly recommend that you make
+ // no assumptions about the maximum size.
+ Credentials *types.Credentials
+
+ // Identifiers for the federated user associated with the credentials (such as
+ // arn:aws:sts::123456789012:federated-user/Bob or 123456789012:Bob). You can use
+ // the federated user's ARN in your resource-based policies, such as an Amazon S3
+ // bucket policy.
+ FederatedUser *types.FederatedUser
+
+ // 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 *int32
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpGetFederationToken{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetFederationToken{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addOpGetFederationTokenValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFederationToken(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetFederationToken(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "sts",
+ OperationName: "GetFederationToken",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go
new file mode 100644
index 000000000..bfde51689
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go
@@ -0,0 +1,201 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "context"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ "github.com/aws/aws-sdk-go-v2/service/sts/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a set of temporary credentials for an Amazon Web Services account or IAM
+// user. The credentials consist of an access key ID, a secret access key, and a
+// security token. Typically, you use GetSessionToken if you want to use MFA to
+// protect programmatic calls to specific Amazon Web Services API operations like
+// Amazon EC2 StopInstances. MFA-enabled IAM users would need to call
+// GetSessionToken and submit an MFA code that is associated with their MFA device.
+// Using the temporary security credentials that are returned from the call, IAM
+// users can then make programmatic calls to API operations that require MFA
+// authentication. If you do not supply a correct MFA code, then the API returns an
+// access denied error. For a comparison of GetSessionToken with the other API
+// operations that produce temporary credentials, see Requesting Temporary Security
+// Credentials
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
+// and Comparing the Amazon Web Services STS API operations
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
+// in the IAM User Guide. No permissions are required for users to perform this
+// operation. The purpose of the sts:GetSessionToken operation is to authenticate
+// the user using MFA. You cannot use policies to control authentication
+// operations. For more information, see Permissions for GetSessionToken
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html)
+// in the IAM User Guide. Session Duration The GetSessionToken operation must be
+// called by using the long-term Amazon Web Services security credentials of the
+// Amazon Web Services account root user or an IAM user. Credentials that are
+// created by IAM users are valid for the duration that you specify. This duration
+// can range from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36
+// hours), with a default of 43,200 seconds (12 hours). Credentials 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
+// Amazon Web Services service with the following exceptions:
+//
+// * You cannot call
+// any IAM API operations unless MFA authentication information is included in the
+// request.
+//
+// * You cannot call any STS API except AssumeRole or
+// GetCallerIdentity.
+//
+// We recommend that you do not call GetSessionToken with
+// Amazon Web Services account root user credentials. Instead, follow our best
+// practices
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users)
+// by creating one or more IAM users, giving them the necessary permissions, and
+// using IAM users for everyday interaction with Amazon Web Services. The
+// credentials that are returned by GetSessionToken are based on permissions
+// associated with the user whose credentials were used to call the operation. If
+// GetSessionToken is called using Amazon Web Services account root user
+// credentials, the temporary credentials have root user permissions. Similarly, if
+// GetSessionToken is called using the credentials of an IAM user, the temporary
+// credentials have the same permissions as the IAM user. For more information
+// about using GetSessionToken to create temporary credentials, go to Temporary
+// Credentials for Users in Untrusted Environments
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken)
+// in the IAM User Guide.
+func (c *Client) GetSessionToken(ctx context.Context, params *GetSessionTokenInput, optFns ...func(*Options)) (*GetSessionTokenOutput, error) {
+ if params == nil {
+ params = &GetSessionTokenInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetSessionToken", params, optFns, c.addOperationGetSessionTokenMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetSessionTokenOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetSessionTokenInput struct {
+
+ // The duration, in seconds, that the credentials should remain valid. Acceptable
+ // durations for IAM user sessions range from 900 seconds (15 minutes) to 129,600
+ // seconds (36 hours), with 43,200 seconds (12 hours) as the default. Sessions for
+ // Amazon Web Services account owners are restricted to a maximum of 3,600 seconds
+ // (one hour). If the duration is longer than one hour, the session for Amazon Web
+ // Services account owners defaults to one hour.
+ DurationSeconds *int32
+
+ // The identification number of the MFA device that is associated with the IAM user
+ // who is making the GetSessionToken call. Specify this value if the IAM user has a
+ // policy that requires MFA authentication. The value is either the serial number
+ // for a hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN)
+ // for a virtual device (such as arn:aws:iam::123456789012:mfa/user). You can find
+ // the device for an IAM user by going to the Amazon Web Services Management
+ // Console and viewing the user's security credentials. The regex used to validate
+ // this parameter is a string of characters consisting of upper- and lower-case
+ // alphanumeric characters with no spaces. You can also include underscores or any
+ // of the following characters: =,.@:/-
+ SerialNumber *string
+
+ // The value provided by the MFA device, if MFA is required. If any policy requires
+ // the IAM user to submit an MFA code, specify this value. If MFA authentication is
+ // required, the user must provide a code when requesting a set of temporary
+ // security credentials. A user who fails to provide the code receives an "access
+ // denied" response when requesting resources that require MFA authentication. The
+ // format for this parameter, as described by its regex pattern, is a sequence of
+ // six numeric digits.
+ TokenCode *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains the response to a successful GetSessionToken request, including
+// temporary Amazon Web Services credentials that can be used to make Amazon Web
+// Services requests.
+type GetSessionTokenOutput struct {
+
+ // The temporary security credentials, which include an access key ID, a secret
+ // access key, and a security (or session) token. The size of the security token
+ // that STS API operations return is not fixed. We strongly recommend that you make
+ // no assumptions about the maximum size.
+ Credentials *types.Credentials
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpGetSessionToken{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetSessionToken{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
+ return err
+ }
+ if err = addRetryMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addHTTPSignerV4Middleware(stack, options); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSessionToken(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetSessionToken(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ SigningName: "sts",
+ OperationName: "GetSessionToken",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go
new file mode 100644
index 000000000..5d634ce35
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go
@@ -0,0 +1,2507 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "bytes"
+ "context"
+ "encoding/xml"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ awsxml "github.com/aws/aws-sdk-go-v2/aws/protocol/xml"
+ "github.com/aws/aws-sdk-go-v2/service/sts/types"
+ smithy "github.com/aws/smithy-go"
+ smithyxml "github.com/aws/smithy-go/encoding/xml"
+ smithyio "github.com/aws/smithy-go/io"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithytime "github.com/aws/smithy-go/time"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+ "strconv"
+ "strings"
+)
+
+type awsAwsquery_deserializeOpAssumeRole struct {
+}
+
+func (*awsAwsquery_deserializeOpAssumeRole) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpAssumeRole) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsquery_deserializeOpErrorAssumeRole(response, &metadata)
+ }
+ output := &AssumeRoleOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("AssumeRoleResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentAssumeRoleOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorAssumeRole(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ if err != nil {
+ return err
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("ExpiredTokenException", errorCode):
+ return awsAwsquery_deserializeErrorExpiredTokenException(response, errorBody)
+
+ case strings.EqualFold("MalformedPolicyDocument", errorCode):
+ return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody)
+
+ case strings.EqualFold("PackedPolicyTooLarge", errorCode):
+ return awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response, errorBody)
+
+ case strings.EqualFold("RegionDisabledException", errorCode):
+ return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpAssumeRoleWithSAML struct {
+}
+
+func (*awsAwsquery_deserializeOpAssumeRoleWithSAML) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpAssumeRoleWithSAML) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsquery_deserializeOpErrorAssumeRoleWithSAML(response, &metadata)
+ }
+ output := &AssumeRoleWithSAMLOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("AssumeRoleWithSAMLResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentAssumeRoleWithSAMLOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorAssumeRoleWithSAML(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ if err != nil {
+ return err
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("ExpiredTokenException", errorCode):
+ return awsAwsquery_deserializeErrorExpiredTokenException(response, errorBody)
+
+ case strings.EqualFold("IDPRejectedClaim", errorCode):
+ return awsAwsquery_deserializeErrorIDPRejectedClaimException(response, errorBody)
+
+ case strings.EqualFold("InvalidIdentityToken", errorCode):
+ return awsAwsquery_deserializeErrorInvalidIdentityTokenException(response, errorBody)
+
+ case strings.EqualFold("MalformedPolicyDocument", errorCode):
+ return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody)
+
+ case strings.EqualFold("PackedPolicyTooLarge", errorCode):
+ return awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response, errorBody)
+
+ case strings.EqualFold("RegionDisabledException", errorCode):
+ return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpAssumeRoleWithWebIdentity struct {
+}
+
+func (*awsAwsquery_deserializeOpAssumeRoleWithWebIdentity) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpAssumeRoleWithWebIdentity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsquery_deserializeOpErrorAssumeRoleWithWebIdentity(response, &metadata)
+ }
+ output := &AssumeRoleWithWebIdentityOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("AssumeRoleWithWebIdentityResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentAssumeRoleWithWebIdentityOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorAssumeRoleWithWebIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ if err != nil {
+ return err
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("ExpiredTokenException", errorCode):
+ return awsAwsquery_deserializeErrorExpiredTokenException(response, errorBody)
+
+ case strings.EqualFold("IDPCommunicationError", errorCode):
+ return awsAwsquery_deserializeErrorIDPCommunicationErrorException(response, errorBody)
+
+ case strings.EqualFold("IDPRejectedClaim", errorCode):
+ return awsAwsquery_deserializeErrorIDPRejectedClaimException(response, errorBody)
+
+ case strings.EqualFold("InvalidIdentityToken", errorCode):
+ return awsAwsquery_deserializeErrorInvalidIdentityTokenException(response, errorBody)
+
+ case strings.EqualFold("MalformedPolicyDocument", errorCode):
+ return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody)
+
+ case strings.EqualFold("PackedPolicyTooLarge", errorCode):
+ return awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response, errorBody)
+
+ case strings.EqualFold("RegionDisabledException", errorCode):
+ return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpDecodeAuthorizationMessage struct {
+}
+
+func (*awsAwsquery_deserializeOpDecodeAuthorizationMessage) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpDecodeAuthorizationMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsquery_deserializeOpErrorDecodeAuthorizationMessage(response, &metadata)
+ }
+ output := &DecodeAuthorizationMessageOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("DecodeAuthorizationMessageResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentDecodeAuthorizationMessageOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorDecodeAuthorizationMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ if err != nil {
+ return err
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("InvalidAuthorizationMessageException", errorCode):
+ return awsAwsquery_deserializeErrorInvalidAuthorizationMessageException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpGetAccessKeyInfo struct {
+}
+
+func (*awsAwsquery_deserializeOpGetAccessKeyInfo) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpGetAccessKeyInfo) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsquery_deserializeOpErrorGetAccessKeyInfo(response, &metadata)
+ }
+ output := &GetAccessKeyInfoOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("GetAccessKeyInfoResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentGetAccessKeyInfoOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorGetAccessKeyInfo(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ if err != nil {
+ return err
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpGetCallerIdentity struct {
+}
+
+func (*awsAwsquery_deserializeOpGetCallerIdentity) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpGetCallerIdentity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsquery_deserializeOpErrorGetCallerIdentity(response, &metadata)
+ }
+ output := &GetCallerIdentityOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("GetCallerIdentityResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentGetCallerIdentityOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorGetCallerIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ if err != nil {
+ return err
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpGetFederationToken struct {
+}
+
+func (*awsAwsquery_deserializeOpGetFederationToken) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpGetFederationToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsquery_deserializeOpErrorGetFederationToken(response, &metadata)
+ }
+ output := &GetFederationTokenOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("GetFederationTokenResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentGetFederationTokenOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorGetFederationToken(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ if err != nil {
+ return err
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("MalformedPolicyDocument", errorCode):
+ return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody)
+
+ case strings.EqualFold("PackedPolicyTooLarge", errorCode):
+ return awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response, errorBody)
+
+ case strings.EqualFold("RegionDisabledException", errorCode):
+ return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsquery_deserializeOpGetSessionToken struct {
+}
+
+func (*awsAwsquery_deserializeOpGetSessionToken) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpGetSessionToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsquery_deserializeOpErrorGetSessionToken(response, &metadata)
+ }
+ output := &GetSessionTokenOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("GetSessionTokenResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentGetSessionTokenOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorGetSessionToken(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ if err != nil {
+ return err
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("RegionDisabledException", errorCode):
+ return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsAwsquery_deserializeErrorExpiredTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ExpiredTokenException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(errorBody, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return output
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("Error")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeDocumentExpiredTokenException(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return output
+}
+
+func awsAwsquery_deserializeErrorIDPCommunicationErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.IDPCommunicationErrorException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(errorBody, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return output
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("Error")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeDocumentIDPCommunicationErrorException(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return output
+}
+
+func awsAwsquery_deserializeErrorIDPRejectedClaimException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.IDPRejectedClaimException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(errorBody, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return output
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("Error")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeDocumentIDPRejectedClaimException(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return output
+}
+
+func awsAwsquery_deserializeErrorInvalidAuthorizationMessageException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidAuthorizationMessageException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(errorBody, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return output
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("Error")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeDocumentInvalidAuthorizationMessageException(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return output
+}
+
+func awsAwsquery_deserializeErrorInvalidIdentityTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidIdentityTokenException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(errorBody, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return output
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("Error")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeDocumentInvalidIdentityTokenException(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return output
+}
+
+func awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.MalformedPolicyDocumentException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(errorBody, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return output
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("Error")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeDocumentMalformedPolicyDocumentException(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return output
+}
+
+func awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.PackedPolicyTooLargeException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(errorBody, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return output
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("Error")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeDocumentPackedPolicyTooLargeException(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return output
+}
+
+func awsAwsquery_deserializeErrorRegionDisabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.RegionDisabledException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(errorBody, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return output
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("Error")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeDocumentRegionDisabledException(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ return output
+}
+
+func awsAwsquery_deserializeDocumentAssumedRoleUser(v **types.AssumedRoleUser, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.AssumedRoleUser
+ if *v == nil {
+ sv = &types.AssumedRoleUser{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Arn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Arn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("AssumedRoleId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AssumedRoleId = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeDocumentCredentials(v **types.Credentials, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.Credentials
+ if *v == nil {
+ sv = &types.Credentials{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AccessKeyId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AccessKeyId = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Expiration", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
+ if err != nil {
+ return err
+ }
+ sv.Expiration = ptr.Time(t)
+ }
+
+ case strings.EqualFold("SecretAccessKey", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SecretAccessKey = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("SessionToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SessionToken = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeDocumentExpiredTokenException(v **types.ExpiredTokenException, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ExpiredTokenException
+ if *v == nil {
+ sv = &types.ExpiredTokenException{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("message", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Message = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeDocumentFederatedUser(v **types.FederatedUser, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.FederatedUser
+ if *v == nil {
+ sv = &types.FederatedUser{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Arn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Arn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("FederatedUserId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.FederatedUserId = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeDocumentIDPCommunicationErrorException(v **types.IDPCommunicationErrorException, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.IDPCommunicationErrorException
+ if *v == nil {
+ sv = &types.IDPCommunicationErrorException{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("message", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Message = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeDocumentIDPRejectedClaimException(v **types.IDPRejectedClaimException, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.IDPRejectedClaimException
+ if *v == nil {
+ sv = &types.IDPRejectedClaimException{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("message", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Message = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeDocumentInvalidAuthorizationMessageException(v **types.InvalidAuthorizationMessageException, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InvalidAuthorizationMessageException
+ if *v == nil {
+ sv = &types.InvalidAuthorizationMessageException{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("message", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Message = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeDocumentInvalidIdentityTokenException(v **types.InvalidIdentityTokenException, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InvalidIdentityTokenException
+ if *v == nil {
+ sv = &types.InvalidIdentityTokenException{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("message", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Message = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeDocumentMalformedPolicyDocumentException(v **types.MalformedPolicyDocumentException, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.MalformedPolicyDocumentException
+ if *v == nil {
+ sv = &types.MalformedPolicyDocumentException{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("message", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Message = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeDocumentPackedPolicyTooLargeException(v **types.PackedPolicyTooLargeException, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.PackedPolicyTooLargeException
+ if *v == nil {
+ sv = &types.PackedPolicyTooLargeException{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("message", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Message = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeDocumentRegionDisabledException(v **types.RegionDisabledException, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.RegionDisabledException
+ if *v == nil {
+ sv = &types.RegionDisabledException{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("message", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Message = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeOpDocumentAssumeRoleOutput(v **AssumeRoleOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssumeRoleOutput
+ if *v == nil {
+ sv = &AssumeRoleOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AssumedRoleUser", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentAssumedRoleUser(&sv.AssumedRoleUser, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Credentials", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("PackedPolicySize", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.PackedPolicySize = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("SourceIdentity", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SourceIdentity = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeOpDocumentAssumeRoleWithSAMLOutput(v **AssumeRoleWithSAMLOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssumeRoleWithSAMLOutput
+ if *v == nil {
+ sv = &AssumeRoleWithSAMLOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AssumedRoleUser", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentAssumedRoleUser(&sv.AssumedRoleUser, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Audience", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Audience = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Credentials", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Issuer", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Issuer = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("NameQualifier", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.NameQualifier = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("PackedPolicySize", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.PackedPolicySize = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("SourceIdentity", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SourceIdentity = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Subject", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Subject = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("SubjectType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubjectType = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeOpDocumentAssumeRoleWithWebIdentityOutput(v **AssumeRoleWithWebIdentityOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssumeRoleWithWebIdentityOutput
+ if *v == nil {
+ sv = &AssumeRoleWithWebIdentityOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AssumedRoleUser", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentAssumedRoleUser(&sv.AssumedRoleUser, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Audience", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Audience = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Credentials", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("PackedPolicySize", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.PackedPolicySize = ptr.Int32(int32(i64))
+ }
+
+ case strings.EqualFold("Provider", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Provider = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("SourceIdentity", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SourceIdentity = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("SubjectFromWebIdentityToken", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SubjectFromWebIdentityToken = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeOpDocumentDecodeAuthorizationMessageOutput(v **DecodeAuthorizationMessageOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *DecodeAuthorizationMessageOutput
+ if *v == nil {
+ sv = &DecodeAuthorizationMessageOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("DecodedMessage", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.DecodedMessage = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeOpDocumentGetAccessKeyInfoOutput(v **GetAccessKeyInfoOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetAccessKeyInfoOutput
+ if *v == nil {
+ sv = &GetAccessKeyInfoOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Account", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Account = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeOpDocumentGetCallerIdentityOutput(v **GetCallerIdentityOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetCallerIdentityOutput
+ if *v == nil {
+ sv = &GetCallerIdentityOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Account", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Account = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Arn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Arn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("UserId", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.UserId = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeOpDocumentGetFederationTokenOutput(v **GetFederationTokenOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetFederationTokenOutput
+ if *v == nil {
+ sv = &GetFederationTokenOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Credentials", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("FederatedUser", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentFederatedUser(&sv.FederatedUser, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("PackedPolicySize", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ i64, err := strconv.ParseInt(xtv, 10, 64)
+ if err != nil {
+ return err
+ }
+ sv.PackedPolicySize = ptr.Int32(int32(i64))
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsquery_deserializeOpDocumentGetSessionTokenOutput(v **GetSessionTokenOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetSessionTokenOutput
+ if *v == nil {
+ sv = &GetSessionTokenOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Credentials", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go
new file mode 100644
index 000000000..7cabbb97e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go
@@ -0,0 +1,12 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+// Package sts provides the API client, operations, and parameter types for AWS
+// Security Token Service.
+//
+// Security Token Service Security Token Service (STS) enables you to request
+// temporary, limited-privilege credentials for Identity and Access Management
+// (IAM) users or for users that you authenticate (federated users). This guide
+// provides descriptions of the STS API. For more information about using this
+// service, see Temporary Security Credentials
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html).
+package sts
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go
new file mode 100644
index 000000000..cababea22
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go
@@ -0,0 +1,200 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalendpoints "github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/url"
+ "strings"
+)
+
+// EndpointResolverOptions is the service endpoint resolver options
+type EndpointResolverOptions = internalendpoints.Options
+
+// EndpointResolver interface for resolving service endpoints.
+type EndpointResolver interface {
+ ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+}
+
+var _ EndpointResolver = &internalendpoints.Resolver{}
+
+// NewDefaultEndpointResolver constructs a new service endpoint resolver
+func NewDefaultEndpointResolver() *internalendpoints.Resolver {
+ return internalendpoints.New()
+}
+
+// EndpointResolverFunc is a helper utility that wraps a function so it satisfies
+// the EndpointResolver interface. This is useful when you want to add additional
+// endpoint resolving logic, or stub out specific endpoints with custom values.
+type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+
+func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ return fn(region, options)
+}
+
+func resolveDefaultEndpointConfiguration(o *Options) {
+ if o.EndpointResolver != nil {
+ return
+ }
+ o.EndpointResolver = NewDefaultEndpointResolver()
+}
+
+// EndpointResolverFromURL returns an EndpointResolver configured using the
+// provided endpoint url. By default, the resolved endpoint resolver uses the
+// client region as signing region, and the endpoint source is set to
+// EndpointSourceCustom.You can provide functional options to configure endpoint
+// values for the resolved endpoint.
+func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver {
+ e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom}
+ for _, fn := range optFns {
+ fn(&e)
+ }
+
+ return EndpointResolverFunc(
+ func(region string, options EndpointResolverOptions) (aws.Endpoint, error) {
+ if len(e.SigningRegion) == 0 {
+ e.SigningRegion = region
+ }
+ return e, nil
+ },
+ )
+}
+
+type ResolveEndpoint struct {
+ Resolver EndpointResolver
+ Options EndpointResolverOptions
+}
+
+func (*ResolveEndpoint) ID() string {
+ return "ResolveEndpoint"
+}
+
+func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.Resolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ eo := m.Options
+ eo.Logger = middleware.GetLogger(ctx)
+
+ var endpoint aws.Endpoint
+ endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL, err = url.Parse(endpoint.URL)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err)
+ }
+
+ if len(awsmiddleware.GetSigningName(ctx)) == 0 {
+ signingName := endpoint.SigningName
+ if len(signingName) == 0 {
+ signingName = "sts"
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ }
+ ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source)
+ ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable)
+ ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
+ ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID)
+ return next.HandleSerialize(ctx, in)
+}
+func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Serialize.Insert(&ResolveEndpoint{
+ Resolver: o.EndpointResolver,
+ Options: o.EndpointOptions,
+ }, "OperationSerializer", middleware.Before)
+}
+
+func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
+ _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID())
+ return err
+}
+
+type wrappedEndpointResolver struct {
+ awsResolver aws.EndpointResolverWithOptions
+ resolver EndpointResolver
+}
+
+func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ if w.awsResolver == nil {
+ goto fallback
+ }
+ endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options)
+ if err == nil {
+ return endpoint, nil
+ }
+
+ if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) {
+ return endpoint, err
+ }
+
+fallback:
+ if w.resolver == nil {
+ return endpoint, fmt.Errorf("default endpoint resolver provided was nil")
+ }
+ return w.resolver.ResolveEndpoint(region, options)
+}
+
+type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
+
+func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) {
+ return a(service, region)
+}
+
+var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
+
+// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver.
+// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided
+// fallbackResolver for resolution.
+//
+// fallbackResolver must not be nil
+func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver {
+ var resolver aws.EndpointResolverWithOptions
+
+ if awsResolverWithOptions != nil {
+ resolver = awsResolverWithOptions
+ } else if awsResolver != nil {
+ resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint)
+ }
+
+ return &wrappedEndpointResolver{
+ awsResolver: resolver,
+ resolver: fallbackResolver,
+ }
+}
+
+func finalizeClientEndpointResolverOptions(options *Options) {
+ options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage()
+
+ if len(options.EndpointOptions.ResolvedRegion) == 0 {
+ const fipsInfix = "-fips-"
+ const fipsPrefix = "fips-"
+ const fipsSuffix = "-fips"
+
+ if strings.Contains(options.Region, fipsInfix) ||
+ strings.Contains(options.Region, fipsPrefix) ||
+ strings.Contains(options.Region, fipsSuffix) {
+ options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
+ options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
+ options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled
+ }
+ }
+
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json
new file mode 100644
index 000000000..86341bb7d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json
@@ -0,0 +1,35 @@
+{
+ "dependencies": {
+ "github.com/aws/aws-sdk-go-v2": "v1.4.0",
+ "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000",
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000",
+ "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url": "v1.0.7",
+ "github.com/aws/smithy-go": "v1.4.0"
+ },
+ "files": [
+ "api_client.go",
+ "api_client_test.go",
+ "api_op_AssumeRole.go",
+ "api_op_AssumeRoleWithSAML.go",
+ "api_op_AssumeRoleWithWebIdentity.go",
+ "api_op_DecodeAuthorizationMessage.go",
+ "api_op_GetAccessKeyInfo.go",
+ "api_op_GetCallerIdentity.go",
+ "api_op_GetFederationToken.go",
+ "api_op_GetSessionToken.go",
+ "deserializers.go",
+ "doc.go",
+ "endpoints.go",
+ "generated.json",
+ "internal/endpoints/endpoints.go",
+ "internal/endpoints/endpoints_test.go",
+ "protocol_test.go",
+ "serializers.go",
+ "types/errors.go",
+ "types/types.go",
+ "validators.go"
+ ],
+ "go": "1.15",
+ "module": "github.com/aws/aws-sdk-go-v2/service/sts",
+ "unstable": false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
new file mode 100644
index 000000000..9b9e052e3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package sts
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.16.19"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go
new file mode 100644
index 000000000..d061a4e99
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go
@@ -0,0 +1,448 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package endpoints
+
+import (
+ "github.com/aws/aws-sdk-go-v2/aws"
+ endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
+ "github.com/aws/smithy-go/logging"
+ "regexp"
+)
+
+// Options is the endpoint resolver configuration options
+type Options struct {
+ // Logger is a logging implementation that log events should be sent to.
+ Logger logging.Logger
+
+ // LogDeprecated indicates that deprecated endpoints should be logged to the
+ // provided logger.
+ LogDeprecated bool
+
+ // ResolvedRegion is used to override the region to be resolved, rather then the
+ // using the value passed to the ResolveEndpoint method. This value is used by the
+ // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative
+ // name. You must not set this value directly in your application.
+ ResolvedRegion string
+
+ // DisableHTTPS informs the resolver to return an endpoint that does not use the
+ // HTTPS scheme.
+ DisableHTTPS bool
+
+ // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint.
+ UseDualStackEndpoint aws.DualStackEndpointState
+
+ // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
+ UseFIPSEndpoint aws.FIPSEndpointState
+}
+
+func (o Options) GetResolvedRegion() string {
+ return o.ResolvedRegion
+}
+
+func (o Options) GetDisableHTTPS() bool {
+ return o.DisableHTTPS
+}
+
+func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState {
+ return o.UseDualStackEndpoint
+}
+
+func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState {
+ return o.UseFIPSEndpoint
+}
+
+func transformToSharedOptions(options Options) endpoints.Options {
+ return endpoints.Options{
+ Logger: options.Logger,
+ LogDeprecated: options.LogDeprecated,
+ ResolvedRegion: options.ResolvedRegion,
+ DisableHTTPS: options.DisableHTTPS,
+ UseDualStackEndpoint: options.UseDualStackEndpoint,
+ UseFIPSEndpoint: options.UseFIPSEndpoint,
+ }
+}
+
+// Resolver STS endpoint resolver
+type Resolver struct {
+ partitions endpoints.Partitions
+}
+
+// ResolveEndpoint resolves the service endpoint for the given region and options
+func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) {
+ if len(region) == 0 {
+ return endpoint, &aws.MissingRegionError{}
+ }
+
+ opt := transformToSharedOptions(options)
+ return r.partitions.ResolveEndpoint(region, opt)
+}
+
+// New returns a new Resolver
+func New() *Resolver {
+ return &Resolver{
+ partitions: defaultPartitions,
+ }
+}
+
+var partitionRegexp = struct {
+ Aws *regexp.Regexp
+ AwsCn *regexp.Regexp
+ AwsIso *regexp.Regexp
+ AwsIsoB *regexp.Regexp
+ AwsUsGov *regexp.Regexp
+}{
+
+ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"),
+ AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
+ AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
+ AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
+ AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
+}
+
+var defaultPartitions = endpoints.Partitions{
+ {
+ ID: "aws",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "sts.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sts-fips.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "sts-fips.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "sts.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.Aws,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "af-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-northeast-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-northeast-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-northeast-3",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-3",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "aws-global",
+ }: endpoints.Endpoint{
+ Hostname: "sts.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-1",
+ },
+ },
+ endpoints.EndpointKey{
+ Region: "ca-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-north-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-west-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-west-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-west-3",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "me-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "me-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "sa-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sts-fips.us-east-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "sts-fips.us-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-east-2",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sts-fips.us-east-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-2-fips",
+ }: endpoints.Endpoint{
+ Hostname: "sts-fips.us-east-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-west-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sts-fips.us-west-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "sts-fips.us-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-west-2",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sts-fips.us-west-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-2-fips",
+ }: endpoints.Endpoint{
+ Hostname: "sts-fips.us-west-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ },
+ },
+ {
+ ID: "aws-cn",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "sts.{region}.api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sts-fips.{region}.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "sts-fips.{region}.api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "sts.{region}.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsCn,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "cn-north-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "cn-northwest-1",
+ }: endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-iso",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sts-fips.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "sts.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIso,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "us-iso-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-iso-west-1",
+ }: endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-iso-b",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sts-fips.{region}.sc2s.sgov.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "sts.{region}.sc2s.sgov.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoB,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "us-isob-east-1",
+ }: endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-us-gov",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "sts.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sts.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "sts-fips.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "sts.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsUsGov,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "us-gov-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-gov-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sts.us-gov-east-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "sts.us-gov-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-west-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-gov-west-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "sts.us-gov-west-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "sts.us-gov-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ },
+ },
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go
new file mode 100644
index 000000000..05531d369
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go
@@ -0,0 +1,835 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/query"
+ "github.com/aws/aws-sdk-go-v2/service/sts/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/encoding/httpbinding"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "path"
+)
+
+type awsAwsquery_serializeOpAssumeRole struct {
+}
+
+func (*awsAwsquery_serializeOpAssumeRole) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpAssumeRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*AssumeRoleInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssumeRole")
+ body.Key("Version").String("2011-06-15")
+
+ if err := awsAwsquery_serializeOpDocumentAssumeRoleInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpAssumeRoleWithSAML struct {
+}
+
+func (*awsAwsquery_serializeOpAssumeRoleWithSAML) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpAssumeRoleWithSAML) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*AssumeRoleWithSAMLInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssumeRoleWithSAML")
+ body.Key("Version").String("2011-06-15")
+
+ if err := awsAwsquery_serializeOpDocumentAssumeRoleWithSAMLInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpAssumeRoleWithWebIdentity struct {
+}
+
+func (*awsAwsquery_serializeOpAssumeRoleWithWebIdentity) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpAssumeRoleWithWebIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*AssumeRoleWithWebIdentityInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssumeRoleWithWebIdentity")
+ body.Key("Version").String("2011-06-15")
+
+ if err := awsAwsquery_serializeOpDocumentAssumeRoleWithWebIdentityInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpDecodeAuthorizationMessage struct {
+}
+
+func (*awsAwsquery_serializeOpDecodeAuthorizationMessage) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpDecodeAuthorizationMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DecodeAuthorizationMessageInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("DecodeAuthorizationMessage")
+ body.Key("Version").String("2011-06-15")
+
+ if err := awsAwsquery_serializeOpDocumentDecodeAuthorizationMessageInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpGetAccessKeyInfo struct {
+}
+
+func (*awsAwsquery_serializeOpGetAccessKeyInfo) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpGetAccessKeyInfo) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetAccessKeyInfoInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetAccessKeyInfo")
+ body.Key("Version").String("2011-06-15")
+
+ if err := awsAwsquery_serializeOpDocumentGetAccessKeyInfoInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpGetCallerIdentity struct {
+}
+
+func (*awsAwsquery_serializeOpGetCallerIdentity) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpGetCallerIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetCallerIdentityInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetCallerIdentity")
+ body.Key("Version").String("2011-06-15")
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpGetFederationToken struct {
+}
+
+func (*awsAwsquery_serializeOpGetFederationToken) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpGetFederationToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetFederationTokenInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetFederationToken")
+ body.Key("Version").String("2011-06-15")
+
+ if err := awsAwsquery_serializeOpDocumentGetFederationTokenInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsquery_serializeOpGetSessionToken struct {
+}
+
+func (*awsAwsquery_serializeOpGetSessionToken) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpGetSessionToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetSessionTokenInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("GetSessionToken")
+ body.Key("Version").String("2011-06-15")
+
+ if err := awsAwsquery_serializeOpDocumentGetSessionTokenInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ return next.HandleSerialize(ctx, in)
+}
+func awsAwsquery_serializeDocumentPolicyDescriptorListType(v []types.PolicyDescriptorType, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsAwsquery_serializeDocumentPolicyDescriptorType(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentPolicyDescriptorType(v *types.PolicyDescriptorType, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Arn != nil {
+ objectKey := object.Key("arn")
+ objectKey.String(*v.Arn)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentTag(v *types.Tag, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.Key != nil {
+ objectKey := object.Key("Key")
+ objectKey.String(*v.Key)
+ }
+
+ if v.Value != nil {
+ objectKey := object.Key("Value")
+ objectKey.String(*v.Value)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeDocumentTagKeyListType(v []string, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsquery_serializeDocumentTagListType(v []types.Tag, value query.Value) error {
+ if len(v) == 0 {
+ return nil
+ }
+ array := value.Array("member")
+
+ for i := range v {
+ av := array.Value()
+ if err := awsAwsquery_serializeDocumentTag(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentAssumeRoleInput(v *AssumeRoleInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DurationSeconds != nil {
+ objectKey := object.Key("DurationSeconds")
+ objectKey.Integer(*v.DurationSeconds)
+ }
+
+ if v.ExternalId != nil {
+ objectKey := object.Key("ExternalId")
+ objectKey.String(*v.ExternalId)
+ }
+
+ if v.Policy != nil {
+ objectKey := object.Key("Policy")
+ objectKey.String(*v.Policy)
+ }
+
+ if v.PolicyArns != nil {
+ objectKey := object.Key("PolicyArns")
+ if err := awsAwsquery_serializeDocumentPolicyDescriptorListType(v.PolicyArns, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.RoleArn != nil {
+ objectKey := object.Key("RoleArn")
+ objectKey.String(*v.RoleArn)
+ }
+
+ if v.RoleSessionName != nil {
+ objectKey := object.Key("RoleSessionName")
+ objectKey.String(*v.RoleSessionName)
+ }
+
+ if v.SerialNumber != nil {
+ objectKey := object.Key("SerialNumber")
+ objectKey.String(*v.SerialNumber)
+ }
+
+ if v.SourceIdentity != nil {
+ objectKey := object.Key("SourceIdentity")
+ objectKey.String(*v.SourceIdentity)
+ }
+
+ if v.Tags != nil {
+ objectKey := object.Key("Tags")
+ if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.TokenCode != nil {
+ objectKey := object.Key("TokenCode")
+ objectKey.String(*v.TokenCode)
+ }
+
+ if v.TransitiveTagKeys != nil {
+ objectKey := object.Key("TransitiveTagKeys")
+ if err := awsAwsquery_serializeDocumentTagKeyListType(v.TransitiveTagKeys, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentAssumeRoleWithSAMLInput(v *AssumeRoleWithSAMLInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DurationSeconds != nil {
+ objectKey := object.Key("DurationSeconds")
+ objectKey.Integer(*v.DurationSeconds)
+ }
+
+ if v.Policy != nil {
+ objectKey := object.Key("Policy")
+ objectKey.String(*v.Policy)
+ }
+
+ if v.PolicyArns != nil {
+ objectKey := object.Key("PolicyArns")
+ if err := awsAwsquery_serializeDocumentPolicyDescriptorListType(v.PolicyArns, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.PrincipalArn != nil {
+ objectKey := object.Key("PrincipalArn")
+ objectKey.String(*v.PrincipalArn)
+ }
+
+ if v.RoleArn != nil {
+ objectKey := object.Key("RoleArn")
+ objectKey.String(*v.RoleArn)
+ }
+
+ if v.SAMLAssertion != nil {
+ objectKey := object.Key("SAMLAssertion")
+ objectKey.String(*v.SAMLAssertion)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentAssumeRoleWithWebIdentityInput(v *AssumeRoleWithWebIdentityInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DurationSeconds != nil {
+ objectKey := object.Key("DurationSeconds")
+ objectKey.Integer(*v.DurationSeconds)
+ }
+
+ if v.Policy != nil {
+ objectKey := object.Key("Policy")
+ objectKey.String(*v.Policy)
+ }
+
+ if v.PolicyArns != nil {
+ objectKey := object.Key("PolicyArns")
+ if err := awsAwsquery_serializeDocumentPolicyDescriptorListType(v.PolicyArns, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.ProviderId != nil {
+ objectKey := object.Key("ProviderId")
+ objectKey.String(*v.ProviderId)
+ }
+
+ if v.RoleArn != nil {
+ objectKey := object.Key("RoleArn")
+ objectKey.String(*v.RoleArn)
+ }
+
+ if v.RoleSessionName != nil {
+ objectKey := object.Key("RoleSessionName")
+ objectKey.String(*v.RoleSessionName)
+ }
+
+ if v.WebIdentityToken != nil {
+ objectKey := object.Key("WebIdentityToken")
+ objectKey.String(*v.WebIdentityToken)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentDecodeAuthorizationMessageInput(v *DecodeAuthorizationMessageInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.EncodedMessage != nil {
+ objectKey := object.Key("EncodedMessage")
+ objectKey.String(*v.EncodedMessage)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentGetAccessKeyInfoInput(v *GetAccessKeyInfoInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.AccessKeyId != nil {
+ objectKey := object.Key("AccessKeyId")
+ objectKey.String(*v.AccessKeyId)
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentGetCallerIdentityInput(v *GetCallerIdentityInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentGetFederationTokenInput(v *GetFederationTokenInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DurationSeconds != nil {
+ objectKey := object.Key("DurationSeconds")
+ objectKey.Integer(*v.DurationSeconds)
+ }
+
+ if v.Name != nil {
+ objectKey := object.Key("Name")
+ objectKey.String(*v.Name)
+ }
+
+ if v.Policy != nil {
+ objectKey := object.Key("Policy")
+ objectKey.String(*v.Policy)
+ }
+
+ if v.PolicyArns != nil {
+ objectKey := object.Key("PolicyArns")
+ if err := awsAwsquery_serializeDocumentPolicyDescriptorListType(v.PolicyArns, objectKey); err != nil {
+ return err
+ }
+ }
+
+ if v.Tags != nil {
+ objectKey := object.Key("Tags")
+ if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsquery_serializeOpDocumentGetSessionTokenInput(v *GetSessionTokenInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DurationSeconds != nil {
+ objectKey := object.Key("DurationSeconds")
+ objectKey.Integer(*v.DurationSeconds)
+ }
+
+ if v.SerialNumber != nil {
+ objectKey := object.Key("SerialNumber")
+ objectKey.String(*v.SerialNumber)
+ }
+
+ if v.TokenCode != nil {
+ objectKey := object.Key("TokenCode")
+ objectKey.String(*v.TokenCode)
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go
new file mode 100644
index 000000000..b109fe5fc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go
@@ -0,0 +1,193 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ "fmt"
+ smithy "github.com/aws/smithy-go"
+)
+
+// The web identity token that was passed is expired or is not valid. Get a new
+// identity token from the identity provider and then retry the request.
+type ExpiredTokenException struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ExpiredTokenException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ExpiredTokenException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ExpiredTokenException) ErrorCode() string { return "ExpiredTokenException" }
+func (e *ExpiredTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// 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 identity provider might be down or not responding.
+type IDPCommunicationErrorException struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *IDPCommunicationErrorException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *IDPCommunicationErrorException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *IDPCommunicationErrorException) ErrorCode() string { return "IDPCommunicationError" }
+func (e *IDPCommunicationErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The identity provider (IdP) reported that authentication failed. This might be
+// because the claim is invalid. If this error is returned for the
+// AssumeRoleWithWebIdentity operation, it can also mean that the claim has expired
+// or has been explicitly revoked.
+type IDPRejectedClaimException struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *IDPRejectedClaimException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *IDPRejectedClaimException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *IDPRejectedClaimException) ErrorCode() string { return "IDPRejectedClaim" }
+func (e *IDPRejectedClaimException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The error returned if the message passed to DecodeAuthorizationMessage was
+// invalid. This can happen if the token contains invalid characters, such as
+// linebreaks.
+type InvalidAuthorizationMessageException struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidAuthorizationMessageException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidAuthorizationMessageException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidAuthorizationMessageException) ErrorCode() string {
+ return "InvalidAuthorizationMessageException"
+}
+func (e *InvalidAuthorizationMessageException) ErrorFault() smithy.ErrorFault {
+ return smithy.FaultClient
+}
+
+// The web identity token that was passed could not be validated by Amazon Web
+// Services. Get a new identity token from the identity provider and then retry the
+// request.
+type InvalidIdentityTokenException struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidIdentityTokenException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidIdentityTokenException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidIdentityTokenException) ErrorCode() string { return "InvalidIdentityToken" }
+func (e *InvalidIdentityTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the policy document was malformed. The error
+// message describes the specific error.
+type MalformedPolicyDocumentException struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *MalformedPolicyDocumentException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *MalformedPolicyDocumentException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *MalformedPolicyDocumentException) ErrorCode() string { return "MalformedPolicyDocument" }
+func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the total packed size of the session policies
+// and session tags combined was too large. An Amazon Web Services 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/reference_iam-quotas.html#reference_iam-limits-entity-length)
+// in the IAM User Guide.
+type PackedPolicyTooLargeException struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *PackedPolicyTooLargeException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *PackedPolicyTooLargeException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *PackedPolicyTooLargeException) ErrorCode() string { return "PackedPolicyTooLarge" }
+func (e *PackedPolicyTooLargeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// STS is not activated in the requested region for the account that is being asked
+// to generate credentials. The account administrator must use the IAM console to
+// activate STS in that region. For more information, see Activating and
+// Deactivating Amazon Web Services STS in an Amazon Web Services Region
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
+// in the IAM User Guide.
+type RegionDisabledException struct {
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *RegionDisabledException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *RegionDisabledException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *RegionDisabledException) ErrorCode() string { return "RegionDisabledException" }
+func (e *RegionDisabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go
new file mode 100644
index 000000000..86e509905
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go
@@ -0,0 +1,124 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ smithydocument "github.com/aws/smithy-go/document"
+ "time"
+)
+
+// The identifiers for the temporary security credentials that the operation
+// returns.
+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
+ // the IAM User Guide.
+ //
+ // This member is required.
+ Arn *string
+
+ // A unique identifier that contains the role ID and the role session name of the
+ // role that is being assumed. The role ID is generated by Amazon Web Services when
+ // the role is created.
+ //
+ // This member is required.
+ AssumedRoleId *string
+
+ noSmithyDocumentSerde
+}
+
+// Amazon Web Services credentials for API authentication.
+type Credentials struct {
+
+ // The access key ID that identifies the temporary security credentials.
+ //
+ // This member is required.
+ AccessKeyId *string
+
+ // The date on which the current credentials expire.
+ //
+ // This member is required.
+ Expiration *time.Time
+
+ // The secret access key that can be used to sign requests.
+ //
+ // This member is required.
+ SecretAccessKey *string
+
+ // The token that users must pass to the service API to use the temporary
+ // credentials.
+ //
+ // This member is required.
+ SessionToken *string
+
+ noSmithyDocumentSerde
+}
+
+// Identifiers for the federated user that is associated with the credentials.
+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
+ // the IAM User Guide.
+ //
+ // This member is required.
+ Arn *string
+
+ // The string that identifies the federated user associated with the credentials,
+ // similar to the unique ID of an IAM user.
+ //
+ // This member is required.
+ FederatedUserId *string
+
+ noSmithyDocumentSerde
+}
+
+// A reference to the IAM managed policy that is passed as a session policy for a
+// role session or a federated user session.
+type PolicyDescriptorType struct {
+
+ // The Amazon Resource Name (ARN) of the IAM managed policy to use as a session
+ // policy for the role. For more information about ARNs, see Amazon Resource Names
+ // (ARNs) and Amazon Web Services Service Namespaces
+ // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in
+ // the Amazon Web Services General Reference.
+ Arn *string
+
+ noSmithyDocumentSerde
+}
+
+// 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 Amazon Web
+// Services STS Sessions
+// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in the
+// IAM User Guide.
+type Tag struct {
+
+ // 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.
+ //
+ // This member is required.
+ Key *string
+
+ // 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.
+ //
+ // This member is required.
+ Value *string
+
+ noSmithyDocumentSerde
+}
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go
new file mode 100644
index 000000000..3e4bad2a9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go
@@ -0,0 +1,305 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/service/sts/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+)
+
+type validateOpAssumeRole struct {
+}
+
+func (*validateOpAssumeRole) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpAssumeRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*AssumeRoleInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpAssumeRoleInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpAssumeRoleWithSAML struct {
+}
+
+func (*validateOpAssumeRoleWithSAML) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpAssumeRoleWithSAML) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*AssumeRoleWithSAMLInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpAssumeRoleWithSAMLInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpAssumeRoleWithWebIdentity struct {
+}
+
+func (*validateOpAssumeRoleWithWebIdentity) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpAssumeRoleWithWebIdentity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*AssumeRoleWithWebIdentityInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpAssumeRoleWithWebIdentityInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDecodeAuthorizationMessage struct {
+}
+
+func (*validateOpDecodeAuthorizationMessage) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDecodeAuthorizationMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DecodeAuthorizationMessageInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDecodeAuthorizationMessageInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetAccessKeyInfo struct {
+}
+
+func (*validateOpGetAccessKeyInfo) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetAccessKeyInfo) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetAccessKeyInfoInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetAccessKeyInfoInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetFederationToken struct {
+}
+
+func (*validateOpGetFederationToken) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetFederationToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetFederationTokenInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetFederationTokenInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+func addOpAssumeRoleValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpAssumeRole{}, middleware.After)
+}
+
+func addOpAssumeRoleWithSAMLValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpAssumeRoleWithSAML{}, middleware.After)
+}
+
+func addOpAssumeRoleWithWebIdentityValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpAssumeRoleWithWebIdentity{}, middleware.After)
+}
+
+func addOpDecodeAuthorizationMessageValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDecodeAuthorizationMessage{}, middleware.After)
+}
+
+func addOpGetAccessKeyInfoValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetAccessKeyInfo{}, middleware.After)
+}
+
+func addOpGetFederationTokenValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetFederationToken{}, middleware.After)
+}
+
+func validateTag(v *types.Tag) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Tag"}
+ if v.Key == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Key"))
+ }
+ if v.Value == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Value"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateTagListType(v []types.Tag) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "TagListType"}
+ for i := range v {
+ if err := validateTag(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpAssumeRoleInput(v *AssumeRoleInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AssumeRoleInput"}
+ if v.RoleArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
+ }
+ if v.RoleSessionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("RoleSessionName"))
+ }
+ if v.Tags != nil {
+ if err := validateTagListType(v.Tags); err != nil {
+ invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpAssumeRoleWithSAMLInput(v *AssumeRoleWithSAMLInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AssumeRoleWithSAMLInput"}
+ if v.RoleArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
+ }
+ if v.PrincipalArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn"))
+ }
+ if v.SAMLAssertion == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("SAMLAssertion"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpAssumeRoleWithWebIdentityInput(v *AssumeRoleWithWebIdentityInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AssumeRoleWithWebIdentityInput"}
+ if v.RoleArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
+ }
+ if v.RoleSessionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("RoleSessionName"))
+ }
+ if v.WebIdentityToken == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("WebIdentityToken"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDecodeAuthorizationMessageInput(v *DecodeAuthorizationMessageInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DecodeAuthorizationMessageInput"}
+ if v.EncodedMessage == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("EncodedMessage"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetAccessKeyInfoInput(v *GetAccessKeyInfoInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetAccessKeyInfoInput"}
+ if v.AccessKeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AccessKeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetFederationTokenInput(v *GetFederationTokenInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetFederationTokenInput"}
+ if v.Name == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Name"))
+ }
+ if v.Tags != nil {
+ if err := validateTagListType(v.Tags); err != nil {
+ invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go b/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go
deleted file mode 100644
index 99849c0e1..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go
+++ /dev/null
@@ -1,164 +0,0 @@
-// Package awserr represents API error interface accessors for the SDK.
-package awserr
-
-// An Error wraps lower level errors with code, message and an original error.
-// The underlying concrete error type may also satisfy other interfaces which
-// can be to used to obtain more specific information about the error.
-//
-// Calling Error() or String() will always include the full information about
-// an error based on its underlying type.
-//
-// Example:
-//
-// output, err := s3manage.Upload(svc, input, opts)
-// if err != nil {
-// if awsErr, ok := err.(awserr.Error); ok {
-// // Get error details
-// log.Println("Error:", awsErr.Code(), awsErr.Message())
-//
-// // Prints out full error message, including original error if there was one.
-// log.Println("Error:", awsErr.Error())
-//
-// // Get original error
-// if origErr := awsErr.OrigErr(); origErr != nil {
-// // operate on original error.
-// }
-// } else {
-// fmt.Println(err.Error())
-// }
-// }
-//
-type Error interface {
- // Satisfy the generic error interface.
- error
-
- // Returns the short phrase depicting the classification of the error.
- Code() string
-
- // Returns the error details message.
- Message() string
-
- // Returns the original error if one was set. Nil is returned if not set.
- OrigErr() error
-}
-
-// BatchError is a batch of errors which also wraps lower level errors with
-// code, message, and original errors. Calling Error() will include all errors
-// that occurred in the batch.
-//
-// Deprecated: Replaced with BatchedErrors. Only defined for backwards
-// compatibility.
-type BatchError interface {
- // Satisfy the generic error interface.
- error
-
- // Returns the short phrase depicting the classification of the error.
- Code() string
-
- // Returns the error details message.
- Message() string
-
- // Returns the original error if one was set. Nil is returned if not set.
- OrigErrs() []error
-}
-
-// BatchedErrors is a batch of errors which also wraps lower level errors with
-// code, message, and original errors. Calling Error() will include all errors
-// that occurred in the batch.
-//
-// Replaces BatchError
-type BatchedErrors interface {
- // Satisfy the base Error interface.
- Error
-
- // Returns the original error if one was set. Nil is returned if not set.
- OrigErrs() []error
-}
-
-// New returns an Error object described by the code, message, and origErr.
-//
-// If origErr satisfies the Error interface it will not be wrapped within a new
-// Error object and will instead be returned.
-func New(code, message string, origErr error) Error {
- var errs []error
- if origErr != nil {
- errs = append(errs, origErr)
- }
- return newBaseError(code, message, errs)
-}
-
-// NewBatchError returns an BatchedErrors with a collection of errors as an
-// array of errors.
-func NewBatchError(code, message string, errs []error) BatchedErrors {
- return newBaseError(code, message, errs)
-}
-
-// A RequestFailure is an interface to extract request failure information from
-// an Error such as the request ID of the failed request returned by a service.
-// RequestFailures may not always have a requestID value if the request failed
-// prior to reaching the service such as a connection error.
-//
-// Example:
-//
-// output, err := s3manage.Upload(svc, input, opts)
-// if err != nil {
-// if reqerr, ok := err.(RequestFailure); ok {
-// log.Println("Request failed", reqerr.Code(), reqerr.Message(), reqerr.RequestID())
-// } else {
-// log.Println("Error:", err.Error())
-// }
-// }
-//
-// Combined with awserr.Error:
-//
-// output, err := s3manage.Upload(svc, input, opts)
-// if err != nil {
-// if awsErr, ok := err.(awserr.Error); ok {
-// // Generic AWS Error with Code, Message, and original error (if any)
-// fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
-//
-// if reqErr, ok := err.(awserr.RequestFailure); ok {
-// // A service error occurred
-// fmt.Println(reqErr.StatusCode(), reqErr.RequestID())
-// }
-// } else {
-// fmt.Println(err.Error())
-// }
-// }
-//
-type RequestFailure interface {
- Error
-
- // The status code of the HTTP response.
- StatusCode() int
-
- // The request ID returned by the service for a request failure. This will
- // be empty if no request ID is available such as the request failed due
- // to a connection error.
- RequestID() string
-}
-
-// NewRequestFailure returns a wrapped error with additional information for
-// request status code, and service requestID.
-//
-// Should be used to wrap all request which involve service requests. Even if
-// the request failed without a service response, but had an HTTP status code
-// that may be meaningful.
-func NewRequestFailure(err Error, statusCode int, reqID string) RequestFailure {
- return newRequestError(err, statusCode, reqID)
-}
-
-// UnmarshalError provides the interface for the SDK failing to unmarshal data.
-type UnmarshalError interface {
- awsError
- Bytes() []byte
-}
-
-// NewUnmarshalError returns an initialized UnmarshalError error wrapper adding
-// the bytes that fail to unmarshal to the error.
-func NewUnmarshalError(err error, msg string, bytes []byte) UnmarshalError {
- return &unmarshalError{
- awsError: New("UnmarshalError", msg, err),
- bytes: bytes,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go b/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go
deleted file mode 100644
index 9cf7eaf40..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go
+++ /dev/null
@@ -1,221 +0,0 @@
-package awserr
-
-import (
- "encoding/hex"
- "fmt"
-)
-
-// SprintError returns a string of the formatted error code.
-//
-// Both extra and origErr are optional. If they are included their lines
-// will be added, but if they are not included their lines will be ignored.
-func SprintError(code, message, extra string, origErr error) string {
- msg := fmt.Sprintf("%s: %s", code, message)
- if extra != "" {
- msg = fmt.Sprintf("%s\n\t%s", msg, extra)
- }
- if origErr != nil {
- msg = fmt.Sprintf("%s\ncaused by: %s", msg, origErr.Error())
- }
- return msg
-}
-
-// A baseError wraps the code and message which defines an error. It also
-// can be used to wrap an original error object.
-//
-// Should be used as the root for errors satisfying the awserr.Error. Also
-// for any error which does not fit into a specific error wrapper type.
-type baseError struct {
- // Classification of error
- code string
-
- // Detailed information about error
- message string
-
- // Optional original error this error is based off of. Allows building
- // chained errors.
- errs []error
-}
-
-// newBaseError returns an error object for the code, message, and errors.
-//
-// code is a short no whitespace phrase depicting the classification of
-// the error that is being created.
-//
-// message is the free flow string containing detailed information about the
-// error.
-//
-// origErrs is the error objects which will be nested under the new errors to
-// be returned.
-func newBaseError(code, message string, origErrs []error) *baseError {
- b := &baseError{
- code: code,
- message: message,
- errs: origErrs,
- }
-
- return b
-}
-
-// Error returns the string representation of the error.
-//
-// See ErrorWithExtra for formatting.
-//
-// Satisfies the error interface.
-func (b baseError) Error() string {
- size := len(b.errs)
- if size > 0 {
- return SprintError(b.code, b.message, "", errorList(b.errs))
- }
-
- return SprintError(b.code, b.message, "", nil)
-}
-
-// String returns the string representation of the error.
-// Alias for Error to satisfy the stringer interface.
-func (b baseError) String() string {
- return b.Error()
-}
-
-// Code returns the short phrase depicting the classification of the error.
-func (b baseError) Code() string {
- return b.code
-}
-
-// Message returns the error details message.
-func (b baseError) Message() string {
- return b.message
-}
-
-// OrigErr returns the original error if one was set. Nil is returned if no
-// error was set. This only returns the first element in the list. If the full
-// list is needed, use BatchedErrors.
-func (b baseError) OrigErr() error {
- switch len(b.errs) {
- case 0:
- return nil
- case 1:
- return b.errs[0]
- default:
- if err, ok := b.errs[0].(Error); ok {
- return NewBatchError(err.Code(), err.Message(), b.errs[1:])
- }
- return NewBatchError("BatchedErrors",
- "multiple errors occurred", b.errs)
- }
-}
-
-// OrigErrs returns the original errors if one was set. An empty slice is
-// returned if no error was set.
-func (b baseError) OrigErrs() []error {
- return b.errs
-}
-
-// So that the Error interface type can be included as an anonymous field
-// in the requestError struct and not conflict with the error.Error() method.
-type awsError Error
-
-// A requestError wraps a request or service error.
-//
-// Composed of baseError for code, message, and original error.
-type requestError struct {
- awsError
- statusCode int
- requestID string
- bytes []byte
-}
-
-// newRequestError returns a wrapped error with additional information for
-// request status code, and service requestID.
-//
-// Should be used to wrap all request which involve service requests. Even if
-// the request failed without a service response, but had an HTTP status code
-// that may be meaningful.
-//
-// Also wraps original errors via the baseError.
-func newRequestError(err Error, statusCode int, requestID string) *requestError {
- return &requestError{
- awsError: err,
- statusCode: statusCode,
- requestID: requestID,
- }
-}
-
-// Error returns the string representation of the error.
-// Satisfies the error interface.
-func (r requestError) Error() string {
- extra := fmt.Sprintf("status code: %d, request id: %s",
- r.statusCode, r.requestID)
- return SprintError(r.Code(), r.Message(), extra, r.OrigErr())
-}
-
-// String returns the string representation of the error.
-// Alias for Error to satisfy the stringer interface.
-func (r requestError) String() string {
- return r.Error()
-}
-
-// StatusCode returns the wrapped status code for the error
-func (r requestError) StatusCode() int {
- return r.statusCode
-}
-
-// RequestID returns the wrapped requestID
-func (r requestError) RequestID() string {
- return r.requestID
-}
-
-// OrigErrs returns the original errors if one was set. An empty slice is
-// returned if no error was set.
-func (r requestError) OrigErrs() []error {
- if b, ok := r.awsError.(BatchedErrors); ok {
- return b.OrigErrs()
- }
- return []error{r.OrigErr()}
-}
-
-type unmarshalError struct {
- awsError
- bytes []byte
-}
-
-// Error returns the string representation of the error.
-// Satisfies the error interface.
-func (e unmarshalError) Error() string {
- extra := hex.Dump(e.bytes)
- return SprintError(e.Code(), e.Message(), extra, e.OrigErr())
-}
-
-// String returns the string representation of the error.
-// Alias for Error to satisfy the stringer interface.
-func (e unmarshalError) String() string {
- return e.Error()
-}
-
-// Bytes returns the bytes that failed to unmarshal.
-func (e unmarshalError) Bytes() []byte {
- return e.bytes
-}
-
-// An error list that satisfies the golang interface
-type errorList []error
-
-// Error returns the string representation of the error.
-//
-// Satisfies the error interface.
-func (e errorList) Error() string {
- msg := ""
- // How do we want to handle the array size being zero
- if size := len(e); size > 0 {
- for i := 0; i < size; i++ {
- msg += e[i].Error()
- // We check the next index to see if it is within the slice.
- // If it is, then we append a newline. We do this, because unit tests
- // could be broken with the additional '\n'
- if i+1 < size {
- msg += "\n"
- }
- }
- }
- return msg
-}
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
deleted file mode 100644
index b147f103c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package client
-
-import (
- "fmt"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// A Config provides configuration to a service client instance.
-type Config struct {
- Config *aws.Config
- Handlers request.Handlers
- PartitionID string
- Endpoint string
- SigningRegion string
- SigningName string
- ResolvedRegion string
-
- // States that the signing name did not come from a modeled source but
- // was derived based on other data. Used by service client constructors
- // to determine if the signin name can be overridden based on metadata the
- // service has.
- SigningNameDerived bool
-}
-
-// ConfigProvider provides a generic way for a service client to receive
-// the ClientConfig without circular dependencies.
-type ConfigProvider interface {
- ClientConfig(serviceName string, cfgs ...*aws.Config) Config
-}
-
-// ConfigNoResolveEndpointProvider same as ConfigProvider except it will not
-// resolve the endpoint automatically. The service client's endpoint must be
-// provided via the aws.Config.Endpoint field.
-type ConfigNoResolveEndpointProvider interface {
- ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) Config
-}
-
-// A Client implements the base client request and response handling
-// used by all service clients.
-type Client struct {
- request.Retryer
- metadata.ClientInfo
-
- Config aws.Config
- Handlers request.Handlers
-}
-
-// New will return a pointer to a new initialized service client.
-func New(cfg aws.Config, info metadata.ClientInfo, handlers request.Handlers, options ...func(*Client)) *Client {
- svc := &Client{
- Config: cfg,
- ClientInfo: info,
- Handlers: handlers.Copy(),
- }
-
- switch retryer, ok := cfg.Retryer.(request.Retryer); {
- case ok:
- svc.Retryer = retryer
- case cfg.Retryer != nil && cfg.Logger != nil:
- s := fmt.Sprintf("WARNING: %T does not implement request.Retryer; using DefaultRetryer instead", cfg.Retryer)
- cfg.Logger.Log(s)
- fallthrough
- default:
- maxRetries := aws.IntValue(cfg.MaxRetries)
- if cfg.MaxRetries == nil || maxRetries == aws.UseServiceDefaultRetries {
- maxRetries = DefaultRetryerMaxNumRetries
- }
- svc.Retryer = DefaultRetryer{NumMaxRetries: maxRetries}
- }
-
- svc.AddDebugHandlers()
-
- for _, option := range options {
- option(svc)
- }
-
- return svc
-}
-
-// NewRequest returns a new Request pointer for the service API
-// operation and parameters.
-func (c *Client) NewRequest(operation *request.Operation, params interface{}, data interface{}) *request.Request {
- return request.New(c.Config, c.ClientInfo, c.Handlers, c.Retryer, operation, params, data)
-}
-
-// AddDebugHandlers injects debug logging handlers into the service to log request
-// debug information.
-func (c *Client) AddDebugHandlers() {
- c.Handlers.Send.PushFrontNamed(LogHTTPRequestHandler)
- c.Handlers.Send.PushBackNamed(LogHTTPResponseHandler)
-}
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
deleted file mode 100644
index 9f6af19dd..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
+++ /dev/null
@@ -1,177 +0,0 @@
-package client
-
-import (
- "math"
- "strconv"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/sdkrand"
-)
-
-// DefaultRetryer implements basic retry logic using exponential backoff for
-// most services. If you want to implement custom retry logic, you can implement the
-// request.Retryer interface.
-//
-type DefaultRetryer struct {
- // Num max Retries is the number of max retries that will be performed.
- // By default, this is zero.
- NumMaxRetries int
-
- // MinRetryDelay is the minimum retry delay after which retry will be performed.
- // If not set, the value is 0ns.
- MinRetryDelay time.Duration
-
- // MinThrottleRetryDelay is the minimum retry delay when throttled.
- // If not set, the value is 0ns.
- MinThrottleDelay time.Duration
-
- // MaxRetryDelay is the maximum retry delay before which retry must be performed.
- // If not set, the value is 0ns.
- MaxRetryDelay time.Duration
-
- // MaxThrottleDelay is the maximum retry delay when throttled.
- // If not set, the value is 0ns.
- MaxThrottleDelay time.Duration
-}
-
-const (
- // DefaultRetryerMaxNumRetries sets maximum number of retries
- DefaultRetryerMaxNumRetries = 3
-
- // DefaultRetryerMinRetryDelay sets minimum retry delay
- DefaultRetryerMinRetryDelay = 30 * time.Millisecond
-
- // DefaultRetryerMinThrottleDelay sets minimum delay when throttled
- DefaultRetryerMinThrottleDelay = 500 * time.Millisecond
-
- // DefaultRetryerMaxRetryDelay sets maximum retry delay
- DefaultRetryerMaxRetryDelay = 300 * time.Second
-
- // DefaultRetryerMaxThrottleDelay sets maximum delay when throttled
- DefaultRetryerMaxThrottleDelay = 300 * time.Second
-)
-
-// MaxRetries returns the number of maximum returns the service will use to make
-// an individual API request.
-func (d DefaultRetryer) MaxRetries() int {
- return d.NumMaxRetries
-}
-
-// setRetryerDefaults sets the default values of the retryer if not set
-func (d *DefaultRetryer) setRetryerDefaults() {
- if d.MinRetryDelay == 0 {
- d.MinRetryDelay = DefaultRetryerMinRetryDelay
- }
- if d.MaxRetryDelay == 0 {
- d.MaxRetryDelay = DefaultRetryerMaxRetryDelay
- }
- if d.MinThrottleDelay == 0 {
- d.MinThrottleDelay = DefaultRetryerMinThrottleDelay
- }
- if d.MaxThrottleDelay == 0 {
- d.MaxThrottleDelay = DefaultRetryerMaxThrottleDelay
- }
-}
-
-// RetryRules returns the delay duration before retrying this request again
-func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration {
-
- // if number of max retries is zero, no retries will be performed.
- if d.NumMaxRetries == 0 {
- return 0
- }
-
- // Sets default value for retryer members
- d.setRetryerDefaults()
-
- // minDelay is the minimum retryer delay
- minDelay := d.MinRetryDelay
-
- var initialDelay time.Duration
-
- isThrottle := r.IsErrorThrottle()
- if isThrottle {
- if delay, ok := getRetryAfterDelay(r); ok {
- initialDelay = delay
- }
- minDelay = d.MinThrottleDelay
- }
-
- retryCount := r.RetryCount
-
- // maxDelay the maximum retryer delay
- maxDelay := d.MaxRetryDelay
-
- if isThrottle {
- maxDelay = d.MaxThrottleDelay
- }
-
- var delay time.Duration
-
- // Logic to cap the retry count based on the minDelay provided
- actualRetryCount := int(math.Log2(float64(minDelay))) + 1
- if actualRetryCount < 63-retryCount {
- delay = time.Duration(1< maxDelay {
- delay = getJitterDelay(maxDelay / 2)
- }
- } else {
- delay = getJitterDelay(maxDelay / 2)
- }
- return delay + initialDelay
-}
-
-// getJitterDelay returns a jittered delay for retry
-func getJitterDelay(duration time.Duration) time.Duration {
- return time.Duration(sdkrand.SeededRand.Int63n(int64(duration)) + int64(duration))
-}
-
-// ShouldRetry returns true if the request should be retried.
-func (d DefaultRetryer) ShouldRetry(r *request.Request) bool {
-
- // ShouldRetry returns false if number of max retries is 0.
- if d.NumMaxRetries == 0 {
- return false
- }
-
- // If one of the other handlers already set the retry state
- // we don't want to override it based on the service's state
- if r.Retryable != nil {
- return *r.Retryable
- }
- return r.IsErrorRetryable() || r.IsErrorThrottle()
-}
-
-// This will look in the Retry-After header, RFC 7231, for how long
-// it will wait before attempting another request
-func getRetryAfterDelay(r *request.Request) (time.Duration, bool) {
- if !canUseRetryAfterHeader(r) {
- return 0, false
- }
-
- delayStr := r.HTTPResponse.Header.Get("Retry-After")
- if len(delayStr) == 0 {
- return 0, false
- }
-
- delay, err := strconv.Atoi(delayStr)
- if err != nil {
- return 0, false
- }
-
- return time.Duration(delay) * time.Second, true
-}
-
-// Will look at the status code to see if the retry header pertains to
-// the status code.
-func canUseRetryAfterHeader(r *request.Request) bool {
- switch r.HTTPResponse.StatusCode {
- case 429:
- case 503:
- default:
- return false
- }
-
- return true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go
deleted file mode 100644
index 5ac5c24a1..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go
+++ /dev/null
@@ -1,206 +0,0 @@
-package client
-
-import (
- "bytes"
- "fmt"
- "io"
- "io/ioutil"
- "net/http/httputil"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-const logReqMsg = `DEBUG: Request %s/%s Details:
----[ REQUEST POST-SIGN ]-----------------------------
-%s
------------------------------------------------------`
-
-const logReqErrMsg = `DEBUG ERROR: Request %s/%s:
----[ REQUEST DUMP ERROR ]-----------------------------
-%s
-------------------------------------------------------`
-
-type logWriter struct {
- // Logger is what we will use to log the payload of a response.
- Logger aws.Logger
- // buf stores the contents of what has been read
- buf *bytes.Buffer
-}
-
-func (logger *logWriter) Write(b []byte) (int, error) {
- return logger.buf.Write(b)
-}
-
-type teeReaderCloser struct {
- // io.Reader will be a tee reader that is used during logging.
- // This structure will read from a body and write the contents to a logger.
- io.Reader
- // Source is used just to close when we are done reading.
- Source io.ReadCloser
-}
-
-func (reader *teeReaderCloser) Close() error {
- return reader.Source.Close()
-}
-
-// LogHTTPRequestHandler is a SDK request handler to log the HTTP request sent
-// to a service. Will include the HTTP request body if the LogLevel of the
-// request matches LogDebugWithHTTPBody.
-var LogHTTPRequestHandler = request.NamedHandler{
- Name: "awssdk.client.LogRequest",
- Fn: logRequest,
-}
-
-func logRequest(r *request.Request) {
- if !r.Config.LogLevel.AtLeast(aws.LogDebug) || r.Config.Logger == nil {
- return
- }
-
- logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
- bodySeekable := aws.IsReaderSeekable(r.Body)
-
- b, err := httputil.DumpRequestOut(r.HTTPRequest, logBody)
- if err != nil {
- r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, err))
- return
- }
-
- if logBody {
- if !bodySeekable {
- r.SetReaderBody(aws.ReadSeekCloser(r.HTTPRequest.Body))
- }
- // Reset the request body because dumpRequest will re-wrap the
- // r.HTTPRequest's Body as a NoOpCloser and will not be reset after
- // read by the HTTP client reader.
- if err := r.Error; err != nil {
- r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, err))
- return
- }
- }
-
- r.Config.Logger.Log(fmt.Sprintf(logReqMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, string(b)))
-}
-
-// LogHTTPRequestHeaderHandler is a SDK request handler to log the HTTP request sent
-// to a service. Will only log the HTTP request's headers. The request payload
-// will not be read.
-var LogHTTPRequestHeaderHandler = request.NamedHandler{
- Name: "awssdk.client.LogRequestHeader",
- Fn: logRequestHeader,
-}
-
-func logRequestHeader(r *request.Request) {
- if !r.Config.LogLevel.AtLeast(aws.LogDebug) || r.Config.Logger == nil {
- return
- }
-
- b, err := httputil.DumpRequestOut(r.HTTPRequest, false)
- if err != nil {
- r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, err))
- return
- }
-
- r.Config.Logger.Log(fmt.Sprintf(logReqMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, string(b)))
-}
-
-const logRespMsg = `DEBUG: Response %s/%s Details:
----[ RESPONSE ]--------------------------------------
-%s
------------------------------------------------------`
-
-const logRespErrMsg = `DEBUG ERROR: Response %s/%s:
----[ RESPONSE DUMP ERROR ]-----------------------------
-%s
------------------------------------------------------`
-
-// LogHTTPResponseHandler is a SDK request handler to log the HTTP response
-// received from a service. Will include the HTTP response body if the LogLevel
-// of the request matches LogDebugWithHTTPBody.
-var LogHTTPResponseHandler = request.NamedHandler{
- Name: "awssdk.client.LogResponse",
- Fn: logResponse,
-}
-
-func logResponse(r *request.Request) {
- if !r.Config.LogLevel.AtLeast(aws.LogDebug) || r.Config.Logger == nil {
- return
- }
-
- lw := &logWriter{r.Config.Logger, bytes.NewBuffer(nil)}
-
- if r.HTTPResponse == nil {
- lw.Logger.Log(fmt.Sprintf(logRespErrMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, "request's HTTPResponse is nil"))
- return
- }
-
- logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
- if logBody {
- r.HTTPResponse.Body = &teeReaderCloser{
- Reader: io.TeeReader(r.HTTPResponse.Body, lw),
- Source: r.HTTPResponse.Body,
- }
- }
-
- handlerFn := func(req *request.Request) {
- b, err := httputil.DumpResponse(req.HTTPResponse, false)
- if err != nil {
- lw.Logger.Log(fmt.Sprintf(logRespErrMsg,
- req.ClientInfo.ServiceName, req.Operation.Name, err))
- return
- }
-
- lw.Logger.Log(fmt.Sprintf(logRespMsg,
- req.ClientInfo.ServiceName, req.Operation.Name, string(b)))
-
- if logBody {
- b, err := ioutil.ReadAll(lw.buf)
- if err != nil {
- lw.Logger.Log(fmt.Sprintf(logRespErrMsg,
- req.ClientInfo.ServiceName, req.Operation.Name, err))
- return
- }
-
- lw.Logger.Log(string(b))
- }
- }
-
- const handlerName = "awsdk.client.LogResponse.ResponseBody"
-
- r.Handlers.Unmarshal.SetBackNamed(request.NamedHandler{
- Name: handlerName, Fn: handlerFn,
- })
- r.Handlers.UnmarshalError.SetBackNamed(request.NamedHandler{
- Name: handlerName, Fn: handlerFn,
- })
-}
-
-// LogHTTPResponseHeaderHandler is a SDK request handler to log the HTTP
-// response received from a service. Will only log the HTTP response's headers.
-// The response payload will not be read.
-var LogHTTPResponseHeaderHandler = request.NamedHandler{
- Name: "awssdk.client.LogResponseHeader",
- Fn: logResponseHeader,
-}
-
-func logResponseHeader(r *request.Request) {
- if !r.Config.LogLevel.AtLeast(aws.LogDebug) || r.Config.Logger == nil {
- return
- }
-
- b, err := httputil.DumpResponse(r.HTTPResponse, false)
- if err != nil {
- r.Config.Logger.Log(fmt.Sprintf(logRespErrMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, err))
- return
- }
-
- r.Config.Logger.Log(fmt.Sprintf(logRespMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, string(b)))
-}
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
deleted file mode 100644
index a7530ebb3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package metadata
-
-// ClientInfo wraps immutable data from the client.Client structure.
-type ClientInfo struct {
- ServiceName string
- ServiceID string
- APIVersion string
- PartitionID string
- Endpoint string
- SigningName string
- SigningRegion string
- JSONVersion string
- TargetPrefix string
- ResolvedRegion string
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/no_op_retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/client/no_op_retryer.go
deleted file mode 100644
index 881d575f0..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/no_op_retryer.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package client
-
-import (
- "time"
-
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// NoOpRetryer 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.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.Request) time.Duration {
- return 0
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go
deleted file mode 100644
index 4818ea427..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/config.go
+++ /dev/null
@@ -1,631 +0,0 @@
-package aws
-
-import (
- "net/http"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/endpoints"
-)
-
-// UseServiceDefaultRetries instructs the config to use the service's own
-// default number of retries. This will be the default action if
-// Config.MaxRetries is nil also.
-const UseServiceDefaultRetries = -1
-
-// RequestRetryer is an alias for a type that implements the request.Retryer
-// interface.
-type RequestRetryer interface{}
-
-// A Config provides service configuration for service clients. By default,
-// all clients will use the defaults.DefaultConfig structure.
-//
-// // Create Session with MaxRetries configuration to be shared by multiple
-// // service clients.
-// sess := session.Must(session.NewSession(&aws.Config{
-// MaxRetries: aws.Int(3),
-// }))
-//
-// // Create S3 service client with a specific Region.
-// svc := s3.New(sess, &aws.Config{
-// Region: aws.String("us-west-2"),
-// })
-type Config struct {
- // Enables verbose error printing of all credential chain errors.
- // Should be used when wanting to see all errors while attempting to
- // retrieve credentials.
- CredentialsChainVerboseErrors *bool
-
- // The credentials object to use when signing requests. Defaults to a
- // chain of credential providers to search for credentials in environment
- // variables, shared credential file, and EC2 Instance Roles.
- Credentials *credentials.Credentials
-
- // An optional endpoint URL (hostname only or fully qualified URI)
- // that overrides the default generated endpoint for a client. Set this
- // to `nil` or the value to `""` to use the default generated endpoint.
- //
- // Note: You must still provide a `Region` value when specifying an
- // endpoint for a client.
- Endpoint *string
-
- // The resolver to use for looking up endpoints for AWS service clients
- // to use based on region.
- EndpointResolver endpoints.Resolver
-
- // EnforceShouldRetryCheck is used in the AfterRetryHandler to always call
- // ShouldRetry regardless of whether or not if request.Retryable is set.
- // This will utilize ShouldRetry method of custom retryers. If EnforceShouldRetryCheck
- // is not set, then ShouldRetry will only be called if request.Retryable is nil.
- // Proper handling of the request.Retryable field is important when setting this field.
- EnforceShouldRetryCheck *bool
-
- // The region to send requests to. This parameter is required and must
- // be configured globally or on a per-client basis unless otherwise
- // noted. A full list of regions is found in the "Regions and Endpoints"
- // document.
- //
- // See http://docs.aws.amazon.com/general/latest/gr/rande.html for AWS
- // Regions and Endpoints.
- Region *string
-
- // Set this to `true` to disable SSL when sending requests. Defaults
- // to `false`.
- DisableSSL *bool
-
- // The HTTP client to use when sending requests. Defaults to
- // `http.DefaultClient`.
- HTTPClient *http.Client
-
- // An integer value representing the logging level. The default log level
- // is zero (LogOff), which represents no logging. To enable logging set
- // to a LogLevel Value.
- LogLevel *LogLevelType
-
- // The logger writer interface to write logging messages to. Defaults to
- // standard out.
- Logger Logger
-
- // The maximum number of times that a request will be retried for failures.
- // Defaults to -1, which defers the max retry setting to the service
- // specific configuration.
- MaxRetries *int
-
- // Retryer guides how HTTP requests should be retried in case of
- // recoverable failures.
- //
- // When nil or the value does not implement the request.Retryer interface,
- // the client.DefaultRetryer will be used.
- //
- // When both Retryer and MaxRetries are non-nil, the former is used and
- // the latter ignored.
- //
- // To set the Retryer field in a type-safe manner and with chaining, use
- // the request.WithRetryer helper function:
- //
- // cfg := request.WithRetryer(aws.NewConfig(), myRetryer)
- //
- Retryer RequestRetryer
-
- // Disables semantic parameter validation, which validates input for
- // missing required fields and/or other semantic request input errors.
- DisableParamValidation *bool
-
- // Disables the computation of request and response checksums, e.g.,
- // CRC32 checksums in Amazon DynamoDB.
- DisableComputeChecksums *bool
-
- // Set this to `true` to force the request to use path-style addressing,
- // i.e., `http://s3.amazonaws.com/BUCKET/KEY`. By default, the S3 client
- // will use virtual hosted bucket addressing when possible
- // (`http://BUCKET.s3.amazonaws.com/KEY`).
- //
- // Note: This configuration option is specific to the Amazon S3 service.
- //
- // See http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html
- // for Amazon S3: Virtual Hosting of Buckets
- S3ForcePathStyle *bool
-
- // Set this to `true` to disable the SDK adding the `Expect: 100-Continue`
- // header to PUT requests over 2MB of content. 100-Continue instructs the
- // HTTP client not to send the body until the service responds with a
- // `continue` status. This is useful to prevent sending the request body
- // until after the request is authenticated, and validated.
- //
- // http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html
- //
- // 100-Continue is only enabled for Go 1.6 and above. See `http.Transport`'s
- // `ExpectContinueTimeout` for information on adjusting the continue wait
- // timeout. https://golang.org/pkg/net/http/#Transport
- //
- // You should use this flag to disable 100-Continue if you experience issues
- // with proxies or third party S3 compatible services.
- S3Disable100Continue *bool
-
- // Set this to `true` to enable S3 Accelerate feature. For all operations
- // compatible with S3 Accelerate will use the accelerate endpoint for
- // requests. Requests not compatible will fall back to normal S3 requests.
- //
- // The bucket must be enable for accelerate to be used with S3 client with
- // accelerate enabled. If the bucket is not enabled for accelerate an error
- // will be returned. The bucket name must be DNS compatible to also work
- // with accelerate.
- S3UseAccelerate *bool
-
- // S3DisableContentMD5Validation config option is temporarily disabled,
- // For S3 GetObject API calls, #1837.
- //
- // Set this to `true` to disable the S3 service client from automatically
- // adding the ContentMD5 to S3 Object Put and Upload API calls. This option
- // will also disable the SDK from performing object ContentMD5 validation
- // 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.
- //
- // The AWS SDK for Go v2, uses lower case header maps by default. The v1
- // SDK provides this opt-in for this option, for backwards compatibility.
- 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
- // meaningful if you're not already using a custom HTTP client with the
- // SDK. Enabled by default.
- //
- // Must be set and provided to the session.NewSession() in order to disable
- // the EC2Metadata overriding the timeout for default credentials chain.
- //
- // Example:
- // sess := session.Must(session.NewSession(aws.NewConfig()
- // .WithEC2MetadataDisableTimeoutOverride(true)))
- //
- // svc := s3.New(sess)
- //
- EC2MetadataDisableTimeoutOverride *bool
-
- // Instructs the endpoint to be generated for a service client to
- // be the dual stack endpoint. The dual stack endpoint will support
- // both IPv4 and IPv6 addressing.
- //
- // Setting this for a service which does not support dual stack will fail
- // to make requests. It is not recommended to set this value on the session
- // as it will apply to all service clients created with the session. Even
- // services which don't support dual stack endpoints.
- //
- // If the Endpoint config value is also provided the UseDualStack flag
- // will be ignored.
- //
- // Only supported with.
- //
- // sess := session.Must(session.NewSession())
- //
- // svc := s3.New(sess, &aws.Config{
- // UseDualStack: aws.Bool(true),
- // })
- //
- // Deprecated: This option will continue to function for S3 and S3 Control for backwards compatibility.
- // UseDualStackEndpoint should be used to enable usage of a service's dual-stack endpoint for all service clients
- // moving forward. For S3 and S3 Control, when UseDualStackEndpoint is set to a non-zero value it takes higher
- // precedence then this option.
- UseDualStack *bool
-
- // Sets the resolver to resolve a dual-stack endpoint for the service.
- UseDualStackEndpoint endpoints.DualStackEndpointState
-
- // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
- UseFIPSEndpoint endpoints.FIPSEndpointState
-
- // SleepDelay is an override for the func the SDK will call when sleeping
- // during the lifecycle of a request. Specifically this will be used for
- // request delays. This value should only be used for testing. To adjust
- // the delay of a request see the aws/client.DefaultRetryer and
- // aws/request.Retryer.
- //
- // SleepDelay will prevent any Context from being used for canceling retry
- // delay of an API operation. It is recommended to not use SleepDelay at all
- // and specify a Retryer instead.
- SleepDelay func(time.Duration)
-
- // DisableRestProtocolURICleaning will not clean the URL path when making rest protocol requests.
- // Will default to false. This would only be used for empty directory names in s3 requests.
- //
- // Example:
- // sess := session.Must(session.NewSession(&aws.Config{
- // DisableRestProtocolURICleaning: aws.Bool(true),
- // }))
- //
- // svc := s3.New(sess)
- // out, err := svc.GetObject(&s3.GetObjectInput {
- // Bucket: aws.String("bucketname"),
- // Key: aws.String("//foo//bar//moo"),
- // })
- DisableRestProtocolURICleaning *bool
-
- // 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{
- // EnableEndpointDiscovery: aws.Bool(true),
- // }))
- //
- // svc := s3.New(sess)
- // out, err := svc.GetObject(&s3.GetObjectInput {
- // Bucket: aws.String("bucketname"),
- // Key: aws.String("/foo/bar/moo"),
- // })
- EnableEndpointDiscovery *bool
-
- // DisableEndpointHostPrefix will disable the SDK's behavior of prefixing
- // request endpoint hosts with modeled information.
- //
- // 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
-// methods to set multiple configuration values inline without using pointers.
-//
-// // Create Session with MaxRetries configuration to be shared by multiple
-// // service clients.
-// sess := session.Must(session.NewSession(aws.NewConfig().
-// WithMaxRetries(3),
-// ))
-//
-// // Create S3 service client with a specific Region.
-// svc := s3.New(sess, aws.NewConfig().
-// WithRegion("us-west-2"),
-// )
-func NewConfig() *Config {
- return &Config{}
-}
-
-// WithCredentialsChainVerboseErrors sets a config verbose errors boolean and returning
-// a Config pointer.
-func (c *Config) WithCredentialsChainVerboseErrors(verboseErrs bool) *Config {
- c.CredentialsChainVerboseErrors = &verboseErrs
- return c
-}
-
-// WithCredentials sets a config Credentials value returning a Config pointer
-// for chaining.
-func (c *Config) WithCredentials(creds *credentials.Credentials) *Config {
- c.Credentials = creds
- return c
-}
-
-// WithEndpoint sets a config Endpoint value returning a Config pointer for
-// chaining.
-func (c *Config) WithEndpoint(endpoint string) *Config {
- c.Endpoint = &endpoint
- return c
-}
-
-// WithEndpointResolver sets a config EndpointResolver value returning a
-// Config pointer for chaining.
-func (c *Config) WithEndpointResolver(resolver endpoints.Resolver) *Config {
- c.EndpointResolver = resolver
- return c
-}
-
-// WithRegion sets a config Region value returning a Config pointer for
-// chaining.
-func (c *Config) WithRegion(region string) *Config {
- c.Region = ®ion
- return c
-}
-
-// WithDisableSSL sets a config DisableSSL value returning a Config pointer
-// for chaining.
-func (c *Config) WithDisableSSL(disable bool) *Config {
- c.DisableSSL = &disable
- return c
-}
-
-// WithHTTPClient sets a config HTTPClient value returning a Config pointer
-// for chaining.
-func (c *Config) WithHTTPClient(client *http.Client) *Config {
- c.HTTPClient = client
- return c
-}
-
-// WithMaxRetries sets a config MaxRetries value returning a Config pointer
-// for chaining.
-func (c *Config) WithMaxRetries(max int) *Config {
- c.MaxRetries = &max
- return c
-}
-
-// WithDisableParamValidation sets a config DisableParamValidation value
-// returning a Config pointer for chaining.
-func (c *Config) WithDisableParamValidation(disable bool) *Config {
- c.DisableParamValidation = &disable
- return c
-}
-
-// WithDisableComputeChecksums sets a config DisableComputeChecksums value
-// returning a Config pointer for chaining.
-func (c *Config) WithDisableComputeChecksums(disable bool) *Config {
- c.DisableComputeChecksums = &disable
- return c
-}
-
-// WithLogLevel sets a config LogLevel value returning a Config pointer for
-// chaining.
-func (c *Config) WithLogLevel(level LogLevelType) *Config {
- c.LogLevel = &level
- return c
-}
-
-// WithLogger sets a config Logger value returning a Config pointer for
-// chaining.
-func (c *Config) WithLogger(logger Logger) *Config {
- c.Logger = logger
- return c
-}
-
-// WithS3ForcePathStyle sets a config S3ForcePathStyle value returning a Config
-// pointer for chaining.
-func (c *Config) WithS3ForcePathStyle(force bool) *Config {
- c.S3ForcePathStyle = &force
- return c
-}
-
-// WithS3Disable100Continue sets a config S3Disable100Continue value returning
-// a Config pointer for chaining.
-func (c *Config) WithS3Disable100Continue(disable bool) *Config {
- c.S3Disable100Continue = &disable
- return c
-}
-
-// WithS3UseAccelerate sets a config S3UseAccelerate value returning a Config
-// pointer for chaining.
-func (c *Config) WithS3UseAccelerate(enable bool) *Config {
- c.S3UseAccelerate = &enable
- return c
-
-}
-
-// WithS3DisableContentMD5Validation sets a config
-// S3DisableContentMD5Validation value returning a Config pointer for chaining.
-func (c *Config) WithS3DisableContentMD5Validation(enable bool) *Config {
- c.S3DisableContentMD5Validation = &enable
- return c
-
-}
-
-// 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 {
- c.UseDualStack = &enable
- return c
-}
-
-// WithEC2MetadataDisableTimeoutOverride sets a config EC2MetadataDisableTimeoutOverride value
-// returning a Config pointer for chaining.
-func (c *Config) WithEC2MetadataDisableTimeoutOverride(enable bool) *Config {
- c.EC2MetadataDisableTimeoutOverride = &enable
- return c
-}
-
-// WithSleepDelay overrides the function used to sleep while waiting for the
-// next retry. Defaults to time.Sleep.
-func (c *Config) WithSleepDelay(fn func(time.Duration)) *Config {
- c.SleepDelay = fn
- return c
-}
-
-// WithEndpointDiscovery will set whether or not to use endpoint discovery.
-func (c *Config) WithEndpointDiscovery(t bool) *Config {
- c.EnableEndpointDiscovery = &t
- return c
-}
-
-// WithDisableEndpointHostPrefix will set whether or not to use modeled host prefix
-// when making requests.
-func (c *Config) WithDisableEndpointHostPrefix(t bool) *Config {
- c.DisableEndpointHostPrefix = &t
- return c
-}
-
-// 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
-}
-
-// WithLowerCaseHeaderMaps sets a config LowerCaseHeaderMaps value
-// returning a Config pointer for chaining.
-func (c *Config) WithLowerCaseHeaderMaps(t bool) *Config {
- c.LowerCaseHeaderMaps = &t
- return c
-}
-
-// WithDisableRestProtocolURICleaning sets a config DisableRestProtocolURICleaning value
-// returning a Config pointer for chaining.
-func (c *Config) WithDisableRestProtocolURICleaning(t bool) *Config {
- c.DisableRestProtocolURICleaning = &t
- return c
-}
-
-// MergeIn merges the passed in configs into the existing config object.
-func (c *Config) MergeIn(cfgs ...*Config) {
- for _, other := range cfgs {
- mergeInConfig(c, other)
- }
-}
-
-func mergeInConfig(dst *Config, other *Config) {
- if other == nil {
- return
- }
-
- if other.CredentialsChainVerboseErrors != nil {
- dst.CredentialsChainVerboseErrors = other.CredentialsChainVerboseErrors
- }
-
- if other.Credentials != nil {
- dst.Credentials = other.Credentials
- }
-
- if other.Endpoint != nil {
- dst.Endpoint = other.Endpoint
- }
-
- if other.EndpointResolver != nil {
- dst.EndpointResolver = other.EndpointResolver
- }
-
- if other.Region != nil {
- dst.Region = other.Region
- }
-
- if other.DisableSSL != nil {
- dst.DisableSSL = other.DisableSSL
- }
-
- if other.HTTPClient != nil {
- dst.HTTPClient = other.HTTPClient
- }
-
- if other.LogLevel != nil {
- dst.LogLevel = other.LogLevel
- }
-
- if other.Logger != nil {
- dst.Logger = other.Logger
- }
-
- if other.MaxRetries != nil {
- dst.MaxRetries = other.MaxRetries
- }
-
- if other.Retryer != nil {
- dst.Retryer = other.Retryer
- }
-
- if other.DisableParamValidation != nil {
- dst.DisableParamValidation = other.DisableParamValidation
- }
-
- if other.DisableComputeChecksums != nil {
- dst.DisableComputeChecksums = other.DisableComputeChecksums
- }
-
- if other.S3ForcePathStyle != nil {
- dst.S3ForcePathStyle = other.S3ForcePathStyle
- }
-
- if other.S3Disable100Continue != nil {
- dst.S3Disable100Continue = other.S3Disable100Continue
- }
-
- if other.S3UseAccelerate != nil {
- dst.S3UseAccelerate = other.S3UseAccelerate
- }
-
- if other.S3DisableContentMD5Validation != nil {
- dst.S3DisableContentMD5Validation = other.S3DisableContentMD5Validation
- }
-
- if other.S3UseARNRegion != nil {
- dst.S3UseARNRegion = other.S3UseARNRegion
- }
-
- if other.UseDualStack != nil {
- dst.UseDualStack = other.UseDualStack
- }
-
- if other.UseDualStackEndpoint != endpoints.DualStackEndpointStateUnset {
- dst.UseDualStackEndpoint = other.UseDualStackEndpoint
- }
-
- if other.EC2MetadataDisableTimeoutOverride != nil {
- dst.EC2MetadataDisableTimeoutOverride = other.EC2MetadataDisableTimeoutOverride
- }
-
- if other.SleepDelay != nil {
- dst.SleepDelay = other.SleepDelay
- }
-
- if other.DisableRestProtocolURICleaning != nil {
- dst.DisableRestProtocolURICleaning = other.DisableRestProtocolURICleaning
- }
-
- if other.EnforceShouldRetryCheck != nil {
- dst.EnforceShouldRetryCheck = other.EnforceShouldRetryCheck
- }
-
- if other.EnableEndpointDiscovery != nil {
- dst.EnableEndpointDiscovery = other.EnableEndpointDiscovery
- }
-
- 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
- }
-
- if other.LowerCaseHeaderMaps != nil {
- dst.LowerCaseHeaderMaps = other.LowerCaseHeaderMaps
- }
-
- if other.UseDualStackEndpoint != endpoints.DualStackEndpointStateUnset {
- dst.UseDualStackEndpoint = other.UseDualStackEndpoint
- }
-
- if other.UseFIPSEndpoint != endpoints.FIPSEndpointStateUnset {
- dst.UseFIPSEndpoint = other.UseFIPSEndpoint
- }
-}
-
-// Copy will return a shallow copy of the Config object. If any additional
-// configurations are provided they will be merged into the new config returned.
-func (c *Config) Copy(cfgs ...*Config) *Config {
- dst := &Config{}
- dst.MergeIn(c)
-
- for _, cfg := range cfgs {
- dst.MergeIn(cfg)
- }
-
- return dst
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_5.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_5.go
deleted file mode 100644
index 89aad2c67..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/context_1_5.go
+++ /dev/null
@@ -1,38 +0,0 @@
-//go:build !go1.9
-// +build !go1.9
-
-package aws
-
-import "time"
-
-// Context is an copy of the Go v1.7 stdlib's context.Context interface.
-// It is represented as a SDK interface to enable you to use the "WithContext"
-// API methods with Go v1.6 and a Context type such as golang.org/x/net/context.
-//
-// See https://golang.org/pkg/context on how to use contexts.
-type Context interface {
- // Deadline returns the time when work done on behalf of this context
- // should be canceled. Deadline returns ok==false when no deadline is
- // set. Successive calls to Deadline return the same results.
- Deadline() (deadline time.Time, ok bool)
-
- // Done returns a channel that's closed when work done on behalf of this
- // context should be canceled. Done may return nil if this context can
- // never be canceled. Successive calls to Done return the same value.
- Done() <-chan struct{}
-
- // Err returns a non-nil error value after Done is closed. Err returns
- // Canceled if the context was canceled or DeadlineExceeded if the
- // context's deadline passed. No other values for Err are defined.
- // After Done is closed, successive calls to Err return the same value.
- Err() error
-
- // Value returns the value associated with this context for key, or nil
- // if no value is associated with key. Successive calls to Value with
- // the same key returns the same result.
- //
- // Use context values only for request-scoped data that transits
- // processes and API boundaries, not for passing optional parameters to
- // functions.
- Value(key interface{}) interface{}
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_9.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_9.go
deleted file mode 100644
index 6ee9ddd18..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/context_1_9.go
+++ /dev/null
@@ -1,12 +0,0 @@
-//go:build go1.9
-// +build go1.9
-
-package aws
-
-import "context"
-
-// Context is an alias of the Go stdlib's context.Context interface.
-// It can be used within the SDK's API operation "WithContext" methods.
-//
-// See https://golang.org/pkg/context on how to use contexts.
-type Context = context.Context
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
deleted file mode 100644
index 313218190..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_5.go
+++ /dev/null
@@ -1,23 +0,0 @@
-//go:build !go1.7
-// +build !go1.7
-
-package aws
-
-import (
- "github.com/aws/aws-sdk-go/internal/context"
-)
-
-// BackgroundContext returns a context that will never be canceled, has no
-// values, and no deadline. This context is used by the SDK to provide
-// backwards compatibility with non-context API operations and functionality.
-//
-// Go 1.6 and before:
-// This context function is equivalent to context.Background in the Go stdlib.
-//
-// Go 1.7 and later:
-// The context returned will be the value returned by context.Background()
-//
-// See https://golang.org/pkg/context for more information on Contexts.
-func BackgroundContext() Context {
- return context.BackgroundCtx
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_7.go
deleted file mode 100644
index 9975d561b..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_7.go
+++ /dev/null
@@ -1,21 +0,0 @@
-//go:build go1.7
-// +build go1.7
-
-package aws
-
-import "context"
-
-// BackgroundContext returns a context that will never be canceled, has no
-// values, and no deadline. This context is used by the SDK to provide
-// backwards compatibility with non-context API operations and functionality.
-//
-// Go 1.6 and before:
-// This context function is equivalent to context.Background in the Go stdlib.
-//
-// Go 1.7 and later:
-// The context returned will be the value returned by context.Background()
-//
-// See https://golang.org/pkg/context for more information on Contexts.
-func BackgroundContext() Context {
- return context.Background()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_sleep.go b/vendor/github.com/aws/aws-sdk-go/aws/context_sleep.go
deleted file mode 100644
index 304fd1561..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/context_sleep.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package aws
-
-import (
- "time"
-)
-
-// SleepWithContext will wait for the timer duration to expire, or the context
-// is canceled. Which ever happens first. If the context is canceled the Context's
-// error will be returned.
-//
-// Expects Context to always return a non-nil error if the Done channel is closed.
-func SleepWithContext(ctx Context, dur time.Duration) error {
- t := time.NewTimer(dur)
- defer t.Stop()
-
- select {
- case <-t.C:
- break
- case <-ctx.Done():
- return ctx.Err()
- }
-
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go b/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
deleted file mode 100644
index 4e076c183..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
+++ /dev/null
@@ -1,918 +0,0 @@
-package aws
-
-import "time"
-
-// String returns a pointer to the string value passed in.
-func String(v string) *string {
- return &v
-}
-
-// StringValue returns the value of the string pointer passed in or
-// "" if the pointer is nil.
-func StringValue(v *string) string {
- if v != nil {
- return *v
- }
- return ""
-}
-
-// StringSlice converts a slice of string values into a slice of
-// string pointers
-func StringSlice(src []string) []*string {
- dst := make([]*string, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// StringValueSlice converts a slice of string pointers into a slice of
-// string values
-func StringValueSlice(src []*string) []string {
- dst := make([]string, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// StringMap converts a string map of string values into a string
-// map of string pointers
-func StringMap(src map[string]string) map[string]*string {
- dst := make(map[string]*string)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// StringValueMap converts a string map of string pointers into a string
-// map of string values
-func StringValueMap(src map[string]*string) map[string]string {
- dst := make(map[string]string)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Bool returns a pointer to the bool value passed in.
-func Bool(v bool) *bool {
- return &v
-}
-
-// BoolValue returns the value of the bool pointer passed in or
-// false if the pointer is nil.
-func BoolValue(v *bool) bool {
- if v != nil {
- return *v
- }
- return false
-}
-
-// BoolSlice converts a slice of bool values into a slice of
-// bool pointers
-func BoolSlice(src []bool) []*bool {
- dst := make([]*bool, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// BoolValueSlice converts a slice of bool pointers into a slice of
-// bool values
-func BoolValueSlice(src []*bool) []bool {
- dst := make([]bool, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// BoolMap converts a string map of bool values into a string
-// map of bool pointers
-func BoolMap(src map[string]bool) map[string]*bool {
- dst := make(map[string]*bool)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// BoolValueMap converts a string map of bool pointers into a string
-// map of bool values
-func BoolValueMap(src map[string]*bool) map[string]bool {
- dst := make(map[string]bool)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Int returns a pointer to the int value passed in.
-func Int(v int) *int {
- return &v
-}
-
-// IntValue returns the value of the int pointer passed in or
-// 0 if the pointer is nil.
-func IntValue(v *int) int {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// IntSlice converts a slice of int values into a slice of
-// int pointers
-func IntSlice(src []int) []*int {
- dst := make([]*int, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// IntValueSlice converts a slice of int pointers into a slice of
-// int values
-func IntValueSlice(src []*int) []int {
- dst := make([]int, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// IntMap converts a string map of int values into a string
-// map of int pointers
-func IntMap(src map[string]int) map[string]*int {
- dst := make(map[string]*int)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// IntValueMap converts a string map of int pointers into a string
-// map of int values
-func IntValueMap(src map[string]*int) map[string]int {
- dst := make(map[string]int)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Uint returns a pointer to the uint value passed in.
-func Uint(v uint) *uint {
- return &v
-}
-
-// UintValue returns the value of the uint pointer passed in or
-// 0 if the pointer is nil.
-func UintValue(v *uint) uint {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// UintSlice converts a slice of uint values uinto a slice of
-// uint pointers
-func UintSlice(src []uint) []*uint {
- dst := make([]*uint, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// UintValueSlice converts a slice of uint pointers uinto a slice of
-// uint values
-func UintValueSlice(src []*uint) []uint {
- dst := make([]uint, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// UintMap converts a string map of uint values uinto a string
-// map of uint pointers
-func UintMap(src map[string]uint) map[string]*uint {
- dst := make(map[string]*uint)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// UintValueMap converts a string map of uint pointers uinto a string
-// map of uint values
-func UintValueMap(src map[string]*uint) map[string]uint {
- dst := make(map[string]uint)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Int8 returns a pointer to the int8 value passed in.
-func Int8(v int8) *int8 {
- return &v
-}
-
-// Int8Value returns the value of the int8 pointer passed in or
-// 0 if the pointer is nil.
-func Int8Value(v *int8) int8 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Int8Slice converts a slice of int8 values into a slice of
-// int8 pointers
-func Int8Slice(src []int8) []*int8 {
- dst := make([]*int8, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Int8ValueSlice converts a slice of int8 pointers into a slice of
-// int8 values
-func Int8ValueSlice(src []*int8) []int8 {
- dst := make([]int8, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Int8Map converts a string map of int8 values into a string
-// map of int8 pointers
-func Int8Map(src map[string]int8) map[string]*int8 {
- dst := make(map[string]*int8)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Int8ValueMap converts a string map of int8 pointers into a string
-// map of int8 values
-func Int8ValueMap(src map[string]*int8) map[string]int8 {
- dst := make(map[string]int8)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Int16 returns a pointer to the int16 value passed in.
-func Int16(v int16) *int16 {
- return &v
-}
-
-// Int16Value returns the value of the int16 pointer passed in or
-// 0 if the pointer is nil.
-func Int16Value(v *int16) int16 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Int16Slice converts a slice of int16 values into a slice of
-// int16 pointers
-func Int16Slice(src []int16) []*int16 {
- dst := make([]*int16, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Int16ValueSlice converts a slice of int16 pointers into a slice of
-// int16 values
-func Int16ValueSlice(src []*int16) []int16 {
- dst := make([]int16, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Int16Map converts a string map of int16 values into a string
-// map of int16 pointers
-func Int16Map(src map[string]int16) map[string]*int16 {
- dst := make(map[string]*int16)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Int16ValueMap converts a string map of int16 pointers into a string
-// map of int16 values
-func Int16ValueMap(src map[string]*int16) map[string]int16 {
- dst := make(map[string]int16)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Int32 returns a pointer to the int32 value passed in.
-func Int32(v int32) *int32 {
- return &v
-}
-
-// Int32Value returns the value of the int32 pointer passed in or
-// 0 if the pointer is nil.
-func Int32Value(v *int32) int32 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Int32Slice converts a slice of int32 values into a slice of
-// int32 pointers
-func Int32Slice(src []int32) []*int32 {
- dst := make([]*int32, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Int32ValueSlice converts a slice of int32 pointers into a slice of
-// int32 values
-func Int32ValueSlice(src []*int32) []int32 {
- dst := make([]int32, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Int32Map converts a string map of int32 values into a string
-// map of int32 pointers
-func Int32Map(src map[string]int32) map[string]*int32 {
- dst := make(map[string]*int32)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Int32ValueMap converts a string map of int32 pointers into a string
-// map of int32 values
-func Int32ValueMap(src map[string]*int32) map[string]int32 {
- dst := make(map[string]int32)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Int64 returns a pointer to the int64 value passed in.
-func Int64(v int64) *int64 {
- return &v
-}
-
-// Int64Value returns the value of the int64 pointer passed in or
-// 0 if the pointer is nil.
-func Int64Value(v *int64) int64 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Int64Slice converts a slice of int64 values into a slice of
-// int64 pointers
-func Int64Slice(src []int64) []*int64 {
- dst := make([]*int64, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Int64ValueSlice converts a slice of int64 pointers into a slice of
-// int64 values
-func Int64ValueSlice(src []*int64) []int64 {
- dst := make([]int64, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Int64Map converts a string map of int64 values into a string
-// map of int64 pointers
-func Int64Map(src map[string]int64) map[string]*int64 {
- dst := make(map[string]*int64)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Int64ValueMap converts a string map of int64 pointers into a string
-// map of int64 values
-func Int64ValueMap(src map[string]*int64) map[string]int64 {
- dst := make(map[string]int64)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Uint8 returns a pointer to the uint8 value passed in.
-func Uint8(v uint8) *uint8 {
- return &v
-}
-
-// Uint8Value returns the value of the uint8 pointer passed in or
-// 0 if the pointer is nil.
-func Uint8Value(v *uint8) uint8 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Uint8Slice converts a slice of uint8 values into a slice of
-// uint8 pointers
-func Uint8Slice(src []uint8) []*uint8 {
- dst := make([]*uint8, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Uint8ValueSlice converts a slice of uint8 pointers into a slice of
-// uint8 values
-func Uint8ValueSlice(src []*uint8) []uint8 {
- dst := make([]uint8, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Uint8Map converts a string map of uint8 values into a string
-// map of uint8 pointers
-func Uint8Map(src map[string]uint8) map[string]*uint8 {
- dst := make(map[string]*uint8)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Uint8ValueMap converts a string map of uint8 pointers into a string
-// map of uint8 values
-func Uint8ValueMap(src map[string]*uint8) map[string]uint8 {
- dst := make(map[string]uint8)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Uint16 returns a pointer to the uint16 value passed in.
-func Uint16(v uint16) *uint16 {
- return &v
-}
-
-// Uint16Value returns the value of the uint16 pointer passed in or
-// 0 if the pointer is nil.
-func Uint16Value(v *uint16) uint16 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Uint16Slice converts a slice of uint16 values into a slice of
-// uint16 pointers
-func Uint16Slice(src []uint16) []*uint16 {
- dst := make([]*uint16, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Uint16ValueSlice converts a slice of uint16 pointers into a slice of
-// uint16 values
-func Uint16ValueSlice(src []*uint16) []uint16 {
- dst := make([]uint16, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Uint16Map converts a string map of uint16 values into a string
-// map of uint16 pointers
-func Uint16Map(src map[string]uint16) map[string]*uint16 {
- dst := make(map[string]*uint16)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Uint16ValueMap converts a string map of uint16 pointers into a string
-// map of uint16 values
-func Uint16ValueMap(src map[string]*uint16) map[string]uint16 {
- dst := make(map[string]uint16)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Uint32 returns a pointer to the uint32 value passed in.
-func Uint32(v uint32) *uint32 {
- return &v
-}
-
-// Uint32Value returns the value of the uint32 pointer passed in or
-// 0 if the pointer is nil.
-func Uint32Value(v *uint32) uint32 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Uint32Slice converts a slice of uint32 values into a slice of
-// uint32 pointers
-func Uint32Slice(src []uint32) []*uint32 {
- dst := make([]*uint32, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Uint32ValueSlice converts a slice of uint32 pointers into a slice of
-// uint32 values
-func Uint32ValueSlice(src []*uint32) []uint32 {
- dst := make([]uint32, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Uint32Map converts a string map of uint32 values into a string
-// map of uint32 pointers
-func Uint32Map(src map[string]uint32) map[string]*uint32 {
- dst := make(map[string]*uint32)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Uint32ValueMap converts a string map of uint32 pointers into a string
-// map of uint32 values
-func Uint32ValueMap(src map[string]*uint32) map[string]uint32 {
- dst := make(map[string]uint32)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Uint64 returns a pointer to the uint64 value passed in.
-func Uint64(v uint64) *uint64 {
- return &v
-}
-
-// Uint64Value returns the value of the uint64 pointer passed in or
-// 0 if the pointer is nil.
-func Uint64Value(v *uint64) uint64 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Uint64Slice converts a slice of uint64 values into a slice of
-// uint64 pointers
-func Uint64Slice(src []uint64) []*uint64 {
- dst := make([]*uint64, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Uint64ValueSlice converts a slice of uint64 pointers into a slice of
-// uint64 values
-func Uint64ValueSlice(src []*uint64) []uint64 {
- dst := make([]uint64, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Uint64Map converts a string map of uint64 values into a string
-// map of uint64 pointers
-func Uint64Map(src map[string]uint64) map[string]*uint64 {
- dst := make(map[string]*uint64)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Uint64ValueMap converts a string map of uint64 pointers into a string
-// map of uint64 values
-func Uint64ValueMap(src map[string]*uint64) map[string]uint64 {
- dst := make(map[string]uint64)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Float32 returns a pointer to the float32 value passed in.
-func Float32(v float32) *float32 {
- return &v
-}
-
-// Float32Value returns the value of the float32 pointer passed in or
-// 0 if the pointer is nil.
-func Float32Value(v *float32) float32 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Float32Slice converts a slice of float32 values into a slice of
-// float32 pointers
-func Float32Slice(src []float32) []*float32 {
- dst := make([]*float32, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Float32ValueSlice converts a slice of float32 pointers into a slice of
-// float32 values
-func Float32ValueSlice(src []*float32) []float32 {
- dst := make([]float32, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Float32Map converts a string map of float32 values into a string
-// map of float32 pointers
-func Float32Map(src map[string]float32) map[string]*float32 {
- dst := make(map[string]*float32)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Float32ValueMap converts a string map of float32 pointers into a string
-// map of float32 values
-func Float32ValueMap(src map[string]*float32) map[string]float32 {
- dst := make(map[string]float32)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Float64 returns a pointer to the float64 value passed in.
-func Float64(v float64) *float64 {
- return &v
-}
-
-// Float64Value returns the value of the float64 pointer passed in or
-// 0 if the pointer is nil.
-func Float64Value(v *float64) float64 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Float64Slice converts a slice of float64 values into a slice of
-// float64 pointers
-func Float64Slice(src []float64) []*float64 {
- dst := make([]*float64, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Float64ValueSlice converts a slice of float64 pointers into a slice of
-// float64 values
-func Float64ValueSlice(src []*float64) []float64 {
- dst := make([]float64, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Float64Map converts a string map of float64 values into a string
-// map of float64 pointers
-func Float64Map(src map[string]float64) map[string]*float64 {
- dst := make(map[string]*float64)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Float64ValueMap converts a string map of float64 pointers into a string
-// map of float64 values
-func Float64ValueMap(src map[string]*float64) map[string]float64 {
- dst := make(map[string]float64)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Time returns a pointer to the time.Time value passed in.
-func Time(v time.Time) *time.Time {
- return &v
-}
-
-// TimeValue returns the value of the time.Time pointer passed in or
-// time.Time{} if the pointer is nil.
-func TimeValue(v *time.Time) time.Time {
- if v != nil {
- return *v
- }
- return time.Time{}
-}
-
-// SecondsTimeValue converts an int64 pointer to a time.Time value
-// representing seconds since Epoch or time.Time{} if the pointer is nil.
-func SecondsTimeValue(v *int64) time.Time {
- if v != nil {
- return time.Unix((*v / 1000), 0)
- }
- return time.Time{}
-}
-
-// MillisecondsTimeValue converts an int64 pointer to a time.Time value
-// representing milliseconds sinch Epoch or time.Time{} if the pointer is nil.
-func MillisecondsTimeValue(v *int64) time.Time {
- if v != nil {
- return time.Unix(0, (*v * 1000000))
- }
- return time.Time{}
-}
-
-// TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC".
-// The result is undefined if the Unix time cannot be represented by an int64.
-// Which includes calling TimeUnixMilli on a zero Time is undefined.
-//
-// This utility is useful for service API's such as CloudWatch Logs which require
-// their unix time values to be in milliseconds.
-//
-// See Go stdlib https://golang.org/pkg/time/#Time.UnixNano for more information.
-func TimeUnixMilli(t time.Time) int64 {
- return t.UnixNano() / int64(time.Millisecond/time.Nanosecond)
-}
-
-// TimeSlice converts a slice of time.Time values into a slice of
-// time.Time pointers
-func TimeSlice(src []time.Time) []*time.Time {
- dst := make([]*time.Time, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// TimeValueSlice converts a slice of time.Time pointers into a slice of
-// time.Time values
-func TimeValueSlice(src []*time.Time) []time.Time {
- dst := make([]time.Time, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// TimeMap converts a string map of time.Time values into a string
-// map of time.Time pointers
-func TimeMap(src map[string]time.Time) map[string]*time.Time {
- dst := make(map[string]*time.Time)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// TimeValueMap converts a string map of time.Time pointers into a string
-// map of time.Time values
-func TimeValueMap(src map[string]*time.Time) map[string]time.Time {
- dst := make(map[string]time.Time)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
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
deleted file mode 100644
index 36a915efe..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
+++ /dev/null
@@ -1,232 +0,0 @@
-package corehandlers
-
-import (
- "bytes"
- "fmt"
- "io/ioutil"
- "net/http"
- "net/url"
- "regexp"
- "strconv"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// Interface for matching types which also have a Len method.
-type lener interface {
- Len() int
-}
-
-// BuildContentLengthHandler builds the content length of a request based on the body,
-// or will use the HTTPRequest.Header's "Content-Length" if defined. If unable
-// to determine request body length and no "Content-Length" was specified it will panic.
-//
-// The Content-Length will only be added to the request if the length of the body
-// is greater than 0. If the body is empty or the current `Content-Length`
-// header is <= 0, the header will also be stripped.
-var BuildContentLengthHandler = request.NamedHandler{Name: "core.BuildContentLengthHandler", Fn: func(r *request.Request) {
- var length int64
-
- if slength := r.HTTPRequest.Header.Get("Content-Length"); slength != "" {
- length, _ = strconv.ParseInt(slength, 10, 64)
- } else {
- if r.Body != nil {
- var err error
- length, err = aws.SeekerLen(r.Body)
- if err != nil {
- r.Error = awserr.New(request.ErrCodeSerialization, "failed to get request body's length", err)
- return
- }
- }
- }
-
- if length > 0 {
- r.HTTPRequest.ContentLength = length
- r.HTTPRequest.Header.Set("Content-Length", fmt.Sprintf("%d", length))
- } else {
- r.HTTPRequest.ContentLength = 0
- r.HTTPRequest.Header.Del("Content-Length")
- }
-}}
-
-var reStatusCode = regexp.MustCompile(`^(\d{3})`)
-
-// ValidateReqSigHandler is a request handler to ensure that the request's
-// signature doesn't expire before it is sent. This can happen when a request
-// is built and signed significantly before it is sent. Or significant delays
-// occur when retrying requests that would cause the signature to expire.
-var ValidateReqSigHandler = request.NamedHandler{
- Name: "core.ValidateReqSigHandler",
- Fn: func(r *request.Request) {
- // Unsigned requests are not signed
- if r.Config.Credentials == credentials.AnonymousCredentials {
- return
- }
-
- signedTime := r.Time
- if !r.LastSignedAt.IsZero() {
- signedTime = r.LastSignedAt
- }
-
- // 5 minutes to allow for some clock skew/delays in transmission.
- // Would be improved with aws/aws-sdk-go#423
- if signedTime.Add(5 * time.Minute).After(time.Now()) {
- return
- }
-
- fmt.Println("request expired, resigning")
- r.Sign()
- },
-}
-
-// SendHandler is a request handler to send service request using HTTP client.
-var SendHandler = request.NamedHandler{
- Name: "core.SendHandler",
- Fn: func(r *request.Request) {
- sender := sendFollowRedirects
- if r.DisableFollowRedirects {
- sender = sendWithoutFollowRedirects
- }
-
- if request.NoBody == r.HTTPRequest.Body {
- // Strip off the request body if the NoBody reader was used as a
- // place holder for a request body. This prevents the SDK from
- // making requests with a request body when it would be invalid
- // to do so.
- //
- // Use a shallow copy of the http.Request to ensure the race condition
- // of transport on Body will not trigger
- reqOrig, reqCopy := r.HTTPRequest, *r.HTTPRequest
- reqCopy.Body = nil
- r.HTTPRequest = &reqCopy
- defer func() {
- r.HTTPRequest = reqOrig
- }()
- }
-
- var err error
- r.HTTPResponse, err = sender(r)
- if err != nil {
- handleSendError(r, err)
- }
- },
-}
-
-func sendFollowRedirects(r *request.Request) (*http.Response, error) {
- return r.Config.HTTPClient.Do(r.HTTPRequest)
-}
-
-func sendWithoutFollowRedirects(r *request.Request) (*http.Response, error) {
- transport := r.Config.HTTPClient.Transport
- if transport == nil {
- transport = http.DefaultTransport
- }
-
- return transport.RoundTrip(r.HTTPRequest)
-}
-
-func handleSendError(r *request.Request, err error) {
- // Prevent leaking if an HTTPResponse was returned. Clean up
- // the body.
- if r.HTTPResponse != nil {
- r.HTTPResponse.Body.Close()
- }
- // Capture the case where url.Error is returned for error processing
- // response. e.g. 301 without location header comes back as string
- // error and r.HTTPResponse is nil. Other URL redirect errors will
- // comeback in a similar method.
- if e, ok := err.(*url.Error); ok && e.Err != nil {
- if s := reStatusCode.FindStringSubmatch(e.Err.Error()); s != nil {
- code, _ := strconv.ParseInt(s[1], 10, 64)
- r.HTTPResponse = &http.Response{
- StatusCode: int(code),
- Status: http.StatusText(int(code)),
- Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
- }
- return
- }
- }
- if r.HTTPResponse == nil {
- // Add a dummy request response object to ensure the HTTPResponse
- // value is consistent.
- r.HTTPResponse = &http.Response{
- StatusCode: int(0),
- Status: http.StatusText(int(0)),
- Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
- }
- }
- // Catch all request errors, and let the default retrier determine
- // if the error is retryable.
- 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()
- select {
- case <-ctx.Done():
- r.Error = awserr.New(request.CanceledErrorCode,
- "request context canceled", ctx.Err())
- r.Retryable = aws.Bool(false)
- default:
- }
-}
-
-// ValidateResponseHandler is a request handler to validate service response.
-var ValidateResponseHandler = request.NamedHandler{Name: "core.ValidateResponseHandler", Fn: func(r *request.Request) {
- if r.HTTPResponse.StatusCode == 0 || r.HTTPResponse.StatusCode >= 300 {
- // this may be replaced by an UnmarshalError handler
- r.Error = awserr.New("UnknownError", "unknown error", r.Error)
- }
-}}
-
-// AfterRetryHandler performs final checks to determine if the request should
-// be retried and how long to delay.
-var AfterRetryHandler = request.NamedHandler{
- Name: "core.AfterRetryHandler",
- Fn: func(r *request.Request) {
- // If one of the other handlers already set the retry state
- // we don't want to override it based on the service's state
- if r.Retryable == nil || aws.BoolValue(r.Config.EnforceShouldRetryCheck) {
- r.Retryable = aws.Bool(r.ShouldRetry(r))
- }
-
- if r.WillRetry() {
- r.RetryDelay = r.RetryRules(r)
-
- if sleepFn := r.Config.SleepDelay; sleepFn != nil {
- // Support SleepDelay for backwards compatibility and testing
- sleepFn(r.RetryDelay)
- } else if err := aws.SleepWithContext(r.Context(), r.RetryDelay); err != nil {
- r.Error = awserr.New(request.CanceledErrorCode,
- "request context canceled", err)
- r.Retryable = aws.Bool(false)
- return
- }
-
- // when the expired token exception occurs the credentials
- // need to be expired locally so that the next request to
- // get credentials will trigger a credentials refresh.
- if r.IsErrorExpired() {
- r.Config.Credentials.Expire()
- }
-
- r.RetryCount++
- r.Error = nil
- }
- }}
-
-// ValidateEndpointHandler is a request handler to validate a request had the
-// appropriate Region and Endpoint set. Will set r.Error if the endpoint or
-// region is not valid.
-var ValidateEndpointHandler = request.NamedHandler{Name: "core.ValidateEndpointHandler", Fn: func(r *request.Request) {
- if r.ClientInfo.SigningRegion == "" && aws.StringValue(r.Config.Region) == "" {
- r.Error = aws.ErrMissingRegion
- } else if r.ClientInfo.Endpoint == "" {
- // Was any endpoint provided by the user, or one was derived by the
- // SDK's endpoint resolver?
- r.Error = aws.ErrMissingEndpoint
- }
-}}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go
deleted file mode 100644
index 7d50b1557..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package corehandlers
-
-import "github.com/aws/aws-sdk-go/aws/request"
-
-// ValidateParametersHandler is a request handler to validate the input parameters.
-// Validating parameters only has meaning if done prior to the request being sent.
-var ValidateParametersHandler = request.NamedHandler{Name: "core.ValidateParametersHandler", Fn: func(r *request.Request) {
- if !r.ParamsFilled() {
- return
- }
-
- if v, ok := r.Params.(request.Validator); ok {
- if err := v.Validate(); err != nil {
- r.Error = err
- }
- }
-}}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go
deleted file mode 100644
index ab69c7a6f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go
+++ /dev/null
@@ -1,37 +0,0 @@
-package corehandlers
-
-import (
- "os"
- "runtime"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// SDKVersionUserAgentHandler is a request handler for adding the SDK Version
-// to the user agent.
-var SDKVersionUserAgentHandler = request.NamedHandler{
- Name: "core.SDKVersionUserAgentHandler",
- Fn: request.MakeAddToUserAgentHandler(aws.SDKName, aws.SDKVersion,
- runtime.Version(), runtime.GOOS, runtime.GOARCH),
-}
-
-const execEnvVar = `AWS_EXECUTION_ENV`
-const execEnvUAKey = `exec-env`
-
-// AddHostExecEnvUserAgentHander is a request handler appending the SDK's
-// execution environment to the user agent.
-//
-// If the environment variable AWS_EXECUTION_ENV is set, its value will be
-// appended to the user agent string.
-var AddHostExecEnvUserAgentHander = request.NamedHandler{
- Name: "core.AddHostExecEnvUserAgentHander",
- Fn: func(r *request.Request) {
- v := os.Getenv(execEnvVar)
- if len(v) == 0 {
- return
- }
-
- request.AddToUserAgent(r, execEnvUAKey+"/"+v)
- },
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go
deleted file mode 100644
index 3ad1e798d..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go
+++ /dev/null
@@ -1,100 +0,0 @@
-package credentials
-
-import (
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-var (
- // ErrNoValidProvidersFoundInChain Is returned when there are no valid
- // providers in the ChainProvider.
- //
- // This has been deprecated. For verbose error messaging set
- // aws.Config.CredentialsChainVerboseErrors to true.
- ErrNoValidProvidersFoundInChain = awserr.New("NoCredentialProviders",
- `no valid providers in chain. Deprecated.
- For verbose messaging see aws.Config.CredentialsChainVerboseErrors`,
- nil)
-)
-
-// A ChainProvider will search for a provider which returns credentials
-// and cache that provider until Retrieve is called again.
-//
-// The ChainProvider provides a way of chaining multiple providers together
-// which will pick the first available using priority order of the Providers
-// in the list.
-//
-// If none of the Providers retrieve valid credentials Value, ChainProvider's
-// Retrieve() will return the error ErrNoValidProvidersFoundInChain.
-//
-// If a Provider is found which returns valid credentials Value ChainProvider
-// will cache that Provider for all calls to IsExpired(), until Retrieve is
-// called again.
-//
-// Example of ChainProvider to be used with an EnvProvider and EC2RoleProvider.
-// In this example EnvProvider will first check if any credentials are available
-// via the environment variables. If there are none ChainProvider will check
-// the next Provider in the list, EC2RoleProvider in this case. If EC2RoleProvider
-// does not return any credentials ChainProvider will return the error
-// ErrNoValidProvidersFoundInChain
-//
-// creds := credentials.NewChainCredentials(
-// []credentials.Provider{
-// &credentials.EnvProvider{},
-// &ec2rolecreds.EC2RoleProvider{
-// Client: ec2metadata.New(sess),
-// },
-// })
-//
-// // Usage of ChainCredentials with aws.Config
-// svc := ec2.New(session.Must(session.NewSession(&aws.Config{
-// Credentials: creds,
-// })))
-//
-type ChainProvider struct {
- Providers []Provider
- curr Provider
- VerboseErrors bool
-}
-
-// NewChainCredentials returns a pointer to a new Credentials object
-// wrapping a chain of providers.
-func NewChainCredentials(providers []Provider) *Credentials {
- return NewCredentials(&ChainProvider{
- Providers: append([]Provider{}, providers...),
- })
-}
-
-// Retrieve returns the credentials value or error if no provider returned
-// without error.
-//
-// If a provider is found it will be cached and any calls to IsExpired()
-// will return the expired state of the cached provider.
-func (c *ChainProvider) Retrieve() (Value, error) {
- var errs []error
- for _, p := range c.Providers {
- creds, err := p.Retrieve()
- if err == nil {
- c.curr = p
- return creds, nil
- }
- errs = append(errs, err)
- }
- c.curr = nil
-
- var err error
- err = ErrNoValidProvidersFoundInChain
- if c.VerboseErrors {
- err = awserr.NewBatchError("NoCredentialProviders", "no valid providers in chain", errs)
- }
- return Value{}, err
-}
-
-// IsExpired will returned the expired state of the currently cached provider
-// if there is one. If there is no current provider, true will be returned.
-func (c *ChainProvider) IsExpired() bool {
- if c.curr != nil {
- return c.curr.IsExpired()
- }
-
- return true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.5.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.5.go
deleted file mode 100644
index 6e3406b1f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.5.go
+++ /dev/null
@@ -1,23 +0,0 @@
-//go:build !go1.7
-// +build !go1.7
-
-package credentials
-
-import (
- "github.com/aws/aws-sdk-go/internal/context"
-)
-
-// backgroundContext returns a context that will never be canceled, has no
-// values, and no deadline. This context is used by the SDK to provide
-// backwards compatibility with non-context API operations and functionality.
-//
-// Go 1.6 and before:
-// This context function is equivalent to context.Background in the Go stdlib.
-//
-// Go 1.7 and later:
-// The context returned will be the value returned by context.Background()
-//
-// See https://golang.org/pkg/context for more information on Contexts.
-func backgroundContext() Context {
- return context.BackgroundCtx
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.7.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.7.go
deleted file mode 100644
index a68df0ee7..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.7.go
+++ /dev/null
@@ -1,21 +0,0 @@
-//go:build go1.7
-// +build go1.7
-
-package credentials
-
-import "context"
-
-// backgroundContext returns a context that will never be canceled, has no
-// values, and no deadline. This context is used by the SDK to provide
-// backwards compatibility with non-context API operations and functionality.
-//
-// Go 1.6 and before:
-// This context function is equivalent to context.Background in the Go stdlib.
-//
-// Go 1.7 and later:
-// The context returned will be the value returned by context.Background()
-//
-// See https://golang.org/pkg/context for more information on Contexts.
-func backgroundContext() Context {
- return context.Background()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.5.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.5.go
deleted file mode 100644
index 0345fab2d..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.5.go
+++ /dev/null
@@ -1,40 +0,0 @@
-//go:build !go1.9
-// +build !go1.9
-
-package credentials
-
-import "time"
-
-// Context is an copy of the Go v1.7 stdlib's context.Context interface.
-// It is represented as a SDK interface to enable you to use the "WithContext"
-// API methods with Go v1.6 and a Context type such as golang.org/x/net/context.
-//
-// This type, aws.Context, and context.Context are equivalent.
-//
-// See https://golang.org/pkg/context on how to use contexts.
-type Context interface {
- // Deadline returns the time when work done on behalf of this context
- // should be canceled. Deadline returns ok==false when no deadline is
- // set. Successive calls to Deadline return the same results.
- Deadline() (deadline time.Time, ok bool)
-
- // Done returns a channel that's closed when work done on behalf of this
- // context should be canceled. Done may return nil if this context can
- // never be canceled. Successive calls to Done return the same value.
- Done() <-chan struct{}
-
- // Err returns a non-nil error value after Done is closed. Err returns
- // Canceled if the context was canceled or DeadlineExceeded if the
- // context's deadline passed. No other values for Err are defined.
- // After Done is closed, successive calls to Err return the same value.
- Err() error
-
- // Value returns the value associated with this context for key, or nil
- // if no value is associated with key. Successive calls to Value with
- // the same key returns the same result.
- //
- // Use context values only for request-scoped data that transits
- // processes and API boundaries, not for passing optional parameters to
- // functions.
- Value(key interface{}) interface{}
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.9.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.9.go
deleted file mode 100644
index 79018aba7..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.9.go
+++ /dev/null
@@ -1,14 +0,0 @@
-//go:build go1.9
-// +build go1.9
-
-package credentials
-
-import "context"
-
-// Context is an alias of the Go stdlib's context.Context interface.
-// It can be used within the SDK's API operation "WithContext" methods.
-//
-// This type, aws.Context, and context.Context are equivalent.
-//
-// See https://golang.org/pkg/context on how to use contexts.
-type Context = context.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
deleted file mode 100644
index a880a3de8..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
+++ /dev/null
@@ -1,383 +0,0 @@
-// Package credentials provides credential retrieval and management
-//
-// The Credentials is the primary method of getting access to and managing
-// credentials Values. Using dependency injection retrieval of the credential
-// values is handled by a object which satisfies the Provider interface.
-//
-// By default the Credentials.Get() will cache the successful result of a
-// Provider's Retrieve() until Provider.IsExpired() returns true. At which
-// point Credentials will call Provider's Retrieve() to get new credential Value.
-//
-// The Provider is responsible for determining when credentials Value have expired.
-// It is also important to note that Credentials will always call Retrieve the
-// first time Credentials.Get() is called.
-//
-// Example of using the environment variable credentials.
-//
-// creds := credentials.NewEnvCredentials()
-//
-// // Retrieve the credentials value
-// credValue, err := creds.Get()
-// if err != nil {
-// // handle error
-// }
-//
-// Example of forcing credentials to expire and be refreshed on the next Get().
-// This may be helpful to proactively expire credentials and refresh them sooner
-// than they would naturally expire on their own.
-//
-// creds := credentials.NewCredentials(&ec2rolecreds.EC2RoleProvider{})
-// creds.Expire()
-// credsValue, err := creds.Get()
-// // New credentials will be retrieved instead of from cache.
-//
-//
-// Custom Provider
-//
-// Each Provider built into this package also provides a helper method to generate
-// a Credentials pointer setup with the provider. To use a custom Provider just
-// create a type which satisfies the Provider interface and pass it to the
-// NewCredentials method.
-//
-// type MyProvider struct{}
-// func (m *MyProvider) Retrieve() (Value, error) {...}
-// func (m *MyProvider) IsExpired() bool {...}
-//
-// creds := credentials.NewCredentials(&MyProvider{})
-// credValue, err := creds.Get()
-//
-package credentials
-
-import (
- "fmt"
- "sync"
- "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
-// dummy placeholder credentials for requests that do not need signed.
-//
-// This Credentials can be used to configure a service to not sign requests
-// when making service API calls. For example, when accessing public
-// s3 buckets.
-//
-// svc := s3.New(session.Must(session.NewSession(&aws.Config{
-// Credentials: credentials.AnonymousCredentials,
-// })))
-// // Access public S3 buckets.
-var AnonymousCredentials = NewStaticCredentials("", "", "")
-
-// A Value is the AWS credentials value for individual credential fields.
-type Value struct {
- // AWS Access key ID
- AccessKeyID string
-
- // AWS Secret Access Key
- SecretAccessKey string
-
- // AWS Session Token
- SessionToken string
-
- // Provider used to get credentials
- ProviderName string
-}
-
-// HasKeys returns if the credentials Value has both AccessKeyID and
-// SecretAccessKey value set.
-func (v Value) HasKeys() bool {
- return len(v.AccessKeyID) != 0 && len(v.SecretAccessKey) != 0
-}
-
-// A Provider is the interface for any component which will provide credentials
-// Value. A provider is required to manage its own Expired state, and what to
-// be expired means.
-//
-// The Provider should not need to implement its own mutexes, because
-// that will be managed by Credentials.
-type Provider interface {
- // Retrieve returns nil if it successfully retrieved the value.
- // Error is returned if the value were not obtainable, or empty.
- Retrieve() (Value, error)
-
- // IsExpired returns if the credentials are no longer valid, and need
- // to be retrieved.
- 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.
-type Expirer interface {
- // The time at which the credentials are no longer valid
- ExpiresAt() time.Time
-}
-
-// An ErrorProvider is a stub credentials provider that always returns an error
-// this is used by the SDK when construction a known provider is not possible
-// due to an error.
-type ErrorProvider struct {
- // The error to be returned from Retrieve
- Err error
-
- // The provider name to set on the Retrieved returned Value
- ProviderName string
-}
-
-// Retrieve will always return the error that the ErrorProvider was created with.
-func (p ErrorProvider) Retrieve() (Value, error) {
- return Value{ProviderName: p.ProviderName}, p.Err
-}
-
-// IsExpired will always return not expired.
-func (p ErrorProvider) IsExpired() bool {
- return false
-}
-
-// A Expiry provides shared expiration logic to be used by credentials
-// providers to implement expiry functionality.
-//
-// The best method to use this struct is as an anonymous field within the
-// provider's struct.
-//
-// Example:
-// type EC2RoleProvider struct {
-// Expiry
-// ...
-// }
-type Expiry struct {
- // The date/time when to expire on
- expiration time.Time
-
- // If set will be used by IsExpired to determine the current time.
- // Defaults to time.Now if CurrentTime is not set. Available for testing
- // to be able to mock out the current time.
- CurrentTime func() time.Time
-}
-
-// SetExpiration sets the expiration IsExpired will check when called.
-//
-// If window is greater than 0 the expiration time will be reduced by the
-// window value.
-//
-// Using a window is helpful to trigger credentials to expire sooner than
-// the expiration time given to ensure no requests are made with expired
-// tokens.
-func (e *Expiry) SetExpiration(expiration time.Time, window time.Duration) {
- // Passed in expirations should have the monotonic clock values stripped.
- // This ensures time comparisons will be based on wall-time.
- e.expiration = expiration.Round(0)
- if window > 0 {
- e.expiration = e.expiration.Add(-window)
- }
-}
-
-// IsExpired returns if the credentials are expired.
-func (e *Expiry) IsExpired() bool {
- curTime := e.CurrentTime
- if curTime == nil {
- curTime = time.Now
- }
- return e.expiration.Before(curTime())
-}
-
-// ExpiresAt returns the expiration time of the credential
-func (e *Expiry) ExpiresAt() time.Time {
- return e.expiration
-}
-
-// A Credentials provides concurrency safe retrieval of AWS credentials Value.
-// Credentials will cache the credentials value until they expire. Once the value
-// expires the next Get will attempt to retrieve valid credentials.
-//
-// Credentials is safe to use across multiple goroutines and will manage the
-// synchronous state so the Providers do not need to implement their own
-// synchronization.
-//
-// The first Credentials.Get() will always call Provider.Retrieve() to get the
-// 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 {
- sf singleflight.Group
-
- m sync.RWMutex
- creds Value
- provider Provider
-}
-
-// NewCredentials returns a pointer to a new Credentials with the provider set.
-func NewCredentials(provider Provider) *Credentials {
- c := &Credentials{
- provider: provider,
- }
- return c
-}
-
-// 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
-// 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.
-//
-// Passed in Context is equivalent to aws.Context, and context.Context.
-func (c *Credentials) GetWithContext(ctx Context) (Value, error) {
- // Check if credentials are cached, and not expired.
- select {
- case curCreds, ok := <-c.asyncIsExpired():
- // ok will only be true, of the credentials were not expired. ok will
- // be false and have no value if the credentials are expired.
- if ok {
- return curCreds, nil
- }
- case <-ctx.Done():
- return Value{}, awserr.New("RequestCanceled",
- "request context canceled", ctx.Err())
- }
-
- // 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())
- }
-}
-
-func (c *Credentials) singleRetrieve(ctx Context) (interface{}, error) {
- c.m.Lock()
- defer c.m.Unlock()
-
- if curCreds := c.creds; !c.isExpiredLocked(curCreds) {
- return curCreds, nil
- }
-
- var creds Value
- var err error
- if p, ok := c.provider.(ProviderWithContext); ok {
- creds, err = p.RetrieveWithContext(ctx)
- } else {
- creds, err = c.provider.Retrieve()
- }
- if err == nil {
- c.creds = 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
-// next call to Get().
-//
-// 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.creds = Value{}
-}
-
-// IsExpired returns if the credentials are no longer valid, and need
-// to be retrieved.
-//
-// 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.isExpiredLocked(c.creds)
-}
-
-// asyncIsExpired returns a channel of credentials Value. If the channel is
-// closed the credentials are expired and credentials value are not empty.
-func (c *Credentials) asyncIsExpired() <-chan Value {
- ch := make(chan Value, 1)
- go func() {
- c.m.RLock()
- defer c.m.RUnlock()
-
- if curCreds := c.creds; !c.isExpiredLocked(curCreds) {
- ch <- curCreds
- }
-
- close(ch)
- }()
-
- return ch
-}
-
-// isExpiredLocked helper method wrapping the definition of expired credentials.
-func (c *Credentials) isExpiredLocked(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),
- nil)
- }
- if c.creds == (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
deleted file mode 100644
index 92af5b725..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go
+++ /dev/null
@@ -1,188 +0,0 @@
-package ec2rolecreds
-
-import (
- "bufio"
- "encoding/json"
- "fmt"
- "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"
- "github.com/aws/aws-sdk-go/aws/ec2metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/sdkuri"
-)
-
-// ProviderName provides a name of EC2Role provider
-const ProviderName = "EC2RoleProvider"
-
-// A EC2RoleProvider retrieves credentials from the EC2 service, and keeps track if
-// those credentials are expired.
-//
-// Example how to configure the EC2RoleProvider with custom http Client, Endpoint
-// or ExpiryWindow
-//
-// p := &ec2rolecreds.EC2RoleProvider{
-// // Pass in a custom timeout to be used when requesting
-// // IAM EC2 Role credentials.
-// Client: ec2metadata.New(sess, aws.Config{
-// HTTPClient: &http.Client{Timeout: 10 * time.Second},
-// }),
-//
-// // Do not use early expiry of credentials. If a non zero value is
-// // specified the credentials will be expired early
-// ExpiryWindow: 0,
-// }
-type EC2RoleProvider struct {
- credentials.Expiry
-
- // Required EC2Metadata client to use when connecting to EC2 metadata service.
- Client *ec2metadata.EC2Metadata
-
- // ExpiryWindow will allow the credentials to trigger refreshing prior to
- // the credentials actually expiring. This is beneficial so race conditions
- // with expiring credentials do not cause request to fail unexpectedly
- // due to ExpiredTokenException exceptions.
- //
- // So a ExpiryWindow of 10s would cause calls to IsExpired() to return true
- // 10 seconds before the credentials are actually expired.
- //
- // If ExpiryWindow is 0 or less it will be ignored.
- ExpiryWindow time.Duration
-}
-
-// NewCredentials returns a pointer to a new Credentials object wrapping
-// the EC2RoleProvider. Takes a ConfigProvider to create a EC2Metadata client.
-// The ConfigProvider is satisfied by the session.Session type.
-func NewCredentials(c client.ConfigProvider, options ...func(*EC2RoleProvider)) *credentials.Credentials {
- p := &EC2RoleProvider{
- Client: ec2metadata.New(c),
- }
-
- for _, option := range options {
- option(p)
- }
-
- return credentials.NewCredentials(p)
-}
-
-// NewCredentialsWithClient returns a pointer to a new Credentials object wrapping
-// the EC2RoleProvider. Takes a EC2Metadata client to use when connecting to EC2
-// metadata service.
-func NewCredentialsWithClient(client *ec2metadata.EC2Metadata, options ...func(*EC2RoleProvider)) *credentials.Credentials {
- p := &EC2RoleProvider{
- Client: client,
- }
-
- for _, option := range options {
- option(p)
- }
-
- return credentials.NewCredentials(p)
-}
-
-// Retrieve retrieves credentials from the EC2 service.
-// Error will be returned if the request fails, or unable to extract
-// the desired credentials.
-func (m *EC2RoleProvider) Retrieve() (credentials.Value, error) {
- 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
- }
-
- if len(credsList) == 0 {
- return credentials.Value{ProviderName: ProviderName}, awserr.New("EmptyEC2RoleList", "empty EC2 Role list", nil)
- }
- credsName := credsList[0]
-
- roleCreds, err := requestCred(ctx, m.Client, credsName)
- if err != nil {
- return credentials.Value{ProviderName: ProviderName}, err
- }
-
- m.SetExpiration(roleCreds.Expiration, m.ExpiryWindow)
-
- return credentials.Value{
- AccessKeyID: roleCreds.AccessKeyID,
- SecretAccessKey: roleCreds.SecretAccessKey,
- SessionToken: roleCreds.Token,
- ProviderName: ProviderName,
- }, nil
-}
-
-// A ec2RoleCredRespBody provides the shape for unmarshaling credential
-// request responses.
-type ec2RoleCredRespBody struct {
- // Success State
- Expiration time.Time
- AccessKeyID string
- SecretAccessKey string
- Token string
-
- // Error state
- Code string
- Message string
-}
-
-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(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)
- }
-
- credsList := []string{}
- s := bufio.NewScanner(strings.NewReader(resp))
- for s.Scan() {
- credsList = append(credsList, s.Text())
- }
-
- if err := s.Err(); err != nil {
- return nil, awserr.New(request.ErrCodeSerialization,
- "failed to read EC2 instance role from metadata service", err)
- }
-
- return credsList, nil
-}
-
-// requestCred requests the credentials for a specific credentials from the EC2 service.
-//
-// If the credentials cannot be found, or there is an error reading the response
-// and error will be returned.
-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",
- fmt.Sprintf("failed to get %s EC2 instance role credentials", credsName),
- err)
- }
-
- respCreds := ec2RoleCredRespBody{}
- if err := json.NewDecoder(strings.NewReader(resp)).Decode(&respCreds); err != nil {
- return ec2RoleCredRespBody{},
- awserr.New(request.ErrCodeSerialization,
- fmt.Sprintf("failed to decode %s EC2 instance role credentials", credsName),
- err)
- }
-
- if respCreds.Code != "Success" {
- // If an error code was returned something failed requesting the role.
- return ec2RoleCredRespBody{}, awserr.New(respCreds.Code, respCreds.Message, nil)
- }
-
- return respCreds, nil
-}
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
deleted file mode 100644
index 785f30d8e..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go
+++ /dev/null
@@ -1,210 +0,0 @@
-// Package endpointcreds provides support for retrieving credentials from an
-// arbitrary HTTP endpoint.
-//
-// The credentials endpoint Provider can receive both static and refreshable
-// credentials that will expire. Credentials are static when an "Expiration"
-// value is not provided in the endpoint's response.
-//
-// Static credentials will never expire once they have been retrieved. The format
-// of the static credentials response:
-// {
-// "AccessKeyId" : "MUA...",
-// "SecretAccessKey" : "/7PC5om....",
-// }
-//
-// Refreshable credentials will expire within the "ExpiryWindow" of the Expiration
-// value in the response. The format of the refreshable credentials response:
-// {
-// "AccessKeyId" : "MUA...",
-// "SecretAccessKey" : "/7PC5om....",
-// "Token" : "AQoDY....=",
-// "Expiration" : "2016-02-25T06:03:31Z"
-// }
-//
-// Errors should be returned in the following format and only returned with 400
-// or 500 HTTP status codes.
-// {
-// "code": "ErrorCode",
-// "message": "Helpful error message."
-// }
-package endpointcreds
-
-import (
- "encoding/json"
- "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/client/metadata"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil"
-)
-
-// ProviderName is the name of the credentials provider.
-const ProviderName = `CredentialsEndpointProvider`
-
-// Provider satisfies the credentials.Provider interface, and is a client to
-// retrieve credentials from an arbitrary endpoint.
-type Provider struct {
- staticCreds bool
- credentials.Expiry
-
- // Requires a AWS Client to make HTTP requests to the endpoint with.
- // the Endpoint the request will be made to is provided by the aws.Config's
- // Endpoint value.
- Client *client.Client
-
- // ExpiryWindow will allow the credentials to trigger refreshing prior to
- // the credentials actually expiring. This is beneficial so race conditions
- // with expiring credentials do not cause request to fail unexpectedly
- // due to ExpiredTokenException exceptions.
- //
- // So a ExpiryWindow of 10s would cause calls to IsExpired() to return true
- // 10 seconds before the credentials are actually expired.
- //
- // If ExpiryWindow is 0 or less it will be ignored.
- ExpiryWindow time.Duration
-
- // Optional authorization token value if set will be used as the value of
- // the Authorization header of the endpoint credential request.
- AuthorizationToken string
-}
-
-// NewProviderClient returns a credentials Provider for retrieving AWS credentials
-// from arbitrary endpoint.
-func NewProviderClient(cfg aws.Config, handlers request.Handlers, endpoint string, options ...func(*Provider)) credentials.Provider {
- p := &Provider{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "CredentialsEndpoint",
- Endpoint: endpoint,
- },
- handlers,
- ),
- }
-
- p.Client.Handlers.Unmarshal.PushBack(unmarshalHandler)
- p.Client.Handlers.UnmarshalError.PushBack(unmarshalError)
- p.Client.Handlers.Validate.Clear()
- p.Client.Handlers.Validate.PushBack(validateEndpointHandler)
-
- for _, option := range options {
- option(p)
- }
-
- return p
-}
-
-// NewCredentialsClient returns a pointer to a new Credentials object
-// wrapping the endpoint credentials Provider.
-func NewCredentialsClient(cfg aws.Config, handlers request.Handlers, endpoint string, options ...func(*Provider)) *credentials.Credentials {
- return credentials.NewCredentials(NewProviderClient(cfg, handlers, endpoint, options...))
-}
-
-// IsExpired returns true if the credentials retrieved are expired, or not yet
-// retrieved.
-func (p *Provider) IsExpired() bool {
- if p.staticCreds {
- return false
- }
- return p.Expiry.IsExpired()
-}
-
-// 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) {
- 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)
- }
-
- if resp.Expiration != nil {
- p.SetExpiration(*resp.Expiration, p.ExpiryWindow)
- } else {
- p.staticCreds = true
- }
-
- return credentials.Value{
- AccessKeyID: resp.AccessKeyID,
- SecretAccessKey: resp.SecretAccessKey,
- SessionToken: resp.Token,
- ProviderName: ProviderName,
- }, nil
-}
-
-type getCredentialsOutput struct {
- Expiration *time.Time
- AccessKeyID string
- SecretAccessKey string
- Token string
-}
-
-type errorOutput struct {
- Code string `json:"code"`
- Message string `json:"message"`
-}
-
-func (p *Provider) getCredentials(ctx aws.Context) (*getCredentialsOutput, error) {
- op := &request.Operation{
- Name: "GetCredentials",
- HTTPMethod: "GET",
- }
-
- 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)
- }
-
- return out, req.Send()
-}
-
-func validateEndpointHandler(r *request.Request) {
- if len(r.ClientInfo.Endpoint) == 0 {
- r.Error = aws.ErrMissingEndpoint
- }
-}
-
-func unmarshalHandler(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
-
- out := r.Data.(*getCredentialsOutput)
- if err := json.NewDecoder(r.HTTPResponse.Body).Decode(&out); err != nil {
- r.Error = awserr.New(request.ErrCodeSerialization,
- "failed to decode endpoint credentials",
- err,
- )
- }
-}
-
-func unmarshalError(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
-
- var errOut errorOutput
- err := jsonutil.UnmarshalJSONError(&errOut, r.HTTPResponse.Body)
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization,
- "failed to decode error message", 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(errOut.Code, errOut.Message, nil)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go
deleted file mode 100644
index 54c5cf733..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go
+++ /dev/null
@@ -1,74 +0,0 @@
-package credentials
-
-import (
- "os"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-// EnvProviderName provides a name of Env provider
-const EnvProviderName = "EnvProvider"
-
-var (
- // ErrAccessKeyIDNotFound is returned when the AWS Access Key ID can't be
- // found in the process's environment.
- ErrAccessKeyIDNotFound = awserr.New("EnvAccessKeyNotFound", "AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY not found in environment", nil)
-
- // ErrSecretAccessKeyNotFound is returned when the AWS Secret Access Key
- // can't be found in the process's environment.
- ErrSecretAccessKeyNotFound = awserr.New("EnvSecretNotFound", "AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY not found in environment", nil)
-)
-
-// A EnvProvider retrieves credentials from the environment variables of the
-// running process. Environment credentials never expire.
-//
-// Environment variables used:
-//
-// * Access Key ID: AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY
-//
-// * Secret Access Key: AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY
-type EnvProvider struct {
- retrieved bool
-}
-
-// NewEnvCredentials returns a pointer to a new Credentials object
-// wrapping the environment variable provider.
-func NewEnvCredentials() *Credentials {
- return NewCredentials(&EnvProvider{})
-}
-
-// Retrieve retrieves the keys from the environment.
-func (e *EnvProvider) Retrieve() (Value, error) {
- e.retrieved = false
-
- id := os.Getenv("AWS_ACCESS_KEY_ID")
- if id == "" {
- id = os.Getenv("AWS_ACCESS_KEY")
- }
-
- secret := os.Getenv("AWS_SECRET_ACCESS_KEY")
- if secret == "" {
- secret = os.Getenv("AWS_SECRET_KEY")
- }
-
- if id == "" {
- return Value{ProviderName: EnvProviderName}, ErrAccessKeyIDNotFound
- }
-
- if secret == "" {
- return Value{ProviderName: EnvProviderName}, ErrSecretAccessKeyNotFound
- }
-
- e.retrieved = true
- return Value{
- AccessKeyID: id,
- SecretAccessKey: secret,
- SessionToken: os.Getenv("AWS_SESSION_TOKEN"),
- ProviderName: EnvProviderName,
- }, nil
-}
-
-// IsExpired returns if the credentials have been retrieved.
-func (e *EnvProvider) IsExpired() bool {
- return !e.retrieved
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini b/vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini
deleted file mode 100644
index 7fc91d9d2..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini
+++ /dev/null
@@ -1,12 +0,0 @@
-[default]
-aws_access_key_id = accessKey
-aws_secret_access_key = secret
-aws_session_token = token
-
-[no_token]
-aws_access_key_id = accessKey
-aws_secret_access_key = secret
-
-[with_colon]
-aws_access_key_id: accessKey
-aws_secret_access_key: secret
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
deleted file mode 100644
index e62483600..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/processcreds/provider.go
+++ /dev/null
@@ -1,426 +0,0 @@
-/*
-Package processcreds is a credential Provider to retrieve `credential_process`
-credentials.
-
-WARNING: The following describes a method of sourcing credentials from an external
-process. This can potentially be dangerous, so proceed with caution. Other
-credential providers should be preferred if at all possible. If using this
-option, you should make sure that the config file is as locked down as possible
-using security best practices for your operating system.
-
-You can use credentials from a `credential_process` in a variety of ways.
-
-One way is to setup your shared config file, located in the default
-location, with the `credential_process` key and the command you want to be
-called. You also need to set the AWS_SDK_LOAD_CONFIG environment variable
-(e.g., `export AWS_SDK_LOAD_CONFIG=1`) to use the shared config file.
-
- [default]
- credential_process = /command/to/call
-
-Creating a new session will use the credential process to retrieve credentials.
-NOTE: If there are credentials in the profile you are using, the credential
-process will not be used.
-
- // Initialize a session to load credentials.
- sess, _ := session.NewSession(&aws.Config{
- Region: aws.String("us-east-1")},
- )
-
- // Create S3 service client to use the credentials.
- svc := s3.New(sess)
-
-Another way to use the `credential_process` method is by using
-`credentials.NewCredentials()` and providing a command to be executed to
-retrieve credentials:
-
- // Create credentials using the ProcessProvider.
- creds := processcreds.NewCredentials("/path/to/command")
-
- // Create service client value configured for credentials.
- svc := s3.New(sess, &aws.Config{Credentials: creds})
-
-You can set a non-default timeout for the `credential_process` with another
-constructor, `credentials.NewCredentialsTimeout()`, providing the timeout. To
-set a one minute timeout:
-
- // Create credentials using the ProcessProvider.
- creds := processcreds.NewCredentialsTimeout(
- "/path/to/command",
- time.Duration(500) * time.Millisecond)
-
-If you need more control, you can set any configurable options in the
-credentials using one or more option functions. For example, you can set a two
-minute timeout, a credential duration of 60 minutes, and a maximum stdout
-buffer size of 2k.
-
- creds := processcreds.NewCredentials(
- "/path/to/command",
- func(opt *ProcessProvider) {
- opt.Timeout = time.Duration(2) * time.Minute
- opt.Duration = time.Duration(60) * time.Minute
- opt.MaxBufSize = 2048
- })
-
-You can also use your own `exec.Cmd`:
-
- // Create an exec.Cmd
- myCommand := exec.Command("/path/to/command")
-
- // Create credentials using your exec.Cmd and custom timeout
- creds := processcreds.NewCredentialsCommand(
- myCommand,
- func(opt *processcreds.ProcessProvider) {
- opt.Timeout = time.Duration(1) * time.Second
- })
-*/
-package processcreds
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "os/exec"
- "runtime"
- "strings"
- "time"
-
- "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 (
- // ProviderName is the name this credentials provider will label any
- // returned credentials Value with.
- ProviderName = `ProcessProvider`
-
- // ErrCodeProcessProviderParse error parsing process output
- ErrCodeProcessProviderParse = "ProcessProviderParseError"
-
- // ErrCodeProcessProviderVersion version error in output
- ErrCodeProcessProviderVersion = "ProcessProviderVersionError"
-
- // ErrCodeProcessProviderRequired required attribute missing in output
- ErrCodeProcessProviderRequired = "ProcessProviderRequiredError"
-
- // ErrCodeProcessProviderExecution execution of command failed
- ErrCodeProcessProviderExecution = "ProcessProviderExecutionError"
-
- // errMsgProcessProviderTimeout process took longer than allowed
- errMsgProcessProviderTimeout = "credential process timed out"
-
- // errMsgProcessProviderProcess process error
- errMsgProcessProviderProcess = "error in credential_process"
-
- // errMsgProcessProviderParse problem parsing output
- errMsgProcessProviderParse = "parse failed of credential_process output"
-
- // errMsgProcessProviderVersion version error in output
- errMsgProcessProviderVersion = "wrong version in process output (not 1)"
-
- // errMsgProcessProviderMissKey missing access key id in output
- errMsgProcessProviderMissKey = "missing AccessKeyId in process output"
-
- // errMsgProcessProviderMissSecret missing secret acess key in output
- errMsgProcessProviderMissSecret = "missing SecretAccessKey in process output"
-
- // errMsgProcessProviderPrepareCmd prepare of command failed
- errMsgProcessProviderPrepareCmd = "failed to prepare command"
-
- // errMsgProcessProviderEmptyCmd command must not be empty
- errMsgProcessProviderEmptyCmd = "command must not be empty"
-
- // errMsgProcessProviderPipe failed to initialize pipe
- errMsgProcessProviderPipe = "failed to initialize pipe"
-
- // DefaultDuration is the default amount of time in minutes that the
- // credentials will be valid for.
- DefaultDuration = time.Duration(15) * time.Minute
-
- // DefaultBufSize limits buffer size from growing to an enormous
- // amount due to a faulty process.
- DefaultBufSize = int(8 * sdkio.KibiByte)
-
- // DefaultTimeout default limit on time a process can run.
- DefaultTimeout = time.Duration(1) * time.Minute
-)
-
-// ProcessProvider satisfies the credentials.Provider interface, and is a
-// client to retrieve credentials from a process.
-type ProcessProvider struct {
- staticCreds bool
- credentials.Expiry
- originalCommand []string
-
- // Expiry duration of the credentials. Defaults to 15 minutes if not set.
- Duration time.Duration
-
- // ExpiryWindow will allow the credentials to trigger refreshing prior to
- // the credentials actually expiring. This is beneficial so race conditions
- // with expiring credentials do not cause request to fail unexpectedly
- // due to ExpiredTokenException exceptions.
- //
- // So a ExpiryWindow of 10s would cause calls to IsExpired() to return true
- // 10 seconds before the credentials are actually expired.
- //
- // If ExpiryWindow is 0 or less it will be ignored.
- ExpiryWindow time.Duration
-
- // A string representing an os command that should return a JSON with
- // credential information.
- command *exec.Cmd
-
- // MaxBufSize limits memory usage from growing to an enormous
- // amount due to a faulty process.
- MaxBufSize int
-
- // Timeout limits the time a process can run.
- Timeout time.Duration
-}
-
-// NewCredentials returns a pointer to a new Credentials object wrapping the
-// ProcessProvider. The credentials will expire every 15 minutes by default.
-func NewCredentials(command string, options ...func(*ProcessProvider)) *credentials.Credentials {
- p := &ProcessProvider{
- command: exec.Command(command),
- Duration: DefaultDuration,
- Timeout: DefaultTimeout,
- MaxBufSize: DefaultBufSize,
- }
-
- for _, option := range options {
- option(p)
- }
-
- return credentials.NewCredentials(p)
-}
-
-// NewCredentialsTimeout returns a pointer to a new Credentials object with
-// the specified command and timeout, and default duration and max buffer size.
-func NewCredentialsTimeout(command string, timeout time.Duration) *credentials.Credentials {
- p := NewCredentials(command, func(opt *ProcessProvider) {
- opt.Timeout = timeout
- })
-
- return p
-}
-
-// NewCredentialsCommand returns a pointer to a new Credentials object with
-// the specified command, and default timeout, duration and max buffer size.
-func NewCredentialsCommand(command *exec.Cmd, options ...func(*ProcessProvider)) *credentials.Credentials {
- p := &ProcessProvider{
- command: command,
- Duration: DefaultDuration,
- Timeout: DefaultTimeout,
- MaxBufSize: DefaultBufSize,
- }
-
- for _, option := range options {
- option(p)
- }
-
- return credentials.NewCredentials(p)
-}
-
-type credentialProcessResponse struct {
- Version int
- AccessKeyID string `json:"AccessKeyId"`
- SecretAccessKey string
- SessionToken string
- Expiration *time.Time
-}
-
-// Retrieve executes the 'credential_process' and returns the credentials.
-func (p *ProcessProvider) Retrieve() (credentials.Value, error) {
- out, err := p.executeCredentialProcess()
- if err != nil {
- return credentials.Value{ProviderName: ProviderName}, err
- }
-
- // Serialize and validate response
- resp := &credentialProcessResponse{}
- if err = json.Unmarshal(out, resp); err != nil {
- return credentials.Value{ProviderName: ProviderName}, awserr.New(
- ErrCodeProcessProviderParse,
- fmt.Sprintf("%s: %s", errMsgProcessProviderParse, string(out)),
- err)
- }
-
- if resp.Version != 1 {
- return credentials.Value{ProviderName: ProviderName}, awserr.New(
- ErrCodeProcessProviderVersion,
- errMsgProcessProviderVersion,
- nil)
- }
-
- if len(resp.AccessKeyID) == 0 {
- return credentials.Value{ProviderName: ProviderName}, awserr.New(
- ErrCodeProcessProviderRequired,
- errMsgProcessProviderMissKey,
- nil)
- }
-
- if len(resp.SecretAccessKey) == 0 {
- return credentials.Value{ProviderName: ProviderName}, awserr.New(
- ErrCodeProcessProviderRequired,
- errMsgProcessProviderMissSecret,
- nil)
- }
-
- // Handle expiration
- p.staticCreds = resp.Expiration == nil
- if resp.Expiration != nil {
- p.SetExpiration(*resp.Expiration, p.ExpiryWindow)
- }
-
- return credentials.Value{
- ProviderName: ProviderName,
- AccessKeyID: resp.AccessKeyID,
- SecretAccessKey: resp.SecretAccessKey,
- SessionToken: resp.SessionToken,
- }, nil
-}
-
-// IsExpired returns true if the credentials retrieved are expired, or not yet
-// retrieved.
-func (p *ProcessProvider) IsExpired() bool {
- if p.staticCreds {
- return false
- }
- return p.Expiry.IsExpired()
-}
-
-// prepareCommand prepares the command to be executed.
-func (p *ProcessProvider) prepareCommand() error {
-
- var cmdArgs []string
- if runtime.GOOS == "windows" {
- cmdArgs = []string{"cmd.exe", "/C"}
- } else {
- cmdArgs = []string{"sh", "-c"}
- }
-
- if len(p.originalCommand) == 0 {
- p.originalCommand = make([]string, len(p.command.Args))
- copy(p.originalCommand, p.command.Args)
-
- // check for empty command because it succeeds
- if len(strings.TrimSpace(p.originalCommand[0])) < 1 {
- return awserr.New(
- ErrCodeProcessProviderExecution,
- fmt.Sprintf(
- "%s: %s",
- errMsgProcessProviderPrepareCmd,
- errMsgProcessProviderEmptyCmd),
- nil)
- }
- }
-
- cmdArgs = append(cmdArgs, p.originalCommand...)
- p.command = exec.Command(cmdArgs[0], cmdArgs[1:]...)
- p.command.Env = os.Environ()
-
- return nil
-}
-
-// executeCredentialProcess starts the credential process on the OS and
-// returns the results or an error.
-func (p *ProcessProvider) executeCredentialProcess() ([]byte, error) {
-
- if err := p.prepareCommand(); err != nil {
- return nil, err
- }
-
- // Setup the pipes
- outReadPipe, outWritePipe, err := os.Pipe()
- if err != nil {
- return nil, awserr.New(
- ErrCodeProcessProviderExecution,
- errMsgProcessProviderPipe,
- err)
- }
-
- p.command.Stderr = os.Stderr // display stderr on console for MFA
- p.command.Stdout = outWritePipe // get creds json on process's stdout
- p.command.Stdin = os.Stdin // enable stdin for MFA
-
- output := bytes.NewBuffer(make([]byte, 0, p.MaxBufSize))
-
- stdoutCh := make(chan error, 1)
- go readInput(
- io.LimitReader(outReadPipe, int64(p.MaxBufSize)),
- output,
- stdoutCh)
-
- execCh := make(chan error, 1)
- go executeCommand(*p.command, execCh)
-
- finished := false
- var errors []error
- for !finished {
- select {
- case readError := <-stdoutCh:
- errors = appendError(errors, readError)
- finished = true
- case execError := <-execCh:
- err := outWritePipe.Close()
- errors = appendError(errors, err)
- errors = appendError(errors, execError)
- if errors != nil {
- return output.Bytes(), awserr.NewBatchError(
- ErrCodeProcessProviderExecution,
- errMsgProcessProviderProcess,
- errors)
- }
- case <-time.After(p.Timeout):
- finished = true
- return output.Bytes(), awserr.NewBatchError(
- ErrCodeProcessProviderExecution,
- errMsgProcessProviderTimeout,
- errors) // errors can be nil
- }
- }
-
- out := output.Bytes()
-
- if runtime.GOOS == "windows" {
- // windows adds slashes to quotes
- out = []byte(strings.Replace(string(out), `\"`, `"`, -1))
- }
-
- return out, nil
-}
-
-// appendError conveniently checks for nil before appending slice
-func appendError(errors []error, err error) []error {
- if err != nil {
- return append(errors, err)
- }
- return errors
-}
-
-func executeCommand(cmd exec.Cmd, exec chan error) {
- // Start the command
- err := cmd.Start()
- if err == nil {
- err = cmd.Wait()
- }
-
- exec <- err
-}
-
-func readInput(r io.Reader, w io.Writer, read chan error) {
- tee := io.TeeReader(r, w)
-
- _, err := ioutil.ReadAll(tee)
-
- if err == io.EOF {
- err = nil
- }
-
- read <- err // will only arrive here when write end of pipe is closed
-}
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
deleted file mode 100644
index 22b5c5d9f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
+++ /dev/null
@@ -1,151 +0,0 @@
-package credentials
-
-import (
- "fmt"
- "os"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/internal/ini"
- "github.com/aws/aws-sdk-go/internal/shareddefaults"
-)
-
-// SharedCredsProviderName provides a name of SharedCreds provider
-const SharedCredsProviderName = "SharedCredentialsProvider"
-
-var (
- // ErrSharedCredentialsHomeNotFound is emitted when the user directory cannot be found.
- ErrSharedCredentialsHomeNotFound = awserr.New("UserHomeNotFound", "user home directory not found.", nil)
-)
-
-// 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 {
- // Path to the shared credentials file.
- //
- // If empty will look for "AWS_SHARED_CREDENTIALS_FILE" env variable. If the
- // env value is empty will default to current user's home directory.
- // Linux/OSX: "$HOME/.aws/credentials"
- // Windows: "%USERPROFILE%\.aws\credentials"
- Filename string
-
- // AWS Profile to extract credentials from the shared credentials file. If empty
- // will default to environment variable "AWS_PROFILE" or "default" if
- // environment variable is also not set.
- Profile string
-
- // retrieved states if the credentials have been successfully retrieved.
- retrieved bool
-}
-
-// NewSharedCredentials returns a pointer to a new Credentials object
-// wrapping the Profile file provider.
-func NewSharedCredentials(filename, profile string) *Credentials {
- return NewCredentials(&SharedCredentialsProvider{
- Filename: filename,
- Profile: profile,
- })
-}
-
-// Retrieve reads and extracts the shared credentials from the current
-// users home directory.
-func (p *SharedCredentialsProvider) Retrieve() (Value, error) {
- p.retrieved = false
-
- filename, err := p.filename()
- if err != nil {
- return Value{ProviderName: SharedCredsProviderName}, err
- }
-
- creds, err := loadProfile(filename, p.profile())
- if err != nil {
- return Value{ProviderName: SharedCredsProviderName}, err
- }
-
- p.retrieved = true
- return creds, nil
-}
-
-// IsExpired returns if the shared credentials have expired.
-func (p *SharedCredentialsProvider) IsExpired() bool {
- return !p.retrieved
-}
-
-// loadProfiles loads from the file pointed to by shared credentials filename for profile.
-// The credentials retrieved from the profile will be returned or error. Error will be
-// returned if it fails to read from the file, or the data is invalid.
-func loadProfile(filename, profile string) (Value, error) {
- config, err := ini.OpenFile(filename)
- if err != nil {
- return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsLoad", "failed to load shared credentials file", err)
- }
-
- iniProfile, ok := config.GetSection(profile)
- if !ok {
- return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsLoad", "failed to get profile", nil)
- }
-
- id := iniProfile.String("aws_access_key_id")
- if len(id) == 0 {
- return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsAccessKey",
- fmt.Sprintf("shared credentials %s in %s did not contain aws_access_key_id", profile, filename),
- nil)
- }
-
- secret := iniProfile.String("aws_secret_access_key")
- if len(secret) == 0 {
- return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsSecret",
- fmt.Sprintf("shared credentials %s in %s did not contain aws_secret_access_key", profile, filename),
- nil)
- }
-
- // Default to empty string if not found
- token := iniProfile.String("aws_session_token")
-
- return Value{
- AccessKeyID: id,
- SecretAccessKey: secret,
- SessionToken: token,
- ProviderName: SharedCredsProviderName,
- }, nil
-}
-
-// filename returns the filename to use to read AWS shared credentials.
-//
-// Will return an error if the user's home directory path cannot be found.
-func (p *SharedCredentialsProvider) filename() (string, error) {
- if len(p.Filename) != 0 {
- return p.Filename, nil
- }
-
- if p.Filename = os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); len(p.Filename) != 0 {
- return p.Filename, nil
- }
-
- if home := shareddefaults.UserHomeDir(); len(home) == 0 {
- // Backwards compatibility of home directly not found error being returned.
- // This error is too verbose, failure when opening the file would of been
- // a better error to return.
- return "", ErrSharedCredentialsHomeNotFound
- }
-
- p.Filename = shareddefaults.SharedCredentialsFilename()
-
- return p.Filename, nil
-}
-
-// profile returns the AWS shared credentials profile. If empty will read
-// environment variable "AWS_PROFILE". If that is not set profile will
-// return "default".
-func (p *SharedCredentialsProvider) profile() string {
- if p.Profile == "" {
- p.Profile = os.Getenv("AWS_PROFILE")
- }
- if p.Profile == "" {
- p.Profile = "default"
- }
-
- return p.Profile
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/doc.go
deleted file mode 100644
index 18c940ab3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/doc.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Package ssocreds provides a credential provider for retrieving temporary AWS credentials using an SSO access token.
-//
-// IMPORTANT: The provider in this package does not initiate or perform the AWS SSO login flow. The SDK provider
-// expects that you have already performed the SSO login flow using AWS CLI using the "aws sso login" command, or by
-// some other mechanism. The provider must find a valid non-expired access token for the AWS SSO user portal URL in
-// ~/.aws/sso/cache. If a cached token is not found, it is expired, or the file is malformed an error will be returned.
-//
-// Loading AWS SSO credentials with the AWS shared configuration file
-//
-// You can use configure AWS SSO credentials from the AWS shared configuration file by
-// providing the specifying the required keys in the profile:
-//
-// sso_account_id
-// sso_region
-// sso_role_name
-// sso_start_url
-//
-// For example, the following defines a profile "devsso" and specifies the AWS SSO parameters that defines the target
-// account, role, sign-on portal, and the region where the user portal is located. Note: all SSO arguments must be
-// provided, or an error will be returned.
-//
-// [profile devsso]
-// sso_start_url = https://my-sso-portal.awsapps.com/start
-// sso_role_name = SSOReadOnlyRole
-// sso_region = us-east-1
-// sso_account_id = 123456789012
-//
-// Using the config module, you can load the AWS SDK shared configuration, and specify that this profile be used to
-// retrieve credentials. For example:
-//
-// sess, err := session.NewSessionWithOptions(session.Options{
-// SharedConfigState: session.SharedConfigEnable,
-// Profile: "devsso",
-// })
-// if err != nil {
-// return err
-// }
-//
-// Programmatically loading AWS SSO credentials directly
-//
-// You can programmatically construct the AWS SSO Provider in your application, and provide the necessary information
-// to load and retrieve temporary credentials using an access token from ~/.aws/sso/cache.
-//
-// svc := sso.New(sess, &aws.Config{
-// Region: aws.String("us-west-2"), // Client Region must correspond to the AWS SSO user portal region
-// })
-//
-// provider := ssocreds.NewCredentialsWithClient(svc, "123456789012", "SSOReadOnlyRole", "https://my-sso-portal.awsapps.com/start")
-//
-// credentials, err := provider.Get()
-// if err != nil {
-// return err
-// }
-//
-// Additional Resources
-//
-// Configuring the AWS CLI to use AWS Single Sign-On: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
-//
-// AWS Single Sign-On User Guide: https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html
-package ssocreds
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os.go
deleted file mode 100644
index d4df39a7a..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os.go
+++ /dev/null
@@ -1,10 +0,0 @@
-//go:build !windows
-// +build !windows
-
-package ssocreds
-
-import "os"
-
-func getHomeDirectory() string {
- return os.Getenv("HOME")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os_windows.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os_windows.go
deleted file mode 100644
index eb48f61e5..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os_windows.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package ssocreds
-
-import "os"
-
-func getHomeDirectory() string {
- return os.Getenv("USERPROFILE")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/provider.go
deleted file mode 100644
index 6eda2a555..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/provider.go
+++ /dev/null
@@ -1,180 +0,0 @@
-package ssocreds
-
-import (
- "crypto/sha1"
- "encoding/hex"
- "encoding/json"
- "fmt"
- "io/ioutil"
- "path/filepath"
- "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"
- "github.com/aws/aws-sdk-go/service/sso"
- "github.com/aws/aws-sdk-go/service/sso/ssoiface"
-)
-
-// ErrCodeSSOProviderInvalidToken is the code type that is returned if loaded token has expired or is otherwise invalid.
-// To refresh the SSO session run aws sso login with the corresponding profile.
-const ErrCodeSSOProviderInvalidToken = "SSOProviderInvalidToken"
-
-const invalidTokenMessage = "the SSO session has expired or is invalid"
-
-func init() {
- nowTime = time.Now
- defaultCacheLocation = defaultCacheLocationImpl
-}
-
-var nowTime func() time.Time
-
-// ProviderName is the name of the provider used to specify the source of credentials.
-const ProviderName = "SSOProvider"
-
-var defaultCacheLocation func() string
-
-func defaultCacheLocationImpl() string {
- return filepath.Join(getHomeDirectory(), ".aws", "sso", "cache")
-}
-
-// Provider is an AWS credential provider that retrieves temporary AWS credentials by exchanging an SSO login token.
-type Provider struct {
- credentials.Expiry
-
- // The Client which is configured for the AWS Region where the AWS SSO user portal is located.
- Client ssoiface.SSOAPI
-
- // The AWS account that is assigned to the user.
- AccountID string
-
- // The role name that is assigned to the user.
- RoleName string
-
- // The URL that points to the organization's AWS Single Sign-On (AWS SSO) user portal.
- StartURL string
-}
-
-// NewCredentials returns a new AWS Single Sign-On (AWS SSO) credential provider. The ConfigProvider is expected to be configured
-// for the AWS Region where the AWS SSO user portal is located.
-func NewCredentials(configProvider client.ConfigProvider, accountID, roleName, startURL string, optFns ...func(provider *Provider)) *credentials.Credentials {
- return NewCredentialsWithClient(sso.New(configProvider), accountID, roleName, startURL, optFns...)
-}
-
-// NewCredentialsWithClient returns a new AWS Single Sign-On (AWS SSO) credential provider. The provided client is expected to be configured
-// for the AWS Region where the AWS SSO user portal is located.
-func NewCredentialsWithClient(client ssoiface.SSOAPI, accountID, roleName, startURL string, optFns ...func(provider *Provider)) *credentials.Credentials {
- p := &Provider{
- Client: client,
- AccountID: accountID,
- RoleName: roleName,
- StartURL: startURL,
- }
-
- for _, fn := range optFns {
- fn(p)
- }
-
- return credentials.NewCredentials(p)
-}
-
-// Retrieve retrieves temporary AWS credentials from the configured Amazon Single Sign-On (AWS SSO) user portal
-// by exchanging the accessToken present in ~/.aws/sso/cache.
-func (p *Provider) Retrieve() (credentials.Value, error) {
- return p.RetrieveWithContext(aws.BackgroundContext())
-}
-
-// RetrieveWithContext retrieves temporary AWS credentials from the configured Amazon Single Sign-On (AWS SSO) user portal
-// by exchanging the accessToken present in ~/.aws/sso/cache.
-func (p *Provider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) {
- tokenFile, err := loadTokenFile(p.StartURL)
- if err != nil {
- return credentials.Value{}, err
- }
-
- output, err := p.Client.GetRoleCredentialsWithContext(ctx, &sso.GetRoleCredentialsInput{
- AccessToken: &tokenFile.AccessToken,
- AccountId: &p.AccountID,
- RoleName: &p.RoleName,
- })
- if err != nil {
- return credentials.Value{}, err
- }
-
- expireTime := time.Unix(0, aws.Int64Value(output.RoleCredentials.Expiration)*int64(time.Millisecond)).UTC()
- p.SetExpiration(expireTime, 0)
-
- return credentials.Value{
- AccessKeyID: aws.StringValue(output.RoleCredentials.AccessKeyId),
- SecretAccessKey: aws.StringValue(output.RoleCredentials.SecretAccessKey),
- SessionToken: aws.StringValue(output.RoleCredentials.SessionToken),
- ProviderName: ProviderName,
- }, nil
-}
-
-func getCacheFileName(url string) (string, error) {
- hash := sha1.New()
- _, err := hash.Write([]byte(url))
- if err != nil {
- return "", err
- }
- return strings.ToLower(hex.EncodeToString(hash.Sum(nil))) + ".json", nil
-}
-
-type rfc3339 time.Time
-
-func (r *rfc3339) UnmarshalJSON(bytes []byte) error {
- var value string
-
- if err := json.Unmarshal(bytes, &value); err != nil {
- return err
- }
-
- parse, err := time.Parse(time.RFC3339, value)
- if err != nil {
- return fmt.Errorf("expected RFC3339 timestamp: %v", err)
- }
-
- *r = rfc3339(parse)
-
- return nil
-}
-
-type token struct {
- AccessToken string `json:"accessToken"`
- ExpiresAt rfc3339 `json:"expiresAt"`
- Region string `json:"region,omitempty"`
- StartURL string `json:"startUrl,omitempty"`
-}
-
-func (t token) Expired() bool {
- return nowTime().Round(0).After(time.Time(t.ExpiresAt))
-}
-
-func loadTokenFile(startURL string) (t token, err error) {
- key, err := getCacheFileName(startURL)
- if err != nil {
- return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, err)
- }
-
- fileBytes, err := ioutil.ReadFile(filepath.Join(defaultCacheLocation(), key))
- if err != nil {
- return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, err)
- }
-
- if err := json.Unmarshal(fileBytes, &t); err != nil {
- return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, err)
- }
-
- if len(t.AccessToken) == 0 {
- return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, nil)
- }
-
- if t.Expired() {
- return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, nil)
- }
-
- return t, nil
-}
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
deleted file mode 100644
index cbba1e3d5..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package credentials
-
-import (
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-// StaticProviderName provides a name of Static provider
-const StaticProviderName = "StaticProvider"
-
-var (
- // ErrStaticCredentialsEmpty is emitted when static credentials are empty.
- ErrStaticCredentialsEmpty = awserr.New("EmptyStaticCreds", "static credentials are empty", nil)
-)
-
-// A StaticProvider is a set of credentials which are set programmatically,
-// and will never expire.
-type StaticProvider struct {
- Value
-}
-
-// NewStaticCredentials returns a pointer to a new Credentials object
-// 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,
- SecretAccessKey: secret,
- SessionToken: token,
- }})
-}
-
-// NewStaticCredentialsFromCreds returns a pointer to a new Credentials object
-// wrapping the static credentials value provide. Same as NewStaticCredentials
-// but takes the creds Value instead of individual fields
-func NewStaticCredentialsFromCreds(creds Value) *Credentials {
- return NewCredentials(&StaticProvider{Value: creds})
-}
-
-// Retrieve returns the credentials or error if the credentials are invalid.
-func (s *StaticProvider) Retrieve() (Value, error) {
- if s.AccessKeyID == "" || s.SecretAccessKey == "" {
- return Value{ProviderName: StaticProviderName}, ErrStaticCredentialsEmpty
- }
-
- if len(s.Value.ProviderName) == 0 {
- s.Value.ProviderName = StaticProviderName
- }
- return s.Value, nil
-}
-
-// IsExpired returns if the credentials are expired.
-//
-// For StaticProvider, the credentials never expired.
-func (s *StaticProvider) IsExpired() bool {
- return false
-}
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
deleted file mode 100644
index 260a37cbb..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
-Package stscreds are credential Providers to retrieve STS AWS credentials.
-
-STS provides multiple ways to retrieve credentials which can be used when making
-future AWS service API operation calls.
-
-The SDK will ensure that per instance of credentials.Credentials all requests
-to refresh the credentials will be synchronized. But, the SDK is unable to
-ensure synchronous usage of the AssumeRoleProvider if the value is shared
-between multiple Credentials, Sessions or service clients.
-
-Assume Role
-
-To assume an IAM role using STS with the SDK you can create a new Credentials
-with the SDKs's stscreds package.
-
- // Initial credentials loaded from SDK's default credential chain. Such as
- // the environment, shared credentials (~/.aws/credentials), or EC2 Instance
- // Role. These credentials will be used to to make the STS Assume Role API.
- sess := session.Must(session.NewSession())
-
- // Create the credentials from AssumeRoleProvider to assume the role
- // referenced by the "myRoleARN" ARN.
- creds := stscreds.NewCredentials(sess, "myRoleArn")
-
- // Create service client value configured for credentials
- // from assumed role.
- svc := s3.New(sess, &aws.Config{Credentials: creds})
-
-Assume Role with static MFA Token
-
-To assume an IAM role with a MFA token you can either specify a MFA token code
-directly or provide a function to prompt the user each time the credentials
-need to refresh the role's credentials. Specifying the TokenCode should be used
-for short lived operations that will not need to be refreshed, and when you do
-not want to have direct control over the user provides their MFA token.
-
-With TokenCode the AssumeRoleProvider will be not be able to refresh the role's
-credentials.
-
- // Create the credentials from AssumeRoleProvider to assume the role
- // referenced by the "myRoleARN" ARN using the MFA token code provided.
- creds := stscreds.NewCredentials(sess, "myRoleArn", func(p *stscreds.AssumeRoleProvider) {
- p.SerialNumber = aws.String("myTokenSerialNumber")
- p.TokenCode = aws.String("00000000")
- })
-
- // Create service client value configured for credentials
- // from assumed role.
- svc := s3.New(sess, &aws.Config{Credentials: creds})
-
-Assume Role with MFA Token Provider
-
-To assume an IAM role with MFA for longer running tasks where the credentials
-may need to be refreshed setting the TokenProvider field of AssumeRoleProvider
-will allow the credential provider to prompt for new MFA token code when the
-role's credentials need to be refreshed.
-
-The StdinTokenProvider function is available to prompt on stdin to retrieve
-the MFA token code from the user. You can also implement custom prompts by
-satisfing the TokenProvider function signature.
-
-Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will
-have undesirable results as the StdinTokenProvider will not be synchronized. A
-single Credentials with an AssumeRoleProvider can be shared safely.
-
- // Create the credentials from AssumeRoleProvider to assume the role
- // referenced by the "myRoleARN" ARN. Prompting for MFA token from stdin.
- creds := stscreds.NewCredentials(sess, "myRoleArn", func(p *stscreds.AssumeRoleProvider) {
- p.SerialNumber = aws.String("myTokenSerialNumber")
- p.TokenProvider = stscreds.StdinTokenProvider
- })
-
- // Create service client value configured for credentials
- // from assumed role.
- svc := s3.New(sess, &aws.Config{Credentials: creds})
-
-*/
-package stscreds
-
-import (
- "fmt"
- "os"
- "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"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/sdkrand"
- "github.com/aws/aws-sdk-go/service/sts"
-)
-
-// StdinTokenProvider will prompt on stderr and read from stdin for a string value.
-// An error is returned if reading from stdin fails.
-//
-// Use this function to read MFA tokens from stdin. The function makes no attempt
-// to make atomic prompts from stdin across multiple gorouties.
-//
-// Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will
-// have undesirable results as the StdinTokenProvider will not be synchronized. A
-// single Credentials with an AssumeRoleProvider can be shared safely
-//
-// Will wait forever until something is provided on the stdin.
-func StdinTokenProvider() (string, error) {
- var v string
- fmt.Fprintf(os.Stderr, "Assume Role MFA token code: ")
- _, err := fmt.Scanln(&v)
-
- return v, err
-}
-
-// ProviderName provides a name of AssumeRole provider
-const ProviderName = "AssumeRoleProvider"
-
-// AssumeRoler represents the minimal subset of the STS client API used by this provider.
-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
-
-// AssumeRoleProvider retrieves temporary credentials from the STS service, and
-// keeps track of their expiration time.
-//
-// This credential provider will be used by the SDKs default credential change
-// when shared configuration is enabled, and the shared config or shared credentials
-// file configure assume role. See Session docs for how to do this.
-//
-// AssumeRoleProvider does not provide any synchronization and it is not safe
-// to share this value across multiple Credentials, Sessions, or service clients
-// without also sharing the same Credentials instance.
-type AssumeRoleProvider struct {
- credentials.Expiry
-
- // STS client to make assume role request with.
- Client AssumeRoler
-
- // Role to be assumed.
- RoleARN string
-
- // 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
-
- // Optional ExternalID to pass along, defaults to nil if not set.
- ExternalID *string
-
- // The policy plain text must be 2048 bytes or shorter. However, an internal
- // conversion compresses it into a packed binary format with a separate limit.
- // The PackedPolicySize response element indicates by percentage how close to
- // the upper size limit the policy is, with 100% equaling the maximum allowed
- // 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.
- // The value is either the serial number for a hardware device (such as GAHT12345678)
- // or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).
- SerialNumber *string
-
- // 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
- // is missing or expired, the AssumeRole call returns an "access denied" error.
- //
- // If SerialNumber is set and neither TokenCode nor TokenProvider are also
- // set an error will be returned.
- TokenCode *string
-
- // Async method of providing MFA token code for assuming an IAM role with MFA.
- // The value returned by the function will be used as the TokenCode in the Retrieve
- // call. See StdinTokenProvider for a provider that prompts and reads from stdin.
- //
- // This token provider will be called when ever the assumed role's
- // credentials need to be refreshed when SerialNumber is also set and
- // TokenCode is not set.
- //
- // If both TokenCode and TokenProvider is set, TokenProvider will be used and
- // TokenCode is ignored.
- TokenProvider func() (string, error)
-
- // ExpiryWindow will allow the credentials to trigger refreshing prior to
- // the credentials actually expiring. This is beneficial so race conditions
- // with expiring credentials do not cause request to fail unexpectedly
- // due to ExpiredTokenException exceptions.
- //
- // So a ExpiryWindow of 10s would cause calls to IsExpired() to return true
- // 10 seconds before the credentials are actually expired.
- //
- // If ExpiryWindow is 0 or less it will be ignored.
- ExpiryWindow time.Duration
-
- // MaxJitterFrac reduces the effective Duration of each credential requested
- // by a random percentage between 0 and MaxJitterFraction. MaxJitterFrac must
- // have a value between 0 and 1. Any other value may lead to expected behavior.
- // With a MaxJitterFrac value of 0, default) will no jitter will be used.
- //
- // For example, with a Duration of 30m and a MaxJitterFrac of 0.1, the
- // AssumeRole call will be made with an arbitrary Duration between 27m and
- // 30m.
- //
- // MaxJitterFrac should not be negative.
- MaxJitterFrac float64
-}
-
-// NewCredentials returns a pointer to a new Credentials value wrapping the
-// AssumeRoleProvider. The credentials will expire every 15 minutes and the
-// role will be named after a nanosecond timestamp of this operation. The
-// Credentials value will attempt to refresh the credentials using the provider
-// when Credentials.Get is called, if the cached credentials are expiring.
-//
-// Takes a Config provider to create the STS client. The ConfigProvider is
-// satisfied by the session.Session type.
-//
-// It is safe to share the returned Credentials with multiple Sessions and
-// service clients. All access to the credentials and refreshing them
-// will be synchronized.
-func NewCredentials(c client.ConfigProvider, roleARN string, options ...func(*AssumeRoleProvider)) *credentials.Credentials {
- p := &AssumeRoleProvider{
- Client: sts.New(c),
- RoleARN: roleARN,
- Duration: DefaultDuration,
- }
-
- for _, option := range options {
- option(p)
- }
-
- return credentials.NewCredentials(p)
-}
-
-// NewCredentialsWithClient returns a pointer to a new Credentials value wrapping the
-// AssumeRoleProvider. The credentials will expire every 15 minutes and the
-// role will be named after a nanosecond timestamp of this operation. The
-// Credentials value will attempt to refresh the credentials using the provider
-// when Credentials.Get is called, if the cached credentials are expiring.
-//
-// Takes an AssumeRoler which can be satisfied by the STS client.
-//
-// It is safe to share the returned Credentials with multiple Sessions and
-// service clients. All access to the credentials and refreshing them
-// will be synchronized.
-func NewCredentialsWithClient(svc AssumeRoler, roleARN string, options ...func(*AssumeRoleProvider)) *credentials.Credentials {
- p := &AssumeRoleProvider{
- Client: svc,
- RoleARN: roleARN,
- Duration: DefaultDuration,
- }
-
- for _, option := range options {
- option(p)
- }
-
- return credentials.NewCredentials(p)
-}
-
-// 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.
- p.RoleSessionName = fmt.Sprintf("%d", time.Now().UTC().UnixNano())
- }
- if p.Duration == 0 {
- // Expire as often as AWS permits.
- p.Duration = DefaultDuration
- }
- 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,
- Tags: p.Tags,
- PolicyArns: p.PolicyArns,
- TransitiveTagKeys: p.TransitiveTagKeys,
- }
- if p.Policy != nil {
- input.Policy = p.Policy
- }
- if p.SerialNumber != nil {
- if p.TokenCode != nil {
- input.SerialNumber = p.SerialNumber
- input.TokenCode = p.TokenCode
- } else if p.TokenProvider != nil {
- input.SerialNumber = p.SerialNumber
- code, err := p.TokenProvider()
- if err != nil {
- return credentials.Value{ProviderName: ProviderName}, err
- }
- input.TokenCode = aws.String(code)
- } else {
- return credentials.Value{ProviderName: ProviderName},
- awserr.New("AssumeRoleTokenNotAvailable",
- "assume role with MFA enabled, but neither TokenCode nor TokenProvider are set", nil)
- }
- }
-
- 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
- }
-
- // We will proactively generate new credentials before they expire.
- p.SetExpiration(*roleOutput.Credentials.Expiration, p.ExpiryWindow)
-
- return credentials.Value{
- AccessKeyID: *roleOutput.Credentials.AccessKeyId,
- SecretAccessKey: *roleOutput.Credentials.SecretAccessKey,
- SessionToken: *roleOutput.Credentials.SessionToken,
- ProviderName: ProviderName,
- }, nil
-}
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
deleted file mode 100644
index 19ad619aa..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go
+++ /dev/null
@@ -1,182 +0,0 @@
-package stscreds
-
-import (
- "fmt"
- "io/ioutil"
- "strconv"
- "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"
- "github.com/aws/aws-sdk-go/service/sts"
- "github.com/aws/aws-sdk-go/service/sts/stsiface"
-)
-
-const (
- // ErrCodeWebIdentity will be used as an error code when constructing
- // a new error to be returned during session creation or retrieval.
- ErrCodeWebIdentity = "WebIdentityErr"
-
- // WebIdentityProviderName is the web identity provider name
- WebIdentityProviderName = "WebIdentityCredentials"
-)
-
-// now is used to return a time.Time object representing
-// the current time. This can be used to easily test and
-// compare test values.
-var now = time.Now
-
-// TokenFetcher should 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
-
- // The policy ARNs to use with the web identity assumed role.
- PolicyArns []*sts.PolicyDescriptorType
-
- // Duration the STS credentials will be valid for. Truncated to seconds.
- // If unset, the assumed role will use AssumeRoleWithWebIdentity's default
- // expiry duration. See
- // https://docs.aws.amazon.com/sdk-for-go/api/service/sts/#STS.AssumeRoleWithWebIdentity
- // for more information.
- Duration time.Duration
-
- // The amount of time the credentials will be refreshed before they expire.
- // This is useful refresh credentials before they expire to reduce risk of
- // using credentials as they expire. If unset, will default to no expiry
- // window.
- ExpiryWindow time.Duration
-
- client stsiface.STSAPI
-
- tokenFetcher TokenFetcher
- roleARN string
- roleSessionName string
-}
-
-// NewWebIdentityCredentials will return a new set of credentials with a given
-// configuration, role arn, and token file path.
-//
-// Deprecated: Use NewWebIdentityRoleProviderWithOptions for flexible
-// functional options, and wrap with credentials.NewCredentials helper.
-func NewWebIdentityCredentials(c client.ConfigProvider, roleARN, roleSessionName, path string) *credentials.Credentials {
- svc := sts.New(c)
- p := NewWebIdentityRoleProvider(svc, roleARN, roleSessionName, path)
- return credentials.NewCredentials(p)
-}
-
-// NewWebIdentityRoleProvider will return a new WebIdentityRoleProvider with the
-// provided stsiface.STSAPI
-//
-// Deprecated: Use NewWebIdentityRoleProviderWithOptions for flexible
-// functional options.
-func NewWebIdentityRoleProvider(svc stsiface.STSAPI, roleARN, roleSessionName, path string) *WebIdentityRoleProvider {
- return NewWebIdentityRoleProviderWithOptions(svc, roleARN, roleSessionName, FetchTokenPath(path))
-}
-
-// NewWebIdentityRoleProviderWithToken will return a new WebIdentityRoleProvider with the
-// provided stsiface.STSAPI and a TokenFetcher
-//
-// Deprecated: Use NewWebIdentityRoleProviderWithOptions for flexible
-// functional options.
-func NewWebIdentityRoleProviderWithToken(svc stsiface.STSAPI, roleARN, roleSessionName string, tokenFetcher TokenFetcher) *WebIdentityRoleProvider {
- return NewWebIdentityRoleProviderWithOptions(svc, roleARN, roleSessionName, tokenFetcher)
-}
-
-// NewWebIdentityRoleProviderWithOptions will return an initialize
-// WebIdentityRoleProvider with the provided stsiface.STSAPI, role ARN, and a
-// TokenFetcher. Additional options can be provided as functional options.
-//
-// TokenFetcher is the implementation that will retrieve the JWT token from to
-// assume the role with. Use the provided FetchTokenPath implementation to
-// retrieve the JWT token using a file system path.
-func NewWebIdentityRoleProviderWithOptions(svc stsiface.STSAPI, roleARN, roleSessionName string, tokenFetcher TokenFetcher, optFns ...func(*WebIdentityRoleProvider)) *WebIdentityRoleProvider {
- p := WebIdentityRoleProvider{
- client: svc,
- tokenFetcher: tokenFetcher,
- roleARN: roleARN,
- roleSessionName: roleSessionName,
- }
-
- for _, fn := range optFns {
- fn(&p)
- }
-
- return &p
-}
-
-// Retrieve 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) Retrieve() (credentials.Value, error) {
- 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 {
- return credentials.Value{}, awserr.New(ErrCodeWebIdentity, "failed fetching WebIdentity token: ", err)
- }
-
- sessionName := p.roleSessionName
- if len(sessionName) == 0 {
- // session name is used to uniquely identify a session. This simply
- // uses unix time in nanoseconds to uniquely identify sessions.
- sessionName = strconv.FormatInt(now().UnixNano(), 10)
- }
-
- var duration *int64
- if p.Duration != 0 {
- duration = aws.Int64(int64(p.Duration / time.Second))
- }
-
- req, resp := p.client.AssumeRoleWithWebIdentityRequest(&sts.AssumeRoleWithWebIdentityInput{
- PolicyArns: p.PolicyArns,
- RoleArn: &p.roleARN,
- RoleSessionName: &sessionName,
- WebIdentityToken: aws.String(string(b)),
- DurationSeconds: duration,
- })
-
- 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)
- if err := req.Send(); err != nil {
- return credentials.Value{}, awserr.New(ErrCodeWebIdentity, "failed to retrieve credentials", err)
- }
-
- p.SetExpiration(aws.TimeValue(resp.Credentials.Expiration), p.ExpiryWindow)
-
- value := credentials.Value{
- AccessKeyID: aws.StringValue(resp.Credentials.AccessKeyId),
- SecretAccessKey: aws.StringValue(resp.Credentials.SecretAccessKey),
- SessionToken: aws.StringValue(resp.Credentials.SessionToken),
- ProviderName: WebIdentityProviderName,
- }
- return value, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go
deleted file mode 100644
index 25a66d1dd..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Package csm provides the Client Side Monitoring (CSM) client which enables
-// sending metrics via UDP connection to the CSM agent. This package provides
-// control options, and configuration for the CSM client. The client can be
-// controlled manually, or automatically via the SDK's Session configuration.
-//
-// Enabling CSM client via SDK's Session configuration
-//
-// The CSM client can be enabled automatically via SDK's Session configuration.
-// The SDK's session configuration enables the CSM client if the AWS_CSM_PORT
-// environment variable is set to a non-empty value.
-//
-// The configuration options for the CSM client via the SDK's session
-// configuration are:
-//
-// * AWS_CSM_PORT=
-// The port number the CSM agent will receive metrics on.
-//
-// * AWS_CSM_HOST=
-// The hostname, or IP address the CSM agent will receive metrics on.
-// Without port number.
-//
-// Manually enabling the CSM client
-//
-// The CSM client can be started, paused, and resumed manually. The Start
-// function will enable the CSM client to publish metrics to the CSM agent. It
-// is safe to call Start concurrently, but if Start is called additional times
-// with different ClientID or address it will panic.
-//
-// r, err := csm.Start("clientID", ":31000")
-// if err != nil {
-// panic(fmt.Errorf("failed starting CSM: %v", err))
-// }
-//
-// When controlling the CSM client manually, you must also inject its request
-// handlers into the SDK's Session configuration for the SDK's API clients to
-// publish metrics.
-//
-// sess, err := session.NewSession(&aws.Config{})
-// if err != nil {
-// panic(fmt.Errorf("failed loading session: %v", err))
-// }
-//
-// // Add CSM client's metric publishing request handlers to the SDK's
-// // Session Configuration.
-// r.InjectHandlers(&sess.Handlers)
-//
-// Controlling CSM client
-//
-// Once the CSM client has been enabled the Get function will return a Reporter
-// value that you can use to pause and resume the metrics published to the CSM
-// agent. If Get function is called before the reporter is enabled with the
-// Start function or via SDK's Session configuration nil will be returned.
-//
-// The Pause method can be called to stop the CSM client publishing metrics to
-// the CSM agent. The Continue method will resume metric publishing.
-//
-// // Get the CSM client Reporter.
-// r := csm.Get()
-//
-// // Will pause monitoring
-// r.Pause()
-// resp, err = client.GetObject(&s3.GetObjectInput{
-// Bucket: aws.String("bucket"),
-// Key: aws.String("key"),
-// })
-//
-// // Resume monitoring
-// r.Continue()
-package csm
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go
deleted file mode 100644
index 4b19e2800..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go
+++ /dev/null
@@ -1,89 +0,0 @@
-package csm
-
-import (
- "fmt"
- "strings"
- "sync"
-)
-
-var (
- lock sync.Mutex
-)
-
-const (
- // DefaultPort is used when no port is specified.
- DefaultPort = "31000"
-
- // DefaultHost is the host that will be used when none is specified.
- DefaultHost = "127.0.0.1"
-)
-
-// AddressWithDefaults returns a CSM address built from the host and port
-// values. If the host or port is not set, default values will be used
-// instead. If host is "localhost" it will be replaced with "127.0.0.1".
-func AddressWithDefaults(host, port string) string {
- if len(host) == 0 || strings.EqualFold(host, "localhost") {
- host = DefaultHost
- }
-
- if len(port) == 0 {
- port = DefaultPort
- }
-
- // Only IP6 host can contain a colon
- if strings.Contains(host, ":") {
- return "[" + host + "]:" + port
- }
-
- return host + ":" + port
-}
-
-// Start will start a long running go routine to capture
-// client side metrics. Calling start multiple time will only
-// start the metric listener once and will panic if a different
-// client ID or port is passed in.
-//
-// r, err := csm.Start("clientID", "127.0.0.1:31000")
-// if err != nil {
-// panic(fmt.Errorf("expected no error, but received %v", err))
-// }
-// sess := session.NewSession()
-// r.InjectHandlers(sess.Handlers)
-//
-// svc := s3.New(sess)
-// out, err := svc.GetObject(&s3.GetObjectInput{
-// Bucket: aws.String("bucket"),
-// Key: aws.String("key"),
-// })
-func Start(clientID string, url string) (*Reporter, error) {
- lock.Lock()
- defer lock.Unlock()
-
- if sender == nil {
- sender = newReporter(clientID, url)
- } else {
- if sender.clientID != clientID {
- panic(fmt.Errorf("inconsistent client IDs. %q was expected, but received %q", sender.clientID, clientID))
- }
-
- if sender.url != url {
- panic(fmt.Errorf("inconsistent URLs. %q was expected, but received %q", sender.url, url))
- }
- }
-
- if err := connect(url); err != nil {
- sender = nil
- return nil, err
- }
-
- return sender, nil
-}
-
-// Get will return a reporter if one exists, if one does not exist, nil will
-// be returned.
-func Get() *Reporter {
- lock.Lock()
- defer lock.Unlock()
-
- return sender
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go
deleted file mode 100644
index 5bacc791a..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go
+++ /dev/null
@@ -1,109 +0,0 @@
-package csm
-
-import (
- "strconv"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
-)
-
-type metricTime time.Time
-
-func (t metricTime) MarshalJSON() ([]byte, error) {
- ns := time.Duration(time.Time(t).UnixNano())
- return []byte(strconv.FormatInt(int64(ns/time.Millisecond), 10)), nil
-}
-
-type metric struct {
- ClientID *string `json:"ClientId,omitempty"`
- API *string `json:"Api,omitempty"`
- Service *string `json:"Service,omitempty"`
- Timestamp *metricTime `json:"Timestamp,omitempty"`
- Type *string `json:"Type,omitempty"`
- Version *int `json:"Version,omitempty"`
-
- AttemptCount *int `json:"AttemptCount,omitempty"`
- Latency *int `json:"Latency,omitempty"`
-
- Fqdn *string `json:"Fqdn,omitempty"`
- UserAgent *string `json:"UserAgent,omitempty"`
- AttemptLatency *int `json:"AttemptLatency,omitempty"`
-
- SessionToken *string `json:"SessionToken,omitempty"`
- Region *string `json:"Region,omitempty"`
- AccessKey *string `json:"AccessKey,omitempty"`
- HTTPStatusCode *int `json:"HttpStatusCode,omitempty"`
- XAmzID2 *string `json:"XAmzId2,omitempty"`
- XAmzRequestID *string `json:"XAmznRequestId,omitempty"`
-
- AWSException *string `json:"AwsException,omitempty"`
- AWSExceptionMessage *string `json:"AwsExceptionMessage,omitempty"`
- SDKException *string `json:"SdkException,omitempty"`
- SDKExceptionMessage *string `json:"SdkExceptionMessage,omitempty"`
-
- FinalHTTPStatusCode *int `json:"FinalHttpStatusCode,omitempty"`
- FinalAWSException *string `json:"FinalAwsException,omitempty"`
- FinalAWSExceptionMessage *string `json:"FinalAwsExceptionMessage,omitempty"`
- FinalSDKException *string `json:"FinalSdkException,omitempty"`
- FinalSDKExceptionMessage *string `json:"FinalSdkExceptionMessage,omitempty"`
-
- DestinationIP *string `json:"DestinationIp,omitempty"`
- ConnectionReused *int `json:"ConnectionReused,omitempty"`
-
- AcquireConnectionLatency *int `json:"AcquireConnectionLatency,omitempty"`
- ConnectLatency *int `json:"ConnectLatency,omitempty"`
- RequestLatency *int `json:"RequestLatency,omitempty"`
- DNSLatency *int `json:"DnsLatency,omitempty"`
- TCPLatency *int `json:"TcpLatency,omitempty"`
- SSLLatency *int `json:"SslLatency,omitempty"`
-
- MaxRetriesExceeded *int `json:"MaxRetriesExceeded,omitempty"`
-}
-
-func (m *metric) TruncateFields() {
- m.ClientID = truncateString(m.ClientID, 255)
- m.UserAgent = truncateString(m.UserAgent, 256)
-
- m.AWSException = truncateString(m.AWSException, 128)
- m.AWSExceptionMessage = truncateString(m.AWSExceptionMessage, 512)
-
- m.SDKException = truncateString(m.SDKException, 128)
- m.SDKExceptionMessage = truncateString(m.SDKExceptionMessage, 512)
-
- m.FinalAWSException = truncateString(m.FinalAWSException, 128)
- m.FinalAWSExceptionMessage = truncateString(m.FinalAWSExceptionMessage, 512)
-
- m.FinalSDKException = truncateString(m.FinalSDKException, 128)
- m.FinalSDKExceptionMessage = truncateString(m.FinalSDKExceptionMessage, 512)
-}
-
-func truncateString(v *string, l int) *string {
- if v != nil && len(*v) > l {
- nv := (*v)[:l]
- return &nv
- }
-
- return v
-}
-
-func (m *metric) SetException(e metricException) {
- switch te := e.(type) {
- case awsException:
- m.AWSException = aws.String(te.exception)
- m.AWSExceptionMessage = aws.String(te.message)
- case sdkException:
- m.SDKException = aws.String(te.exception)
- m.SDKExceptionMessage = aws.String(te.message)
- }
-}
-
-func (m *metric) SetFinalException(e metricException) {
- switch te := e.(type) {
- case awsException:
- m.FinalAWSException = aws.String(te.exception)
- m.FinalAWSExceptionMessage = aws.String(te.message)
- case sdkException:
- m.FinalSDKException = aws.String(te.exception)
- m.FinalSDKExceptionMessage = aws.String(te.message)
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go
deleted file mode 100644
index 82a3e345e..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package csm
-
-import (
- "sync/atomic"
-)
-
-const (
- runningEnum = iota
- pausedEnum
-)
-
-var (
- // MetricsChannelSize of metrics to hold in the channel
- MetricsChannelSize = 100
-)
-
-type metricChan struct {
- ch chan metric
- paused *int64
-}
-
-func newMetricChan(size int) metricChan {
- return metricChan{
- ch: make(chan metric, size),
- paused: new(int64),
- }
-}
-
-func (ch *metricChan) Pause() {
- atomic.StoreInt64(ch.paused, pausedEnum)
-}
-
-func (ch *metricChan) Continue() {
- atomic.StoreInt64(ch.paused, runningEnum)
-}
-
-func (ch *metricChan) IsPaused() bool {
- v := atomic.LoadInt64(ch.paused)
- return v == pausedEnum
-}
-
-// Push will push metrics to the metric channel if the channel
-// is not paused
-func (ch *metricChan) Push(m metric) bool {
- if ch.IsPaused() {
- return false
- }
-
- select {
- case ch.ch <- m:
- return true
- default:
- return false
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_exception.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_exception.go
deleted file mode 100644
index 54a99280c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_exception.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package csm
-
-type metricException interface {
- Exception() string
- Message() string
-}
-
-type requestException struct {
- exception string
- message string
-}
-
-func (e requestException) Exception() string {
- return e.exception
-}
-func (e requestException) Message() string {
- return e.message
-}
-
-type awsException struct {
- requestException
-}
-
-type sdkException struct {
- requestException
-}
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
deleted file mode 100644
index 835bcd49c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go
+++ /dev/null
@@ -1,264 +0,0 @@
-package csm
-
-import (
- "encoding/json"
- "net"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// Reporter will gather metrics of API requests made and
-// send those metrics to the CSM endpoint.
-type Reporter struct {
- clientID string
- url string
- conn net.Conn
- metricsCh metricChan
- done chan struct{}
-}
-
-var (
- sender *Reporter
-)
-
-func connect(url string) error {
- const network = "udp"
- if err := sender.connect(network, url); err != nil {
- return err
- }
-
- if sender.done == nil {
- sender.done = make(chan struct{})
- go sender.start()
- }
-
- return nil
-}
-
-func newReporter(clientID, url string) *Reporter {
- return &Reporter{
- clientID: clientID,
- url: url,
- metricsCh: newMetricChan(MetricsChannelSize),
- }
-}
-
-func (rep *Reporter) sendAPICallAttemptMetric(r *request.Request) {
- if rep == nil {
- return
- }
-
- now := time.Now()
- creds, _ := r.Config.Credentials.Get()
-
- m := metric{
- ClientID: aws.String(rep.clientID),
- API: aws.String(r.Operation.Name),
- Service: aws.String(r.ClientInfo.ServiceID),
- Timestamp: (*metricTime)(&now),
- UserAgent: aws.String(r.HTTPRequest.Header.Get("User-Agent")),
- Region: r.Config.Region,
- Type: aws.String("ApiCallAttempt"),
- Version: aws.Int(1),
-
- XAmzRequestID: aws.String(r.RequestID),
-
- AttemptLatency: aws.Int(int(now.Sub(r.AttemptTime).Nanoseconds() / int64(time.Millisecond))),
- AccessKey: aws.String(creds.AccessKeyID),
- }
-
- if r.HTTPResponse != nil {
- m.HTTPStatusCode = aws.Int(r.HTTPResponse.StatusCode)
- }
-
- if r.Error != nil {
- if awserr, ok := r.Error.(awserr.Error); ok {
- m.SetException(getMetricException(awserr))
- }
- }
-
- m.TruncateFields()
- rep.metricsCh.Push(m)
-}
-
-func getMetricException(err awserr.Error) metricException {
- msg := err.Error()
- code := err.Code()
-
- switch code {
- case request.ErrCodeRequestError,
- request.ErrCodeSerialization,
- request.CanceledErrorCode:
- return sdkException{
- requestException{exception: code, message: msg},
- }
- default:
- return awsException{
- requestException{exception: code, message: msg},
- }
- }
-}
-
-func (rep *Reporter) sendAPICallMetric(r *request.Request) {
- if rep == nil {
- return
- }
-
- now := time.Now()
- m := metric{
- ClientID: aws.String(rep.clientID),
- API: aws.String(r.Operation.Name),
- Service: aws.String(r.ClientInfo.ServiceID),
- Timestamp: (*metricTime)(&now),
- UserAgent: aws.String(r.HTTPRequest.Header.Get("User-Agent")),
- Type: aws.String("ApiCall"),
- AttemptCount: aws.Int(r.RetryCount + 1),
- Region: r.Config.Region,
- Latency: aws.Int(int(time.Since(r.Time) / time.Millisecond)),
- XAmzRequestID: aws.String(r.RequestID),
- MaxRetriesExceeded: aws.Int(boolIntValue(r.RetryCount >= r.MaxRetries())),
- }
-
- if r.HTTPResponse != nil {
- m.FinalHTTPStatusCode = aws.Int(r.HTTPResponse.StatusCode)
- }
-
- if r.Error != nil {
- if awserr, ok := r.Error.(awserr.Error); ok {
- m.SetFinalException(getMetricException(awserr))
- }
- }
-
- m.TruncateFields()
-
- // TODO: Probably want to figure something out for logging dropped
- // metrics
- rep.metricsCh.Push(m)
-}
-
-func (rep *Reporter) connect(network, url string) error {
- if rep.conn != nil {
- rep.conn.Close()
- }
-
- conn, err := net.Dial(network, url)
- if err != nil {
- return awserr.New("UDPError", "Could not connect", err)
- }
-
- rep.conn = conn
-
- return nil
-}
-
-func (rep *Reporter) close() {
- if rep.done != nil {
- close(rep.done)
- }
-
- rep.metricsCh.Pause()
-}
-
-func (rep *Reporter) start() {
- defer func() {
- rep.metricsCh.Pause()
- }()
-
- for {
- select {
- case <-rep.done:
- rep.done = nil
- return
- case m := <-rep.metricsCh.ch:
- // TODO: What to do with this error? Probably should just log
- b, err := json.Marshal(m)
- if err != nil {
- continue
- }
-
- rep.conn.Write(b)
- }
- }
-}
-
-// Pause will pause the metric channel preventing any new metrics from being
-// added. It is safe to call concurrently with other calls to Pause, but if
-// called concurently with Continue can lead to unexpected state.
-func (rep *Reporter) Pause() {
- lock.Lock()
- defer lock.Unlock()
-
- if rep == nil {
- return
- }
-
- rep.close()
-}
-
-// Continue will reopen the metric channel and allow for monitoring to be
-// resumed. It is safe to call concurrently with other calls to Continue, but
-// if called concurently with Pause can lead to unexpected state.
-func (rep *Reporter) Continue() {
- lock.Lock()
- defer lock.Unlock()
- if rep == nil {
- return
- }
-
- if !rep.metricsCh.IsPaused() {
- return
- }
-
- rep.metricsCh.Continue()
-}
-
-// Client side metric handler names
-const (
- APICallMetricHandlerName = "awscsm.SendAPICallMetric"
- APICallAttemptMetricHandlerName = "awscsm.SendAPICallAttemptMetric"
-)
-
-// InjectHandlers will will enable client side metrics and inject the proper
-// handlers to handle how metrics are sent.
-//
-// InjectHandlers is NOT safe to call concurrently. Calling InjectHandlers
-// multiple times may lead to unexpected behavior, (e.g. duplicate metrics).
-//
-// // Start must be called in order to inject the correct handlers
-// r, err := csm.Start("clientID", "127.0.0.1:8094")
-// if err != nil {
-// panic(fmt.Errorf("expected no error, but received %v", err))
-// }
-//
-// sess := session.NewSession()
-// r.InjectHandlers(&sess.Handlers)
-//
-// // create a new service client with our client side metric session
-// svc := s3.New(sess)
-func (rep *Reporter) InjectHandlers(handlers *request.Handlers) {
- if rep == nil {
- return
- }
-
- handlers.Complete.PushFrontNamed(request.NamedHandler{
- Name: APICallMetricHandlerName,
- Fn: rep.sendAPICallMetric,
- })
-
- handlers.CompleteAttempt.PushFrontNamed(request.NamedHandler{
- Name: APICallAttemptMetricHandlerName,
- Fn: rep.sendAPICallAttemptMetric,
- })
-}
-
-// boolIntValue return 1 for true and 0 for false.
-func boolIntValue(b bool) int {
- if b {
- return 1
- }
-
- return 0
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
deleted file mode 100644
index 23bb639e0..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
+++ /dev/null
@@ -1,207 +0,0 @@
-// Package defaults is a collection of helpers to retrieve the SDK's default
-// configuration and handlers.
-//
-// Generally this package shouldn't be used directly, but session.Session
-// instead. This package is useful when you need to reset the defaults
-// of a session or service client to the SDK defaults before setting
-// additional parameters.
-package defaults
-
-import (
- "fmt"
- "net"
- "net/http"
- "net/url"
- "os"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/corehandlers"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds"
- "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds"
- "github.com/aws/aws-sdk-go/aws/ec2metadata"
- "github.com/aws/aws-sdk-go/aws/endpoints"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/shareddefaults"
-)
-
-// A Defaults provides a collection of default values for SDK clients.
-type Defaults struct {
- Config *aws.Config
- Handlers request.Handlers
-}
-
-// Get returns the SDK's default values with Config and handlers pre-configured.
-func Get() Defaults {
- cfg := Config()
- handlers := Handlers()
- cfg.Credentials = CredChain(cfg, handlers)
-
- return Defaults{
- Config: cfg,
- Handlers: handlers,
- }
-}
-
-// Config returns the default configuration without credentials.
-// To retrieve a config with credentials also included use
-// `defaults.Get().Config` instead.
-//
-// Generally you shouldn't need to use this method directly, but
-// is available if you need to reset the configuration of an
-// existing service client or session.
-func Config() *aws.Config {
- return aws.NewConfig().
- WithCredentials(credentials.AnonymousCredentials).
- WithRegion(os.Getenv("AWS_REGION")).
- WithHTTPClient(http.DefaultClient).
- WithMaxRetries(aws.UseServiceDefaultRetries).
- WithLogger(aws.NewDefaultLogger()).
- WithLogLevel(aws.LogOff).
- WithEndpointResolver(endpoints.DefaultResolver())
-}
-
-// Handlers returns the default request handlers.
-//
-// Generally you shouldn't need to use this method directly, but
-// is available if you need to reset the request handlers of an
-// existing service client or session.
-func Handlers() request.Handlers {
- var handlers request.Handlers
-
- handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler)
- handlers.Validate.AfterEachFn = request.HandlerListStopOnError
- handlers.Build.PushBackNamed(corehandlers.SDKVersionUserAgentHandler)
- handlers.Build.PushBackNamed(corehandlers.AddHostExecEnvUserAgentHander)
- handlers.Build.AfterEachFn = request.HandlerListStopOnError
- handlers.Sign.PushBackNamed(corehandlers.BuildContentLengthHandler)
- handlers.Send.PushBackNamed(corehandlers.ValidateReqSigHandler)
- handlers.Send.PushBackNamed(corehandlers.SendHandler)
- handlers.AfterRetry.PushBackNamed(corehandlers.AfterRetryHandler)
- handlers.ValidateResponse.PushBackNamed(corehandlers.ValidateResponseHandler)
-
- return handlers
-}
-
-// CredChain returns the default credential chain.
-//
-// Generally you shouldn't need to use this method directly, but
-// is available if you need to reset the credentials of an
-// existing service client or session's Config.
-func CredChain(cfg *aws.Config, handlers request.Handlers) *credentials.Credentials {
- return credentials.NewCredentials(&credentials.ChainProvider{
- VerboseErrors: aws.BoolValue(cfg.CredentialsChainVerboseErrors),
- Providers: CredProviders(cfg, handlers),
- })
-}
-
-// CredProviders returns the slice of providers used in
-// the default credential chain.
-//
-// For applications that need to use some other provider (for example use
-// different environment variables for legacy reasons) but still fall back
-// on the default chain of providers. This allows that default chaint to be
-// automatically updated
-func CredProviders(cfg *aws.Config, handlers request.Handlers) []credentials.Provider {
- return []credentials.Provider{
- &credentials.EnvProvider{},
- &credentials.SharedCredentialsProvider{Filename: "", Profile: ""},
- RemoteCredProvider(*cfg, handlers),
- }
-}
-
-const (
- httpProviderAuthorizationEnvVar = "AWS_CONTAINER_AUTHORIZATION_TOKEN"
- httpProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI"
-)
-
-// RemoteCredProvider returns a credentials provider for the default remote
-// endpoints such as EC2 or ECS Roles.
-func RemoteCredProvider(cfg aws.Config, handlers request.Handlers) credentials.Provider {
- if u := os.Getenv(httpProviderEnvVar); len(u) > 0 {
- return localHTTPCredProvider(cfg, handlers, u)
- }
-
- if uri := os.Getenv(shareddefaults.ECSCredsProviderEnvVar); len(uri) > 0 {
- u := fmt.Sprintf("%s%s", shareddefaults.ECSContainerCredentialsURI, uri)
- return httpCredProvider(cfg, handlers, u)
- }
-
- return ec2RoleProvider(cfg, handlers)
-}
-
-var lookupHostFn = net.LookupHost
-
-func isLoopbackHost(host string) (bool, error) {
- ip := net.ParseIP(host)
- if ip != nil {
- return ip.IsLoopback(), nil
- }
-
- // Host is not an ip, perform lookup
- addrs, err := lookupHostFn(host)
- if err != nil {
- return false, err
- }
- for _, addr := range addrs {
- if !net.ParseIP(addr).IsLoopback() {
- return false, nil
- }
- }
-
- return true, nil
-}
-
-func localHTTPCredProvider(cfg aws.Config, handlers request.Handlers, u string) credentials.Provider {
- var errMsg string
-
- parsed, err := url.Parse(u)
- if err != nil {
- errMsg = fmt.Sprintf("invalid URL, %v", err)
- } else {
- host := aws.URLHostname(parsed)
- if len(host) == 0 {
- errMsg = "unable to parse host from local HTTP cred provider URL"
- } else if isLoopback, loopbackErr := isLoopbackHost(host); loopbackErr != nil {
- errMsg = fmt.Sprintf("failed to resolve host %q, %v", host, loopbackErr)
- } else if !isLoopback {
- errMsg = fmt.Sprintf("invalid endpoint host, %q, only loopback hosts are allowed.", host)
- }
- }
-
- if len(errMsg) > 0 {
- if cfg.Logger != nil {
- cfg.Logger.Log("Ignoring, HTTP credential provider", errMsg, err)
- }
- return credentials.ErrorProvider{
- Err: awserr.New("CredentialsEndpointError", errMsg, err),
- ProviderName: endpointcreds.ProviderName,
- }
- }
-
- return httpCredProvider(cfg, handlers, u)
-}
-
-func httpCredProvider(cfg aws.Config, handlers request.Handlers, u string) credentials.Provider {
- return endpointcreds.NewProviderClient(cfg, handlers, u,
- func(p *endpointcreds.Provider) {
- p.ExpiryWindow = 5 * time.Minute
- p.AuthorizationToken = os.Getenv(httpProviderAuthorizationEnvVar)
- },
- )
-}
-
-func ec2RoleProvider(cfg aws.Config, handlers request.Handlers) credentials.Provider {
- resolver := cfg.EndpointResolver
- if resolver == nil {
- resolver = endpoints.DefaultResolver()
- }
-
- e, _ := resolver.EndpointFor(endpoints.Ec2metadataServiceID, "")
- return &ec2rolecreds.EC2RoleProvider{
- Client: ec2metadata.NewClient(cfg, handlers, e.URL, e.SigningRegion),
- ExpiryWindow: 5 * time.Minute,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go
deleted file mode 100644
index ca0ee1dcc..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package defaults
-
-import (
- "github.com/aws/aws-sdk-go/internal/shareddefaults"
-)
-
-// SharedCredentialsFilename returns the SDK's default file path
-// for the shared credentials file.
-//
-// Builds the shared config file path based on the OS's platform.
-//
-// - Linux/Unix: $HOME/.aws/credentials
-// - Windows: %USERPROFILE%\.aws\credentials
-func SharedCredentialsFilename() string {
- return shareddefaults.SharedCredentialsFilename()
-}
-
-// SharedConfigFilename returns the SDK's default file path for
-// the shared config file.
-//
-// Builds the shared config file path based on the OS's platform.
-//
-// - Linux/Unix: $HOME/.aws/config
-// - Windows: %USERPROFILE%\.aws\config
-func SharedConfigFilename() string {
- return shareddefaults.SharedConfigFilename()
-}
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
deleted file mode 100644
index 69fa63dc0..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go
+++ /dev/null
@@ -1,250 +0,0 @@
-package ec2metadata
-
-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: "/latest/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 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("/latest/meta-data", p),
- }
- output := &metadataOutput{}
-
- req := c.NewRequest(op, nil, output)
-
- req.SetContext(ctx)
-
- err := req.Send()
- return output.Content, err
-}
-
-// GetUserData 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) 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",
- HTTPPath: "/latest/user-data",
- }
-
- output := &metadataOutput{}
- req := c.NewRequest(op, nil, output)
- req.SetContext(ctx)
-
- err := req.Send()
- return output.Content, err
-}
-
-// GetDynamicData 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) 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",
- HTTPPath: sdkuri.PathJoin("/latest/dynamic", p),
- }
-
- output := &metadataOutput{}
- req := c.NewRequest(op, nil, output)
- req.SetContext(ctx)
-
- err := req.Send()
- return output.Content, err
-}
-
-// GetInstanceIdentityDocument retrieves an identity document describing an
-// instance. Error is returned if the request fails or is unable to parse
-// the response.
-func (c *EC2Metadata) GetInstanceIdentityDocument() (EC2InstanceIdentityDocument, error) {
- 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",
- "failed to get EC2 instance identity document", err)
- }
-
- doc := EC2InstanceIdentityDocument{}
- if err := json.NewDecoder(strings.NewReader(resp)).Decode(&doc); err != nil {
- return EC2InstanceIdentityDocument{},
- awserr.New(request.ErrCodeSerialization,
- "failed to decode EC2 instance identity document", err)
- }
-
- return doc, nil
-}
-
-// IAMInfo retrieves IAM info from the metadata API
-func (c *EC2Metadata) IAMInfo() (EC2IAMInfo, error) {
- 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",
- "failed to get EC2 IAM info", err)
- }
-
- info := EC2IAMInfo{}
- if err := json.NewDecoder(strings.NewReader(resp)).Decode(&info); err != nil {
- return EC2IAMInfo{},
- awserr.New(request.ErrCodeSerialization,
- "failed to decode EC2 IAM info", err)
- }
-
- if info.Code != "Success" {
- errMsg := fmt.Sprintf("failed to get EC2 IAM Info (%s)", info.Code)
- return EC2IAMInfo{},
- awserr.New("EC2MetadataError", errMsg, nil)
- }
-
- return info, nil
-}
-
-// Region returns the region the instance is running in.
-func (c *EC2Metadata) Region() (string, error) {
- 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
- }
- // 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
- 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 {
- 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
- }
-
- return true
-}
-
-// An EC2IAMInfo provides the shape for unmarshaling
-// an IAM info from the metadata API
-type EC2IAMInfo struct {
- Code string
- LastUpdated time.Time
- InstanceProfileArn string
- InstanceProfileID string
-}
-
-// An EC2InstanceIdentityDocument provides the shape for unmarshaling
-// an instance identity document
-type EC2InstanceIdentityDocument struct {
- DevpayProductCodes []string `json:"devpayProductCodes"`
- MarketplaceProductCodes []string `json:"marketplaceProductCodes"`
- AvailabilityZone string `json:"availabilityZone"`
- PrivateIP string `json:"privateIp"`
- Version string `json:"version"`
- Region string `json:"region"`
- InstanceID string `json:"instanceId"`
- BillingProducts []string `json:"billingProducts"`
- InstanceType string `json:"instanceType"`
- AccountID string `json:"accountId"`
- PendingTime time.Time `json:"pendingTime"`
- ImageID string `json:"imageId"`
- KernelID string `json:"kernelId"`
- RamdiskID string `json:"ramdiskId"`
- Architecture string `json:"architecture"`
-}
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
deleted file mode 100644
index df63bade1..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go
+++ /dev/null
@@ -1,245 +0,0 @@
-// Package ec2metadata provides the client for making API calls to the
-// EC2 Metadata service.
-//
-// This package's client can be disabled completely by setting the environment
-// variable "AWS_EC2_METADATA_DISABLED=true". This environment variable set to
-// true instructs the SDK to disable the EC2 Metadata client. The client cannot
-// be used while the environment variable is set to true, (case insensitive).
-//
-// The endpoint of the EC2 IMDS client can be configured via the environment
-// variable, AWS_EC2_METADATA_SERVICE_ENDPOINT when creating the client with a
-// Session. See aws/session#Options.EC2IMDSEndpoint for more details.
-package ec2metadata
-
-import (
- "bytes"
- "io"
- "net/http"
- "net/url"
- "os"
- "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/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/corehandlers"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-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 {
- *client.Client
-}
-
-// New creates a new instance of the EC2Metadata client with a session.
-// This client is safe to use across multiple goroutines.
-//
-//
-// Example:
-// // Create a EC2Metadata client from just a session.
-// svc := ec2metadata.New(mySession)
-//
-// // Create a EC2Metadata client with additional configuration
-// svc := ec2metadata.New(mySession, aws.NewConfig().WithLogLevel(aws.LogDebugHTTPBody))
-func New(p client.ConfigProvider, cfgs ...*aws.Config) *EC2Metadata {
- c := p.ClientConfig(ServiceName, cfgs...)
- return NewClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// NewClient returns a new EC2Metadata client. Should be used to create
-// a client when not using a session. Generally using just New with a session
-// is preferred.
-//
-// Will remove the URL path from the endpoint provided to ensure the EC2 IMDS
-// client is able to communicate with the EC2 IMDS API.
-//
-// If an unmodified HTTP client is provided from the stdlib default, or no client
-// the EC2RoleProvider's EC2Metadata HTTP client's timeout will be shortened.
-// To disable this set Config.EC2MetadataDisableTimeoutOverride to false. Enabled by default.
-func NewClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string, opts ...func(*client.Client)) *EC2Metadata {
- if !aws.BoolValue(cfg.EC2MetadataDisableTimeoutOverride) && httpClientZero(cfg.HTTPClient) {
- // If the http client is unmodified and this feature is not disabled
- // set custom timeouts for EC2Metadata requests.
- cfg.HTTPClient = &http.Client{
- // 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: 1 * time.Second,
- }
- // max number of retries on the client operation
- cfg.MaxRetries = aws.Int(2)
- }
-
- if u, err := url.Parse(endpoint); err == nil {
- // Remove path from the endpoint since it will be added by requests.
- // This is an artifact of the SDK adding `/latest` to the endpoint for
- // EC2 IMDS, but this is now moved to the operation definition.
- u.Path = ""
- u.RawPath = ""
- endpoint = u.String()
- }
-
- svc := &EC2Metadata{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: ServiceName,
- ServiceID: ServiceName,
- Endpoint: endpoint,
- APIVersion: "latest",
- },
- handlers,
- ),
- }
-
- // 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 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{
- Name: corehandlers.SendHandler.Name,
- Fn: func(r *request.Request) {
- r.HTTPResponse = &http.Response{
- Header: http.Header{},
- }
- r.Error = awserr.New(
- request.CanceledErrorCode,
- "EC2 IMDS access disabled via "+disableServiceEnvVar+" env var",
- nil)
- },
- })
- }
-
- // Add additional options to the service config
- for _, option := range opts {
- option(svc.Client)
- }
- return svc
-}
-
-func httpClientZero(c *http.Client) bool {
- return c == nil || (c.Transport == nil && c.CheckRedirect == nil && c.Jar == nil && c.Timeout == 0)
-}
-
-type metadataOutput struct {
- Content string
-}
-
-type tokenOutput struct {
- Token string
- TTL time.Duration
-}
-
-// 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()
- 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.NewRequestFailure(
- awserr.New("EC2MetadataError", "failed to make EC2Metadata request\n"+b.String(), nil),
- r.HTTPResponse.StatusCode, r.RequestID)
-}
-
-func validateEndpointHandler(r *request.Request) {
- if r.ClientInfo.Endpoint == "" {
- r.Error = aws.ErrMissingEndpoint
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/token_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/token_provider.go
deleted file mode 100644
index 4b29f190b..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/token_provider.go
+++ /dev/null
@@ -1,93 +0,0 @@
-package ec2metadata
-
-import (
- "net/http"
- "sync/atomic"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// A tokenProvider struct provides access to EC2Metadata client
-// and atomic instance of a token, along with configuredTTL for it.
-// tokenProvider also provides an atomic flag to disable the
-// fetch token operation.
-// The disabled member will use 0 as false, and 1 as true.
-type tokenProvider struct {
- client *EC2Metadata
- token atomic.Value
- configuredTTL time.Duration
- disabled uint32
-}
-
-// A ec2Token struct helps use of token in EC2 Metadata service ops
-type ec2Token struct {
- token string
- credentials.Expiry
-}
-
-// newTokenProvider provides a pointer to a tokenProvider instance
-func newTokenProvider(c *EC2Metadata, duration time.Duration) *tokenProvider {
- return &tokenProvider{client: c, configuredTTL: duration}
-}
-
-// fetchTokenHandler fetches token for EC2Metadata service client by default.
-func (t *tokenProvider) fetchTokenHandler(r *request.Request) {
-
- // short-circuits to insecure data flow if tokenProvider is disabled.
- if v := atomic.LoadUint32(&t.disabled); v == 1 {
- return
- }
-
- if ec2Token, ok := t.token.Load().(ec2Token); ok && !ec2Token.IsExpired() {
- r.HTTPRequest.Header.Set(tokenHeader, ec2Token.token)
- return
- }
-
- output, err := t.client.getToken(r.Context(), t.configuredTTL)
-
- if err != nil {
-
- // change the disabled flag on token provider to true,
- // when error is request timeout error.
- if requestFailureError, ok := err.(awserr.RequestFailure); ok {
- switch requestFailureError.StatusCode() {
- case http.StatusForbidden, http.StatusNotFound, http.StatusMethodNotAllowed:
- atomic.StoreUint32(&t.disabled, 1)
- case http.StatusBadRequest:
- r.Error = requestFailureError
- }
-
- // Check if request timed out while waiting for response
- if e, ok := requestFailureError.OrigErr().(awserr.Error); ok {
- if e.Code() == request.ErrCodeRequestError {
- atomic.StoreUint32(&t.disabled, 1)
- }
- }
- }
- return
- }
-
- newToken := ec2Token{
- token: output.Token,
- }
- newToken.SetExpiration(time.Now().Add(output.TTL), ttlExpirationWindow)
- t.token.Store(newToken)
-
- // Inject token header to the request.
- if ec2Token, ok := t.token.Load().(ec2Token); ok {
- r.HTTPRequest.Header.Set(tokenHeader, ec2Token.token)
- }
-}
-
-// enableTokenProviderHandler enables the token provider
-func (t *tokenProvider) enableTokenProviderHandler(r *request.Request) {
- // If the error code status is 401, we enable the token provider
- if e, ok := r.Error.(awserr.RequestFailure); ok && e != nil &&
- e.StatusCode() == http.StatusUnauthorized {
- t.token.Store(ec2Token{})
- atomic.StoreUint32(&t.disabled, 0)
- }
-}
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
deleted file mode 100644
index cad3b9a48..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go
+++ /dev/null
@@ -1,193 +0,0 @@
-package endpoints
-
-import (
- "encoding/json"
- "fmt"
- "io"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-type modelDefinition map[string]json.RawMessage
-
-// A DecodeModelOptions are the options for how the endpoints model definition
-// are decoded.
-type DecodeModelOptions struct {
- SkipCustomizations bool
-}
-
-// Set combines all of the option functions together.
-func (d *DecodeModelOptions) Set(optFns ...func(*DecodeModelOptions)) {
- for _, fn := range optFns {
- fn(d)
- }
-}
-
-// DecodeModel unmarshals a Regions and Endpoint model definition file into
-// a endpoint Resolver. If the file format is not supported, or an error occurs
-// when unmarshaling the model an error will be returned.
-//
-// Casting the return value of this func to a EnumPartitions will
-// allow you to get a list of the partitions in the order the endpoints
-// will be resolved in.
-//
-// resolver, err := endpoints.DecodeModel(reader)
-//
-// partitions := resolver.(endpoints.EnumPartitions).Partitions()
-// for _, p := range partitions {
-// // ... inspect partitions
-// }
-func DecodeModel(r io.Reader, optFns ...func(*DecodeModelOptions)) (Resolver, error) {
- var opts DecodeModelOptions
- opts.Set(optFns...)
-
- // Get the version of the partition file to determine what
- // unmarshaling model to use.
- modelDef := modelDefinition{}
- if err := json.NewDecoder(r).Decode(&modelDef); err != nil {
- return nil, newDecodeModelError("failed to decode endpoints model", err)
- }
-
- var version string
- if b, ok := modelDef["version"]; ok {
- version = string(b)
- } else {
- return nil, newDecodeModelError("endpoints version not found in model", nil)
- }
-
- if version == "3" {
- return decodeV3Endpoints(modelDef, opts)
- }
-
- return nil, newDecodeModelError(
- fmt.Sprintf("endpoints version %s, not supported", version), nil)
-}
-
-func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (Resolver, error) {
- b, ok := modelDef["partitions"]
- if !ok {
- return nil, newDecodeModelError("endpoints model missing partitions", nil)
- }
-
- ps := partitions{}
- if err := json.Unmarshal(b, &ps); err != nil {
- return nil, newDecodeModelError("failed to decode endpoints model", err)
- }
-
- if opts.SkipCustomizations {
- return ps, nil
- }
-
- // Customization
- for i := 0; i < len(ps); i++ {
- p := &ps[i]
- custRegionalS3(p)
- custRmIotDataService(p)
- custFixAppAutoscalingChina(p)
- custFixAppAutoscalingUsGov(p)
- }
-
- return ps, nil
-}
-
-func custRegionalS3(p *partition) {
- if p.ID != "aws" {
- return
- }
-
- service, ok := p.Services["s3"]
- if !ok {
- return
- }
-
- const awsGlobal = "aws-global"
- const usEast1 = "us-east-1"
-
- // If global endpoint already exists no customization needed.
- if _, ok := service.Endpoints[endpointKey{Region: awsGlobal}]; ok {
- return
- }
-
- service.PartitionEndpoint = awsGlobal
- if _, ok := service.Endpoints[endpointKey{Region: usEast1}]; !ok {
- service.Endpoints[endpointKey{Region: usEast1}] = endpoint{}
- }
- service.Endpoints[endpointKey{Region: awsGlobal}] = endpoint{
- Hostname: "s3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: usEast1,
- },
- }
-
- p.Services["s3"] = service
-}
-
-func custRmIotDataService(p *partition) {
- delete(p.Services, "data.iot")
-}
-
-func custFixAppAutoscalingChina(p *partition) {
- if p.ID != "aws-cn" {
- return
- }
-
- const serviceName = "application-autoscaling"
- s, ok := p.Services[serviceName]
- if !ok {
- return
- }
-
- const expectHostname = `autoscaling.{region}.amazonaws.com`
- serviceDefault := s.Defaults[defaultKey{}]
- if e, a := expectHostname, serviceDefault.Hostname; e != a {
- fmt.Printf("custFixAppAutoscalingChina: ignoring customization, expected %s, got %s\n", e, a)
- return
- }
- serviceDefault.Hostname = expectHostname + ".cn"
- s.Defaults[defaultKey{}] = serviceDefault
- p.Services[serviceName] = s
-}
-
-func custFixAppAutoscalingUsGov(p *partition) {
- if p.ID != "aws-us-gov" {
- return
- }
-
- const serviceName = "application-autoscaling"
- s, ok := p.Services[serviceName]
- if !ok {
- return
- }
-
- serviceDefault := s.Defaults[defaultKey{}]
- if a := serviceDefault.CredentialScope.Service; a != "" {
- fmt.Printf("custFixAppAutoscalingUsGov: ignoring customization, expected empty credential scope service, got %s\n", a)
- return
- }
-
- if a := serviceDefault.Hostname; a != "" {
- fmt.Printf("custFixAppAutoscalingUsGov: ignoring customization, expected empty hostname, got %s\n", a)
- return
- }
-
- serviceDefault.CredentialScope.Service = "application-autoscaling"
- serviceDefault.Hostname = "autoscaling.{region}.amazonaws.com"
-
- if s.Defaults == nil {
- s.Defaults = make(endpointDefaults)
- }
-
- s.Defaults[defaultKey{}] = serviceDefault
-
- p.Services[serviceName] = s
-}
-
-type decodeModelError struct {
- awsError
-}
-
-func newDecodeModelError(msg string, err error) decodeModelError {
- return decodeModelError{
- awsError: awserr.New("DecodeEndpointsModelError", msg, err),
- }
-}
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
deleted file mode 100644
index 524d2240d..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
+++ /dev/null
@@ -1,33804 +0,0 @@
-// Code generated by aws/endpoints/v3model_codegen.go. DO NOT EDIT.
-
-package endpoints
-
-import (
- "regexp"
-)
-
-// Partition identifiers
-const (
- AwsPartitionID = "aws" // AWS Standard partition.
- AwsCnPartitionID = "aws-cn" // AWS China partition.
- AwsUsGovPartitionID = "aws-us-gov" // AWS GovCloud (US) partition.
- AwsIsoPartitionID = "aws-iso" // AWS ISO (US) partition.
- AwsIsoBPartitionID = "aws-iso-b" // AWS ISOB (US) partition.
-)
-
-// 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).
- ApNortheast3RegionID = "ap-northeast-3" // Asia Pacific (Osaka).
- ApSouth1RegionID = "ap-south-1" // Asia Pacific (Mumbai).
- ApSoutheast1RegionID = "ap-southeast-1" // Asia Pacific (Singapore).
- ApSoutheast2RegionID = "ap-southeast-2" // Asia Pacific (Sydney).
- ApSoutheast3RegionID = "ap-southeast-3" // Asia Pacific (Jakarta).
- CaCentral1RegionID = "ca-central-1" // Canada (Central).
- 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).
- MeCentral1RegionID = "me-central-1" // Middle East (UAE).
- MeSouth1RegionID = "me-south-1" // Middle East (Bahrain).
- SaEast1RegionID = "sa-east-1" // South America (Sao Paulo).
- UsEast1RegionID = "us-east-1" // US East (N. Virginia).
- UsEast2RegionID = "us-east-2" // US East (Ohio).
- UsWest1RegionID = "us-west-1" // US West (N. California).
- UsWest2RegionID = "us-west-2" // US West (Oregon).
-)
-
-// AWS China partition's regions.
-const (
- CnNorth1RegionID = "cn-north-1" // China (Beijing).
- CnNorthwest1RegionID = "cn-northwest-1" // China (Ningxia).
-)
-
-// AWS GovCloud (US) partition's regions.
-const (
- UsGovEast1RegionID = "us-gov-east-1" // AWS GovCloud (US-East).
- UsGovWest1RegionID = "us-gov-west-1" // AWS GovCloud (US-West).
-)
-
-// AWS ISO (US) partition's regions.
-const (
- UsIsoEast1RegionID = "us-iso-east-1" // US ISO East.
- UsIsoWest1RegionID = "us-iso-west-1" // US ISO WEST.
-)
-
-// AWS ISOB (US) partition's regions.
-const (
- UsIsobEast1RegionID = "us-isob-east-1" // US ISOB East (Ohio).
-)
-
-// DefaultResolver returns an Endpoint resolver that will be able
-// to resolve endpoints for: AWS Standard, AWS China, AWS GovCloud (US), AWS ISO (US), and AWS ISOB (US).
-//
-// Use DefaultPartitions() to get the list of the default partitions.
-func DefaultResolver() Resolver {
- return defaultPartitions
-}
-
-// DefaultPartitions returns a list of the partitions the SDK is bundled
-// with. The available partitions are: AWS Standard, AWS China, AWS GovCloud (US), AWS ISO (US), and AWS ISOB (US).
-//
-// partitions := endpoints.DefaultPartitions
-// for _, p := range partitions {
-// // ... inspect partitions
-// }
-func DefaultPartitions() []Partition {
- return defaultPartitions.Partitions()
-}
-
-var defaultPartitions = partitions{
- awsPartition,
- awscnPartition,
- awsusgovPartition,
- awsisoPartition,
- awsisobPartition,
-}
-
-// AwsPartition returns the Resolver for AWS Standard.
-func AwsPartition() Partition {
- return awsPartition.Partition()
-}
-
-var awsPartition = partition{
- ID: "aws",
- Name: "AWS Standard",
- DNSSuffix: "amazonaws.com",
- RegionRegex: regionRegex{
- Regexp: func() *regexp.Regexp {
- reg, _ := regexp.Compile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$")
- return reg
- }(),
- },
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- DNSSuffix: "api.aws",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "api.aws",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- Regions: regions{
- "af-south-1": region{
- Description: "Africa (Cape Town)",
- },
- "ap-east-1": region{
- Description: "Asia Pacific (Hong Kong)",
- },
- "ap-northeast-1": region{
- Description: "Asia Pacific (Tokyo)",
- },
- "ap-northeast-2": region{
- Description: "Asia Pacific (Seoul)",
- },
- "ap-northeast-3": region{
- Description: "Asia Pacific (Osaka)",
- },
- "ap-south-1": region{
- Description: "Asia Pacific (Mumbai)",
- },
- "ap-southeast-1": region{
- Description: "Asia Pacific (Singapore)",
- },
- "ap-southeast-2": region{
- Description: "Asia Pacific (Sydney)",
- },
- "ap-southeast-3": region{
- Description: "Asia Pacific (Jakarta)",
- },
- "ca-central-1": region{
- Description: "Canada (Central)",
- },
- "eu-central-1": region{
- Description: "Europe (Frankfurt)",
- },
- "eu-north-1": region{
- Description: "Europe (Stockholm)",
- },
- "eu-south-1": region{
- Description: "Europe (Milan)",
- },
- "eu-west-1": region{
- Description: "Europe (Ireland)",
- },
- "eu-west-2": region{
- Description: "Europe (London)",
- },
- "eu-west-3": region{
- Description: "Europe (Paris)",
- },
- "me-central-1": region{
- Description: "Middle East (UAE)",
- },
- "me-south-1": region{
- Description: "Middle East (Bahrain)",
- },
- "sa-east-1": region{
- Description: "South America (Sao Paulo)",
- },
- "us-east-1": region{
- Description: "US East (N. Virginia)",
- },
- "us-east-2": region{
- Description: "US East (Ohio)",
- },
- "us-west-1": region{
- Description: "US West (N. California)",
- },
- "us-west-2": region{
- Description: "US West (Oregon)",
- },
- },
- Services: services{
- "a4b": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "access-analyzer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "access-analyzer-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "access-analyzer-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "access-analyzer-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "access-analyzer-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "access-analyzer-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "access-analyzer-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "access-analyzer-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "access-analyzer-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "access-analyzer-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "access-analyzer-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "account": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "account.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- },
- },
- "acm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "acm-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "acm-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "acm-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "acm-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "acm-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "acm-pca": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "acm-pca-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "acm-pca-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "acm-pca-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "acm-pca-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "acm-pca-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "airflow": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "amplify": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "amplifybackend": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "amplifyuibuilder": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "api.detective": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.detective-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "api.detective-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.detective-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "api.detective-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.detective-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "api.detective-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.detective-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "api.detective-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "api.ecr": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{
- Hostname: "api.ecr.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{
- Hostname: "api.ecr.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "api.ecr.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "api.ecr.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{
- Hostname: "api.ecr.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "api.ecr.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "api.ecr.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "api.ecr.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{
- Hostname: "api.ecr.ap-southeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-3",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "api.ecr.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "dkr-us-east-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-east-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-west-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "api.ecr.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "api.ecr.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{
- Hostname: "api.ecr.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "api.ecr.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "api.ecr.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "api.ecr.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "fips-dkr-us-east-1",
- }: endpoint{
- Hostname: "ecr-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-dkr-us-east-2",
- }: endpoint{
- Hostname: "ecr-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-dkr-us-west-1",
- }: endpoint{
- Hostname: "ecr-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-dkr-us-west-2",
- }: endpoint{
- Hostname: "ecr-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "ecr-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "ecr-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "ecr-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "ecr-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{
- Hostname: "api.ecr.me-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-central-1",
- },
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{
- Hostname: "api.ecr.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "api.ecr.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "api.ecr.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "api.ecr.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{
- Hostname: "api.ecr.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "api.ecr.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "api.elastic-inference": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "api.elastic-inference.ap-northeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "api.elastic-inference.ap-northeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "api.elastic-inference.eu-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "api.elastic-inference.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "api.elastic-inference.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "api.elastic-inference.us-west-2.amazonaws.com",
- },
- },
- },
- "api.fleethub.iot": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "api.iotdeviceadvisor": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "api.iotdeviceadvisor.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "api.iotdeviceadvisor.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "api.iotdeviceadvisor.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "api.iotdeviceadvisor.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "api.iotwireless": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "api.iotwireless.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "api.iotwireless.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "api.iotwireless.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "api.iotwireless.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "api.iotwireless.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "api.mediatailor": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "api.pricing": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "pricing",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "api.sagemaker": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api-fips.sagemaker.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "api.tunneling.iot": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "apigateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "apigateway-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "apigateway-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "apigateway-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "apigateway-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "apigateway-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "apigateway-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "apigateway-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "apigateway-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "apigateway-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "apigateway-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "app-integrations": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "appconfig": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "appconfigdata": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "appflow": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "application-autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "applicationinsights": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "appmesh": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "af-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.af-south-1.api.aws",
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.ap-east-1.api.aws",
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.ap-northeast-1.api.aws",
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.ap-northeast-2.api.aws",
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.ap-northeast-3.api.aws",
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.ap-south-1.api.aws",
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.ap-southeast-1.api.aws",
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.ap-southeast-2.api.aws",
- },
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.ap-southeast-3.api.aws",
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.ca-central-1.api.aws",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.eu-central-1.api.aws",
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.eu-north-1.api.aws",
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.eu-south-1.api.aws",
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.eu-west-1.api.aws",
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.eu-west-2.api.aws",
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.eu-west-3.api.aws",
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.me-south-1.api.aws",
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.sa-east-1.api.aws",
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.us-east-1.api.aws",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.us-east-2.api.aws",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.us-west-1.api.aws",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.us-west-2.api.aws",
- },
- },
- },
- "apprunner": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "apprunner-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "apprunner-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "apprunner-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "apprunner-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "apprunner-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "apprunner-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "appstream2": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- CredentialScope: credentialScope{
- Service: "appstream",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "appstream2-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "appstream2-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "appstream2-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "appstream2-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "appstream2-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "appsync": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "aps": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "athena": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "athena-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "athena-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "athena-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "athena-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "athena-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "athena-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "athena-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "athena-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "auditmanager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "autoscaling-plans": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "backup": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "backup-gateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "backupstorage": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "batch": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.batch.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "fips.batch.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "fips.batch.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "fips.batch.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "fips.batch.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.batch.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.batch.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.batch.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.batch.us-west-2.amazonaws.com",
- },
- },
- },
- "billingconductor": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "billingconductor.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- },
- },
- "braket": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "budgets": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "budgets.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- },
- },
- "cassandra": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "cassandra-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "cassandra-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cassandra-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cassandra-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "catalog.marketplace": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "ce": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "ce.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- },
- },
- "chime": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "chime.us-east-1.amazonaws.com",
- Protocols: []string{"https"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- },
- },
- "cloud9": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "cloudcontrolapi": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "clouddirectory": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "cloudformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudformation-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "cloudformation-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudformation-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "cloudformation-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudformation-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "cloudformation-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudformation-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "cloudformation-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "cloudfront": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "cloudfront.amazonaws.com",
- Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- },
- },
- "cloudhsm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "cloudhsmv2": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "cloudhsm",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "cloudsearch": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "cloudtrail": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "cloudtrail-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "cloudtrail-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "cloudtrail-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "cloudtrail-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudtrail-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudtrail-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudtrail-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudtrail-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "codeartifact": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "codebuild": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codebuild-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "codebuild-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codebuild-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "codebuild-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codebuild-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "codebuild-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codebuild-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "codebuild-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "codecommit": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codecommit-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "codecommit-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "codecommit-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codecommit-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "codecommit-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codecommit-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "codecommit-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codecommit-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "codecommit-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codecommit-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "codecommit-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "codedeploy": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codedeploy-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "codedeploy-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codedeploy-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "codedeploy-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codedeploy-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "codedeploy-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codedeploy-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "codedeploy-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "codeguru-reviewer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "codepipeline": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codepipeline-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "codepipeline-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "codepipeline-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "codepipeline-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "codepipeline-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "codepipeline-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codepipeline-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codepipeline-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codepipeline-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codepipeline-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "codestar": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "codestar-connections": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "cognito-identity": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "cognito-identity-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "cognito-identity-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "cognito-identity-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-identity-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-identity-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-identity-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "cognito-idp": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "cognito-idp-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "cognito-idp-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "cognito-idp-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "cognito-idp-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-idp-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-idp-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-idp-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-idp-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "cognito-sync": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "comprehend": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "comprehend-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "comprehend-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "comprehend-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehend-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehend-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehend-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "comprehendmedical": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "compute-optimizer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{
- Hostname: "compute-optimizer.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{
- Hostname: "compute-optimizer.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "compute-optimizer.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "compute-optimizer.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{
- Hostname: "compute-optimizer.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "compute-optimizer.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "compute-optimizer.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "compute-optimizer.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "compute-optimizer.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "compute-optimizer.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "compute-optimizer.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{
- Hostname: "compute-optimizer.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "compute-optimizer.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "compute-optimizer.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "compute-optimizer.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{
- Hostname: "compute-optimizer.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "compute-optimizer.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "compute-optimizer.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "compute-optimizer.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{
- Hostname: "compute-optimizer.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "compute-optimizer.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "config": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "config-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "config-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "config-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "config-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "config-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "config-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "config-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "config-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "connect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "connect-campaigns": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "connect-campaigns-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "connect-campaigns-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "connect-campaigns-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "connect-campaigns-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "contact-lens": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "controltower": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "controltower-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "controltower-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "controltower-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "controltower-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "controltower-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "controltower-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "controltower-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "controltower-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "cur": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "data-ats.iot": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- CredentialScope: credentialScope{
- Service: "iotdata",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.iot-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "data.iot-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "iotdata",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "data.iot-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "iotdata",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "data.iot-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "iotdata",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "data.iot-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "iotdata",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "data.iot-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "iotdata",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.iot-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.iot-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.iot-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.iot-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "data.jobs.iot": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.jobs.iot-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "data.jobs.iot-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "data.mediastore": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "databrew": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "databrew-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "databrew-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "databrew-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "databrew-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "databrew-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "databrew-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "databrew-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "databrew-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "dataexchange": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "datapipeline": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "datasync": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "datasync-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "datasync-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "datasync-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "datasync-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "datasync-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "datasync-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "datasync-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "datasync-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "datasync-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "datasync-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "dax": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "devicefarm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "devops-guru": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "devops-guru-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "devops-guru-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "devops-guru-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "devops-guru-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "devops-guru-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "devops-guru-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "directconnect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "directconnect-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "directconnect-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "directconnect-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "directconnect-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "directconnect-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "directconnect-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "directconnect-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "directconnect-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "discovery": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "dlm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "dms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "dms",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms-fips",
- }: endpoint{
- Hostname: "dms-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "dms-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "dms-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "dms-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "dms-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "docdb": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "rds.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "rds.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "rds.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "rds.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "rds.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "rds.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "rds.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "rds.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "rds.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "rds.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "rds.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "rds.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "rds.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "rds.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "drs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "ds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ds-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "ds-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "ds-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "ds-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "ds-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "ds-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ds-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ds-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ds-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ds-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "dynamodb-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "local",
- }: endpoint{
- Hostname: "localhost:8000",
- Protocols: []string{"http"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "dynamodb-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "dynamodb-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "dynamodb-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "dynamodb-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "ebs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ebs-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "ebs-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "ebs-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "ebs-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "ebs-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "ebs-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ebs-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ebs-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ebs-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ebs-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "ec2": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "ec2.ap-south-1.api.aws",
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ec2-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "ec2.eu-west-1.api.aws",
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "ec2-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "ec2-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "ec2-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "ec2-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "ec2-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "ec2.sa-east-1.api.aws",
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "ec2.us-east-1.api.aws",
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ec2-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "ec2.us-east-2.api.aws",
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ec2-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ec2-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "ec2.us-west-2.api.aws",
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ec2-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "ecs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "ecs-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "ecs-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "ecs-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "ecs-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecs-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecs-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecs-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecs-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "edge.sagemaker": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "eks": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.eks.{region}.{dnsSuffix}",
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "fips.eks.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "fips.eks.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "fips.eks.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "fips.eks.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.eks.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.eks.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.eks.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.eks.us-west-2.amazonaws.com",
- },
- },
- },
- "elasticache": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "elasticache-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticache-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "elasticache-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticache-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "elasticache-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticache-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "elasticache-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticache-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "elasticache-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "elasticbeanstalk": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "elasticfilesystem": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "af-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.af-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-northeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-northeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-northeast-3.amazonaws.com",
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-southeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-southeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-southeast-3.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-north-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-west-3.amazonaws.com",
- },
- endpointKey{
- Region: "fips-af-south-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-east-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-2",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-3",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-south-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-2",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-3",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-southeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-central-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-north-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-south-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-2",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-3",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-me-south-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-sa-east-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.me-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.sa-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "elasticloadbalancing": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "elasticmapreduce": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SSLCommonName: "{region}.{service}.{dnsSuffix}",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- SSLCommonName: "{service}.{region}.{dnsSuffix}",
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "elasticmapreduce-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- SSLCommonName: "{service}.{region}.{dnsSuffix}",
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-east-1.amazonaws.com",
- SSLCommonName: "{service}.{region}.{dnsSuffix}",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "elastictranscoder": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "email": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "email-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "email-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "email-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "email-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "emr-containers": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "emr-containers-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "emr-containers-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "emr-containers-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "emr-containers-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "emr-containers-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "emr-containers-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "emr-containers-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "emr-containers-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "emr-containers-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "emr-containers-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "emr-serverless": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "emr-serverless-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "emr-serverless-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "emr-serverless-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "emr-serverless-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "emr-serverless-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "emr-serverless-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "entitlement.marketplace": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "aws-marketplace",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "es": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "es-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "es-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "es-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "es-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "es-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "es-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "es-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "es-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "es-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "events": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "events-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "events-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "events-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "events-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "events-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "events-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "events-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "events-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "evidently": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "evidently.ap-northeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "evidently.ap-southeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "evidently.ap-southeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "evidently.eu-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "evidently.eu-north-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "evidently.eu-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "evidently.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "evidently.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "evidently.us-west-2.amazonaws.com",
- },
- },
- },
- "finspace": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "finspace-api": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "firehose": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "firehose-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "firehose-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "firehose-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "firehose-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "firehose-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "firehose-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "firehose-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "firehose-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "fms": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "af-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.af-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.ap-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.ap-northeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.ap-northeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.ap-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.ap-southeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.ap-southeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.eu-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.eu-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.eu-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.eu-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.eu-west-3.amazonaws.com",
- },
- endpointKey{
- Region: "fips-af-south-1",
- }: endpoint{
- Hostname: "fms-fips.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-east-1",
- }: endpoint{
- Hostname: "fms-fips.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-1",
- }: endpoint{
- Hostname: "fms-fips.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-2",
- }: endpoint{
- Hostname: "fms-fips.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-south-1",
- }: endpoint{
- Hostname: "fms-fips.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-1",
- }: endpoint{
- Hostname: "fms-fips.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-2",
- }: endpoint{
- Hostname: "fms-fips.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "fms-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-central-1",
- }: endpoint{
- Hostname: "fms-fips.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-south-1",
- }: endpoint{
- Hostname: "fms-fips.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-1",
- }: endpoint{
- Hostname: "fms-fips.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-2",
- }: endpoint{
- Hostname: "fms-fips.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-3",
- }: endpoint{
- Hostname: "fms-fips.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-me-south-1",
- }: endpoint{
- Hostname: "fms-fips.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-sa-east-1",
- }: endpoint{
- Hostname: "fms-fips.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "fms-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "fms-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "fms-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "fms-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.me-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.sa-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "forecast": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "forecast-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "forecast-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "forecast-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "forecast-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "forecast-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "forecast-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "forecastquery": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "forecastquery-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "forecastquery-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "forecastquery-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "forecastquery-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "forecastquery-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "forecastquery-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "frauddetector": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "fsx": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "fsx-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-prod-ca-central-1",
- }: endpoint{
- Hostname: "fsx-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-prod-us-east-1",
- }: endpoint{
- Hostname: "fsx-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-prod-us-east-2",
- }: endpoint{
- Hostname: "fsx-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-prod-us-west-2",
- }: endpoint{
- Hostname: "fsx-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "fsx-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "fsx-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "fsx-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-ca-central-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-east-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-east-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-west-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "gamelift": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "gamesparks": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "geo": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "glacier": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glacier-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "glacier-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "glacier-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "glacier-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "glacier-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "glacier-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glacier-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glacier-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glacier-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glacier-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "glue": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "glue-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "glue-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "glue-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "glue-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glue-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glue-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glue-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glue-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "grafana": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "grafana.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "grafana.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "grafana.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "grafana.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "grafana.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "grafana.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "grafana.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "grafana.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "grafana.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "grafana.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "greengrass": service{
- IsRegionalized: boxedTrue,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "groundstation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "groundstation-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "groundstation-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "groundstation-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "groundstation-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "groundstation-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "groundstation-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "guardduty": service{
- IsRegionalized: boxedTrue,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "guardduty-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "guardduty-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "guardduty-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "guardduty-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "guardduty-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "guardduty-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "guardduty-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "guardduty-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "health": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SSLCommonName: "health.us-east-1.amazonaws.com",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "global.health.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "health-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "health-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "healthlake": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "honeycode": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "iam": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "iam.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "aws-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iam-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "aws-global-fips",
- }: endpoint{
- Hostname: "iam-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "iam",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "iam",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iam-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "iam-fips",
- }: endpoint{
- Hostname: "iam-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "identity-chime": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "identity-chime-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "identity-chime-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "identitystore": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "importexport": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "importexport.amazonaws.com",
- SignatureVersions: []string{"v2", "v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- Service: "IngestionService",
- },
- },
- },
- },
- "inspector": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "inspector-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "inspector-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "inspector-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "inspector-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "inspector-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "inspector-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "inspector-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "inspector-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "inspector2": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "iot": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iot-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "iot-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "iot-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "iot-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "iot-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "iot-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iot-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iot-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iot-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iot-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "iotanalytics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "iotevents": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iotevents-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "iotevents-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "iotevents-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "iotevents-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "iotevents-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iotevents-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iotevents-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iotevents-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "ioteventsdata": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "data.iotevents.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "data.iotevents.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "data.iotevents.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "data.iotevents.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "data.iotevents.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "data.iotevents.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.iotevents-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "data.iotevents.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "data.iotevents.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "data.iotevents.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "data.iotevents-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "data.iotevents-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "data.iotevents-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "data.iotevents-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "data.iotevents.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.iotevents-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "data.iotevents.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.iotevents-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "data.iotevents.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.iotevents-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "iotsecuredtunneling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "iotsitewise": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iotsitewise-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "iotsitewise-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "iotsitewise-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "iotsitewise-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "iotsitewise-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iotsitewise-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iotsitewise-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iotsitewise-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "iotthingsgraph": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "iotthingsgraph",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "iottwinmaker": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "iotwireless": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "api.iotwireless.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "api.iotwireless.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "api.iotwireless.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "api.iotwireless.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "api.iotwireless.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "ivs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "ivschat": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "kafka": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "kafkaconnect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "kendra": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "kendra-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "kendra-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "kendra-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kendra-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kendra-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kendra-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "kinesis": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "kinesis-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "kinesis-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "kinesis-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "kinesis-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kinesis-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kinesis-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kinesis-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kinesis-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "kinesisanalytics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "kinesisvideo": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "kms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "af-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.af-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "af-south-1-fips",
- }: endpoint{
- Hostname: "kms-fips.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ap-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-east-1-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ap-northeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-1-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ap-northeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-2-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ap-northeast-3.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-3-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ap-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-south-1-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ap-southeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-1-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ap-southeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-2-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ap-southeast-3.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-3-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-southeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "kms-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.eu-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1-fips",
- }: endpoint{
- Hostname: "kms-fips.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.eu-north-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-north-1-fips",
- }: endpoint{
- Hostname: "kms-fips.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.eu-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-south-1-fips",
- }: endpoint{
- Hostname: "kms-fips.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.eu-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-1-fips",
- }: endpoint{
- Hostname: "kms-fips.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.eu-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-2-fips",
- }: endpoint{
- Hostname: "kms-fips.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.eu-west-3.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-3-fips",
- }: endpoint{
- Hostname: "kms-fips.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.me-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "me-central-1-fips",
- }: endpoint{
- Hostname: "kms-fips.me-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.me-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "me-south-1-fips",
- }: endpoint{
- Hostname: "kms-fips.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.sa-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "sa-east-1-fips",
- }: endpoint{
- Hostname: "kms-fips.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "kms-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "kms-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "kms-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "kms-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "lakeformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "lakeformation-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "lakeformation-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "lakeformation-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "lakeformation-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lakeformation-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lakeformation-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lakeformation-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lakeformation-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "lambda": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "af-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.af-south-1.api.aws",
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.ap-east-1.api.aws",
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.ap-northeast-1.api.aws",
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.ap-northeast-2.api.aws",
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.ap-northeast-3.api.aws",
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.ap-south-1.api.aws",
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.ap-southeast-1.api.aws",
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.ap-southeast-2.api.aws",
- },
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.ap-southeast-3.api.aws",
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.ca-central-1.api.aws",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.eu-central-1.api.aws",
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.eu-north-1.api.aws",
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.eu-south-1.api.aws",
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.eu-west-1.api.aws",
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.eu-west-2.api.aws",
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.eu-west-3.api.aws",
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "lambda-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "lambda-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "lambda-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "lambda-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.me-south-1.api.aws",
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.sa-east-1.api.aws",
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.us-east-1.api.aws",
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lambda-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.us-east-2.api.aws",
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lambda-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.us-west-1.api.aws",
- },
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lambda-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.us-west-2.api.aws",
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lambda-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "license-manager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "license-manager-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "license-manager-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "license-manager-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "license-manager-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "license-manager-user-subscriptions": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "license-manager-user-subscriptions-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "license-manager-user-subscriptions-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "license-manager-user-subscriptions-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "license-manager-user-subscriptions-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-user-subscriptions-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-user-subscriptions-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-user-subscriptions-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-user-subscriptions-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "lightsail": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "logs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "logs-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "logs-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "logs-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "logs-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "logs-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "logs-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "logs-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "logs-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "lookoutequipment": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "lookoutmetrics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "lookoutvision": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "m2": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "machinelearning": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "macie": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "macie-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "macie-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "macie-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "macie-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "macie2": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "macie2-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "macie2-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "macie2-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "macie2-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "macie2-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "macie2-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "macie2-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "macie2-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "managedblockchain": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "marketplacecommerceanalytics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "media-pipelines-chime": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "media-pipelines-chime-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "media-pipelines-chime-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "media-pipelines-chime-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "media-pipelines-chime-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "mediaconnect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "mediaconvert": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mediaconvert-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "mediaconvert-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "mediaconvert-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "mediaconvert-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "mediaconvert-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "mediaconvert-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mediaconvert-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mediaconvert-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mediaconvert-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mediaconvert-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "medialive": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "medialive-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "medialive-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "medialive-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "medialive-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "medialive-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "medialive-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "mediapackage": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "mediapackage-vod": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "mediastore": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "meetings-chime": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "meetings-chime-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "meetings-chime-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "meetings-chime-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "meetings-chime-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "memory-db": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "memory-db-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "messaging-chime": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "messaging-chime-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "messaging-chime-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "metering.marketplace": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "aws-marketplace",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "mgh": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "mgn": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "migrationhub-strategy": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "mobileanalytics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "models-v2-lex": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "models.lex": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "models-fips.lex.{region}.{dnsSuffix}",
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "models-fips.lex.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "models-fips.lex.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "models-fips.lex.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "models-fips.lex.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "monitoring": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "monitoring-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "monitoring-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "monitoring-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "monitoring-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "monitoring-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "monitoring-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "monitoring-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "monitoring-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "mq": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "mq-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "mq-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "mq-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "mq-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mq-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mq-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mq-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mq-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "mturk-requester": service{
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "sandbox",
- }: endpoint{
- Hostname: "mturk-requester-sandbox.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "neptune": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{
- Hostname: "rds.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "rds.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "rds.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "rds.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "rds.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "rds.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "rds.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "rds.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "rds.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "rds.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "rds.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "rds.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{
- Hostname: "rds.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "rds.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "rds.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "rds.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{
- Hostname: "rds.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "rds.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "network-firewall": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "network-firewall-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "network-firewall-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "network-firewall-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "network-firewall-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "network-firewall-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "network-firewall-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "network-firewall-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "network-firewall-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "network-firewall-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "network-firewall-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "networkmanager": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "networkmanager.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "nimble": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "oidc": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{
- Hostname: "oidc.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "oidc.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "oidc.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{
- Hostname: "oidc.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "oidc.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "oidc.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "oidc.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "oidc.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "oidc.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "oidc.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{
- Hostname: "oidc.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "oidc.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "oidc.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "oidc.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{
- Hostname: "oidc.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "oidc.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "oidc.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "oidc.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "oidc.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "opsworks": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "opsworks-cm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "organizations": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "organizations.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "aws-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "organizations-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "fips-aws-global",
- }: endpoint{
- Hostname: "organizations-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "outposts": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "outposts-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "outposts-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "outposts-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "outposts-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "outposts-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "outposts-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "outposts-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "outposts-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "outposts-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "outposts-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "participant.connect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "participant.connect-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "participant.connect-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "participant.connect-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "participant.connect-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "personalize": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "pi": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "pinpoint": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "mobiletargeting",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "pinpoint-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "pinpoint-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "pinpoint.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "pinpoint-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "pinpoint.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "pinpoint-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "polly": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "polly-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "polly-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "polly-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "polly-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "polly-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "polly-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "polly-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "polly-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "portal.sso": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{
- Hostname: "portal.sso.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "portal.sso.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "portal.sso.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{
- Hostname: "portal.sso.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "portal.sso.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "portal.sso.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "portal.sso.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "portal.sso.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "portal.sso.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "portal.sso.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{
- Hostname: "portal.sso.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "portal.sso.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "portal.sso.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "portal.sso.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{
- Hostname: "portal.sso.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "portal.sso.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "portal.sso.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "portal.sso.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "portal.sso.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "profile": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "projects.iot1click": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "proton": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "qldb": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "qldb-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "qldb-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "qldb-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "qldb-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "qldb-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "qldb-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "qldb-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "qldb-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "quicksight": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "api",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "ram": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ram-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "ram-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "ram-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "ram-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "ram-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "ram-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ram-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ram-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ram-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ram-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "rbin": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rbin-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "rbin-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "rbin-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "rbin-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "rbin-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "rbin-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rbin-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rbin-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rbin-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rbin-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "rds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "rds-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "rds-fips.ca-central-1",
- }: endpoint{
- Hostname: "rds-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds-fips.us-east-1",
- }: endpoint{
- Hostname: "rds-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds-fips.us-east-2",
- }: endpoint{
- Hostname: "rds-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds-fips.us-west-1",
- }: endpoint{
- Hostname: "rds-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds-fips.us-west-2",
- }: endpoint{
- Hostname: "rds-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.ca-central-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-east-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-east-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-west-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- SSLCommonName: "{service}.{dnsSuffix}",
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-east-1.amazonaws.com",
- SSLCommonName: "{service}.{dnsSuffix}",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "rds-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "rds-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "rds-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "rds-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "rds-data": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "rds-data-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "rds-data-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "rds-data-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "rds-data-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-data-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-data-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-data-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-data-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "redshift": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "redshift-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "redshift-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "redshift-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "redshift-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "redshift-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "redshift-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "redshift-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "redshift-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "redshift-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "redshift-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "redshift-serverless": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "rekognition": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "rekognition-fips.ca-central-1",
- }: endpoint{
- Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition-fips.us-east-1",
- }: endpoint{
- Hostname: "rekognition-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition-fips.us-east-2",
- }: endpoint{
- Hostname: "rekognition-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition-fips.us-west-1",
- }: endpoint{
- Hostname: "rekognition-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition-fips.us-west-2",
- }: endpoint{
- Hostname: "rekognition-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.ca-central-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-east-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-east-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-west-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "rekognition-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "rekognition-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "rekognition-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "rekognition-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "resiliencehub": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "resource-groups": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "resource-groups-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "resource-groups-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "resource-groups-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "resource-groups-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "resource-groups-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "resource-groups-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "resource-groups-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "resource-groups-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "robomaker": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "rolesanywhere": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "route53": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "route53.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "aws-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "route53-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "fips-aws-global",
- }: endpoint{
- Hostname: "route53-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "route53-recovery-control-config": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "route53-recovery-control-config.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "route53domains": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "route53resolver": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "rum": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "runtime-v2-lex": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "runtime.lex": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.lex.{region}.{dnsSuffix}",
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.lex.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "runtime-fips.lex.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.lex.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "runtime-fips.lex.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "runtime.sagemaker": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "s3": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedTrue,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "af-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.af-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ap-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "s3.ap-northeast-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "ap-northeast-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ap-northeast-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ap-northeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ap-northeast-3.amazonaws.com",
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ap-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "s3.ap-southeast-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "ap-southeast-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ap-southeast-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "s3.ap-southeast-2.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "ap-southeast-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ap-southeast-2.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ap-southeast-3.amazonaws.com",
- },
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "s3.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-fips.dualstack.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.eu-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.eu-north-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.eu-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "s3.eu-west-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "eu-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.eu-west-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.eu-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.eu-west-3.amazonaws.com",
- },
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "s3-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "s3-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "s3-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "s3-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "s3-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-central-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.me-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.me-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "s3-external-1",
- }: endpoint{
- Hostname: "s3-external-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "s3.sa-east-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "sa-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.sa-east-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "s3.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-fips.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-fips.dualstack.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-fips.dualstack.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{
- Hostname: "s3.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-fips.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-fips.dualstack.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "s3.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-west-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-fips.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-fips.dualstack.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- },
- },
- "s3-control": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "s3-control.ap-northeast-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.ap-northeast-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "s3-control.ap-northeast-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.ap-northeast-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{
- Hostname: "s3-control.ap-northeast-3.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- },
- endpointKey{
- Region: "ap-northeast-3",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.ap-northeast-3.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "s3-control.ap-south-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.ap-south-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "s3-control.ap-southeast-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.ap-southeast-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "s3-control.ap-southeast-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.ap-southeast-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "s3-control.ca-central-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.ca-central-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-control-fips.ca-central-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-control-fips.dualstack.ca-central-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "s3-control-fips.ca-central-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "s3-control.eu-central-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.eu-central-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "s3-control.eu-north-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.eu-north-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "s3-control.eu-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.eu-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "s3-control.eu-west-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.eu-west-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "s3-control.eu-west-3.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.eu-west-3.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "s3-control.sa-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.sa-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "s3-control.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-control-fips.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-control-fips.dualstack.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "s3-control-fips.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "s3-control.us-east-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-east-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.us-east-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-control-fips.us-east-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-control-fips.dualstack.us-east-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "s3-control-fips.us-east-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{
- Hostname: "s3-control.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-control-fips.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-control-fips.dualstack.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "s3-control-fips.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "s3-control.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-control-fips.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-control-fips.dualstack.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "s3-control-fips.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "s3-outposts": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
-
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
-
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
-
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
-
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
-
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{},
- },
- },
- "savingsplans": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "savingsplans.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- },
- },
- "schemas": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "sdb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v2"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "sdb.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "secretsmanager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "secretsmanager-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "secretsmanager-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "secretsmanager-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "secretsmanager-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "secretsmanager-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "secretsmanager-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "secretsmanager-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "secretsmanager-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "secretsmanager-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "secretsmanager-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "securityhub": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "securityhub-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "securityhub-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "securityhub-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "securityhub-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "securityhub-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "securityhub-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "securityhub-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "securityhub-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "serverlessrepo": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Protocols: []string{"https"},
- },
- },
- },
- "servicecatalog": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "servicecatalog-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "servicecatalog-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "servicecatalog-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "servicecatalog-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "servicecatalog-appregistry": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "servicediscovery": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "servicediscovery",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "servicediscovery",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "servicediscovery-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "servicequotas": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "session.qldb": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "session.qldb-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "session.qldb-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "session.qldb-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "session.qldb-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "session.qldb-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "session.qldb-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "shield": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SSLCommonName: "shield.us-east-1.amazonaws.com",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "shield.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "aws-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "shield-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "fips-aws-global",
- }: endpoint{
- Hostname: "shield-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "sms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "sms-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "sms-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "sms-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "sms-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sms-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sms-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sms-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sms-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "sms-voice": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "snowball": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.ap-northeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.ap-northeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.ap-northeast-3.amazonaws.com",
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.ap-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.ap-southeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.ap-southeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.eu-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.eu-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.eu-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.eu-west-3.amazonaws.com",
- },
- endpointKey{
- Region: "fips-ap-northeast-1",
- }: endpoint{
- Hostname: "snowball-fips.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-2",
- }: endpoint{
- Hostname: "snowball-fips.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-3",
- }: endpoint{
- Hostname: "snowball-fips.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-south-1",
- }: endpoint{
- Hostname: "snowball-fips.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-1",
- }: endpoint{
- Hostname: "snowball-fips.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-2",
- }: endpoint{
- Hostname: "snowball-fips.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "snowball-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-central-1",
- }: endpoint{
- Hostname: "snowball-fips.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-1",
- }: endpoint{
- Hostname: "snowball-fips.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-2",
- }: endpoint{
- Hostname: "snowball-fips.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-3",
- }: endpoint{
- Hostname: "snowball-fips.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-sa-east-1",
- }: endpoint{
- Hostname: "snowball-fips.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "snowball-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "snowball-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "snowball-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "snowball-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.sa-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "sns": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "sns-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "sns-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "sns-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "sns-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sns-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sns-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sns-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sns-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "sqs": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SSLCommonName: "{region}.queue.{dnsSuffix}",
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "sqs-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "sqs-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "sqs-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "sqs-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- SSLCommonName: "queue.{dnsSuffix}",
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sqs-fips.us-east-1.amazonaws.com",
- SSLCommonName: "queue.{dnsSuffix}",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sqs-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sqs-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sqs-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "ssm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "ssm-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "ssm-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "ssm-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "ssm-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "ssm-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "ssm-incidents": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "sso": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "states": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "states-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "states-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "states-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "states-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "states-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "states-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "states-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "states-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "storagegateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "storagegateway-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "storagegateway-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "storagegateway-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "storagegateway-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "storagegateway-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "storagegateway-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "storagegateway-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "storagegateway-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "storagegateway-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "storagegateway-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "storagegateway-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "streams.dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Service: "dynamodb",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "local",
- }: endpoint{
- Hostname: "localhost:8000",
- Protocols: []string{"http"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "sts": service{
- PartitionEndpoint: "aws-global",
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "sts.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sts-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "sts-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sts-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "sts-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sts-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "sts-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sts-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "sts-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "support": service{
- PartitionEndpoint: "aws-global",
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "support.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- },
- },
- "supportapp": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "swf": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "swf-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "swf-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "swf-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "swf-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "swf-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "swf-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "swf-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "swf-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "synthetics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "synthetics-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "synthetics-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "synthetics-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "synthetics-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "synthetics-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "synthetics-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "synthetics-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "synthetics-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "tagging": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "textract": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "textract-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "textract-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "textract-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "textract-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "textract-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "textract-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "textract-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "textract-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "textract-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "textract-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "transcribe": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "fips.transcribe.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "fips.transcribe.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "fips.transcribe.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "fips.transcribe.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "fips.transcribe.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.us-west-2.amazonaws.com",
- },
- },
- },
- "transcribestreaming": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "transcribestreaming-ca-central-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transcribestreaming-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-fips-ca-central-1",
- }: endpoint{
- Hostname: "transcribestreaming-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-fips-us-east-1",
- }: endpoint{
- Hostname: "transcribestreaming-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-fips-us-east-2",
- }: endpoint{
- Hostname: "transcribestreaming-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-fips-us-west-2",
- }: endpoint{
- Hostname: "transcribestreaming-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-us-east-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transcribestreaming-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-us-east-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transcribestreaming-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-us-west-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transcribestreaming-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "transfer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transfer-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "transfer-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "transfer-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "transfer-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "transfer-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "transfer-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transfer-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transfer-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transfer-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transfer-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "translate": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "translate-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "translate-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "translate-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "translate-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "translate-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "translate-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "voiceid": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
-
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
-
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{},
- },
- },
- "waf": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "aws",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "aws-fips",
- }: endpoint{
- Hostname: "waf-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "waf.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "aws-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "aws-global-fips",
- }: endpoint{
- Hostname: "waf-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "waf-regional": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{
- Hostname: "waf-regional.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- },
- endpointKey{
- Region: "af-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{
- Hostname: "waf-regional.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- },
- endpointKey{
- Region: "ap-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "waf-regional.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "waf-regional.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{
- Hostname: "waf-regional.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- },
- endpointKey{
- Region: "ap-northeast-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "waf-regional.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "waf-regional.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "waf-regional.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{
- Hostname: "waf-regional.ap-southeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-3",
- },
- },
- endpointKey{
- Region: "ap-southeast-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ap-southeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-3",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "waf-regional.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "waf-regional.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "waf-regional.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{
- Hostname: "waf-regional.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- },
- endpointKey{
- Region: "eu-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "waf-regional.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "waf-regional.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "waf-regional.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "fips-af-south-1",
- }: endpoint{
- Hostname: "waf-regional-fips.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-east-1",
- }: endpoint{
- Hostname: "waf-regional-fips.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-1",
- }: endpoint{
- Hostname: "waf-regional-fips.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-2",
- }: endpoint{
- Hostname: "waf-regional-fips.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-3",
- }: endpoint{
- Hostname: "waf-regional-fips.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-south-1",
- }: endpoint{
- Hostname: "waf-regional-fips.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-1",
- }: endpoint{
- Hostname: "waf-regional-fips.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-2",
- }: endpoint{
- Hostname: "waf-regional-fips.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-3",
- }: endpoint{
- Hostname: "waf-regional-fips.ap-southeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "waf-regional-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-central-1",
- }: endpoint{
- Hostname: "waf-regional-fips.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-north-1",
- }: endpoint{
- Hostname: "waf-regional-fips.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-south-1",
- }: endpoint{
- Hostname: "waf-regional-fips.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-1",
- }: endpoint{
- Hostname: "waf-regional-fips.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-2",
- }: endpoint{
- Hostname: "waf-regional-fips.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-3",
- }: endpoint{
- Hostname: "waf-regional-fips.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-me-south-1",
- }: endpoint{
- Hostname: "waf-regional-fips.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-sa-east-1",
- }: endpoint{
- Hostname: "waf-regional-fips.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "waf-regional-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "waf-regional-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "waf-regional-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "waf-regional-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{
- Hostname: "waf-regional.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- },
- endpointKey{
- Region: "me-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "waf-regional.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "waf-regional.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "waf-regional.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{
- Hostname: "waf-regional.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "waf-regional.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "wafv2": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{
- Hostname: "wafv2.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- },
- endpointKey{
- Region: "af-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{
- Hostname: "wafv2.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- },
- endpointKey{
- Region: "ap-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "wafv2.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "wafv2.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{
- Hostname: "wafv2.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- },
- endpointKey{
- Region: "ap-northeast-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "wafv2.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "wafv2.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "wafv2.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{
- Hostname: "wafv2.ap-southeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-3",
- },
- },
- endpointKey{
- Region: "ap-southeast-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.ap-southeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-3",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "wafv2.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "wafv2.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "wafv2.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{
- Hostname: "wafv2.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- },
- endpointKey{
- Region: "eu-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "wafv2.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "wafv2.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "wafv2.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "fips-af-south-1",
- }: endpoint{
- Hostname: "wafv2-fips.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-east-1",
- }: endpoint{
- Hostname: "wafv2-fips.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-1",
- }: endpoint{
- Hostname: "wafv2-fips.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-2",
- }: endpoint{
- Hostname: "wafv2-fips.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-3",
- }: endpoint{
- Hostname: "wafv2-fips.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-south-1",
- }: endpoint{
- Hostname: "wafv2-fips.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-1",
- }: endpoint{
- Hostname: "wafv2-fips.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-2",
- }: endpoint{
- Hostname: "wafv2-fips.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-3",
- }: endpoint{
- Hostname: "wafv2-fips.ap-southeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "wafv2-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-central-1",
- }: endpoint{
- Hostname: "wafv2-fips.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-north-1",
- }: endpoint{
- Hostname: "wafv2-fips.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-south-1",
- }: endpoint{
- Hostname: "wafv2-fips.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-1",
- }: endpoint{
- Hostname: "wafv2-fips.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-2",
- }: endpoint{
- Hostname: "wafv2-fips.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-3",
- }: endpoint{
- Hostname: "wafv2-fips.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-me-south-1",
- }: endpoint{
- Hostname: "wafv2-fips.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-sa-east-1",
- }: endpoint{
- Hostname: "wafv2-fips.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "wafv2-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "wafv2-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "wafv2-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "wafv2-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{
- Hostname: "wafv2.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- },
- endpointKey{
- Region: "me-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "wafv2.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "wafv2.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "wafv2.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{
- Hostname: "wafv2.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "wafv2.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "wellarchitected": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "wisdom": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "workdocs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "workdocs-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "workdocs-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "workdocs-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "workdocs-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "workmail": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "workspaces": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "workspaces-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "workspaces-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "workspaces-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "workspaces-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "workspaces-web": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "xray": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "xray-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "xray-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "xray-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "xray-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-central-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "xray-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "xray-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "xray-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "xray-fips.us-west-2.amazonaws.com",
- },
- },
- },
- },
-}
-
-// AwsCnPartition returns the Resolver for AWS China.
-func AwsCnPartition() Partition {
- return awscnPartition.Partition()
-}
-
-var awscnPartition = partition{
- ID: "aws-cn",
- Name: "AWS China",
- DNSSuffix: "amazonaws.com.cn",
- RegionRegex: regionRegex{
- Regexp: func() *regexp.Regexp {
- reg, _ := regexp.Compile("^cn\\-\\w+\\-\\d+$")
- return reg
- }(),
- },
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- DNSSuffix: "api.amazonwebservices.com.cn",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com.cn",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "api.amazonwebservices.com.cn",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- Regions: regions{
- "cn-north-1": region{
- Description: "China (Beijing)",
- },
- "cn-northwest-1": region{
- Description: "China (Ningxia)",
- },
- },
- Services: services{
- "access-analyzer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "account": service{
- PartitionEndpoint: "aws-cn-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "account.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "acm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "api.ecr": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Hostname: "api.ecr.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "api.ecr.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "api.sagemaker": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "api.tunneling.iot": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "apigateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "appconfig": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "appconfigdata": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "application-autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "applicationinsights": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "appmesh": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-north-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.cn-north-1.api.amazonwebservices.com.cn",
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "appmesh.cn-northwest-1.api.amazonwebservices.com.cn",
- },
- },
- },
- "appsync": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "athena": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "autoscaling-plans": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "backup": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "batch": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "budgets": service{
- PartitionEndpoint: "aws-cn-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "budgets.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "cassandra": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "ce": service{
- PartitionEndpoint: "aws-cn-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "ce.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "cloudcontrolapi": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "cloudformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "cloudfront": service{
- PartitionEndpoint: "aws-cn-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "cloudfront.cn-northwest-1.amazonaws.com.cn",
- Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "cloudtrail": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "codebuild": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "codecommit": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "codedeploy": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "codepipeline": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "cognito-identity": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- },
- },
- "compute-optimizer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Hostname: "compute-optimizer.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "compute-optimizer.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "config": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "cur": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "data-ats.iot": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- CredentialScope: credentialScope{
- Service: "iotdata",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "data.jobs.iot": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "databrew": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "dax": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "directconnect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "dlm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "dms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "docdb": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "rds.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "ds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "ebs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "ec2": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "ecs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "eks": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "elasticache": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "elasticbeanstalk": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "elasticfilesystem": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-north-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.cn-north-1.amazonaws.com.cn",
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.cn-northwest-1.amazonaws.com.cn",
- },
- endpointKey{
- Region: "fips-cn-north-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-cn-northwest-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "elasticloadbalancing": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "elasticmapreduce": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "emr-containers": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "es": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "events": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "firehose": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-north-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "firehose.cn-north-1.api.amazonwebservices.com.cn",
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "firehose.cn-northwest-1.api.amazonwebservices.com.cn",
- },
- },
- },
- "fms": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "fsx": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "gamelift": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "glacier": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "glue": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "greengrass": service{
- IsRegionalized: boxedTrue,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- },
- },
- "guardduty": service{
- IsRegionalized: boxedTrue,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "health": service{
- PartitionEndpoint: "aws-cn-global",
- IsRegionalized: boxedFalse,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SSLCommonName: "health.cn-northwest-1.amazonaws.com.cn",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "global.health.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "iam": service{
- PartitionEndpoint: "aws-cn-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "iam.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- },
- },
- "iot": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "iotanalytics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- },
- },
- "iotevents": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- },
- },
- "ioteventsdata": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Hostname: "data.iotevents.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- },
- },
- "iotsecuredtunneling": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "iotsitewise": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- },
- },
- "kafka": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "kinesis": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "kinesisanalytics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "kms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "lakeformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "lambda": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-north-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.cn-north-1.api.amazonwebservices.com.cn",
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.cn-northwest-1.api.amazonwebservices.com.cn",
- },
- },
- },
- "license-manager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "logs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "mediaconvert": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "subscribe.mediaconvert.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "memory-db": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "monitoring": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "mq": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "neptune": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Hostname: "rds.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "rds.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "organizations": service{
- PartitionEndpoint: "aws-cn-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "organizations.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "personalize": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- },
- },
- "pi": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "polly": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "ram": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "rbin": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "rds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "redshift": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "resource-groups": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "route53": service{
- PartitionEndpoint: "aws-cn-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "route53.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "route53resolver": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "runtime.sagemaker": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "s3": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com.cn",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-north-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.cn-north-1.amazonaws.com.cn",
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.cn-northwest-1.amazonaws.com.cn",
- },
- },
- },
- "s3-control": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com.cn",
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Hostname: "s3-control.cn-north-1.amazonaws.com.cn",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-north-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.cn-north-1.amazonaws.com.cn",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "s3-control.cn-northwest-1.amazonaws.com.cn",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.cn-northwest-1.amazonaws.com.cn",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "secretsmanager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "securityhub": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "serverlessrepo": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- },
- },
- "servicecatalog": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "servicediscovery": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "sms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "snowball": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-north-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.cn-north-1.amazonaws.com.cn",
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.cn-northwest-1.amazonaws.com.cn",
- },
- endpointKey{
- Region: "fips-cn-north-1",
- }: endpoint{
- Hostname: "snowball-fips.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-cn-northwest-1",
- }: endpoint{
- Hostname: "snowball-fips.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "sns": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "sqs": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SSLCommonName: "{region}.queue.{dnsSuffix}",
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "ssm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "states": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "storagegateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "streams.dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Service: "dynamodb",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "sts": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "support": service{
- PartitionEndpoint: "aws-cn-global",
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "support.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- },
- },
- "swf": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "synthetics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "tagging": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "transcribe": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Hostname: "cn.transcribe.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "cn.transcribe.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "transcribestreaming": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "transfer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "waf-regional": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Hostname: "waf-regional.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-north-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "waf-regional.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- endpointKey{
- Region: "fips-cn-north-1",
- }: endpoint{
- Hostname: "waf-regional-fips.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-cn-northwest-1",
- }: endpoint{
- Hostname: "waf-regional-fips.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "wafv2": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Hostname: "wafv2.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-north-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "wafv2.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- endpointKey{
- Region: "fips-cn-north-1",
- }: endpoint{
- Hostname: "wafv2-fips.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-cn-northwest-1",
- }: endpoint{
- Hostname: "wafv2-fips.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "workspaces": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "xray": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- },
-}
-
-// AwsUsGovPartition returns the Resolver for AWS GovCloud (US).
-func AwsUsGovPartition() Partition {
- return awsusgovPartition.Partition()
-}
-
-var awsusgovPartition = partition{
- ID: "aws-us-gov",
- Name: "AWS GovCloud (US)",
- DNSSuffix: "amazonaws.com",
- RegionRegex: regionRegex{
- Regexp: func() *regexp.Regexp {
- reg, _ := regexp.Compile("^us\\-gov\\-\\w+\\-\\d+$")
- return reg
- }(),
- },
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- DNSSuffix: "api.aws",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "api.aws",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- Regions: regions{
- "us-gov-east-1": region{
- Description: "AWS GovCloud (US-East)",
- },
- "us-gov-west-1": region{
- Description: "AWS GovCloud (US-West)",
- },
- },
- Services: services{
- "access-analyzer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "access-analyzer.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "access-analyzer.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "acm": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "acm.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "acm.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "acm-pca": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "acm-pca.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "acm-pca.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "api.detective": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.detective-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "api.detective-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.detective-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "api.detective-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "api.ecr": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "dkr-us-gov-east-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-gov-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-dkr-us-gov-east-1",
- }: endpoint{
- Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-dkr-us-gov-west-1",
- }: endpoint{
- Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "api.ecr.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "api.ecr.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "api.sagemaker": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api-fips.sagemaker.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1-fips-secondary",
- }: endpoint{
- Hostname: "api.sagemaker.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1-secondary",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1-secondary",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.sagemaker.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "api.tunneling.iot": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "apigateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "appconfig": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "appconfig.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "appconfig.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "appconfig.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "appconfig.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "appconfigdata": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "application-autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Hostname: "autoscaling.{region}.amazonaws.com",
- Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Service: "application-autoscaling",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- },
- "applicationinsights": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "applicationinsights.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "applicationinsights.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "appstream2": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- CredentialScope: credentialScope{
- Service: "appstream",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "appstream2-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "appstream2-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "appstream2-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "athena": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "athena-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "athena-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "athena-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "athena-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "autoscaling.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- },
- "autoscaling-plans": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- },
- "backup": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "backup-gateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "batch": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "batch.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "batch.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "batch.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "batch.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "batch.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "cassandra": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "cassandra.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "cassandra.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "cloudcontrolapi": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "clouddirectory": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "cloudformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "cloudformation.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "cloudformation.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "cloudhsm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "cloudhsmv2": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "cloudhsm",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "cloudtrail": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "cloudtrail.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "cloudtrail.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudtrail.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudtrail.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "codebuild": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codebuild-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "codebuild-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codebuild-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "codebuild-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "codecommit": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codecommit-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "codecommit-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "codedeploy": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codedeploy-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "codedeploy-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codedeploy-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "codedeploy-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "codepipeline": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "codepipeline-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codepipeline-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "cognito-identity": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "cognito-identity-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-identity-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "cognito-idp": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "cognito-idp-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-idp-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "comprehend": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "comprehend-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehend-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "comprehendmedical": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "config": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "config.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "config.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "config.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "config.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "config.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "connect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "data-ats.iot": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- CredentialScope: credentialScope{
- Service: "iotdata",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "data.iot-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "iotdata",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "data.iot-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "iotdata",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.iot-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.iot-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "data.jobs.iot": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "databrew": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "datasync": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "datasync-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "datasync-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "datasync-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "datasync-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "directconnect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "directconnect.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "directconnect.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "dlm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "dms": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "dms",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms-fips",
- }: endpoint{
- Hostname: "dms.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "dms.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "dms.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "docdb": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "rds.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "ds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "ds-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "ds-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ds-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ds-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "dynamodb.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "dynamodb.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "ebs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "ec2": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ec2.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "ec2.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "ec2.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "ecs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "ecs-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "ecs-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecs-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecs-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "eks": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "eks.{region}.{dnsSuffix}",
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "eks.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "eks.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "eks.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "eks.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "elasticache": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticache.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "elasticache.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticache.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "elasticache.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "elasticbeanstalk": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "elasticbeanstalk.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "elasticbeanstalk.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "elasticfilesystem": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "elasticloadbalancing": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticloadbalancing.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "elasticloadbalancing.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "elasticloadbalancing.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticloadbalancing.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticloadbalancing.us-gov-west-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- },
- },
- },
- "elasticmapreduce": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "elasticmapreduce.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "elasticmapreduce.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce.us-gov-west-1.amazonaws.com",
- Protocols: []string{"https"},
- },
- },
- },
- "email": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "email-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "email-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "es": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "es-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "es-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "es-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "es-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "es-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "events": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "events.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "events.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "events.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "events.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "firehose": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "firehose-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "firehose-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "firehose-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "firehose-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "fms": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "fms-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "fms-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "fsx": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-prod-us-gov-east-1",
- }: endpoint{
- Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-prod-us-gov-west-1",
- }: endpoint{
- Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-gov-east-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-gov-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "glacier": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "glacier.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "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: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "glue-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "glue-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glue-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glue-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "greengrass": service{
- IsRegionalized: boxedTrue,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "dataplane-us-gov-east-1",
- }: endpoint{
- Hostname: "greengrass-ats.iot.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "dataplane-us-gov-west-1",
- }: endpoint{
- Hostname: "greengrass-ats.iot.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "greengrass-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "greengrass.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "greengrass-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "greengrass.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "guardduty": service{
- IsRegionalized: boxedTrue,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "guardduty.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "guardduty.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "guardduty.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "guardduty.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "guardduty.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "health": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "health-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "health-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "iam": service{
- PartitionEndpoint: "aws-us-gov-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-us-gov-global",
- }: endpoint{
- Hostname: "iam.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "aws-us-gov-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iam.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "aws-us-gov-global-fips",
- }: endpoint{
- Hostname: "iam.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "iam-govcloud",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "iam-govcloud",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iam.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "iam-govcloud-fips",
- }: endpoint{
- Hostname: "iam.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "identitystore": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "identitystore.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "identitystore.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "identitystore.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "identitystore.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "identitystore.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "inspector": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "inspector-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "inspector-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "inspector-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "inspector-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "iot": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "iot-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "iot-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iot-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iot-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "iotevents": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "iotevents-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iotevents-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "ioteventsdata": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "data.iotevents-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "data.iotevents.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.iotevents-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "iotsecuredtunneling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "iotsitewise": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "iotsitewise-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iotsitewise-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "kafka": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "kendra": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "kendra-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kendra-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "kinesis": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "kinesis.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "kinesis.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "kinesisanalytics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "kms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ProdFips",
- }: endpoint{
- Hostname: "kms-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "kms-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "kms-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "lakeformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "lakeformation-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "lakeformation-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lakeformation-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lakeformation-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "lambda": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "lambda-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "lambda-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.us-gov-east-1.api.aws",
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lambda-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "lambda.us-gov-west-1.api.aws",
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lambda-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "license-manager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "license-manager-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "license-manager-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "logs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "logs.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "logs.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "logs.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "logs.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "managedblockchain": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "mediaconvert": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "mediaconvert.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "meetings-chime": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "meetings-chime-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "meetings-chime-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "meetings-chime-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "meetings-chime-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "metering.marketplace": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "aws-marketplace",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "models.lex": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "models-fips.lex.{region}.{dnsSuffix}",
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "models-fips.lex.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "models-fips.lex.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "monitoring": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "monitoring.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "monitoring.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "monitoring.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "monitoring.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "monitoring.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "mq": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "mq-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "mq-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mq-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mq-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "neptune": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "rds.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "rds.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "network-firewall": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "network-firewall-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "network-firewall-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "network-firewall-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "network-firewall-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "networkmanager": service{
- PartitionEndpoint: "aws-us-gov-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-us-gov-global",
- }: endpoint{
- Hostname: "networkmanager.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "oidc": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "oidc.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "oidc.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "organizations": service{
- PartitionEndpoint: "aws-us-gov-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-us-gov-global",
- }: endpoint{
- Hostname: "organizations.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "aws-us-gov-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "organizations.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "fips-aws-us-gov-global",
- }: endpoint{
- Hostname: "organizations.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "outposts": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "outposts.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "outposts.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "participant.connect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "participant.connect.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "pinpoint": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "mobiletargeting",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "pinpoint-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "pinpoint.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "pinpoint-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "polly": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "polly-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "polly-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "portal.sso": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "portal.sso.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "portal.sso.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "quicksight": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "api",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "ram": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "ram.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "ram.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "rbin": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "rbin-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "rbin-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rbin-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rbin-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "rds": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "rds.us-gov-east-1",
- }: endpoint{
- Hostname: "rds.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-gov-west-1",
- }: endpoint{
- Hostname: "rds.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "rds.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "rds.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "redshift": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "redshift.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "redshift.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "rekognition": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "rekognition-fips.us-gov-west-1",
- }: endpoint{
- Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-gov-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "resource-groups": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "resource-groups.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "resource-groups.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "resource-groups.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "resource-groups.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "resource-groups.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "robomaker": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "route53": service{
- PartitionEndpoint: "aws-us-gov-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-us-gov-global",
- }: endpoint{
- Hostname: "route53.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "aws-us-gov-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "route53.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "fips-aws-us-gov-global",
- }: endpoint{
- Hostname: "route53.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "route53resolver": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "runtime.lex": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.lex.{region}.{dnsSuffix}",
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.lex.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "runtime-fips.lex.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "runtime.sagemaker": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime.sagemaker.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime.sagemaker.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "runtime.sagemaker.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "s3": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SignatureVersions: []string{"s3", "s3v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- defaultKey{
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "s3-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "s3-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "s3.us-gov-east-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.us-gov-east-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-fips.us-gov-east-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "s3.us-gov-west-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.us-gov-west-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-fips.us-gov-west-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- },
- },
- },
- "s3-control": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "s3-control.us-gov-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.us-gov-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-control-fips.us-gov-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-control-fips.dualstack.us-gov-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "s3-control-fips.us-gov-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "s3-control.us-gov-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.us-gov-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-control-fips.us-gov-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-control-fips.dualstack.us-gov-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "s3-control-fips.us-gov-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "s3-outposts": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
-
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
-
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{},
- },
- },
- "secretsmanager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "secretsmanager-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "secretsmanager-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "secretsmanager-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "secretsmanager-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "securityhub": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "securityhub-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "securityhub-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "securityhub-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "securityhub-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "serverlessrepo": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "serverlessrepo.us-gov-east-1.amazonaws.com",
- Protocols: []string{"https"},
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "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: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "servicecatalog-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "servicecatalog-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "servicecatalog-appregistry": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-appregistry.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "servicediscovery": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "servicediscovery",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "servicediscovery",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "servicediscovery-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "servicequotas": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicequotas.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "servicequotas.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "servicequotas.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicequotas.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicequotas.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "sms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "sms-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "sms-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sms-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sms-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "sms-voice": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "snowball": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "snowball-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "snowball-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "sns": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "sns.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "sns.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sns.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sns.us-gov-west-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- },
- },
- },
- "sqs": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sqs.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "sqs.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "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{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "ssm.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "ssm.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "sso": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "sso.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "sso.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "states": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "states-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "states.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "states-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "states.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "storagegateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "storagegateway-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "storagegateway-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "streams.dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "dynamodb",
- },
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "streams.dynamodb.{region}.{dnsSuffix}",
- CredentialScope: credentialScope{
- Service: "dynamodb",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "streams.dynamodb.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "streams.dynamodb.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "streams.dynamodb.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "streams.dynamodb.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "sts": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sts.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sts.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "sts.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sts.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "sts.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "support": service{
- PartitionEndpoint: "aws-us-gov-global",
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-us-gov-global",
- }: endpoint{
- Hostname: "support.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "support.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "support.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "swf": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "swf.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "swf.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "synthetics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "synthetics-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "synthetics-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "synthetics-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "synthetics-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "tagging": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "textract": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "textract-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "textract-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "textract-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "textract-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "transcribe": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "fips.transcribe.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "fips.transcribe.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "transcribestreaming": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "transfer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "transfer-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "transfer-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transfer-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transfer-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "translate": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "translate-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "translate-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "waf-regional": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "waf-regional-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "waf-regional-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "waf-regional.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "waf-regional.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "wafv2": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "wafv2-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "wafv2-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "wafv2.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "wafv2.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "wafv2-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "wellarchitected": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "workspaces": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "workspaces-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "workspaces-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "xray": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "xray-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "xray-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "xray-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "xray-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- },
-}
-
-// AwsIsoPartition returns the Resolver for AWS ISO (US).
-func AwsIsoPartition() Partition {
- return awsisoPartition.Partition()
-}
-
-var awsisoPartition = partition{
- ID: "aws-iso",
- Name: "AWS ISO (US)",
- DNSSuffix: "c2s.ic.gov",
- RegionRegex: regionRegex{
- Regexp: func() *regexp.Regexp {
- reg, _ := regexp.Compile("^us\\-iso\\-\\w+\\-\\d+$")
- return reg
- }(),
- },
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "c2s.ic.gov",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- Regions: regions{
- "us-iso-east-1": region{
- Description: "US ISO East",
- },
- "us-iso-west-1": region{
- Description: "US ISO WEST",
- },
- },
- Services: services{
- "api.ecr": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Hostname: "api.ecr.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{
- Hostname: "api.ecr.us-iso-west-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-west-1",
- },
- },
- },
- },
- "api.sagemaker": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "apigateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "appconfig": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "appconfigdata": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "application-autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "autoscaling": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "cloudformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "cloudtrail": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "codedeploy": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "comprehend": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "config": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "datapipeline": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "directconnect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "dms": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "dms",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms-fips",
- }: endpoint{
- Hostname: "dms.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.us-iso-east-1.c2s.ic.gov",
- },
- endpointKey{
- Region: "us-iso-east-1-fips",
- }: endpoint{
- Hostname: "dms.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.us-iso-west-1.c2s.ic.gov",
- },
- endpointKey{
- Region: "us-iso-west-1-fips",
- }: endpoint{
- Hostname: "dms.us-iso-west-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "ds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "dynamodb": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "ebs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "ec2": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "ecs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "eks": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "elasticache": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "elasticfilesystem": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-iso-east-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-iso-east-1.c2s.ic.gov",
- },
- },
- },
- "elasticloadbalancing": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "elasticmapreduce": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "es": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "events": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "firehose": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "glacier": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "health": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "iam": service{
- PartitionEndpoint: "aws-iso-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-iso-global",
- }: endpoint{
- Hostname: "iam.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- },
- },
- },
- "kinesis": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "kms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ProdFips",
- }: endpoint{
- Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
- },
- endpointKey{
- Region: "us-iso-east-1-fips",
- }: endpoint{
- Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-iso-west-1.c2s.ic.gov",
- },
- endpointKey{
- Region: "us-iso-west-1-fips",
- }: endpoint{
- Hostname: "kms-fips.us-iso-west-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "lambda": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "license-manager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "logs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "medialive": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "mediapackage": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "monitoring": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "outposts": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "ram": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "rds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "redshift": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "route53": service{
- PartitionEndpoint: "aws-iso-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-iso-global",
- }: endpoint{
- Hostname: "route53.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- },
- },
- },
- "route53resolver": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "runtime.sagemaker": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "s3": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SignatureVersions: []string{"s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"s3v4"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "secretsmanager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "snowball": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "sns": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "sqs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "ssm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "states": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "streams.dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "dynamodb",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "sts": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "support": service{
- PartitionEndpoint: "aws-iso-global",
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-iso-global",
- }: endpoint{
- Hostname: "support.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- },
- },
- },
- "swf": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "synthetics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "tagging": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "transcribe": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "transcribestreaming": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "translate": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "workspaces": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- },
-}
-
-// AwsIsoBPartition returns the Resolver for AWS ISOB (US).
-func AwsIsoBPartition() Partition {
- return awsisobPartition.Partition()
-}
-
-var awsisobPartition = partition{
- ID: "aws-iso-b",
- Name: "AWS ISOB (US)",
- DNSSuffix: "sc2s.sgov.gov",
- RegionRegex: regionRegex{
- Regexp: func() *regexp.Regexp {
- reg, _ := regexp.Compile("^us\\-isob\\-\\w+\\-\\d+$")
- return reg
- }(),
- },
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "sc2s.sgov.gov",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- Regions: regions{
- "us-isob-east-1": region{
- Description: "US ISOB East (Ohio)",
- },
- },
- Services: services{
- "api.ecr": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{
- Hostname: "api.ecr.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- },
- },
- },
- "appconfig": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "appconfigdata": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "application-autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "cloudformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "cloudtrail": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "codedeploy": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "config": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "directconnect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "dms": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "dms",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms-fips",
- }: endpoint{
- Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-isob-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
- },
- endpointKey{
- Region: "us-isob-east-1-fips",
- }: endpoint{
- Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "ds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "ebs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "ec2": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "ecs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "eks": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "elasticache": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "elasticfilesystem": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-isob-east-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-isob-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-isob-east-1.sc2s.sgov.gov",
- },
- },
- },
- "elasticloadbalancing": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- },
- },
- "elasticmapreduce": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "es": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "events": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "glacier": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "health": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "iam": service{
- PartitionEndpoint: "aws-iso-b-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-iso-b-global",
- }: endpoint{
- Hostname: "iam.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- },
- },
- },
- "kinesis": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "kms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ProdFips",
- }: endpoint{
- Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-isob-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
- },
- endpointKey{
- Region: "us-isob-east-1-fips",
- }: endpoint{
- Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "lambda": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "license-manager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "logs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "metering.marketplace": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "aws-marketplace",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "monitoring": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "ram": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "rds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "redshift": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "route53": service{
- PartitionEndpoint: "aws-iso-b-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-iso-b-global",
- }: endpoint{
- Hostname: "route53.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- },
- },
- },
- "s3": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "snowball": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "sns": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "sqs": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SSLCommonName: "{region}.queue.{dnsSuffix}",
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "ssm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "states": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "streams.dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Service: "dynamodb",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "sts": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "support": service{
- PartitionEndpoint: "aws-iso-b-global",
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-iso-b-global",
- }: endpoint{
- Hostname: "support.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- },
- },
- },
- "swf": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "synthetics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "tagging": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "workspaces": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- },
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/dep_service_ids.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/dep_service_ids.go
deleted file mode 100644
index ca8fc828e..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/dep_service_ids.go
+++ /dev/null
@@ -1,141 +0,0 @@
-package endpoints
-
-// Service identifiers
-//
-// Deprecated: Use client package's EndpointsID value instead of these
-// ServiceIDs. These IDs are not maintained, and are out of date.
-const (
- A4bServiceID = "a4b" // A4b.
- AcmServiceID = "acm" // Acm.
- AcmPcaServiceID = "acm-pca" // AcmPca.
- ApiMediatailorServiceID = "api.mediatailor" // ApiMediatailor.
- ApiPricingServiceID = "api.pricing" // ApiPricing.
- ApiSagemakerServiceID = "api.sagemaker" // ApiSagemaker.
- ApigatewayServiceID = "apigateway" // Apigateway.
- ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling.
- Appstream2ServiceID = "appstream2" // Appstream2.
- AppsyncServiceID = "appsync" // Appsync.
- AthenaServiceID = "athena" // Athena.
- AutoscalingServiceID = "autoscaling" // Autoscaling.
- AutoscalingPlansServiceID = "autoscaling-plans" // AutoscalingPlans.
- BatchServiceID = "batch" // Batch.
- BudgetsServiceID = "budgets" // Budgets.
- CeServiceID = "ce" // Ce.
- ChimeServiceID = "chime" // Chime.
- Cloud9ServiceID = "cloud9" // Cloud9.
- ClouddirectoryServiceID = "clouddirectory" // Clouddirectory.
- CloudformationServiceID = "cloudformation" // Cloudformation.
- CloudfrontServiceID = "cloudfront" // Cloudfront.
- CloudhsmServiceID = "cloudhsm" // Cloudhsm.
- Cloudhsmv2ServiceID = "cloudhsmv2" // Cloudhsmv2.
- CloudsearchServiceID = "cloudsearch" // Cloudsearch.
- CloudtrailServiceID = "cloudtrail" // Cloudtrail.
- CodebuildServiceID = "codebuild" // Codebuild.
- CodecommitServiceID = "codecommit" // Codecommit.
- CodedeployServiceID = "codedeploy" // Codedeploy.
- CodepipelineServiceID = "codepipeline" // Codepipeline.
- CodestarServiceID = "codestar" // Codestar.
- CognitoIdentityServiceID = "cognito-identity" // CognitoIdentity.
- CognitoIdpServiceID = "cognito-idp" // CognitoIdp.
- CognitoSyncServiceID = "cognito-sync" // CognitoSync.
- ComprehendServiceID = "comprehend" // Comprehend.
- ConfigServiceID = "config" // Config.
- CurServiceID = "cur" // Cur.
- DatapipelineServiceID = "datapipeline" // Datapipeline.
- DaxServiceID = "dax" // Dax.
- DevicefarmServiceID = "devicefarm" // Devicefarm.
- DirectconnectServiceID = "directconnect" // Directconnect.
- DiscoveryServiceID = "discovery" // Discovery.
- DmsServiceID = "dms" // Dms.
- DsServiceID = "ds" // Ds.
- DynamodbServiceID = "dynamodb" // Dynamodb.
- Ec2ServiceID = "ec2" // Ec2.
- Ec2metadataServiceID = "ec2metadata" // Ec2metadata.
- EcrServiceID = "ecr" // Ecr.
- EcsServiceID = "ecs" // Ecs.
- ElasticacheServiceID = "elasticache" // Elasticache.
- ElasticbeanstalkServiceID = "elasticbeanstalk" // Elasticbeanstalk.
- ElasticfilesystemServiceID = "elasticfilesystem" // Elasticfilesystem.
- ElasticloadbalancingServiceID = "elasticloadbalancing" // Elasticloadbalancing.
- ElasticmapreduceServiceID = "elasticmapreduce" // Elasticmapreduce.
- ElastictranscoderServiceID = "elastictranscoder" // Elastictranscoder.
- EmailServiceID = "email" // Email.
- EntitlementMarketplaceServiceID = "entitlement.marketplace" // EntitlementMarketplace.
- EsServiceID = "es" // Es.
- EventsServiceID = "events" // Events.
- FirehoseServiceID = "firehose" // Firehose.
- FmsServiceID = "fms" // Fms.
- GameliftServiceID = "gamelift" // Gamelift.
- GlacierServiceID = "glacier" // Glacier.
- GlueServiceID = "glue" // Glue.
- GreengrassServiceID = "greengrass" // Greengrass.
- GuarddutyServiceID = "guardduty" // Guardduty.
- HealthServiceID = "health" // Health.
- IamServiceID = "iam" // Iam.
- ImportexportServiceID = "importexport" // Importexport.
- InspectorServiceID = "inspector" // Inspector.
- IotServiceID = "iot" // Iot.
- IotanalyticsServiceID = "iotanalytics" // Iotanalytics.
- KinesisServiceID = "kinesis" // Kinesis.
- KinesisanalyticsServiceID = "kinesisanalytics" // Kinesisanalytics.
- KinesisvideoServiceID = "kinesisvideo" // Kinesisvideo.
- KmsServiceID = "kms" // Kms.
- LambdaServiceID = "lambda" // Lambda.
- LightsailServiceID = "lightsail" // Lightsail.
- LogsServiceID = "logs" // Logs.
- MachinelearningServiceID = "machinelearning" // Machinelearning.
- MarketplacecommerceanalyticsServiceID = "marketplacecommerceanalytics" // Marketplacecommerceanalytics.
- MediaconvertServiceID = "mediaconvert" // Mediaconvert.
- MedialiveServiceID = "medialive" // Medialive.
- MediapackageServiceID = "mediapackage" // Mediapackage.
- MediastoreServiceID = "mediastore" // Mediastore.
- MeteringMarketplaceServiceID = "metering.marketplace" // MeteringMarketplace.
- MghServiceID = "mgh" // Mgh.
- MobileanalyticsServiceID = "mobileanalytics" // Mobileanalytics.
- ModelsLexServiceID = "models.lex" // ModelsLex.
- MonitoringServiceID = "monitoring" // Monitoring.
- MturkRequesterServiceID = "mturk-requester" // MturkRequester.
- NeptuneServiceID = "neptune" // Neptune.
- OpsworksServiceID = "opsworks" // Opsworks.
- OpsworksCmServiceID = "opsworks-cm" // OpsworksCm.
- OrganizationsServiceID = "organizations" // Organizations.
- PinpointServiceID = "pinpoint" // Pinpoint.
- PollyServiceID = "polly" // Polly.
- RdsServiceID = "rds" // Rds.
- RedshiftServiceID = "redshift" // Redshift.
- RekognitionServiceID = "rekognition" // Rekognition.
- ResourceGroupsServiceID = "resource-groups" // ResourceGroups.
- Route53ServiceID = "route53" // Route53.
- Route53domainsServiceID = "route53domains" // Route53domains.
- RuntimeLexServiceID = "runtime.lex" // RuntimeLex.
- RuntimeSagemakerServiceID = "runtime.sagemaker" // RuntimeSagemaker.
- S3ServiceID = "s3" // S3.
- S3ControlServiceID = "s3-control" // S3Control.
- SagemakerServiceID = "api.sagemaker" // Sagemaker.
- SdbServiceID = "sdb" // Sdb.
- SecretsmanagerServiceID = "secretsmanager" // Secretsmanager.
- ServerlessrepoServiceID = "serverlessrepo" // Serverlessrepo.
- ServicecatalogServiceID = "servicecatalog" // Servicecatalog.
- ServicediscoveryServiceID = "servicediscovery" // Servicediscovery.
- ShieldServiceID = "shield" // Shield.
- SmsServiceID = "sms" // Sms.
- SnowballServiceID = "snowball" // Snowball.
- SnsServiceID = "sns" // Sns.
- SqsServiceID = "sqs" // Sqs.
- SsmServiceID = "ssm" // Ssm.
- StatesServiceID = "states" // States.
- StoragegatewayServiceID = "storagegateway" // Storagegateway.
- StreamsDynamodbServiceID = "streams.dynamodb" // StreamsDynamodb.
- StsServiceID = "sts" // Sts.
- SupportServiceID = "support" // Support.
- SwfServiceID = "swf" // Swf.
- TaggingServiceID = "tagging" // Tagging.
- TransferServiceID = "transfer" // Transfer.
- TranslateServiceID = "translate" // Translate.
- WafServiceID = "waf" // Waf.
- WafRegionalServiceID = "waf-regional" // WafRegional.
- WorkdocsServiceID = "workdocs" // Workdocs.
- WorkmailServiceID = "workmail" // Workmail.
- WorkspacesServiceID = "workspaces" // Workspaces.
- XrayServiceID = "xray" // Xray.
-)
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go
deleted file mode 100644
index 66dec6beb..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// Package endpoints provides the types and functionality for defining regions
-// and endpoints, as well as querying those definitions.
-//
-// The SDK's Regions and Endpoints metadata is code generated into the endpoints
-// package, and is accessible via the DefaultResolver function. This function
-// returns a endpoint Resolver will search the metadata and build an associated
-// endpoint if one is found. The default resolver will search all partitions
-// known by the SDK. e.g AWS Standard (aws), AWS China (aws-cn), and
-// AWS GovCloud (US) (aws-us-gov).
-// .
-//
-// # Enumerating Regions and Endpoint Metadata
-//
-// Casting the Resolver returned by DefaultResolver to a EnumPartitions interface
-// will allow you to get access to the list of underlying Partitions with the
-// Partitions method. This is helpful if you want to limit the SDK's endpoint
-// resolving to a single partition, or enumerate regions, services, and endpoints
-// in the partition.
-//
-// resolver := endpoints.DefaultResolver()
-// partitions := resolver.(endpoints.EnumPartitions).Partitions()
-//
-// for _, p := range partitions {
-// fmt.Println("Regions for", p.ID())
-// for id, _ := range p.Regions() {
-// fmt.Println("*", id)
-// }
-//
-// fmt.Println("Services for", p.ID())
-// for id, _ := range p.Services() {
-// fmt.Println("*", id)
-// }
-// }
-//
-// # Using Custom Endpoints
-//
-// The endpoints package also gives you the ability to use your own logic how
-// endpoints are resolved. This is a great way to define a custom endpoint
-// for select services, without passing that logic down through your code.
-//
-// If a type implements the Resolver interface it can be used to resolve
-// endpoints. To use this with the SDK's Session and Config set the value
-// of the type to the EndpointsResolver field of aws.Config when initializing
-// the session, or service client.
-//
-// In addition the ResolverFunc is a wrapper for a func matching the signature
-// of Resolver.EndpointFor, converting it to a type that satisfies the
-// Resolver interface.
-//
-// myCustomResolver := func(service, region string, optFns ...func(*endpoints.Options)) (endpoints.ResolvedEndpoint, error) {
-// if service == endpoints.S3ServiceID {
-// return endpoints.ResolvedEndpoint{
-// URL: "s3.custom.endpoint.com",
-// SigningRegion: "custom-signing-region",
-// }, nil
-// }
-//
-// return endpoints.DefaultResolver().EndpointFor(service, region, optFns...)
-// }
-//
-// sess := session.Must(session.NewSession(&aws.Config{
-// Region: aws.String("us-west-2"),
-// EndpointResolver: endpoints.ResolverFunc(myCustomResolver),
-// }))
-package 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
deleted file mode 100644
index a686a48fa..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
+++ /dev/null
@@ -1,708 +0,0 @@
-package endpoints
-
-import (
- "fmt"
- "regexp"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-// A Logger is a minimalistic interface for the SDK to log messages to.
-type Logger interface {
- Log(...interface{})
-}
-
-// DualStackEndpointState is a constant to describe the dual-stack endpoint resolution
-// behavior.
-type DualStackEndpointState uint
-
-const (
- // DualStackEndpointStateUnset is the default value behavior for dual-stack endpoint
- // resolution.
- DualStackEndpointStateUnset DualStackEndpointState = iota
-
- // DualStackEndpointStateEnabled enable dual-stack endpoint resolution for endpoints.
- DualStackEndpointStateEnabled
-
- // DualStackEndpointStateDisabled disables dual-stack endpoint resolution for endpoints.
- DualStackEndpointStateDisabled
-)
-
-// FIPSEndpointState is a constant to describe the FIPS endpoint resolution behavior.
-type FIPSEndpointState uint
-
-const (
- // FIPSEndpointStateUnset is the default value behavior for FIPS endpoint resolution.
- FIPSEndpointStateUnset FIPSEndpointState = iota
-
- // FIPSEndpointStateEnabled enables FIPS endpoint resolution for service endpoints.
- FIPSEndpointStateEnabled
-
- // FIPSEndpointStateDisabled disables FIPS endpoint resolution for endpoints.
- FIPSEndpointStateDisabled
-)
-
-// Options provide the configuration needed to direct how the
-// endpoints will be resolved.
-type Options struct {
- // DisableSSL forces the endpoint to be resolved as HTTP.
- // instead of HTTPS if the service supports it.
- DisableSSL bool
-
- // Sets the resolver to resolve the endpoint as a dualstack endpoint
- // for the service. If dualstack support for a service is not known and
- // StrictMatching is not enabled a dualstack endpoint for the service will
- // be returned. This endpoint may not be valid. If StrictMatching is
- // enabled only services that are known to support dualstack will return
- // dualstack endpoints.
- //
- // Deprecated: This option will continue to function for S3 and S3 Control for backwards compatibility.
- // UseDualStackEndpoint should be used to enable usage of a service's dual-stack endpoint for all service clients
- // moving forward. For S3 and S3 Control, when UseDualStackEndpoint is set to a non-zero value it takes higher
- // precedence then this option.
- UseDualStack bool
-
- // Sets the resolver to resolve a dual-stack endpoint for the service.
- UseDualStackEndpoint DualStackEndpointState
-
- // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
- UseFIPSEndpoint FIPSEndpointState
-
- // Enables strict matching of services and regions resolved endpoints.
- // If the partition doesn't enumerate the exact service and region an
- // error will be returned. This option will prevent returning endpoints
- // that look valid, but may not resolve to any real endpoint.
- StrictMatching bool
-
- // Enables resolving a service endpoint based on the region provided if the
- // service does not exist. The service endpoint ID will be used as the service
- // domain name prefix. By default the endpoint resolver requires the service
- // to be known when resolving endpoints.
- //
- // If resolving an endpoint on the partition list the provided region will
- // be used to determine which partition's domain name pattern to the service
- // endpoint ID with. If both the service and region are unknown and resolving
- // the endpoint on partition list an UnknownEndpointError error will be returned.
- //
- // If resolving and endpoint on a partition specific resolver that partition's
- // domain name pattern will be used with the service endpoint ID. If both
- // region and service do not exist when resolving an endpoint on a specific
- // partition the partition's domain pattern will be used to combine the
- // endpoint and region together.
- //
- // This option is ignored if StrictMatching is enabled.
- ResolveUnknownService bool
-
- // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
- EC2MetadataEndpointMode EC2IMDSEndpointModeState
-
- // STS Regional Endpoint flag helps with resolving the STS endpoint
- STSRegionalEndpoint STSRegionalEndpoint
-
- // S3 Regional Endpoint flag helps with resolving the S3 endpoint
- S3UsEast1RegionalEndpoint S3UsEast1RegionalEndpoint
-
- // ResolvedRegion is the resolved region string. If provided (non-zero length) it takes priority
- // over the region name passed to the ResolveEndpoint call.
- ResolvedRegion string
-
- // Logger is the logger that will be used to log messages.
- Logger Logger
-
- // Determines whether logging of deprecated endpoints usage is enabled.
- LogDeprecated bool
-}
-
-func (o Options) getEndpointVariant(service string) (v endpointVariant) {
- const s3 = "s3"
- const s3Control = "s3-control"
-
- if (o.UseDualStackEndpoint == DualStackEndpointStateEnabled) ||
- ((service == s3 || service == s3Control) && (o.UseDualStackEndpoint == DualStackEndpointStateUnset && o.UseDualStack)) {
- v |= dualStackVariant
- }
- if o.UseFIPSEndpoint == FIPSEndpointStateEnabled {
- v |= fipsVariant
- }
- return v
-}
-
-// EC2IMDSEndpointModeState is an enum configuration variable describing the client endpoint mode.
-type EC2IMDSEndpointModeState uint
-
-// Enumeration values for EC2IMDSEndpointModeState
-const (
- EC2IMDSEndpointModeStateUnset EC2IMDSEndpointModeState = iota
- EC2IMDSEndpointModeStateIPv4
- EC2IMDSEndpointModeStateIPv6
-)
-
-// SetFromString sets the EC2IMDSEndpointModeState based on the provided string value. Unknown values will default to EC2IMDSEndpointModeStateUnset
-func (e *EC2IMDSEndpointModeState) SetFromString(v string) error {
- v = strings.TrimSpace(v)
-
- switch {
- case len(v) == 0:
- *e = EC2IMDSEndpointModeStateUnset
- case strings.EqualFold(v, "IPv6"):
- *e = EC2IMDSEndpointModeStateIPv6
- case strings.EqualFold(v, "IPv4"):
- *e = EC2IMDSEndpointModeStateIPv4
- default:
- return fmt.Errorf("unknown EC2 IMDS endpoint mode, must be either IPv6 or IPv4")
- }
- return nil
-}
-
-// 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.
-func (o *Options) Set(optFns ...func(*Options)) {
- for _, fn := range optFns {
- fn(o)
- }
-}
-
-// DisableSSLOption sets the DisableSSL options. Can be used as a functional
-// option when resolving endpoints.
-func DisableSSLOption(o *Options) {
- o.DisableSSL = true
-}
-
-// UseDualStackOption sets the UseDualStack option. Can be used as a functional
-// option when resolving endpoints.
-//
-// Deprecated: UseDualStackEndpointOption should be used to enable usage of a service's dual-stack endpoint.
-// When DualStackEndpointState is set to a non-zero value it takes higher precedence then this option.
-func UseDualStackOption(o *Options) {
- o.UseDualStack = true
-}
-
-// UseDualStackEndpointOption sets the UseDualStackEndpoint option to enabled. Can be used as a functional
-// option when resolving endpoints.
-func UseDualStackEndpointOption(o *Options) {
- o.UseDualStackEndpoint = DualStackEndpointStateEnabled
-}
-
-// UseFIPSEndpointOption sets the UseFIPSEndpoint option to enabled. Can be used as a functional
-// option when resolving endpoints.
-func UseFIPSEndpointOption(o *Options) {
- o.UseFIPSEndpoint = FIPSEndpointStateEnabled
-}
-
-// StrictMatchingOption sets the StrictMatching option. Can be used as a functional
-// option when resolving endpoints.
-func StrictMatchingOption(o *Options) {
- o.StrictMatching = true
-}
-
-// ResolveUnknownServiceOption sets the ResolveUnknownService option. Can be used
-// as a functional option when resolving endpoints.
-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 {
- EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error)
-}
-
-// ResolverFunc is a helper utility that wraps a function so it satisfies the
-// Resolver interface. This is useful when you want to add additional endpoint
-// resolving logic, or stub out specific endpoints with custom values.
-type ResolverFunc func(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error)
-
-// EndpointFor wraps the ResolverFunc function to satisfy the Resolver interface.
-func (fn ResolverFunc) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
- return fn(service, region, opts...)
-}
-
-var schemeRE = regexp.MustCompile("^([^:]+)://")
-
-// AddScheme adds the HTTP or HTTPS schemes to a endpoint URL if there is no
-// scheme. If disableSSL is true HTTP will set HTTP instead of the default HTTPS.
-//
-// If disableSSL is set, it will only set the URL's scheme if the URL does not
-// contain a scheme.
-func AddScheme(endpoint string, disableSSL bool) string {
- if !schemeRE.MatchString(endpoint) {
- scheme := "https"
- if disableSSL {
- scheme = "http"
- }
- endpoint = fmt.Sprintf("%s://%s", scheme, endpoint)
- }
-
- return endpoint
-}
-
-// EnumPartitions a provides a way to retrieve the underlying partitions that
-// make up the SDK's default Resolver, or any resolver decoded from a model
-// file.
-//
-// Use this interface with DefaultResolver and DecodeModels to get the list of
-// Partitions.
-type EnumPartitions interface {
- Partitions() []Partition
-}
-
-// RegionsForService returns a map of regions for the partition and service.
-// If either the partition or service does not exist false will be returned
-// as the second parameter.
-//
-// This example shows how to get the regions for DynamoDB in the AWS partition.
-//
-// rs, exists := endpoints.RegionsForService(endpoints.DefaultPartitions(), endpoints.AwsPartitionID, endpoints.DynamodbServiceID)
-//
-// This is equivalent to using the partition directly.
-//
-// rs := endpoints.AwsPartition().Services()[endpoints.DynamodbServiceID].Regions()
-func RegionsForService(ps []Partition, partitionID, serviceID string) (map[string]Region, bool) {
- for _, p := range ps {
- if p.ID() != partitionID {
- continue
- }
- if _, ok := p.p.Services[serviceID]; !(ok || serviceID == Ec2metadataServiceID) {
- break
- }
-
- s := Service{
- id: serviceID,
- p: p.p,
- }
- return s.Regions(), true
- }
-
- return map[string]Region{}, false
-}
-
-// PartitionForRegion returns the first partition which includes the region
-// passed in. This includes both known regions and regions which match
-// a pattern supported by the partition which may include regions that are
-// not explicitly known by the partition. Use the Regions method of the
-// returned Partition if explicit support is needed.
-func PartitionForRegion(ps []Partition, regionID string) (Partition, bool) {
- for _, p := range ps {
- if _, ok := p.p.Regions[regionID]; ok || p.p.RegionRegex.MatchString(regionID) {
- return p, true
- }
- }
-
- return Partition{}, false
-}
-
-// A Partition provides the ability to enumerate the partition's regions
-// and services.
-type Partition struct {
- id, dnsSuffix string
- p *partition
-}
-
-// DNSSuffix returns the base domain name of the partition.
-func (p Partition) DNSSuffix() string { return p.dnsSuffix }
-
-// ID returns the identifier of the partition.
-func (p Partition) ID() string { return p.id }
-
-// EndpointFor attempts to resolve the endpoint based on service and region.
-// See Options for information on configuring how the endpoint is resolved.
-//
-// If the service cannot be found in the metadata the UnknownServiceError
-// error will be returned. This validation will occur regardless if
-// StrictMatching is enabled. To enable resolving unknown services set the
-// "ResolveUnknownService" option to true. When StrictMatching is disabled
-// this option allows the partition resolver to resolve a endpoint based on
-// the service endpoint ID provided.
-//
-// When resolving endpoints you can choose to enable StrictMatching. This will
-// 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 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.
-//
-// Errors that can be returned.
-// - UnknownServiceError
-// - UnknownEndpointError
-func (p Partition) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
- return p.p.EndpointFor(service, region, opts...)
-}
-
-// 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 := make(map[string]Region, len(p.p.Regions))
- for id, r := range p.p.Regions {
- rs[id] = Region{
- id: id,
- desc: r.Description,
- p: p.p,
- }
- }
-
- return rs
-}
-
-// 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 := make(map[string]Service, len(p.p.Services))
-
- for id := range p.p.Services {
- ss[id] = Service{
- id: id,
- p: p.p,
- }
- }
-
- // Since we have removed the customization that injected this into the model
- // we still need to pretend that this is a modeled service.
- if _, ok := ss[Ec2metadataServiceID]; !ok {
- ss[Ec2metadataServiceID] = Service{
- id: Ec2metadataServiceID,
- p: p.p,
- }
- }
-
- return ss
-}
-
-// A Region provides information about a region, and ability to resolve an
-// endpoint from the context of a region, given a service.
-type Region struct {
- id, desc string
- p *partition
-}
-
-// ID returns the region's identifier.
-func (r Region) ID() string { return r.id }
-
-// Description returns the region's description. The region description
-// is free text, it can be empty, and it may change between SDK releases.
-func (r Region) Description() string { return r.desc }
-
-// ResolveEndpoint resolves an endpoint from the context of the region given
-// a service. See Partition.EndpointFor for usage and errors that can be returned.
-func (r Region) ResolveEndpoint(service string, opts ...func(*Options)) (ResolvedEndpoint, error) {
- return r.p.EndpointFor(service, r.id, opts...)
-}
-
-// Services returns a list of all services that are known to be in this region.
-func (r Region) Services() map[string]Service {
- ss := map[string]Service{}
- for id, s := range r.p.Services {
- if _, ok := s.Endpoints[endpointKey{Region: r.id}]; ok {
- ss[id] = Service{
- id: id,
- p: r.p,
- }
- }
- }
-
- return ss
-}
-
-// A Service provides information about a service, and ability to resolve an
-// endpoint from the context of a service, given a region.
-type Service struct {
- id string
- p *partition
-}
-
-// ID returns the identifier for the service.
-func (s Service) ID() string { return s.id }
-
-// ResolveEndpoint resolves an endpoint from the context of a service given
-// a region. See Partition.EndpointFor for usage and errors that can be returned.
-func (s Service) ResolveEndpoint(region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
- return s.p.EndpointFor(s.id, region, opts...)
-}
-
-// Regions returns a map of Regions that the service is present in.
-//
-// 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) Regions() map[string]Region {
- rs := map[string]Region{}
-
- service, ok := s.p.Services[s.id]
-
- // Since ec2metadata customization has been removed we need to check
- // if it was defined in non-standard endpoints.json file. If it's not
- // then we can return the empty map as there is no regional-endpoints for IMDS.
- // Otherwise, we iterate need to iterate the non-standard model.
- if s.id == Ec2metadataServiceID && !ok {
- return rs
- }
-
- for id := range service.Endpoints {
- if id.Variant != 0 {
- continue
- }
- if r, ok := s.p.Regions[id.Region]; ok {
- rs[id.Region] = Region{
- id: id.Region,
- desc: r.Description,
- p: s.p,
- }
- }
- }
-
- return rs
-}
-
-// Endpoints returns a map of Endpoints indexed by their ID for all known
-// endpoints for a service.
-//
-// 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 := make(map[string]Endpoint, len(s.p.Services[s.id].Endpoints))
- for id := range s.p.Services[s.id].Endpoints {
- if id.Variant != 0 {
- continue
- }
- es[id.Region] = Endpoint{
- id: id.Region,
- serviceID: s.id,
- p: s.p,
- }
- }
-
- return es
-}
-
-// A Endpoint provides information about endpoints, and provides the ability
-// to resolve that endpoint for the service, and the region the endpoint
-// represents.
-type Endpoint struct {
- id string
- serviceID string
- p *partition
-}
-
-// ID returns the identifier for an endpoint.
-func (e Endpoint) ID() string { return e.id }
-
-// ServiceID returns the identifier the endpoint belongs to.
-func (e Endpoint) ServiceID() string { return e.serviceID }
-
-// ResolveEndpoint resolves an endpoint from the context of a service and
-// region the endpoint represents. See Partition.EndpointFor for usage and
-// errors that can be returned.
-func (e Endpoint) ResolveEndpoint(opts ...func(*Options)) (ResolvedEndpoint, error) {
- return e.p.EndpointFor(e.serviceID, e.id, opts...)
-}
-
-// A ResolvedEndpoint is an endpoint that has been resolved based on a partition
-// service, and region.
-type ResolvedEndpoint struct {
- // The endpoint URL
- URL string
-
- // The endpoint partition
- PartitionID string
-
- // The region that should be used for signing requests.
- SigningRegion string
-
- // The service name that should be used for signing requests.
- SigningName string
-
- // States that the signing name for this endpoint was derived from metadata
- // passed in, but was not explicitly modeled.
- SigningNameDerived bool
-
- // The signing method that should be used for signing requests.
- SigningMethod string
-}
-
-// So that the Error interface type can be included as an anonymous field
-// in the requestError struct and not conflict with the error.Error() method.
-type awsError awserr.Error
-
-// A EndpointNotFoundError is returned when in StrictMatching mode, and the
-// endpoint for the service and region cannot be found in any of the partitions.
-type EndpointNotFoundError struct {
- awsError
- Partition string
- Service string
- Region string
-}
-
-// A UnknownServiceError is returned when the service does not resolve to an
-// endpoint. Includes a list of all known services for the partition. Returned
-// when a partition does not support the service.
-type UnknownServiceError struct {
- awsError
- Partition string
- Service string
- Known []string
-}
-
-// NewUnknownServiceError builds and returns UnknownServiceError.
-func NewUnknownServiceError(p, s string, known []string) UnknownServiceError {
- return UnknownServiceError{
- awsError: awserr.New("UnknownServiceError",
- "could not resolve endpoint for unknown service", nil),
- Partition: p,
- Service: s,
- Known: known,
- }
-}
-
-// String returns the string representation of the error.
-func (e UnknownServiceError) Error() string {
- extra := fmt.Sprintf("partition: %q, service: %q",
- e.Partition, e.Service)
- if len(e.Known) > 0 {
- extra += fmt.Sprintf(", known: %v", e.Known)
- }
- return awserr.SprintError(e.Code(), e.Message(), extra, e.OrigErr())
-}
-
-// String returns the string representation of the error.
-func (e UnknownServiceError) String() string {
- return e.Error()
-}
-
-// A UnknownEndpointError is returned when in StrictMatching mode and the
-// service is valid, but the region does not resolve to an endpoint. Includes
-// a list of all known endpoints for the service.
-type UnknownEndpointError struct {
- awsError
- Partition string
- Service string
- Region string
- Known []string
-}
-
-// NewUnknownEndpointError builds and returns UnknownEndpointError.
-func NewUnknownEndpointError(p, s, r string, known []string) UnknownEndpointError {
- return UnknownEndpointError{
- awsError: awserr.New("UnknownEndpointError",
- "could not resolve endpoint", nil),
- Partition: p,
- Service: s,
- Region: r,
- Known: known,
- }
-}
-
-// String returns the string representation of the error.
-func (e UnknownEndpointError) Error() string {
- extra := fmt.Sprintf("partition: %q, service: %q, region: %q",
- e.Partition, e.Service, e.Region)
- if len(e.Known) > 0 {
- extra += fmt.Sprintf(", known: %v", e.Known)
- }
- return awserr.SprintError(e.Code(), e.Message(), extra, e.OrigErr())
-}
-
-// String returns the string representation of the error.
-func (e UnknownEndpointError) String() string {
- return e.Error()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/legacy_regions.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/legacy_regions.go
deleted file mode 100644
index df75e899a..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/legacy_regions.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package endpoints
-
-var legacyGlobalRegions = map[string]map[string]struct{}{
- "sts": {
- "ap-northeast-1": {},
- "ap-south-1": {},
- "ap-southeast-1": {},
- "ap-southeast-2": {},
- "ca-central-1": {},
- "eu-central-1": {},
- "eu-north-1": {},
- "eu-west-1": {},
- "eu-west-2": {},
- "eu-west-3": {},
- "sa-east-1": {},
- "us-east-1": {},
- "us-east-2": {},
- "us-west-1": {},
- "us-west-2": {},
- },
- "s3": {
- "us-east-1": {},
- },
-}
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
deleted file mode 100644
index 89f6627dc..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go
+++ /dev/null
@@ -1,594 +0,0 @@
-package endpoints
-
-import (
- "encoding/json"
- "fmt"
- "regexp"
- "strconv"
- "strings"
-)
-
-const (
- ec2MetadataEndpointIPv6 = "http://[fd00:ec2::254]/latest"
- ec2MetadataEndpointIPv4 = "http://169.254.169.254/latest"
-)
-
-const dnsSuffixTemplateKey = "{dnsSuffix}"
-
-// defaultKey is a compound map key of a variant and other values.
-type defaultKey struct {
- Variant endpointVariant
- ServiceVariant serviceVariant
-}
-
-// endpointKey is a compound map key of a region and associated variant value.
-type endpointKey struct {
- Region string
- Variant endpointVariant
-}
-
-// endpointVariant is a bit field to describe the endpoints attributes.
-type endpointVariant uint64
-
-// serviceVariant is a bit field to describe the service endpoint attributes.
-type serviceVariant uint64
-
-const (
- // fipsVariant indicates that the endpoint is FIPS capable.
- fipsVariant endpointVariant = 1 << (64 - 1 - iota)
-
- // dualStackVariant indicates that the endpoint is DualStack capable.
- dualStackVariant
-)
-
-var regionValidationRegex = regexp.MustCompile(`^[[:alnum:]]([[:alnum:]\-]*[[:alnum:]])?$`)
-
-type partitions []partition
-
-func (ps partitions) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
- var opt Options
- opt.Set(opts...)
-
- if len(opt.ResolvedRegion) > 0 {
- region = opt.ResolvedRegion
- }
-
- for i := 0; i < len(ps); i++ {
- if !ps[i].canResolveEndpoint(service, region, opt) {
- continue
- }
-
- return ps[i].EndpointFor(service, region, opts...)
- }
-
- // If loose matching fallback to first partition format to use
- // when resolving the endpoint.
- if !opt.StrictMatching && len(ps) > 0 {
- return ps[0].EndpointFor(service, region, opts...)
- }
-
- return ResolvedEndpoint{}, NewUnknownEndpointError("all partitions", service, region, []string{})
-}
-
-// Partitions satisfies the EnumPartitions interface and returns a list
-// of Partitions representing each partition represented in the SDK's
-// endpoints model.
-func (ps partitions) Partitions() []Partition {
- parts := make([]Partition, 0, len(ps))
- for i := 0; i < len(ps); i++ {
- parts = append(parts, ps[i].Partition())
- }
-
- return parts
-}
-
-type endpointWithVariants struct {
- endpoint
- Variants []endpointWithTags `json:"variants"`
-}
-
-type endpointWithTags struct {
- endpoint
- Tags []string `json:"tags"`
-}
-
-type endpointDefaults map[defaultKey]endpoint
-
-func (p *endpointDefaults) UnmarshalJSON(data []byte) error {
- if *p == nil {
- *p = make(endpointDefaults)
- }
-
- var e endpointWithVariants
- if err := json.Unmarshal(data, &e); err != nil {
- return err
- }
-
- (*p)[defaultKey{Variant: 0}] = e.endpoint
-
- e.Hostname = ""
- e.DNSSuffix = ""
-
- for _, variant := range e.Variants {
- endpointVariant, unknown := parseVariantTags(variant.Tags)
- if unknown {
- continue
- }
-
- var ve endpoint
- ve.mergeIn(e.endpoint)
- ve.mergeIn(variant.endpoint)
-
- (*p)[defaultKey{Variant: endpointVariant}] = ve
- }
-
- return nil
-}
-
-func parseVariantTags(tags []string) (ev endpointVariant, unknown bool) {
- if len(tags) == 0 {
- unknown = true
- return
- }
-
- for _, tag := range tags {
- switch {
- case strings.EqualFold("fips", tag):
- ev |= fipsVariant
- case strings.EqualFold("dualstack", tag):
- ev |= dualStackVariant
- default:
- unknown = true
- }
- }
- return ev, unknown
-}
-
-type partition struct {
- ID string `json:"partition"`
- Name string `json:"partitionName"`
- DNSSuffix string `json:"dnsSuffix"`
- RegionRegex regionRegex `json:"regionRegex"`
- Defaults endpointDefaults `json:"defaults"`
- Regions regions `json:"regions"`
- Services services `json:"services"`
-}
-
-func (p partition) Partition() Partition {
- return Partition{
- dnsSuffix: p.DNSSuffix,
- id: p.ID,
- p: &p,
- }
-}
-
-func (p partition) canResolveEndpoint(service, region string, options Options) bool {
- s, hasService := p.Services[service]
- _, hasEndpoint := s.Endpoints[endpointKey{
- Region: region,
- Variant: options.getEndpointVariant(service),
- }]
-
- if hasEndpoint && hasService {
- return true
- }
-
- if options.StrictMatching {
- return false
- }
-
- 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...)
-
- if len(opt.ResolvedRegion) > 0 {
- region = opt.ResolvedRegion
- }
-
- s, hasService := p.Services[service]
-
- if service == Ec2metadataServiceID && !hasService {
- endpoint := getEC2MetadataEndpoint(p.ID, service, opt.EC2MetadataEndpointMode)
- return endpoint, nil
- }
-
- 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 r, ok := isLegacyGlobalRegion(service, region, opt); ok {
- region = r
- }
-
- variant := opt.getEndpointVariant(service)
-
- endpoints := s.Endpoints
-
- serviceDefaults, hasServiceDefault := s.Defaults[defaultKey{Variant: variant}]
- // If we searched for a variant which may have no explicit service defaults,
- // then we need to inherit the standard service defaults except the hostname and dnsSuffix
- if variant != 0 && !hasServiceDefault {
- serviceDefaults = s.Defaults[defaultKey{}]
- serviceDefaults.Hostname = ""
- serviceDefaults.DNSSuffix = ""
- }
-
- partitionDefaults, hasPartitionDefault := p.Defaults[defaultKey{Variant: variant}]
-
- var dnsSuffix string
- if len(serviceDefaults.DNSSuffix) > 0 {
- dnsSuffix = serviceDefaults.DNSSuffix
- } else if variant == 0 {
- // For legacy reasons the partition dnsSuffix is not in the defaults, so if we looked for
- // a non-variant endpoint then we need to set the dnsSuffix.
- dnsSuffix = p.DNSSuffix
- }
-
- noDefaults := !hasServiceDefault && !hasPartitionDefault
-
- e, hasEndpoint := s.endpointForRegion(region, endpoints, variant)
- if len(region) == 0 || (!hasEndpoint && (opt.StrictMatching || noDefaults)) {
- return resolved, NewUnknownEndpointError(p.ID, service, region, endpointList(endpoints, variant))
- }
-
- defs := []endpoint{partitionDefaults, serviceDefaults}
-
- return e.resolve(service, p.ID, region, dnsSuffixTemplateKey, dnsSuffix, defs, opt)
-}
-
-func getEC2MetadataEndpoint(partitionID, service string, mode EC2IMDSEndpointModeState) ResolvedEndpoint {
- switch mode {
- case EC2IMDSEndpointModeStateIPv6:
- return ResolvedEndpoint{
- URL: ec2MetadataEndpointIPv6,
- PartitionID: partitionID,
- SigningRegion: "aws-global",
- SigningName: service,
- SigningNameDerived: true,
- SigningMethod: "v4",
- }
- case EC2IMDSEndpointModeStateIPv4:
- fallthrough
- default:
- return ResolvedEndpoint{
- URL: ec2MetadataEndpointIPv4,
- PartitionID: partitionID,
- SigningRegion: "aws-global",
- SigningName: service,
- SigningNameDerived: true,
- SigningMethod: "v4",
- }
- }
-}
-
-func isLegacyGlobalRegion(service string, region string, opt Options) (string, bool) {
- if opt.getEndpointVariant(service) != 0 {
- return "", false
- }
-
- const (
- sts = "sts"
- s3 = "s3"
- awsGlobal = "aws-global"
- )
-
- switch {
- case service == sts && opt.STSRegionalEndpoint == RegionalSTSEndpoint:
- return region, false
- case service == s3 && opt.S3UsEast1RegionalEndpoint == RegionalS3UsEast1Endpoint:
- return region, false
- default:
- if _, ok := legacyGlobalRegions[service][region]; ok {
- return awsGlobal, true
- }
- }
-
- return region, false
-}
-
-func serviceList(ss services) []string {
- list := make([]string, 0, len(ss))
- for k := range ss {
- list = append(list, k)
- }
- return list
-}
-func endpointList(es serviceEndpoints, variant endpointVariant) []string {
- list := make([]string, 0, len(es))
- for k := range es {
- if k.Variant != variant {
- continue
- }
- list = append(list, k.Region)
- }
- return list
-}
-
-type regionRegex struct {
- *regexp.Regexp
-}
-
-func (rr *regionRegex) UnmarshalJSON(b []byte) (err error) {
- // Strip leading and trailing quotes
- regex, err := strconv.Unquote(string(b))
- if err != nil {
- return fmt.Errorf("unable to strip quotes from regex, %v", err)
- }
-
- rr.Regexp, err = regexp.Compile(regex)
- if err != nil {
- return fmt.Errorf("unable to unmarshal region regex, %v", err)
- }
- return nil
-}
-
-type regions map[string]region
-
-type region struct {
- Description string `json:"description"`
-}
-
-type services map[string]service
-
-type service struct {
- PartitionEndpoint string `json:"partitionEndpoint"`
- IsRegionalized boxedBool `json:"isRegionalized,omitempty"`
- Defaults endpointDefaults `json:"defaults"`
- Endpoints serviceEndpoints `json:"endpoints"`
-}
-
-func (s *service) endpointForRegion(region string, endpoints serviceEndpoints, variant endpointVariant) (endpoint, bool) {
- if e, ok := endpoints[endpointKey{Region: region, Variant: variant}]; ok {
- return e, true
- }
-
- if s.IsRegionalized == boxedFalse {
- return endpoints[endpointKey{Region: s.PartitionEndpoint, Variant: variant}], region == s.PartitionEndpoint
- }
-
- // Unable to find any matching endpoint, return
- // blank that will be used for generic endpoint creation.
- return endpoint{}, false
-}
-
-type serviceEndpoints map[endpointKey]endpoint
-
-func (s *serviceEndpoints) UnmarshalJSON(data []byte) error {
- if *s == nil {
- *s = make(serviceEndpoints)
- }
-
- var regionToEndpoint map[string]endpointWithVariants
-
- if err := json.Unmarshal(data, ®ionToEndpoint); err != nil {
- return err
- }
-
- for region, e := range regionToEndpoint {
- (*s)[endpointKey{Region: region}] = e.endpoint
-
- e.Hostname = ""
- e.DNSSuffix = ""
-
- for _, variant := range e.Variants {
- endpointVariant, unknown := parseVariantTags(variant.Tags)
- if unknown {
- continue
- }
-
- var ve endpoint
- ve.mergeIn(e.endpoint)
- ve.mergeIn(variant.endpoint)
-
- (*s)[endpointKey{Region: region, Variant: endpointVariant}] = ve
- }
- }
-
- return nil
-}
-
-type endpoint struct {
- Hostname string `json:"hostname"`
- Protocols []string `json:"protocols"`
- CredentialScope credentialScope `json:"credentialScope"`
-
- DNSSuffix string `json:"dnsSuffix"`
-
- // Signature Version not used
- SignatureVersions []string `json:"signatureVersions"`
-
- // SSLCommonName not used.
- SSLCommonName string `json:"sslCommonName"`
-
- Deprecated boxedBool `json:"deprecated"`
-}
-
-// isZero returns whether the endpoint structure is an empty (zero) value.
-func (e endpoint) isZero() bool {
- switch {
- case len(e.Hostname) != 0:
- return false
- case len(e.Protocols) != 0:
- return false
- case e.CredentialScope != (credentialScope{}):
- return false
- case len(e.SignatureVersions) != 0:
- return false
- case len(e.SSLCommonName) != 0:
- return false
- }
- return true
-}
-
-const (
- defaultProtocol = "https"
- defaultSigner = "v4"
-)
-
-var (
- protocolPriority = []string{"https", "http"}
- signerPriority = []string{"v4", "v2"}
-)
-
-func getByPriority(s []string, p []string, def string) string {
- if len(s) == 0 {
- return def
- }
-
- for i := 0; i < len(p); i++ {
- for j := 0; j < len(s); j++ {
- if s[j] == p[i] {
- return s[j]
- }
- }
- }
-
- return s[0]
-}
-
-func (e endpoint) resolve(service, partitionID, region, dnsSuffixTemplateVariable, dnsSuffix string, defs []endpoint, opts Options) (ResolvedEndpoint, error) {
- var merged endpoint
- for _, def := range defs {
- merged.mergeIn(def)
- }
- merged.mergeIn(e)
- e = merged
-
- 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
-
- if !validateInputRegion(region) {
- return ResolvedEndpoint{}, fmt.Errorf("invalid region identifier format provided")
- }
-
- if len(merged.DNSSuffix) > 0 {
- dnsSuffix = merged.DNSSuffix
- }
-
- u := strings.Replace(hostname, "{service}", service, 1)
- u = strings.Replace(u, "{region}", region, 1)
- u = strings.Replace(u, dnsSuffixTemplateVariable, dnsSuffix, 1)
-
- scheme := getEndpointScheme(e.Protocols, opts.DisableSSL)
- u = fmt.Sprintf("%s://%s", scheme, u)
-
- if e.Deprecated == boxedTrue && opts.LogDeprecated && opts.Logger != nil {
- opts.Logger.Log(fmt.Sprintf("endpoint identifier %q, url %q marked as deprecated", region, u))
- }
-
- 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 {
- if disableSSL {
- return "http"
- }
-
- return getByPriority(protocols, protocolPriority, defaultProtocol)
-}
-
-func (e *endpoint) mergeIn(other endpoint) {
- if len(other.Hostname) > 0 {
- e.Hostname = other.Hostname
- }
- if len(other.Protocols) > 0 {
- e.Protocols = other.Protocols
- }
- if len(other.SignatureVersions) > 0 {
- e.SignatureVersions = other.SignatureVersions
- }
- if len(other.CredentialScope.Region) > 0 {
- e.CredentialScope.Region = other.CredentialScope.Region
- }
- if len(other.CredentialScope.Service) > 0 {
- e.CredentialScope.Service = other.CredentialScope.Service
- }
- if len(other.SSLCommonName) > 0 {
- e.SSLCommonName = other.SSLCommonName
- }
- if len(other.DNSSuffix) > 0 {
- e.DNSSuffix = other.DNSSuffix
- }
- if other.Deprecated != boxedBoolUnset {
- e.Deprecated = other.Deprecated
- }
-}
-
-type credentialScope struct {
- Region string `json:"region"`
- Service string `json:"service"`
-}
-
-type boxedBool int
-
-func (b *boxedBool) UnmarshalJSON(buf []byte) error {
- v, err := strconv.ParseBool(string(buf))
- if err != nil {
- return err
- }
-
- if v {
- *b = boxedTrue
- } else {
- *b = boxedFalse
- }
-
- return nil
-}
-
-const (
- boxedBoolUnset boxedBool = iota
- boxedFalse
- boxedTrue
-)
-
-func validateInputRegion(region string) bool {
- return regionValidationRegex.MatchString(region)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go
deleted file mode 100644
index 84922bca8..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go
+++ /dev/null
@@ -1,412 +0,0 @@
-//go:build codegen
-// +build codegen
-
-package endpoints
-
-import (
- "fmt"
- "io"
- "reflect"
- "strings"
- "text/template"
- "unicode"
-)
-
-// A CodeGenOptions are the options for code generating the endpoints into
-// Go code from the endpoints model definition.
-type CodeGenOptions struct {
- // Options for how the model will be decoded.
- DecodeModelOptions DecodeModelOptions
-
- // Disables code generation of the service endpoint prefix IDs defined in
- // the model.
- DisableGenerateServiceIDs bool
-}
-
-// Set combines all of the option functions together
-func (d *CodeGenOptions) Set(optFns ...func(*CodeGenOptions)) {
- for _, fn := range optFns {
- fn(d)
- }
-}
-
-// CodeGenModel given a endpoints model file will decode it and attempt to
-// generate Go code from the model definition. Error will be returned if
-// the code is unable to be generated, or decoded.
-func CodeGenModel(modelFile io.Reader, outFile io.Writer, optFns ...func(*CodeGenOptions)) error {
- var opts CodeGenOptions
- opts.Set(optFns...)
-
- resolver, err := DecodeModel(modelFile, func(d *DecodeModelOptions) {
- *d = opts.DecodeModelOptions
- })
- if err != nil {
- return err
- }
-
- v := struct {
- Resolver
- CodeGenOptions
- }{
- Resolver: resolver,
- CodeGenOptions: opts,
- }
-
- tmpl := template.Must(template.New("tmpl").Funcs(funcMap).Parse(v3Tmpl))
- if err := tmpl.ExecuteTemplate(outFile, "defaults", v); err != nil {
- return fmt.Errorf("failed to execute template, %v", err)
- }
-
- return nil
-}
-
-func toSymbol(v string) string {
- out := []rune{}
- for _, c := range strings.Title(v) {
- if !(unicode.IsNumber(c) || unicode.IsLetter(c)) {
- continue
- }
-
- out = append(out, c)
- }
-
- return string(out)
-}
-
-func quoteString(v string) string {
- return fmt.Sprintf("%q", v)
-}
-
-func regionConstName(p, r string) string {
- return toSymbol(p) + toSymbol(r)
-}
-
-func partitionGetter(id string) string {
- return fmt.Sprintf("%sPartition", toSymbol(id))
-}
-
-func partitionVarName(id string) string {
- return fmt.Sprintf("%sPartition", strings.ToLower(toSymbol(id)))
-}
-
-func listPartitionNames(ps partitions) string {
- names := []string{}
- switch len(ps) {
- case 1:
- return ps[0].Name
- case 2:
- return fmt.Sprintf("%s and %s", ps[0].Name, ps[1].Name)
- default:
- for i, p := range ps {
- if i == len(ps)-1 {
- names = append(names, "and "+p.Name)
- } else {
- names = append(names, p.Name)
- }
- }
- return strings.Join(names, ", ")
- }
-}
-
-func boxedBoolIfSet(msg string, v boxedBool) string {
- switch v {
- case boxedTrue:
- return fmt.Sprintf(msg, "boxedTrue")
- case boxedFalse:
- return fmt.Sprintf(msg, "boxedFalse")
- default:
- return ""
- }
-}
-
-func stringIfSet(msg, v string) string {
- if len(v) == 0 {
- return ""
- }
-
- return fmt.Sprintf(msg, v)
-}
-
-func stringSliceIfSet(msg string, vs []string) string {
- if len(vs) == 0 {
- return ""
- }
-
- names := []string{}
- for _, v := range vs {
- names = append(names, `"`+v+`"`)
- }
-
- return fmt.Sprintf(msg, strings.Join(names, ","))
-}
-
-func endpointIsSet(v endpoint) bool {
- return !reflect.DeepEqual(v, endpoint{})
-}
-
-func serviceSet(ps partitions) map[string]struct{} {
- set := map[string]struct{}{}
- for _, p := range ps {
- for id := range p.Services {
- set[id] = struct{}{}
- }
- }
-
- return set
-}
-
-func endpointVariantSetter(variant endpointVariant) (string, error) {
- if variant == 0 {
- return "0", nil
- }
-
- if variant > (fipsVariant | dualStackVariant) {
- return "", fmt.Errorf("unknown endpoint variant")
- }
-
- var symbols []string
- if variant&fipsVariant != 0 {
- symbols = append(symbols, "fipsVariant")
- }
- if variant&dualStackVariant != 0 {
- symbols = append(symbols, "dualStackVariant")
- }
- v := strings.Join(symbols, "|")
-
- return v, nil
-}
-
-func endpointKeySetter(e endpointKey) (string, error) {
- var sb strings.Builder
- sb.WriteString("endpointKey{\n")
- sb.WriteString(fmt.Sprintf("Region: %q,\n", e.Region))
- if e.Variant != 0 {
- variantSetter, err := endpointVariantSetter(e.Variant)
- if err != nil {
- return "", err
- }
- sb.WriteString(fmt.Sprintf("Variant: %s,\n", variantSetter))
- }
- sb.WriteString("}")
- return sb.String(), nil
-}
-
-func defaultKeySetter(e defaultKey) (string, error) {
- var sb strings.Builder
- sb.WriteString("defaultKey{\n")
- if e.Variant != 0 {
- variantSetter, err := endpointVariantSetter(e.Variant)
- if err != nil {
- return "", err
- }
- sb.WriteString(fmt.Sprintf("Variant: %s,\n", variantSetter))
- }
- sb.WriteString("}")
- return sb.String(), nil
-}
-
-var funcMap = template.FuncMap{
- "ToSymbol": toSymbol,
- "QuoteString": quoteString,
- "RegionConst": regionConstName,
- "PartitionGetter": partitionGetter,
- "PartitionVarName": partitionVarName,
- "ListPartitionNames": listPartitionNames,
- "BoxedBoolIfSet": boxedBoolIfSet,
- "StringIfSet": stringIfSet,
- "StringSliceIfSet": stringSliceIfSet,
- "EndpointIsSet": endpointIsSet,
- "ServicesSet": serviceSet,
- "EndpointVariantSetter": endpointVariantSetter,
- "EndpointKeySetter": endpointKeySetter,
- "DefaultKeySetter": defaultKeySetter,
-}
-
-const v3Tmpl = `
-{{ define "defaults" -}}
-// Code generated by aws/endpoints/v3model_codegen.go. DO NOT EDIT.
-
-package endpoints
-
-import (
- "regexp"
-)
-
- {{ template "partition consts" $.Resolver }}
-
- {{ range $_, $partition := $.Resolver }}
- {{ template "partition region consts" $partition }}
- {{ end }}
-
- {{ if not $.DisableGenerateServiceIDs -}}
- {{ template "service consts" $.Resolver }}
- {{- end }}
-
- {{ template "endpoint resolvers" $.Resolver }}
-{{- end }}
-
-{{ define "partition consts" }}
- // Partition identifiers
- const (
- {{ range $_, $p := . -}}
- {{ ToSymbol $p.ID }}PartitionID = {{ QuoteString $p.ID }} // {{ $p.Name }} partition.
- {{ end -}}
- )
-{{- end }}
-
-{{ define "partition region consts" }}
- // {{ .Name }} partition's regions.
- const (
- {{ range $id, $region := .Regions -}}
- {{ ToSymbol $id }}RegionID = {{ QuoteString $id }} // {{ $region.Description }}.
- {{ end -}}
- )
-{{- end }}
-
-{{ define "service consts" }}
- // Service identifiers
- const (
- {{ $serviceSet := ServicesSet . -}}
- {{ range $id, $_ := $serviceSet -}}
- {{ ToSymbol $id }}ServiceID = {{ QuoteString $id }} // {{ ToSymbol $id }}.
- {{ end -}}
- )
-{{- end }}
-
-{{ define "endpoint resolvers" }}
- // DefaultResolver returns an Endpoint resolver that will be able
- // to resolve endpoints for: {{ ListPartitionNames . }}.
- //
- // Use DefaultPartitions() to get the list of the default partitions.
- func DefaultResolver() Resolver {
- return defaultPartitions
- }
-
- // DefaultPartitions returns a list of the partitions the SDK is bundled
- // with. The available partitions are: {{ ListPartitionNames . }}.
- //
- // partitions := endpoints.DefaultPartitions
- // for _, p := range partitions {
- // // ... inspect partitions
- // }
- func DefaultPartitions() []Partition {
- return defaultPartitions.Partitions()
- }
-
- var defaultPartitions = partitions{
- {{ range $_, $partition := . -}}
- {{ PartitionVarName $partition.ID }},
- {{ end }}
- }
-
- {{ range $_, $partition := . -}}
- {{ $name := PartitionGetter $partition.ID -}}
- // {{ $name }} returns the Resolver for {{ $partition.Name }}.
- func {{ $name }}() Partition {
- return {{ PartitionVarName $partition.ID }}.Partition()
- }
- var {{ PartitionVarName $partition.ID }} = {{ template "gocode Partition" $partition }}
- {{ end }}
-{{ end }}
-
-{{ define "default partitions" }}
- func DefaultPartitions() []Partition {
- return []partition{
- {{ range $_, $partition := . -}}
- // {{ ToSymbol $partition.ID}}Partition(),
- {{ end }}
- }
- }
-{{ end }}
-
-{{ define "gocode Partition" -}}
-partition{
- {{ StringIfSet "ID: %q,\n" .ID -}}
- {{ StringIfSet "Name: %q,\n" .Name -}}
- {{ StringIfSet "DNSSuffix: %q,\n" .DNSSuffix -}}
- RegionRegex: {{ template "gocode RegionRegex" .RegionRegex }},
- {{ if (gt (len .Defaults) 0) -}}
- Defaults: {{ template "gocode Defaults" .Defaults -}},
- {{ end -}}
- Regions: {{ template "gocode Regions" .Regions }},
- Services: {{ template "gocode Services" .Services }},
-}
-{{- end }}
-
-{{ define "gocode RegionRegex" -}}
-regionRegex{
- Regexp: func() *regexp.Regexp{
- reg, _ := regexp.Compile({{ QuoteString .Regexp.String }})
- return reg
- }(),
-}
-{{- end }}
-
-{{ define "gocode Regions" -}}
-regions{
- {{ range $id, $region := . -}}
- "{{ $id }}": {{ template "gocode Region" $region }},
- {{ end -}}
-}
-{{- end }}
-
-{{ define "gocode Region" -}}
-region{
- {{ StringIfSet "Description: %q,\n" .Description -}}
-}
-{{- end }}
-
-{{ define "gocode Services" -}}
-services{
- {{ range $id, $service := . -}}
- "{{ $id }}": {{ template "gocode Service" $service }},
- {{ end }}
-}
-{{- end }}
-
-{{ define "gocode Service" -}}
-service{
- {{ StringIfSet "PartitionEndpoint: %q,\n" .PartitionEndpoint -}}
- {{ BoxedBoolIfSet "IsRegionalized: %s,\n" .IsRegionalized -}}
- {{ if (gt (len .Defaults) 0) -}}
- Defaults: {{ template "gocode Defaults" .Defaults -}},
- {{ end -}}
- {{ if .Endpoints -}}
- Endpoints: {{ template "gocode Endpoints" .Endpoints }},
- {{- end }}
-}
-{{- end }}
-
-{{ define "gocode Defaults" -}}
-endpointDefaults{
- {{ range $id, $endpoint := . -}}
- {{ DefaultKeySetter $id }}: {{ template "gocode Endpoint" $endpoint }},
- {{ end }}
-}
-{{- end }}
-
-{{ define "gocode Endpoints" -}}
-serviceEndpoints{
- {{ range $id, $endpoint := . -}}
- {{ EndpointKeySetter $id }}: {{ template "gocode Endpoint" $endpoint }},
- {{ end }}
-}
-{{- end }}
-
-{{ define "gocode Endpoint" -}}
-endpoint{
- {{ StringIfSet "Hostname: %q,\n" .Hostname -}}
- {{ StringIfSet "DNSSuffix: %q,\n" .DNSSuffix -}}
- {{ StringIfSet "SSLCommonName: %q,\n" .SSLCommonName -}}
- {{ StringSliceIfSet "Protocols: []string{%s},\n" .Protocols -}}
- {{ StringSliceIfSet "SignatureVersions: []string{%s},\n" .SignatureVersions -}}
- {{ if or .CredentialScope.Region .CredentialScope.Service -}}
- CredentialScope: credentialScope{
- {{ StringIfSet "Region: %q,\n" .CredentialScope.Region -}}
- {{ StringIfSet "Service: %q,\n" .CredentialScope.Service -}}
- },
- {{- end }}
- {{ BoxedBoolIfSet "Deprecated: %s,\n" .Deprecated -}}
-}
-{{- end }}
-`
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/errors.go b/vendor/github.com/aws/aws-sdk-go/aws/errors.go
deleted file mode 100644
index fa06f7a8f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/errors.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package aws
-
-import "github.com/aws/aws-sdk-go/aws/awserr"
-
-var (
- // ErrMissingRegion is an error that is returned if region configuration is
- // not found.
- ErrMissingRegion = awserr.New("MissingRegion", "could not find region configuration", nil)
-
- // ErrMissingEndpoint is an error that is returned if an endpoint cannot be
- // resolved for a service.
- ErrMissingEndpoint = awserr.New("MissingEndpoint", "'Endpoint' configuration is required for this service", nil)
-)
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go b/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go
deleted file mode 100644
index 91a6f277a..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package aws
-
-// JSONValue is a representation of a grab bag type that will be marshaled
-// into a json string. This type can be used just like any other map.
-//
-// Example:
-//
-// values := aws.JSONValue{
-// "Foo": "Bar",
-// }
-// values["Baz"] = "Qux"
-type JSONValue map[string]interface{}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/logger.go
deleted file mode 100644
index 49674cc79..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/logger.go
+++ /dev/null
@@ -1,121 +0,0 @@
-package aws
-
-import (
- "log"
- "os"
-)
-
-// A LogLevelType defines the level logging should be performed at. Used to instruct
-// the SDK which statements should be logged.
-type LogLevelType uint
-
-// LogLevel returns the pointer to a LogLevel. Should be used to workaround
-// not being able to take the address of a non-composite literal.
-func LogLevel(l LogLevelType) *LogLevelType {
- return &l
-}
-
-// Value returns the LogLevel value or the default value LogOff if the LogLevel
-// is nil. Safe to use on nil value LogLevelTypes.
-func (l *LogLevelType) Value() LogLevelType {
- if l != nil {
- return *l
- }
- return LogOff
-}
-
-// Matches returns true if the v LogLevel is enabled by this LogLevel. Should be
-// used with logging sub levels. Is safe to use on nil value LogLevelTypes. If
-// LogLevel is nil, will default to LogOff comparison.
-func (l *LogLevelType) Matches(v LogLevelType) bool {
- c := l.Value()
- return c&v == v
-}
-
-// AtLeast returns true if this LogLevel is at least high enough to satisfies v.
-// Is safe to use on nil value LogLevelTypes. If LogLevel is nil, will default
-// to LogOff comparison.
-func (l *LogLevelType) AtLeast(v LogLevelType) bool {
- c := l.Value()
- return c >= v
-}
-
-const (
- // LogOff states that no logging should be performed by the SDK. This is the
- // default state of the SDK, and should be use to disable all logging.
- LogOff LogLevelType = iota * 0x1000
-
- // LogDebug state that debug output should be logged by the SDK. This should
- // be used to inspect request made and responses received.
- LogDebug
-)
-
-// Debug Logging Sub Levels
-const (
- // LogDebugWithSigning states that the SDK should log request signing and
- // presigning events. This should be used to log the signing details of
- // requests for debugging. Will also enable LogDebug.
- LogDebugWithSigning LogLevelType = LogDebug | (1 << iota)
-
- // LogDebugWithHTTPBody states the SDK should log HTTP request and response
- // HTTP bodys in addition to the headers and path. This should be used to
- // see the body content of requests and responses made while using the SDK
- // Will also enable LogDebug.
- LogDebugWithHTTPBody
-
- // LogDebugWithRequestRetries states the SDK should log when service requests will
- // be retried. This should be used to log when you want to log when service
- // requests are being retried. Will also enable LogDebug.
- LogDebugWithRequestRetries
-
- // LogDebugWithRequestErrors states the SDK should log when service requests fail
- // to build, send, validate, or unmarshal.
- LogDebugWithRequestErrors
-
- // LogDebugWithEventStreamBody states the SDK should log EventStream
- // request and response bodys. This should be used to log the EventStream
- // wire unmarshaled message content of requests and responses made while
- // using the SDK Will also enable LogDebug.
- LogDebugWithEventStreamBody
-
- // LogDebugWithDeprecated states the SDK should log details about deprecated functionality.
- LogDebugWithDeprecated
-)
-
-// A Logger is a minimalistic interface for the SDK to log messages to. Should
-// be used to provide custom logging writers for the SDK to use.
-type Logger interface {
- Log(...interface{})
-}
-
-// A LoggerFunc is a convenience type to convert a function taking a variadic
-// list of arguments and wrap it so the Logger interface can be used.
-//
-// Example:
-// s3.New(sess, &aws.Config{Logger: aws.LoggerFunc(func(args ...interface{}) {
-// fmt.Fprintln(os.Stdout, args...)
-// })})
-type LoggerFunc func(...interface{})
-
-// Log calls the wrapped function with the arguments provided
-func (f LoggerFunc) Log(args ...interface{}) {
- f(args...)
-}
-
-// NewDefaultLogger returns a Logger which will write log messages to stdout, and
-// use same formatting runes as the stdlib log.Logger
-func NewDefaultLogger() Logger {
- return &defaultLogger{
- logger: log.New(os.Stdout, "", log.LstdFlags),
- }
-}
-
-// A defaultLogger provides a minimalistic logger satisfying the Logger interface.
-type defaultLogger struct {
- logger *log.Logger
-}
-
-// Log logs the parameters to the stdlib logger. See log.Println.
-func (l defaultLogger) Log(args ...interface{}) {
- l.logger.Println(args...)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go
deleted file mode 100644
index 2ba3c56c1..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package request
-
-import (
- "strings"
-)
-
-func isErrConnectionReset(err error) bool {
- if strings.Contains(err.Error(), "read: connection reset") {
- return false
- }
-
- if strings.Contains(err.Error(), "use of closed network connection") ||
- strings.Contains(err.Error(), "connection reset") ||
- strings.Contains(err.Error(), "broken pipe") {
- return true
- }
-
- return false
-}
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
deleted file mode 100644
index 9556332b6..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
+++ /dev/null
@@ -1,346 +0,0 @@
-package request
-
-import (
- "fmt"
- "strings"
-)
-
-// A Handlers provides a collection of request handlers for various
-// stages of handling requests.
-type Handlers struct {
- Validate HandlerList
- Build HandlerList
- BuildStream HandlerList
- Sign HandlerList
- Send HandlerList
- ValidateResponse HandlerList
- Unmarshal HandlerList
- UnmarshalStream HandlerList
- UnmarshalMeta HandlerList
- UnmarshalError HandlerList
- Retry HandlerList
- AfterRetry HandlerList
- CompleteAttempt HandlerList
- Complete HandlerList
-}
-
-// Copy returns a copy of this handler's lists.
-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(),
- Unmarshal: h.Unmarshal.copy(),
- UnmarshalStream: h.UnmarshalStream.copy(),
- UnmarshalError: h.UnmarshalError.copy(),
- UnmarshalMeta: h.UnmarshalMeta.copy(),
- Retry: h.Retry.copy(),
- AfterRetry: h.AfterRetry.copy(),
- CompleteAttempt: h.CompleteAttempt.copy(),
- Complete: h.Complete.copy(),
- }
-}
-
-// Clear removes callback functions for all handlers.
-func (h *Handlers) Clear() {
- h.Validate.Clear()
- h.Build.Clear()
- h.BuildStream.Clear()
- h.Send.Clear()
- h.Sign.Clear()
- h.Unmarshal.Clear()
- h.UnmarshalStream.Clear()
- h.UnmarshalMeta.Clear()
- h.UnmarshalError.Clear()
- h.ValidateResponse.Clear()
- h.Retry.Clear()
- h.AfterRetry.Clear()
- h.CompleteAttempt.Clear()
- h.Complete.Clear()
-}
-
-// IsEmpty returns if there are no handlers in any of the handlerlists.
-func (h *Handlers) IsEmpty() bool {
- if h.Validate.Len() != 0 {
- return false
- }
- if h.Build.Len() != 0 {
- return false
- }
- if h.BuildStream.Len() != 0 {
- return false
- }
- if h.Send.Len() != 0 {
- return false
- }
- if h.Sign.Len() != 0 {
- return false
- }
- if h.Unmarshal.Len() != 0 {
- return false
- }
- if h.UnmarshalStream.Len() != 0 {
- return false
- }
- if h.UnmarshalMeta.Len() != 0 {
- return false
- }
- if h.UnmarshalError.Len() != 0 {
- return false
- }
- if h.ValidateResponse.Len() != 0 {
- return false
- }
- if h.Retry.Len() != 0 {
- return false
- }
- if h.AfterRetry.Len() != 0 {
- return false
- }
- if h.CompleteAttempt.Len() != 0 {
- return false
- }
- if h.Complete.Len() != 0 {
- return false
- }
-
- return true
-}
-
-// A HandlerListRunItem represents an entry in the HandlerList which
-// is being run.
-type HandlerListRunItem struct {
- Index int
- Handler NamedHandler
- Request *Request
-}
-
-// A HandlerList manages zero or more handlers in a list.
-type HandlerList struct {
- list []NamedHandler
-
- // Called after each request handler in the list is called. If set
- // and the func returns true the HandlerList will continue to iterate
- // over the request handlers. If false is returned the HandlerList
- // will stop iterating.
- //
- // Should be used if extra logic to be performed between each handler
- // in the list. This can be used to terminate a list's iteration
- // based on a condition such as error like, HandlerListStopOnError.
- // Or for logging like HandlerListLogItem.
- AfterEachFn func(item HandlerListRunItem) bool
-}
-
-// A NamedHandler is a struct that contains a name and function callback.
-type NamedHandler struct {
- Name string
- Fn func(*Request)
-}
-
-// copy creates a copy of the handler list.
-func (l *HandlerList) copy() HandlerList {
- n := HandlerList{
- AfterEachFn: l.AfterEachFn,
- }
- if len(l.list) == 0 {
- return n
- }
-
- n.list = append(make([]NamedHandler, 0, len(l.list)), l.list...)
- return n
-}
-
-// Clear clears the handler list.
-func (l *HandlerList) Clear() {
- l.list = l.list[0:0]
-}
-
-// Len returns the number of handlers in the list.
-func (l *HandlerList) Len() int {
- return len(l.list)
-}
-
-// PushBack pushes handler f to the back of the handler list.
-func (l *HandlerList) PushBack(f func(*Request)) {
- l.PushBackNamed(NamedHandler{"__anonymous", f})
-}
-
-// PushBackNamed pushes named handler f to the back of the handler list.
-func (l *HandlerList) PushBackNamed(n NamedHandler) {
- if cap(l.list) == 0 {
- l.list = make([]NamedHandler, 0, 5)
- }
- l.list = append(l.list, n)
-}
-
-// PushFront pushes handler f to the front of the handler list.
-func (l *HandlerList) PushFront(f func(*Request)) {
- l.PushFrontNamed(NamedHandler{"__anonymous", f})
-}
-
-// PushFrontNamed pushes named handler f to the front of the handler list.
-func (l *HandlerList) PushFrontNamed(n NamedHandler) {
- if cap(l.list) == len(l.list) {
- // Allocating new list required
- l.list = append([]NamedHandler{n}, l.list...)
- } else {
- // Enough room to prepend into list.
- l.list = append(l.list, NamedHandler{})
- copy(l.list[1:], l.list)
- l.list[0] = n
- }
-}
-
-// Remove removes a NamedHandler n
-func (l *HandlerList) Remove(n NamedHandler) {
- l.RemoveByName(n.Name)
-}
-
-// RemoveByName removes a NamedHandler by name.
-func (l *HandlerList) RemoveByName(name string) {
- for i := 0; i < len(l.list); i++ {
- m := l.list[i]
- if m.Name == name {
- // Shift array preventing creating new arrays
- copy(l.list[i:], l.list[i+1:])
- l.list[len(l.list)-1] = NamedHandler{}
- l.list = l.list[:len(l.list)-1]
-
- // decrement list so next check to length is correct
- i--
- }
- }
-}
-
-// SwapNamed will swap out any existing handlers with the same name as the
-// passed in NamedHandler returning true if handlers were swapped. False is
-// returned otherwise.
-func (l *HandlerList) SwapNamed(n NamedHandler) (swapped bool) {
- for i := 0; i < len(l.list); i++ {
- if l.list[i].Name == n.Name {
- l.list[i].Fn = n.Fn
- swapped = true
- }
- }
-
- return swapped
-}
-
-// Swap will swap out all handlers matching the name passed in. The matched
-// handlers will be swapped in. True is returned if the handlers were swapped.
-func (l *HandlerList) Swap(name string, replace NamedHandler) bool {
- var swapped bool
-
- for i := 0; i < len(l.list); i++ {
- if l.list[i].Name == name {
- l.list[i] = replace
- swapped = true
- }
- }
-
- return swapped
-}
-
-// SetBackNamed will replace the named handler if it exists in the handler list.
-// If the handler does not exist the handler will be added to the end of the list.
-func (l *HandlerList) SetBackNamed(n NamedHandler) {
- if !l.SwapNamed(n) {
- l.PushBackNamed(n)
- }
-}
-
-// SetFrontNamed will replace the named handler if it exists in the handler list.
-// If the handler does not exist the handler will be added to the beginning of
-// the list.
-func (l *HandlerList) SetFrontNamed(n NamedHandler) {
- if !l.SwapNamed(n) {
- l.PushFrontNamed(n)
- }
-}
-
-// Run executes all handlers in the list with a given request object.
-func (l *HandlerList) Run(r *Request) {
- for i, h := range l.list {
- h.Fn(r)
- item := HandlerListRunItem{
- Index: i, Handler: h, Request: r,
- }
- if l.AfterEachFn != nil && !l.AfterEachFn(item) {
- return
- }
- }
-}
-
-// HandlerListLogItem logs the request handler and the state of the
-// request's Error value. Always returns true to continue iterating
-// request handlers in a HandlerList.
-func HandlerListLogItem(item HandlerListRunItem) bool {
- if item.Request.Config.Logger == nil {
- return true
- }
- item.Request.Config.Logger.Log("DEBUG: RequestHandler",
- item.Index, item.Handler.Name, item.Request.Error)
-
- return true
-}
-
-// HandlerListStopOnError returns false to stop the HandlerList iterating
-// over request handlers if Request.Error is not nil. True otherwise
-// to continue iterating.
-func HandlerListStopOnError(item HandlerListRunItem) bool {
- return item.Request.Error == nil
-}
-
-// WithAppendUserAgent will add a string to the user agent prefixed with a
-// single white space.
-func WithAppendUserAgent(s string) Option {
- return func(r *Request) {
- r.Handlers.Build.PushBack(func(r2 *Request) {
- AddToUserAgent(r, s)
- })
- }
-}
-
-// MakeAddToUserAgentHandler will add the name/version pair to the User-Agent request
-// header. If the extra parameters are provided they will be added as metadata to the
-// name/version pair resulting in the following format.
-// "name/version (extra0; extra1; ...)"
-// The user agent part will be concatenated with this current request's user agent string.
-func MakeAddToUserAgentHandler(name, version string, extra ...string) func(*Request) {
- ua := fmt.Sprintf("%s/%s", name, version)
- if len(extra) > 0 {
- ua += fmt.Sprintf(" (%s)", strings.Join(extra, "; "))
- }
- return func(r *Request) {
- AddToUserAgent(r, ua)
- }
-}
-
-// MakeAddToUserAgentFreeFormHandler adds the input to the User-Agent request header.
-// The input string will be concatenated with the current request's user agent string.
-func MakeAddToUserAgentFreeFormHandler(s string) func(*Request) {
- return func(r *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.
-//
-// Header keys added will be added as canonical format with title casing
-// applied via http.Header.Set method.
-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.Set(k, v)
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go
deleted file mode 100644
index 79f79602b..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package request
-
-import (
- "io"
- "net/http"
- "net/url"
-)
-
-func copyHTTPRequest(r *http.Request, body io.ReadCloser) *http.Request {
- req := new(http.Request)
- *req = *r
- req.URL = &url.URL{}
- *req.URL = *r.URL
- req.Body = body
-
- req.Header = http.Header{}
- for k, v := range r.Header {
- for _, vv := range v {
- req.Header.Add(k, vv)
- }
- }
-
- return req
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go
deleted file mode 100644
index 9370fa50c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package request
-
-import (
- "io"
- "sync"
-
- "github.com/aws/aws-sdk-go/internal/sdkio"
-)
-
-// offsetReader is a thread-safe io.ReadCloser to prevent racing
-// with retrying requests
-type offsetReader struct {
- buf io.ReadSeeker
- lock sync.Mutex
- closed bool
-}
-
-func newOffsetReader(buf io.ReadSeeker, offset int64) (*offsetReader, error) {
- reader := &offsetReader{}
- _, err := buf.Seek(offset, sdkio.SeekStart)
- if err != nil {
- return nil, err
- }
-
- reader.buf = buf
- return reader, nil
-}
-
-// Close will close the instance of the offset reader's access to
-// the underlying io.ReadSeeker.
-func (o *offsetReader) Close() error {
- o.lock.Lock()
- defer o.lock.Unlock()
- o.closed = true
- return nil
-}
-
-// Read is a thread-safe read of the underlying io.ReadSeeker
-func (o *offsetReader) Read(p []byte) (int, error) {
- o.lock.Lock()
- defer o.lock.Unlock()
-
- if o.closed {
- return 0, io.EOF
- }
-
- return o.buf.Read(p)
-}
-
-// Seek is a thread-safe seeking operation.
-func (o *offsetReader) Seek(offset int64, whence int) (int64, error) {
- o.lock.Lock()
- defer o.lock.Unlock()
-
- return o.buf.Seek(offset, whence)
-}
-
-// CloseAndCopy will return a new offsetReader with a copy of the old buffer
-// and close the old buffer.
-func (o *offsetReader) CloseAndCopy(offset int64) (*offsetReader, error) {
- if err := o.Close(); err != nil {
- return nil, err
- }
- return newOffsetReader(o.buf, offset)
-}
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
deleted file mode 100644
index 636d9ec94..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
+++ /dev/null
@@ -1,722 +0,0 @@
-package request
-
-import (
- "bytes"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "net/url"
- "reflect"
- "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/metadata"
- "github.com/aws/aws-sdk-go/internal/sdkio"
-)
-
-const (
- // ErrCodeSerialization is the serialization error code that is received
- // during protocol unmarshaling.
- ErrCodeSerialization = "SerializationError"
-
- // ErrCodeRead is an error that is returned during HTTP reads.
- ErrCodeRead = "ReadError"
-
- // ErrCodeResponseTimeout is the connection timeout error that is received
- // during body reads.
- ErrCodeResponseTimeout = "ResponseTimeout"
-
- // ErrCodeInvalidPresignExpire is returned when the expire time provided to
- // presign is invalid
- ErrCodeInvalidPresignExpire = "InvalidPresignExpireError"
-
- // CanceledErrorCode is the error code that will be returned by an
- // API request that was canceled. Requests given a aws.Context may
- // return this error when canceled.
- 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.
-type Request struct {
- Config aws.Config
- ClientInfo metadata.ClientInfo
- Handlers Handlers
-
- Retryer
- AttemptTime time.Time
- Time time.Time
- Operation *Operation
- 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
- Data interface{}
- RequestID string
- RetryCount int
- Retryable *bool
- RetryDelay time.Duration
- NotHoist bool
- SignedHeaderVals http.Header
- LastSignedAt time.Time
- DisableFollowRedirects bool
-
- // Additional API error codes that should be retried. IsErrorRetryable
- // will consider these codes in addition to its built in cases.
- RetryErrorCodes []string
-
- // Additional API error codes that should be retried with throttle backoff
- // delay. IsErrorThrottle will consider these codes in addition to its
- // built in cases.
- ThrottleErrorCodes []string
-
- // A value greater than 0 instructs the request to be signed as Presigned URL
- // You should not set this field directly. Instead use Request's
- // Presign or PresignRequest methods.
- ExpireTime time.Duration
-
- context aws.Context
-
- built bool
-
- // Need to persist an intermediate body between the input Body and HTTP
- // request body because the HTTP Client's transport can maintain a reference
- // to the HTTP request's body after the client has returned. This value is
- // safe to use concurrently and wrap the input Body for each HTTP request.
- safeBody *offsetReader
-}
-
-// An Operation is the service API operation to be made.
-type Operation struct {
- Name string
- HTTPMethod string
- HTTPPath string
- *Paginator
-
- BeforePresignFn func(r *Request) error
-}
-
-// 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
-// payload will be deserialized to.
-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"
- }
-
- httpReq, _ := http.NewRequest(method, "", nil)
-
- var err error
- httpReq.URL, err = url.Parse(clientInfo.Endpoint)
- if err != nil {
- httpReq.URL = &url.URL{}
- err = awserr.New("InvalidEndpointURL", "invalid endpoint uri", err)
- }
-
- if len(operation.HTTPPath) != 0 {
- opHTTPPath := operation.HTTPPath
- var opQueryString string
- if idx := strings.Index(opHTTPPath, "?"); idx >= 0 {
- opQueryString = opHTTPPath[idx+1:]
- opHTTPPath = opHTTPPath[:idx]
- }
-
- if strings.HasSuffix(httpReq.URL.Path, "/") && strings.HasPrefix(opHTTPPath, "/") {
- opHTTPPath = opHTTPPath[1:]
- }
- httpReq.URL.Path += opHTTPPath
- httpReq.URL.RawQuery = opQueryString
- }
-
- r := &Request{
- Config: cfg,
- ClientInfo: clientInfo,
- Handlers: handlers.Copy(),
-
- Retryer: retryer,
- Time: time.Now(),
- ExpireTime: 0,
- Operation: operation,
- HTTPRequest: httpReq,
- Body: nil,
- Params: params,
- Error: err,
- Data: data,
- }
- r.SetBufferBody([]byte{})
-
- return r
-}
-
-// A Option is a functional option that can augment or modify a request when
-// using a WithContext API operation method.
-type Option func(*Request)
-
-// WithGetResponseHeader builds a request Option which will retrieve a single
-// header value from the HTTP Response. If there are multiple values for the
-// header key use WithGetResponseHeaders instead to access the http.Header
-// map directly. The passed in val pointer must be non-nil.
-//
-// This Option can be used multiple times with a single API operation.
-//
-// var id2, versionID string
-// svc.PutObjectWithContext(ctx, params,
-// request.WithGetResponseHeader("x-amz-id-2", &id2),
-// request.WithGetResponseHeader("x-amz-version-id", &versionID),
-// )
-func WithGetResponseHeader(key string, val *string) Option {
- return func(r *Request) {
- r.Handlers.Complete.PushBack(func(req *Request) {
- *val = req.HTTPResponse.Header.Get(key)
- })
- }
-}
-
-// WithGetResponseHeaders builds a request Option which will retrieve the
-// headers from the HTTP response and assign them to the passed in headers
-// variable. The passed in headers pointer must be non-nil.
-//
-// var headers http.Header
-// svc.PutObjectWithContext(ctx, params, request.WithGetResponseHeaders(&headers))
-func WithGetResponseHeaders(headers *http.Header) Option {
- return func(r *Request) {
- r.Handlers.Complete.PushBack(func(req *Request) {
- *headers = req.HTTPResponse.Header
- })
- }
-}
-
-// WithLogLevel is a request option that will set the request to use a specific
-// log level when the request is made.
-//
-// svc.PutObjectWithContext(ctx, params, request.WithLogLevel(aws.LogDebugWithHTTPBody)
-func WithLogLevel(l aws.LogLevelType) Option {
- return func(r *Request) {
- r.Config.LogLevel = aws.LogLevel(l)
- }
-}
-
-// ApplyOptions will apply each option to the request calling them in the order
-// the were provided.
-func (r *Request) ApplyOptions(opts ...Option) {
- for _, opt := range opts {
- opt(r)
- }
-}
-
-// Context will always returns a non-nil context. If Request does not have a
-// context aws.BackgroundContext will be returned.
-func (r *Request) Context() aws.Context {
- if r.context != nil {
- return r.context
- }
- return aws.BackgroundContext()
-}
-
-// SetContext adds a Context to the current request that can be used to cancel
-// a in-flight request. The Context value must not be nil, or this method will
-// panic.
-//
-// Unlike http.Request.WithContext, SetContext does not return a copy of the
-// Request. It is not safe to use use a single Request value for multiple
-// requests. A new Request should be created for each API operation request.
-//
-// Go 1.6 and below:
-// The http.Request's Cancel field will be set to the Done() value of
-// the context. This will overwrite the Cancel field's value.
-//
-// Go 1.7 and above:
-// The http.Request.WithContext will be used to set the context on the underlying
-// http.Request. This will create a shallow copy of the http.Request. The SDK
-// may create sub contexts in the future for nested requests such as retries.
-func (r *Request) SetContext(ctx aws.Context) {
- if ctx == nil {
- panic("context cannot be nil")
- }
- setRequestContext(r, ctx)
-}
-
-// WillRetry returns if the request's can be retried.
-func (r *Request) WillRetry() bool {
- if !aws.IsReaderSeekable(r.Body) && r.HTTPRequest.Body != NoBody {
- return false
- }
- return r.Error != nil && aws.BoolValue(r.Retryable) && r.RetryCount < r.MaxRetries()
-}
-
-func fmtAttemptCount(retryCount, maxRetries int) string {
- return fmt.Sprintf("attempt %v/%v", retryCount, maxRetries)
-}
-
-// ParamsFilled returns if the request's parameters have been populated
-// and the parameters are valid. False is returned if no parameters are
-// provided or invalid.
-func (r *Request) ParamsFilled() bool {
- return r.Params != nil && reflect.ValueOf(r.Params).Elem().IsValid()
-}
-
-// DataFilled returns true if the request's data for response deserialization
-// target has been set and is a valid. False is returned if data is not
-// set, or is invalid.
-func (r *Request) DataFilled() bool {
- return r.Data != nil && reflect.ValueOf(r.Data).Elem().IsValid()
-}
-
-// SetBufferBody will set the request's body bytes that will be sent to
-// the service API.
-func (r *Request) SetBufferBody(buf []byte) {
- r.SetReaderBody(bytes.NewReader(buf))
-}
-
-// SetStringBody sets the body of the request to be backed by a string.
-func (r *Request) SetStringBody(s string) {
- r.SetReaderBody(strings.NewReader(s))
-}
-
-// SetReaderBody will set the request's body reader.
-func (r *Request) SetReaderBody(reader io.ReadSeeker) {
- r.Body = reader
-
- if aws.IsReaderSeekable(reader) {
- var err error
- // Get the Bodies current offset so retries will start from the same
- // initial position.
- r.BodyStart, err = reader.Seek(0, sdkio.SeekCurrent)
- if err != nil {
- r.Error = awserr.New(ErrCodeSerialization,
- "failed to determine start of request body", err)
- return
- }
- }
- 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
-// time of 15 minutes.
-//
-// It is invalid to create a presigned URL with a expire duration 0 or less. An
-// error is returned if expire duration is 0 or less.
-func (r *Request) Presign(expire time.Duration) (string, error) {
- r = r.copy()
-
- // Presign requires all headers be hoisted. There is no way to retrieve
- // the signed headers not hoisted without this. Making the presigned URL
- // useless.
- r.NotHoist = false
-
- u, _, err := getPresignedURL(r, expire)
- return u, err
-}
-
-// PresignRequest behaves just like presign, with the addition of returning a
-// set of headers that were signed. The expire parameter is only used for
-// presigned Amazon S3 API requests. All other AWS services will use a fixed
-// expiration time of 15 minutes.
-//
-// It is invalid to create a presigned URL with a expire duration 0 or less. An
-// error is returned if expire duration is 0 or less.
-//
-// Returns the URL string for the API operation with signature in the query string,
-// and the HTTP headers that were included in the signature. These headers must
-// be included in any HTTP request made with the presigned URL.
-//
-// To prevent hoisting any headers to the query string set NotHoist to true on
-// this Request value prior to calling PresignRequest.
-func (r *Request) PresignRequest(expire time.Duration) (string, http.Header, error) {
- r = r.copy()
- return getPresignedURL(r, expire)
-}
-
-// IsPresigned returns true if the request represents a presigned API url.
-func (r *Request) IsPresigned() bool {
- return r.ExpireTime != 0
-}
-
-func getPresignedURL(r *Request, expire time.Duration) (string, http.Header, error) {
- if expire <= 0 {
- return "", nil, awserr.New(
- ErrCodeInvalidPresignExpire,
- "presigned URL requires an expire duration greater than 0",
- nil,
- )
- }
-
- r.ExpireTime = expire
-
- if r.Operation.BeforePresignFn != nil {
- if err := r.Operation.BeforePresignFn(r); err != nil {
- return "", nil, err
- }
- }
-
- if err := r.Sign(); err != nil {
- return "", nil, err
- }
-
- return r.HTTPRequest.URL.String(), r.SignedHeaderVals, nil
-}
-
-const (
- notRetrying = "not retrying"
-)
-
-func debugLogReqError(r *Request, stage, retryStr string, err error) {
- if !r.Config.LogLevel.Matches(aws.LogDebugWithRequestErrors) {
- return
- }
-
- r.Config.Logger.Log(fmt.Sprintf("DEBUG: %s %s/%s failed, %s, error %v",
- stage, r.ClientInfo.ServiceName, r.Operation.Name, retryStr, err))
-}
-
-// Build will build the request's object so it can be signed and sent
-// to the service. Build will also validate all the request's parameters.
-// Any additional build Handlers set on this request will be run
-// in the order they were set.
-//
-// The request will only be built once. Multiple calls to build will have
-// no effect.
-//
-// If any Validate or Build errors occur the build will stop and the error
-// which occurred will be returned.
-func (r *Request) Build() error {
- if !r.built {
- r.Handlers.Validate.Run(r)
- if r.Error != nil {
- debugLogReqError(r, "Validate Request", notRetrying, r.Error)
- return r.Error
- }
- r.Handlers.Build.Run(r)
- if r.Error != nil {
- debugLogReqError(r, "Build Request", notRetrying, r.Error)
- return r.Error
- }
- r.built = true
- }
-
- return r.Error
-}
-
-// Sign will sign the request, returning error if errors are encountered.
-//
-// Sign will build the request prior to signing. All Sign Handlers will
-// be executed in the order they were set.
-func (r *Request) Sign() error {
- r.Build()
- if r.Error != nil {
- debugLogReqError(r, "Build Request", notRetrying, r.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()
- }
-
- r.safeBody, err = newOffsetReader(r.Body, r.BodyStart)
- if err != nil {
- return nil, awserr.New(ErrCodeSerialization,
- "failed to get next request body reader", err)
- }
-
- // Go 1.8 tightened and clarified the rules code needs to use when building
- // requests with the http package. Go 1.8 removed the automatic detection
- // of if the Request.Body was empty, or actually had bytes in it. The SDK
- // always sets the Request.Body even if it is empty and should not actually
- // be sent. This is incorrect.
- //
- // Go 1.8 did add a http.NoBody value that the SDK can use to tell the http
- // client that the request really should be sent without a body. The
- // Request.Body cannot be set to nil, which is preferable, because the
- // field is exported and could introduce nil pointer dereferences for users
- // of the SDK if they used that field.
- //
- // Related golang/go#18257
- l, err := aws.SeekerLen(r.Body)
- if err != nil {
- return nil, awserr.New(ErrCodeSerialization,
- "failed to compute request body size", err)
- }
-
- if l == 0 {
- body = NoBody
- } else if l > 0 {
- body = r.safeBody
- } else {
- // Hack to prevent sending bodies for methods where the body
- // should be ignored by the server. Sending bodies on these
- // methods without an associated ContentLength will cause the
- // request to socket timeout because the server does not handle
- // Transfer-Encoding: chunked bodies for these methods.
- //
- // This would only happen if a aws.ReaderSeekerCloser was used with
- // a io.Reader that was not also an io.Seeker, or did not implement
- // Len() method.
- switch r.Operation.HTTPMethod {
- case "GET", "HEAD", "DELETE":
- body = NoBody
- default:
- body = r.safeBody
- }
- }
-
- return body, nil
-}
-
-// GetBody will return an io.ReadSeeker of the Request's underlying
-// input body with a concurrency safe wrapper.
-func (r *Request) GetBody() io.ReadSeeker {
- return r.safeBody
-}
-
-// Send will send the request, returning error if errors are encountered.
-//
-// Send will sign the request prior to sending. All Send Handlers will
-// be executed in the order they were set.
-//
-// Canceling a request is non-deterministic. If a request has been canceled,
-// then the transport will choose, randomly, one of the state channels during
-// reads or getting the connection.
-//
-// readLoop() and getConn(req *Request, cm connectMethod)
-// https://github.com/golang/go/blob/master/src/net/http/transport.go
-//
-// Send will not close the request.Request's body.
-func (r *Request) Send() error {
- defer func() {
- // Ensure a non-nil HTTPResponse parameter is set to ensure handlers
- // checking for HTTPResponse values, don't fail.
- if r.HTTPResponse == nil {
- r.HTTPResponse = &http.Response{
- Header: http.Header{},
- Body: ioutil.NopCloser(&bytes.Buffer{}),
- }
- }
- // Regardless of success or failure of the request trigger the Complete
- // request handlers.
- r.Handlers.Complete.Run(r)
- }()
-
- if err := r.Error; err != nil {
- return err
- }
-
- for {
- r.Error = nil
- r.AttemptTime = time.Now()
-
- if err := r.Sign(); err != nil {
- debugLogReqError(r, "Sign Request", notRetrying, err)
- return err
- }
-
- if err := r.sendRequest(); err == nil {
- return nil
- }
- r.Handlers.Retry.Run(r)
- r.Handlers.AfterRetry.Run(r)
-
- if r.Error != nil || !aws.BoolValue(r.Retryable) {
- return r.Error
- }
-
- if err := r.prepareRetry(); err != nil {
- r.Error = err
- return err
- }
- }
-}
-
-func (r *Request) prepareRetry() error {
- if r.Config.LogLevel.Matches(aws.LogDebugWithRequestRetries) {
- r.Config.Logger.Log(fmt.Sprintf("DEBUG: Retrying Request %s/%s, attempt %d",
- r.ClientInfo.ServiceName, r.Operation.Name, r.RetryCount))
- }
-
- // The previous http.Request will have a reference to the r.Body
- // and the HTTP Client's Transport may still be reading from
- // the request's body even though the Client's Do returned.
- r.HTTPRequest = copyHTTPRequest(r.HTTPRequest, nil)
- r.ResetBody()
- if err := r.Error; err != nil {
- return awserr.New(ErrCodeSerialization,
- "failed to prepare body for retry", err)
-
- }
-
- // Closing response body to ensure that no response body is leaked
- // between retry attempts.
- if r.HTTPResponse != nil && r.HTTPResponse.Body != nil {
- r.HTTPResponse.Body.Close()
- }
-
- return nil
-}
-
-func (r *Request) sendRequest() (sendErr error) {
- defer r.Handlers.CompleteAttempt.Run(r)
-
- r.Retryable = nil
- r.Handlers.Send.Run(r)
- if r.Error != nil {
- debugLogReqError(r, "Send Request",
- fmtAttemptCount(r.RetryCount, r.MaxRetries()),
- r.Error)
- return r.Error
- }
-
- r.Handlers.UnmarshalMeta.Run(r)
- r.Handlers.ValidateResponse.Run(r)
- if r.Error != nil {
- r.Handlers.UnmarshalError.Run(r)
- debugLogReqError(r, "Validate Response",
- fmtAttemptCount(r.RetryCount, r.MaxRetries()),
- r.Error)
- return r.Error
- }
-
- r.Handlers.Unmarshal.Run(r)
- if r.Error != nil {
- debugLogReqError(r, "Unmarshal Response",
- fmtAttemptCount(r.RetryCount, r.MaxRetries()),
- r.Error)
- return r.Error
- }
-
- return nil
-}
-
-// copy will copy a request which will allow for local manipulation of the
-// request.
-func (r *Request) copy() *Request {
- req := &Request{}
- *req = *r
- req.Handlers = r.Handlers.Copy()
- op := *r.Operation
- req.Operation = &op
- return req
-}
-
-// AddToUserAgent adds the string to the end of the request's current user agent.
-func AddToUserAgent(r *Request, s string) {
- curUA := r.HTTPRequest.Header.Get("User-Agent")
- if len(curUA) > 0 {
- s = curUA + " " + s
- }
- r.HTTPRequest.Header.Set("User-Agent", s)
-}
-
-// SanitizeHostForHeader removes default port from host and updates request.Host
-func SanitizeHostForHeader(r *http.Request) {
- host := getHost(r)
- port := portOnly(host)
- if port != "" && isDefaultPort(r.URL.Scheme, port) {
- r.Host = stripPort(host)
- }
-}
-
-// Returns host from request
-func getHost(r *http.Request) string {
- if r.Host != "" {
- return r.Host
- }
-
- if r.URL == nil {
- return ""
- }
-
- return r.URL.Host
-}
-
-// Hostname returns u.Host, without any port number.
-//
-// If Host is an IPv6 literal with a port number, Hostname returns the
-// IPv6 literal without the square brackets. IPv6 literals may include
-// a zone identifier.
-//
-// Copied from the Go 1.8 standard library (net/url)
-func stripPort(hostport string) string {
- colon := strings.IndexByte(hostport, ':')
- if colon == -1 {
- return hostport
- }
- if i := strings.IndexByte(hostport, ']'); i != -1 {
- return strings.TrimPrefix(hostport[:i], "[")
- }
- return hostport[:colon]
-}
-
-// Port returns the port part of u.Host, without the leading colon.
-// If u.Host doesn't contain a port, Port returns an empty string.
-//
-// Copied from the Go 1.8 standard library (net/url)
-func portOnly(hostport string) string {
- colon := strings.IndexByte(hostport, ':')
- if colon == -1 {
- return ""
- }
- if i := strings.Index(hostport, "]:"); i != -1 {
- return hostport[i+len("]:"):]
- }
- if strings.Contains(hostport, "]") {
- return ""
- }
- return hostport[colon+len(":"):]
-}
-
-// Returns true if the specified URI is using the standard port
-// (i.e. port 80 for HTTP URIs or 443 for HTTPS URIs)
-func isDefaultPort(scheme, port string) bool {
- if port == "" {
- return true
- }
-
- lowerCaseScheme := strings.ToLower(scheme)
- if (lowerCaseScheme == "http" && port == "80") || (lowerCaseScheme == "https" && port == "443") {
- return true
- }
-
- return false
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
deleted file mode 100644
index 5921b8ff2..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
+++ /dev/null
@@ -1,40 +0,0 @@
-//go:build !go1.8
-// +build !go1.8
-
-package request
-
-import "io"
-
-// NoBody is an io.ReadCloser with no bytes. Read always returns EOF
-// and Close always returns nil. It can be used in an outgoing client
-// request to explicitly signal that a request has zero bytes.
-// An alternative, however, is to simply set Request.Body to nil.
-//
-// Copy of Go 1.8 NoBody type from net/http/http.go
-type noBody struct{}
-
-func (noBody) Read([]byte) (int, error) { return 0, io.EOF }
-func (noBody) Close() error { return nil }
-func (noBody) WriteTo(io.Writer) (int64, error) { return 0, nil }
-
-// NoBody is an empty reader that will trigger the Go HTTP client to not include
-// and body in the HTTP request.
-var NoBody = noBody{}
-
-// ResetBody rewinds the request body back to its starting position, and
-// sets the HTTP Request body reference. When the body is read prior
-// to being sent in the HTTP request it will need to be rewound.
-//
-// ResetBody will automatically be called by the SDK's build handler, but if
-// the request is being used directly ResetBody must be called before the request
-// is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically
-// call ResetBody.
-func (r *Request) ResetBody() {
- body, err := r.getNextRequestBody()
- if err != nil {
- r.Error = err
- return
- }
-
- r.HTTPRequest.Body = body
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go
deleted file mode 100644
index ea643c9c4..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go
+++ /dev/null
@@ -1,37 +0,0 @@
-//go:build go1.8
-// +build go1.8
-
-package request
-
-import (
- "net/http"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-// NoBody is a http.NoBody reader instructing Go HTTP client to not include
-// and body in the HTTP request.
-var NoBody = http.NoBody
-
-// ResetBody rewinds the request body back to its starting position, and
-// sets the HTTP Request body reference. When the body is read prior
-// to being sent in the HTTP request it will need to be rewound.
-//
-// ResetBody will automatically be called by the SDK's build handler, but if
-// the request is being used directly ResetBody must be called before the request
-// is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically
-// call ResetBody.
-//
-// Will also set the Go 1.8's http.Request.GetBody member to allow retrying
-// PUT/POST redirects.
-func (r *Request) ResetBody() {
- body, err := r.getNextRequestBody()
- if err != nil {
- r.Error = awserr.New(ErrCodeSerialization,
- "failed to reset request body", err)
- return
- }
-
- r.HTTPRequest.Body = body
- r.HTTPRequest.GetBody = r.getNextRequestBody
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go
deleted file mode 100644
index d8c505302..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go
+++ /dev/null
@@ -1,15 +0,0 @@
-//go:build go1.7
-// +build go1.7
-
-package request
-
-import "github.com/aws/aws-sdk-go/aws"
-
-// setContext updates the Request to use the passed in context for cancellation.
-// Context will also be used for request retry delay.
-//
-// Creates shallow copy of the http.Request with the WithContext method.
-func setRequestContext(r *Request, ctx aws.Context) {
- r.context = ctx
- r.HTTPRequest = r.HTTPRequest.WithContext(ctx)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go
deleted file mode 100644
index 49a243ef2..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go
+++ /dev/null
@@ -1,15 +0,0 @@
-//go:build !go1.7
-// +build !go1.7
-
-package request
-
-import "github.com/aws/aws-sdk-go/aws"
-
-// setContext updates the Request to use the passed in context for cancellation.
-// Context will also be used for request retry delay.
-//
-// Creates shallow copy of the http.Request with the WithContext method.
-func setRequestContext(r *Request, ctx aws.Context) {
- r.context = ctx
- r.HTTPRequest.Cancel = ctx.Done()
-}
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
deleted file mode 100644
index 64784e16f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
+++ /dev/null
@@ -1,266 +0,0 @@
-package request
-
-import (
- "reflect"
- "sync/atomic"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
-)
-
-// A Pagination provides paginating of SDK API operations which are paginatable.
-// Generally you should not use this type directly, but use the "Pages" API
-// operations method to automatically perform pagination for you. Such as,
-// "S3.ListObjectsPages", and "S3.ListObjectsPagesWithContext" methods.
-//
-// Pagination differs from a Paginator type in that pagination is the type that
-// does the pagination between API operations, and Paginator defines the
-// configuration that will be used per page request.
-//
-// 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
-// use the Pagination type.
-type Pagination struct {
- // Function to return a Request value for each pagination request.
- // Any configuration or handlers that need to be applied to the request
- // prior to getting the next page should be done here before the request
- // returned.
- //
- // NewRequest should always be built from the same API operations. It is
- // undefined if different API operations are returned on subsequent calls.
- NewRequest func() (*Request, error)
- // EndPageOnSameToken, when enabled, will allow the paginator to stop on
- // token that are the same as its previous tokens.
- EndPageOnSameToken bool
-
- started bool
- prevTokens []interface{}
- nextTokens []interface{}
-
- err error
- curPage interface{}
-}
-
-// HasNextPage will return true if Pagination is able to determine that the API
-// operation has additional pages. False will be returned if there are no more
-// pages remaining.
-//
-// Will always return true if Next has not been called yet.
-func (p *Pagination) HasNextPage() bool {
- if !p.started {
- return true
- }
-
- hasNextPage := len(p.nextTokens) != 0
- if p.EndPageOnSameToken {
- return hasNextPage && !awsutil.DeepEqual(p.nextTokens, p.prevTokens)
- }
- return hasNextPage
-}
-
-// Err returns the error Pagination encountered when retrieving the next page.
-func (p *Pagination) Err() error {
- return p.err
-}
-
-// Page returns the current page. Page should only be called after a successful
-// call to Next. It is undefined what Page will return if Page is called after
-// Next returns false.
-func (p *Pagination) Page() interface{} {
- return p.curPage
-}
-
-// Next will attempt to retrieve the next page for the API operation. When a page
-// is retrieved true will be returned. If the page cannot be retrieved, or there
-// are no more pages false will be returned.
-//
-// Use the Page method to retrieve the current page data. The data will need
-// to be cast to the API operation's output type.
-//
-// Use the Err method to determine if an error occurred if Page returns false.
-func (p *Pagination) Next() bool {
- if !p.HasNextPage() {
- return false
- }
-
- req, err := p.NewRequest()
- if err != nil {
- p.err = err
- return false
- }
-
- if p.started {
- for i, intok := range req.Operation.InputTokens {
- awsutil.SetValueAtPath(req.Params, intok, p.nextTokens[i])
- }
- }
- p.started = true
-
- err = req.Send()
- if err != nil {
- p.err = err
- return false
- }
-
- p.prevTokens = p.nextTokens
- p.nextTokens = req.nextPageTokens()
- p.curPage = req.Data
-
- return true
-}
-
-// A Paginator is the configuration data that defines how an API operation
-// should be paginated. This type is used by the API service models to define
-// the generated pagination config for service APIs.
-//
-// The Pagination type is what provides iterating between pages of an API. It
-// is only used to store the token metadata the SDK should use for performing
-// pagination.
-type Paginator struct {
- InputTokens []string
- OutputTokens []string
- LimitToken string
- TruncationToken string
-}
-
-// nextPageTokens returns the tokens to use when asking for the next page of data.
-func (r *Request) nextPageTokens() []interface{} {
- if r.Operation.Paginator == nil {
- return nil
- }
- if r.Operation.TruncationToken != "" {
- tr, _ := awsutil.ValuesAtPath(r.Data, r.Operation.TruncationToken)
- if len(tr) == 0 {
- return nil
- }
-
- switch v := tr[0].(type) {
- case *bool:
- if !aws.BoolValue(v) {
- return nil
- }
- case bool:
- if !v {
- return nil
- }
- }
- }
-
- tokens := []interface{}{}
- tokenAdded := false
- for _, outToken := range r.Operation.OutputTokens {
- vs, _ := awsutil.ValuesAtPath(r.Data, outToken)
- if len(vs) == 0 {
- tokens = append(tokens, nil)
- continue
- }
- v := vs[0]
-
- switch tv := v.(type) {
- case *string:
- if len(aws.StringValue(tv)) == 0 {
- tokens = append(tokens, nil)
- continue
- }
- case string:
- if len(tv) == 0 {
- tokens = append(tokens, nil)
- continue
- }
- }
-
- tokenAdded = true
- tokens = append(tokens, v)
- }
- if !tokenAdded {
- return nil
- }
-
- return tokens
-}
-
-// Ensure a deprecated item is only logged once instead of each time its used.
-func logDeprecatedf(logger aws.Logger, flag *int32, msg string) {
- if logger == nil {
- return
- }
- if atomic.CompareAndSwapInt32(flag, 0, 1) {
- logger.Log(msg)
- }
-}
-
-var (
- logDeprecatedHasNextPage int32
- logDeprecatedNextPage int32
- logDeprecatedEachPage int32
-)
-
-// HasNextPage returns true if this request has more pages of data available.
-//
-// Deprecated Use Pagination type for configurable pagination of API operations
-func (r *Request) HasNextPage() bool {
- logDeprecatedf(r.Config.Logger, &logDeprecatedHasNextPage,
- "Request.HasNextPage deprecated. Use Pagination type for configurable pagination of API operations")
-
- return len(r.nextPageTokens()) > 0
-}
-
-// NextPage returns a new Request that can be executed to return the next
-// page of result data. Call .Send() on this request to execute it.
-//
-// Deprecated Use Pagination type for configurable pagination of API operations
-func (r *Request) NextPage() *Request {
- logDeprecatedf(r.Config.Logger, &logDeprecatedNextPage,
- "Request.NextPage deprecated. Use Pagination type for configurable pagination of API operations")
-
- tokens := r.nextPageTokens()
- if len(tokens) == 0 {
- return nil
- }
-
- data := reflect.New(reflect.TypeOf(r.Data).Elem()).Interface()
- nr := New(r.Config, r.ClientInfo, r.Handlers, r.Retryer, r.Operation, awsutil.CopyOf(r.Params), data)
- for i, intok := range nr.Operation.InputTokens {
- awsutil.SetValueAtPath(nr.Params, intok, tokens[i])
- }
- return nr
-}
-
-// EachPage iterates over each page of a paginated request object. The fn
-// parameter should be a function with the following sample signature:
-//
-// func(page *T, lastPage bool) bool {
-// return true // return false to stop iterating
-// }
-//
-// Where "T" is the structure type matching the output structure of the given
-// operation. For example, a request object generated by
-// DynamoDB.ListTablesRequest() would expect to see dynamodb.ListTablesOutput
-// as the structure "T". The lastPage value represents whether the page is
-// the last page of data or not. The return value of this function should
-// return true to keep iterating or false to stop.
-//
-// Deprecated Use Pagination type for configurable pagination of API operations
-func (r *Request) EachPage(fn func(data interface{}, isLastPage bool) (shouldContinue bool)) error {
- logDeprecatedf(r.Config.Logger, &logDeprecatedEachPage,
- "Request.EachPage deprecated. Use Pagination type for configurable pagination of API operations")
-
- for page := r; page != nil; page = page.NextPage() {
- if err := page.Send(); err != nil {
- return err
- }
- if getNextPage := fn(page.Data, !page.HasNextPage()); !getNextPage {
- return page.Error
- }
- }
-
- return nil
-}
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
deleted file mode 100644
index 3f0001f91..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
+++ /dev/null
@@ -1,309 +0,0 @@
-package request
-
-import (
- "net"
- "net/url"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-// Retryer provides the interface drive the SDK's request retry behavior. The
-// Retryer implementation is responsible for implementing exponential backoff,
-// and determine if a request API error should be retried.
-//
-// client.DefaultRetryer is the SDK's default implementation of the Retryer. It
-// uses the Request.IsErrorRetryable and Request.IsErrorThrottle methods to
-// determine if the request is retried.
-type Retryer interface {
- // RetryRules return the retry delay that should be used by the SDK before
- // making another request attempt for the failed request.
- RetryRules(*Request) time.Duration
-
- // ShouldRetry returns if the failed request is retryable.
- //
- // Implementations may consider request attempt count when determining if a
- // request is retryable, but the SDK will use MaxRetries to limit the
- // number of attempts a request are made.
- ShouldRetry(*Request) bool
-
- // MaxRetries is the number of times a request may be retried before
- // failing.
- MaxRetries() int
-}
-
-// WithRetryer sets a Retryer value to the given Config returning the Config
-// 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{}{
- ErrCodeRequestError: {},
- "RequestTimeout": {},
- ErrCodeResponseTimeout: {},
- "RequestTimeoutException": {}, // Glacier's flavor of RequestTimeout
-}
-
-var throttleCodes = map[string]struct{}{
- "ProvisionedThroughputExceededException": {},
- "ThrottledException": {}, // SNS, XRay, ResourceGroupsTagging API
- "Throttling": {},
- "ThrottlingException": {},
- "RequestLimitExceeded": {},
- "RequestThrottled": {},
- "RequestThrottledException": {},
- "TooManyRequestsException": {}, // Lambda functions
- "PriorRequestNotComplete": {}, // Route53
- "TransactionInProgressException": {},
- "EC2ThrottledException": {}, // EC2
-}
-
-// credsExpiredCodes is a collection of error codes which signify the credentials
-// need to be refreshed. Expired tokens require refreshing of credentials, and
-// resigning before the request can be retried.
-var credsExpiredCodes = map[string]struct{}{
- "ExpiredToken": {},
- "ExpiredTokenException": {},
- "RequestExpired": {}, // EC2 Only
-}
-
-func isCodeThrottle(code string) bool {
- _, ok := throttleCodes[code]
- return ok
-}
-
-func isCodeRetryable(code string) bool {
- if _, ok := retryableCodes[code]; ok {
- return true
- }
-
- return isCodeExpiredCreds(code)
-}
-
-func isCodeExpiredCreds(code string) bool {
- _, ok := credsExpiredCodes[code]
- return ok
-}
-
-var validParentCodes = map[string]struct{}{
- ErrCodeSerialization: {},
- ErrCodeRead: {},
-}
-
-func isNestedErrorRetryable(parentErr awserr.Error) bool {
- if parentErr == nil {
- return false
- }
-
- if _, ok := validParentCodes[parentErr.Code()]; !ok {
- return false
- }
-
- err := parentErr.OrigErr()
- if err == nil {
- return false
- }
-
- if aerr, ok := err.(awserr.Error); ok {
- return isCodeRetryable(aerr.Code())
- }
-
- if t, ok := err.(temporary); ok {
- return t.Temporary() || isErrConnectionReset(err)
- }
-
- return isErrConnectionReset(err)
-}
-
-// IsErrorRetryable returns whether the error is retryable, based on its Code.
-// Returns false if error is nil.
-func IsErrorRetryable(err error) bool {
- if err == nil {
- return false
- }
- return shouldRetryError(err)
-}
-
-type temporary interface {
- Temporary() bool
-}
-
-func shouldRetryError(origErr error) bool {
- switch err := origErr.(type) {
- case awserr.Error:
- if err.Code() == CanceledErrorCode {
- return false
- }
- if isNestedErrorRetryable(err) {
- return true
- }
-
- origErr := err.OrigErr()
- var shouldRetry bool
- if origErr != nil {
- shouldRetry = shouldRetryError(origErr)
- if err.Code() == ErrCodeRequestError && !shouldRetry {
- return false
- }
- }
- if isCodeRetryable(err.Code()) {
- return true
- }
- return shouldRetry
-
- case *url.Error:
- if strings.Contains(err.Error(), "connection refused") {
- // Refused connections should be retried as the service may not yet
- // be running on the port. Go TCP dial considers refused
- // connections as not temporary.
- return true
- }
- // *url.Error only implements Temporary after golang 1.6 but since
- // url.Error only wraps the error:
- return shouldRetryError(err.Err)
-
- case temporary:
- if netErr, ok := err.(*net.OpError); ok && netErr.Op == "dial" {
- return true
- }
- // If the error is temporary, we want to allow continuation of the
- // retry process
- return err.Temporary() || isErrConnectionReset(origErr)
-
- case nil:
- // `awserr.Error.OrigErr()` can be nil, meaning there was an error but
- // because we don't know the cause, it is marked as retryable. See
- // TestRequest4xxUnretryable for an example.
- return true
-
- default:
- switch err.Error() {
- case "net/http: request canceled",
- "net/http: request canceled while waiting for connection":
- // known 1.5 error case when an http request is cancelled
- return false
- }
- // here we don't know the error; so we allow a retry.
- return true
- }
-}
-
-// IsErrorThrottle returns whether the error is to be throttled based on its code.
-// Returns false if error is nil.
-func IsErrorThrottle(err error) bool {
- if aerr, ok := err.(awserr.Error); ok && aerr != nil {
- return isCodeThrottle(aerr.Code())
- }
- return false
-}
-
-// IsErrorExpiredCreds returns whether the error code is a credential expiry
-// error. Returns false if error is nil.
-func IsErrorExpiredCreds(err error) bool {
- if aerr, ok := err.(awserr.Error); ok && aerr != nil {
- return isCodeExpiredCreds(aerr.Code())
- }
- return false
-}
-
-// IsErrorRetryable returns whether the error is retryable, based on its Code.
-// Returns false if the request has no Error set.
-//
-// Alias for the utility function IsErrorRetryable
-func (r *Request) IsErrorRetryable() bool {
- if isErrCode(r.Error, r.RetryErrorCodes) {
- return true
- }
-
- // HTTP response status code 501 should not be retried.
- // 501 represents Not Implemented which means the request method is not
- // supported by the server and cannot be handled.
- if r.HTTPResponse != nil {
- // HTTP response status code 500 represents internal server error and
- // should be retried without any throttle.
- if r.HTTPResponse.StatusCode == 500 {
- return true
- }
- }
- return IsErrorRetryable(r.Error)
-}
-
-// IsErrorThrottle returns whether the error is to be throttled based on its
-// code. Returns false if the request has no Error set.
-//
-// Alias for the utility function IsErrorThrottle
-func (r *Request) IsErrorThrottle() bool {
- if isErrCode(r.Error, r.ThrottleErrorCodes) {
- return true
- }
-
- if r.HTTPResponse != nil {
- switch r.HTTPResponse.StatusCode {
- case
- 429, // error caused due to too many requests
- 502, // Bad Gateway error should be throttled
- 503, // caused when service is unavailable
- 504: // error occurred due to gateway timeout
- return true
- }
- }
-
- return IsErrorThrottle(r.Error)
-}
-
-func isErrCode(err error, codes []string) bool {
- if aerr, ok := err.(awserr.Error); ok && aerr != nil {
- for _, code := range codes {
- if code == aerr.Code() {
- return true
- }
- }
- }
-
- return false
-}
-
-// IsErrorExpired returns whether the error code is a credential expiry error.
-// Returns false if the request has no Error set.
-//
-// Alias for the utility function IsErrorExpiredCreds
-func (r *Request) IsErrorExpired() bool {
- return IsErrorExpiredCreds(r.Error)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go
deleted file mode 100644
index 09a44eb98..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package request
-
-import (
- "io"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-var timeoutErr = awserr.New(
- ErrCodeResponseTimeout,
- "read on body has reached the timeout limit",
- nil,
-)
-
-type readResult struct {
- n int
- err error
-}
-
-// timeoutReadCloser will handle body reads that take too long.
-// We will return a ErrReadTimeout error if a timeout occurs.
-type timeoutReadCloser struct {
- reader io.ReadCloser
- duration time.Duration
-}
-
-// Read will spin off a goroutine to call the reader's Read method. We will
-// select on the timer's channel or the read's channel. Whoever completes first
-// will be returned.
-func (r *timeoutReadCloser) Read(b []byte) (int, error) {
- timer := time.NewTimer(r.duration)
- c := make(chan readResult, 1)
-
- go func() {
- n, err := r.reader.Read(b)
- timer.Stop()
- c <- readResult{n: n, err: err}
- }()
-
- select {
- case data := <-c:
- return data.n, data.err
- case <-timer.C:
- return 0, timeoutErr
- }
-}
-
-func (r *timeoutReadCloser) Close() error {
- return r.reader.Close()
-}
-
-const (
- // HandlerResponseTimeout is what we use to signify the name of the
- // response timeout handler.
- HandlerResponseTimeout = "ResponseTimeoutHandler"
-)
-
-// adaptToResponseTimeoutError is a handler that will replace any top level error
-// to a ErrCodeResponseTimeout, if its child is that.
-func adaptToResponseTimeoutError(req *Request) {
- if err, ok := req.Error.(awserr.Error); ok {
- aerr, ok := err.OrigErr().(awserr.Error)
- if ok && aerr.Code() == ErrCodeResponseTimeout {
- req.Error = aerr
- }
- }
-}
-
-// WithResponseReadTimeout is a request option that will wrap the body in a timeout read closer.
-// This will allow for per read timeouts. If a timeout occurred, we will return the
-// ErrCodeResponseTimeout.
-//
-// svc.PutObjectWithContext(ctx, params, request.WithTimeoutReadCloser(30 * time.Second)
-func WithResponseReadTimeout(duration time.Duration) Option {
- return func(r *Request) {
-
- var timeoutHandler = NamedHandler{
- HandlerResponseTimeout,
- func(req *Request) {
- req.HTTPResponse.Body = &timeoutReadCloser{
- reader: req.HTTPResponse.Body,
- duration: duration,
- }
- }}
-
- // remove the handler so we are not stomping over any new durations.
- r.Handlers.Send.RemoveByName(HandlerResponseTimeout)
- r.Handlers.Send.PushBackNamed(timeoutHandler)
-
- r.Handlers.Unmarshal.PushBack(adaptToResponseTimeoutError)
- r.Handlers.UnmarshalError.PushBack(adaptToResponseTimeoutError)
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go
deleted file mode 100644
index 8630683f3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go
+++ /dev/null
@@ -1,286 +0,0 @@
-package request
-
-import (
- "bytes"
- "fmt"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-const (
- // InvalidParameterErrCode is the error code for invalid parameters errors
- InvalidParameterErrCode = "InvalidParameter"
- // ParamRequiredErrCode is the error code for required parameter errors
- ParamRequiredErrCode = "ParamRequiredError"
- // ParamMinValueErrCode is the error code for fields with too low of a
- // number value.
- ParamMinValueErrCode = "ParamMinValueError"
- // ParamMinLenErrCode is the error code for fields without enough elements.
- ParamMinLenErrCode = "ParamMinLenError"
- // ParamMaxLenErrCode is the error code for value being too long.
- ParamMaxLenErrCode = "ParamMaxLenError"
-
- // ParamFormatErrCode is the error code for a field with invalid
- // format or characters.
- ParamFormatErrCode = "ParamFormatInvalidError"
-)
-
-// Validator provides a way for types to perform validation logic on their
-// input values that external code can use to determine if a type's values
-// are valid.
-type Validator interface {
- Validate() error
-}
-
-// An ErrInvalidParams provides wrapping of invalid parameter errors found when
-// validating API operation input parameters.
-type ErrInvalidParams struct {
- // Context is the base context of the invalid parameter group.
- Context string
- errs []ErrInvalidParam
-}
-
-// Add adds a new invalid parameter error to the collection of invalid
-// parameters. The context of the invalid parameter will be updated to reflect
-// this collection.
-func (e *ErrInvalidParams) Add(err ErrInvalidParam) {
- err.SetContext(e.Context)
- e.errs = append(e.errs, err)
-}
-
-// AddNested adds the invalid parameter errors from another ErrInvalidParams
-// value into this collection. The nested errors will have their nested context
-// updated and base context to reflect the merging.
-//
-// Use for nested validations errors.
-func (e *ErrInvalidParams) AddNested(nestedCtx string, nested ErrInvalidParams) {
- for _, err := range nested.errs {
- err.SetContext(e.Context)
- err.AddNestedContext(nestedCtx)
- e.errs = append(e.errs, err)
- }
-}
-
-// Len returns the number of invalid parameter errors
-func (e ErrInvalidParams) Len() int {
- return len(e.errs)
-}
-
-// Code returns the code of the error
-func (e ErrInvalidParams) Code() string {
- return InvalidParameterErrCode
-}
-
-// Message returns the message of the error
-func (e ErrInvalidParams) Message() string {
- return fmt.Sprintf("%d validation error(s) found.", len(e.errs))
-}
-
-// Error returns the string formatted form of the invalid parameters.
-func (e ErrInvalidParams) Error() string {
- w := &bytes.Buffer{}
- fmt.Fprintf(w, "%s: %s\n", e.Code(), e.Message())
-
- for _, err := range e.errs {
- fmt.Fprintf(w, "- %s\n", err.Message())
- }
-
- return w.String()
-}
-
-// OrigErr returns the invalid parameters as a awserr.BatchedErrors value
-func (e ErrInvalidParams) OrigErr() error {
- return awserr.NewBatchError(
- InvalidParameterErrCode, e.Message(), e.OrigErrs())
-}
-
-// OrigErrs returns a slice of the invalid parameters
-func (e ErrInvalidParams) OrigErrs() []error {
- errs := make([]error, len(e.errs))
- for i := 0; i < len(errs); i++ {
- errs[i] = e.errs[i]
- }
-
- return errs
-}
-
-// An ErrInvalidParam represents an invalid parameter error type.
-type ErrInvalidParam interface {
- awserr.Error
-
- // Field name the error occurred on.
- Field() string
-
- // SetContext updates the context of the error.
- SetContext(string)
-
- // AddNestedContext updates the error's context to include a nested level.
- AddNestedContext(string)
-}
-
-type errInvalidParam struct {
- context string
- nestedContext string
- field string
- code string
- msg string
-}
-
-// Code returns the error code for the type of invalid parameter.
-func (e *errInvalidParam) Code() string {
- return e.code
-}
-
-// Message returns the reason the parameter was invalid, and its context.
-func (e *errInvalidParam) Message() string {
- return fmt.Sprintf("%s, %s.", e.msg, e.Field())
-}
-
-// Error returns the string version of the invalid parameter error.
-func (e *errInvalidParam) Error() string {
- return fmt.Sprintf("%s: %s", e.code, e.Message())
-}
-
-// OrigErr returns nil, Implemented for awserr.Error interface.
-func (e *errInvalidParam) OrigErr() error {
- return nil
-}
-
-// Field Returns the field and context the error occurred.
-func (e *errInvalidParam) Field() string {
- field := e.context
- if len(field) > 0 {
- field += "."
- }
- if len(e.nestedContext) > 0 {
- field += fmt.Sprintf("%s.", e.nestedContext)
- }
- field += e.field
-
- return field
-}
-
-// SetContext updates the base context of the error.
-func (e *errInvalidParam) SetContext(ctx string) {
- e.context = ctx
-}
-
-// AddNestedContext prepends a context to the field's path.
-func (e *errInvalidParam) AddNestedContext(ctx string) {
- if len(e.nestedContext) == 0 {
- e.nestedContext = ctx
- } else {
- e.nestedContext = fmt.Sprintf("%s.%s", ctx, e.nestedContext)
- }
-
-}
-
-// An ErrParamRequired represents an required parameter error.
-type ErrParamRequired struct {
- errInvalidParam
-}
-
-// NewErrParamRequired creates a new required parameter error.
-func NewErrParamRequired(field string) *ErrParamRequired {
- return &ErrParamRequired{
- errInvalidParam{
- code: ParamRequiredErrCode,
- field: field,
- msg: fmt.Sprintf("missing required field"),
- },
- }
-}
-
-// An ErrParamMinValue represents a minimum value parameter error.
-type ErrParamMinValue struct {
- errInvalidParam
- min float64
-}
-
-// NewErrParamMinValue creates a new minimum value parameter error.
-func NewErrParamMinValue(field string, min float64) *ErrParamMinValue {
- return &ErrParamMinValue{
- errInvalidParam: errInvalidParam{
- code: ParamMinValueErrCode,
- field: field,
- msg: fmt.Sprintf("minimum field value of %v", min),
- },
- min: min,
- }
-}
-
-// MinValue returns the field's require minimum value.
-//
-// float64 is returned for both int and float min values.
-func (e *ErrParamMinValue) MinValue() float64 {
- return e.min
-}
-
-// An ErrParamMinLen represents a minimum length parameter error.
-type ErrParamMinLen struct {
- errInvalidParam
- min int
-}
-
-// NewErrParamMinLen creates a new minimum length parameter error.
-func NewErrParamMinLen(field string, min int) *ErrParamMinLen {
- return &ErrParamMinLen{
- errInvalidParam: errInvalidParam{
- code: ParamMinLenErrCode,
- field: field,
- msg: fmt.Sprintf("minimum field size of %v", min),
- },
- min: min,
- }
-}
-
-// MinLen returns the field's required minimum length.
-func (e *ErrParamMinLen) MinLen() int {
- return e.min
-}
-
-// An ErrParamMaxLen represents a maximum length parameter error.
-type ErrParamMaxLen struct {
- errInvalidParam
- max int
-}
-
-// NewErrParamMaxLen creates a new maximum length parameter error.
-func NewErrParamMaxLen(field string, max int, value string) *ErrParamMaxLen {
- return &ErrParamMaxLen{
- errInvalidParam: errInvalidParam{
- code: ParamMaxLenErrCode,
- field: field,
- msg: fmt.Sprintf("maximum size of %v, %v", max, value),
- },
- max: max,
- }
-}
-
-// MaxLen returns the field's required minimum length.
-func (e *ErrParamMaxLen) MaxLen() int {
- return e.max
-}
-
-// An ErrParamFormat represents a invalid format parameter error.
-type ErrParamFormat struct {
- errInvalidParam
- format string
-}
-
-// NewErrParamFormat creates a new invalid format parameter error.
-func NewErrParamFormat(field string, format, value string) *ErrParamFormat {
- return &ErrParamFormat{
- errInvalidParam: errInvalidParam{
- code: ParamFormatErrCode,
- field: field,
- msg: fmt.Sprintf("format %v, %v", format, value),
- },
- format: format,
- }
-}
-
-// Format returns the field's required format.
-func (e *ErrParamFormat) Format() string {
- return e.format
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go b/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go
deleted file mode 100644
index 4601f883c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go
+++ /dev/null
@@ -1,295 +0,0 @@
-package request
-
-import (
- "fmt"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/awsutil"
-)
-
-// WaiterResourceNotReadyErrorCode is the error code returned by a waiter when
-// the waiter's max attempts have been exhausted.
-const WaiterResourceNotReadyErrorCode = "ResourceNotReady"
-
-// A WaiterOption is a function that will update the Waiter value's fields to
-// configure the waiter.
-type WaiterOption func(*Waiter)
-
-// WithWaiterMaxAttempts returns the maximum number of times the waiter should
-// attempt to check the resource for the target state.
-func WithWaiterMaxAttempts(max int) WaiterOption {
- return func(w *Waiter) {
- w.MaxAttempts = max
- }
-}
-
-// WaiterDelay will return a delay the waiter should pause between attempts to
-// check the resource state. The passed in attempt is the number of times the
-// Waiter has checked the resource state.
-//
-// Attempt is the number of attempts the Waiter has made checking the resource
-// state.
-type WaiterDelay func(attempt int) time.Duration
-
-// ConstantWaiterDelay returns a WaiterDelay that will always return a constant
-// delay the waiter should use between attempts. It ignores the number of
-// attempts made.
-func ConstantWaiterDelay(delay time.Duration) WaiterDelay {
- return func(attempt int) time.Duration {
- return delay
- }
-}
-
-// WithWaiterDelay will set the Waiter to use the WaiterDelay passed in.
-func WithWaiterDelay(delayer WaiterDelay) WaiterOption {
- return func(w *Waiter) {
- w.Delay = delayer
- }
-}
-
-// WithWaiterLogger returns a waiter option to set the logger a waiter
-// should use to log warnings and errors to.
-func WithWaiterLogger(logger aws.Logger) WaiterOption {
- return func(w *Waiter) {
- w.Logger = logger
- }
-}
-
-// WithWaiterRequestOptions returns a waiter option setting the request
-// options for each request the waiter makes. Appends to waiter's request
-// options already set.
-func WithWaiterRequestOptions(opts ...Option) WaiterOption {
- return func(w *Waiter) {
- w.RequestOptions = append(w.RequestOptions, opts...)
- }
-}
-
-// A Waiter provides the functionality to perform a blocking call which will
-// wait for a resource state to be satisfied by a service.
-//
-// This type should not be used directly. The API operations provided in the
-// service packages prefixed with "WaitUntil" should be used instead.
-type Waiter struct {
- Name string
- Acceptors []WaiterAcceptor
- Logger aws.Logger
-
- MaxAttempts int
- Delay WaiterDelay
-
- RequestOptions []Option
- NewRequest func([]Option) (*Request, error)
- SleepWithContext func(aws.Context, time.Duration) error
-}
-
-// ApplyOptions updates the waiter with the list of waiter options provided.
-func (w *Waiter) ApplyOptions(opts ...WaiterOption) {
- for _, fn := range opts {
- fn(w)
- }
-}
-
-// WaiterState are states the waiter uses based on WaiterAcceptor definitions
-// to identify if the resource state the waiter is waiting on has occurred.
-type WaiterState int
-
-// String returns the string representation of the waiter state.
-func (s WaiterState) String() string {
- switch s {
- case SuccessWaiterState:
- return "success"
- case FailureWaiterState:
- return "failure"
- case RetryWaiterState:
- return "retry"
- default:
- return "unknown waiter state"
- }
-}
-
-// States the waiter acceptors will use to identify target resource states.
-const (
- SuccessWaiterState WaiterState = iota // waiter successful
- FailureWaiterState // waiter failed
- RetryWaiterState // waiter needs to be retried
-)
-
-// WaiterMatchMode is the mode that the waiter will use to match the WaiterAcceptor
-// definition's Expected attribute.
-type WaiterMatchMode int
-
-// Modes the waiter will use when inspecting API response to identify target
-// resource states.
-const (
- PathAllWaiterMatch WaiterMatchMode = iota // match on all paths
- PathWaiterMatch // match on specific path
- PathAnyWaiterMatch // match on any path
- PathListWaiterMatch // match on list of paths
- StatusWaiterMatch // match on status code
- ErrorWaiterMatch // match on error
-)
-
-// String returns the string representation of the waiter match mode.
-func (m WaiterMatchMode) String() string {
- switch m {
- case PathAllWaiterMatch:
- return "pathAll"
- case PathWaiterMatch:
- return "path"
- case PathAnyWaiterMatch:
- return "pathAny"
- case PathListWaiterMatch:
- return "pathList"
- case StatusWaiterMatch:
- return "status"
- case ErrorWaiterMatch:
- return "error"
- default:
- return "unknown waiter match mode"
- }
-}
-
-// WaitWithContext will make requests for the API operation using NewRequest to
-// build API requests. The request's response will be compared against the
-// Waiter's Acceptors to determine the successful state of the resource the
-// waiter is inspecting.
-//
-// The passed in context must not be nil. If it is nil a panic will occur. The
-// Context will be used to cancel the waiter's pending requests and retry delays.
-// Use aws.BackgroundContext if no context is available.
-//
-// The waiter will continue until the target state defined by the Acceptors,
-// or the max attempts expires.
-//
-// Will return the WaiterResourceNotReadyErrorCode error code if the waiter's
-// retryer ShouldRetry returns false. This normally will happen when the max
-// wait attempts expires.
-func (w Waiter) WaitWithContext(ctx aws.Context) error {
-
- for attempt := 1; ; attempt++ {
- req, err := w.NewRequest(w.RequestOptions)
- if err != nil {
- waiterLogf(w.Logger, "unable to create request %v", err)
- return err
- }
- req.Handlers.Build.PushBack(MakeAddToUserAgentFreeFormHandler("Waiter"))
- err = req.Send()
-
- // See if any of the acceptors match the request's response, or error
- for _, a := range w.Acceptors {
- if matched, matchErr := a.match(w.Name, w.Logger, req, err); matched {
- return matchErr
- }
- }
-
- // The Waiter should only check the resource state MaxAttempts times
- // This is here instead of in the for loop above to prevent delaying
- // unnecessary when the waiter will not retry.
- if attempt == w.MaxAttempts {
- break
- }
-
- // Delay to wait before inspecting the resource again
- delay := w.Delay(attempt)
- if sleepFn := req.Config.SleepDelay; sleepFn != nil {
- // Support SleepDelay for backwards compatibility and testing
- sleepFn(delay)
- } else {
- sleepCtxFn := w.SleepWithContext
- if sleepCtxFn == nil {
- sleepCtxFn = aws.SleepWithContext
- }
-
- if err := sleepCtxFn(ctx, delay); err != nil {
- return awserr.New(CanceledErrorCode, "waiter context canceled", err)
- }
- }
- }
-
- return awserr.New(WaiterResourceNotReadyErrorCode, "exceeded wait attempts", nil)
-}
-
-// A WaiterAcceptor provides the information needed to wait for an API operation
-// to complete.
-type WaiterAcceptor struct {
- State WaiterState
- Matcher WaiterMatchMode
- Argument string
- Expected interface{}
-}
-
-// match returns if the acceptor found a match with the passed in request
-// or error. True is returned if the acceptor made a match, error is returned
-// if there was an error attempting to perform the match.
-func (a *WaiterAcceptor) match(name string, l aws.Logger, req *Request, err error) (bool, error) {
- result := false
- var vals []interface{}
-
- switch a.Matcher {
- case PathAllWaiterMatch, PathWaiterMatch:
- // Require all matches to be equal for result to match
- vals, _ = awsutil.ValuesAtPath(req.Data, a.Argument)
- if len(vals) == 0 {
- break
- }
- result = true
- for _, val := range vals {
- if !awsutil.DeepEqual(val, a.Expected) {
- result = false
- break
- }
- }
- case PathAnyWaiterMatch:
- // Only a single match needs to equal for the result to match
- vals, _ = awsutil.ValuesAtPath(req.Data, a.Argument)
- for _, val := range vals {
- if awsutil.DeepEqual(val, a.Expected) {
- result = true
- break
- }
- }
- case PathListWaiterMatch:
- // ignored matcher
- case StatusWaiterMatch:
- s := a.Expected.(int)
- result = s == req.HTTPResponse.StatusCode
- case ErrorWaiterMatch:
- if aerr, ok := err.(awserr.Error); ok {
- result = aerr.Code() == a.Expected.(string)
- }
- default:
- waiterLogf(l, "WARNING: Waiter %s encountered unexpected matcher: %s",
- name, a.Matcher)
- }
-
- if !result {
- // If there was no matching result found there is nothing more to do
- // for this response, retry the request.
- return false, nil
- }
-
- switch a.State {
- case SuccessWaiterState:
- // waiter completed
- return true, nil
- case FailureWaiterState:
- // Waiter failure state triggered
- return true, awserr.New(WaiterResourceNotReadyErrorCode,
- "failed waiting for successful resource state", err)
- case RetryWaiterState:
- // clear the error and retry the operation
- return false, nil
- default:
- waiterLogf(l, "WARNING: Waiter %s encountered unexpected state: %s",
- name, a.State)
- return false, nil
- }
-}
-
-func waiterLogf(logger aws.Logger, msg string, args ...interface{}) {
- if logger != nil {
- logger.Log(fmt.Sprintf(msg, args...))
- }
-}
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
deleted file mode 100644
index 1d3f4c3ad..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go
+++ /dev/null
@@ -1,303 +0,0 @@
-package session
-
-import (
- "fmt"
- "os"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/credentials/processcreds"
- "github.com/aws/aws-sdk-go/aws/credentials/ssocreds"
- "github.com/aws/aws-sdk-go/aws/credentials/stscreds"
- "github.com/aws/aws-sdk-go/aws/defaults"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/shareddefaults"
- "github.com/aws/aws-sdk-go/service/sts"
-)
-
-// CredentialsProviderOptions specifies additional options for configuring
-// credentials providers.
-type CredentialsProviderOptions struct {
- // WebIdentityRoleProviderOptions configures a WebIdentityRoleProvider,
- // such as setting its ExpiryWindow.
- WebIdentityRoleProviderOptions func(*stscreds.WebIdentityRoleProvider)
-}
-
-func resolveCredentials(cfg *aws.Config,
- envCfg envConfig, sharedCfg sharedConfig,
- handlers request.Handlers,
- sessOpts Options,
-) (*credentials.Credentials, error) {
-
- switch {
- case len(sessOpts.Profile) != 0:
- // User explicitly provided an Profile in the session's configuration
- // so load that profile from shared config first.
- // Github(aws/aws-sdk-go#2727)
- return resolveCredsFromProfile(cfg, envCfg, sharedCfg, handlers, sessOpts)
-
- case envCfg.Creds.HasKeys():
- // Environment credentials
- return credentials.NewStaticCredentialsFromCreds(envCfg.Creds), nil
-
- case len(envCfg.WebIdentityTokenFilePath) != 0:
- // Web identity token from environment, RoleARN required to also be
- // set.
- return assumeWebIdentity(cfg, handlers,
- envCfg.WebIdentityTokenFilePath,
- envCfg.RoleARN,
- envCfg.RoleSessionName,
- sessOpts.CredentialsProviderOptions,
- )
-
- default:
- // Fallback to the "default" credential resolution chain.
- return resolveCredsFromProfile(cfg, envCfg, sharedCfg, handlers, sessOpts)
- }
-}
-
-// WebIdentityEmptyRoleARNErr will occur if 'AWS_WEB_IDENTITY_TOKEN_FILE' was set but
-// 'AWS_ROLE_ARN' was not set.
-var WebIdentityEmptyRoleARNErr = awserr.New(stscreds.ErrCodeWebIdentity, "role ARN is not set", nil)
-
-// 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)
-
-func assumeWebIdentity(cfg *aws.Config, handlers request.Handlers,
- filepath string,
- roleARN, sessionName string,
- credOptions *CredentialsProviderOptions,
-) (*credentials.Credentials, error) {
-
- if len(filepath) == 0 {
- return nil, WebIdentityEmptyTokenFilePathErr
- }
-
- if len(roleARN) == 0 {
- return nil, WebIdentityEmptyRoleARNErr
- }
-
- svc := sts.New(&Session{
- Config: cfg,
- Handlers: handlers.Copy(),
- })
-
- var optFns []func(*stscreds.WebIdentityRoleProvider)
- if credOptions != nil && credOptions.WebIdentityRoleProviderOptions != nil {
- optFns = append(optFns, credOptions.WebIdentityRoleProviderOptions)
- }
-
- p := stscreds.NewWebIdentityRoleProviderWithOptions(svc, roleARN, sessionName, stscreds.FetchTokenPath(filepath), optFns...)
- return credentials.NewCredentials(p), nil
-}
-
-func resolveCredsFromProfile(cfg *aws.Config,
- envCfg envConfig, sharedCfg sharedConfig,
- handlers request.Handlers,
- sessOpts Options,
-) (creds *credentials.Credentials, err error) {
-
- switch {
- case sharedCfg.SourceProfile != nil:
- // Assume IAM role with credentials source from a different profile.
- creds, err = resolveCredsFromProfile(cfg, envCfg,
- *sharedCfg.SourceProfile, handlers, sessOpts,
- )
-
- case sharedCfg.Creds.HasKeys():
- // Static Credentials from Shared Config/Credentials file.
- creds = credentials.NewStaticCredentialsFromCreds(
- sharedCfg.Creds,
- )
-
- case len(sharedCfg.CredentialSource) != 0:
- creds, err = resolveCredsFromSource(cfg, envCfg,
- sharedCfg, handlers, sessOpts,
- )
-
- case len(sharedCfg.WebIdentityTokenFile) != 0:
- // Credentials from Assume Web Identity token require an IAM Role, and
- // that roll will be assumed. May be wrapped with another assume role
- // via SourceProfile.
- return assumeWebIdentity(cfg, handlers,
- sharedCfg.WebIdentityTokenFile,
- sharedCfg.RoleARN,
- sharedCfg.RoleSessionName,
- sessOpts.CredentialsProviderOptions,
- )
-
- case sharedCfg.hasSSOConfiguration():
- creds, err = resolveSSOCredentials(cfg, sharedCfg, handlers)
-
- case len(sharedCfg.CredentialProcess) != 0:
- // Get credentials from CredentialProcess
- creds = processcreds.NewCredentials(sharedCfg.CredentialProcess)
-
- default:
- // Fallback to default credentials provider, include mock errors for
- // the credential chain so user can identify why credentials failed to
- // be retrieved.
- creds = credentials.NewCredentials(&credentials.ChainProvider{
- VerboseErrors: aws.BoolValue(cfg.CredentialsChainVerboseErrors),
- Providers: []credentials.Provider{
- &credProviderError{
- Err: awserr.New("EnvAccessKeyNotFound",
- "failed to find credentials in the environment.", nil),
- },
- &credProviderError{
- Err: awserr.New("SharedCredsLoad",
- fmt.Sprintf("failed to load profile, %s.", envCfg.Profile), nil),
- },
- defaults.RemoteCredProvider(*cfg, handlers),
- },
- })
- }
- if err != nil {
- return nil, err
- }
-
- if len(sharedCfg.RoleARN) > 0 {
- cfgCp := *cfg
- cfgCp.Credentials = creds
- return credsFromAssumeRole(cfgCp, handlers, sharedCfg, sessOpts)
- }
-
- return creds, nil
-}
-
-func resolveSSOCredentials(cfg *aws.Config, sharedCfg sharedConfig, handlers request.Handlers) (*credentials.Credentials, error) {
- if err := sharedCfg.validateSSOConfiguration(); err != nil {
- return nil, err
- }
-
- cfgCopy := cfg.Copy()
- cfgCopy.Region = &sharedCfg.SSORegion
-
- return ssocreds.NewCredentials(
- &Session{
- Config: cfgCopy,
- Handlers: handlers.Copy(),
- },
- sharedCfg.SSOAccountID,
- sharedCfg.SSORoleName,
- sharedCfg.SSOStartURL,
- ), nil
-}
-
-// valid credential source values
-const (
- credSourceEc2Metadata = "Ec2InstanceMetadata"
- credSourceEnvironment = "Environment"
- credSourceECSContainer = "EcsContainer"
-)
-
-func resolveCredsFromSource(cfg *aws.Config,
- envCfg envConfig, sharedCfg sharedConfig,
- handlers request.Handlers,
- sessOpts Options,
-) (creds *credentials.Credentials, err error) {
-
- switch sharedCfg.CredentialSource {
- case credSourceEc2Metadata:
- p := defaults.RemoteCredProvider(*cfg, handlers)
- creds = credentials.NewCredentials(p)
-
- case credSourceEnvironment:
- creds = credentials.NewStaticCredentialsFromCreds(envCfg.Creds)
-
- case credSourceECSContainer:
- if len(os.Getenv(shareddefaults.ECSCredsProviderEnvVar)) == 0 {
- return nil, ErrSharedConfigECSContainerEnvVarEmpty
- }
-
- p := defaults.RemoteCredProvider(*cfg, handlers)
- creds = credentials.NewCredentials(p)
-
- default:
- return nil, ErrSharedConfigInvalidCredSource
- }
-
- return creds, nil
-}
-
-func credsFromAssumeRole(cfg aws.Config,
- handlers request.Handlers,
- sharedCfg sharedConfig,
- sessOpts Options,
-) (*credentials.Credentials, error) {
-
- if len(sharedCfg.MFASerial) != 0 && sessOpts.AssumeRoleTokenProvider == nil {
- // AssumeRole Token provider is required if doing Assume Role
- // with MFA.
- return nil, AssumeRoleTokenProviderNotSetError{}
- }
-
- return stscreds.NewCredentials(
- &Session{
- Config: &cfg,
- Handlers: handlers.Copy(),
- },
- sharedCfg.RoleARN,
- func(opt *stscreds.AssumeRoleProvider) {
- opt.RoleSessionName = sharedCfg.RoleSessionName
-
- 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 {
- opt.ExternalID = aws.String(sharedCfg.ExternalID)
- }
-
- // Assume role with MFA
- if len(sharedCfg.MFASerial) > 0 {
- opt.SerialNumber = aws.String(sharedCfg.MFASerial)
- opt.TokenProvider = sessOpts.AssumeRoleTokenProvider
- }
- },
- ), nil
-}
-
-// AssumeRoleTokenProviderNotSetError is an error returned when creating a
-// session when the MFAToken option is not set when shared config is configured
-// load assume a role with an MFA token.
-type AssumeRoleTokenProviderNotSetError struct{}
-
-// Code is the short id of the error.
-func (e AssumeRoleTokenProviderNotSetError) Code() string {
- return "AssumeRoleTokenProviderNotSetError"
-}
-
-// Message is the description of the error
-func (e AssumeRoleTokenProviderNotSetError) Message() string {
- return fmt.Sprintf("assume role with MFA enabled, but AssumeRoleTokenProvider session option not set.")
-}
-
-// OrigErr is the underlying error that caused the failure.
-func (e AssumeRoleTokenProviderNotSetError) OrigErr() error {
- return nil
-}
-
-// Error satisfies the error interface.
-func (e AssumeRoleTokenProviderNotSetError) Error() string {
- return awserr.SprintError(e.Code(), e.Message(), "", nil)
-}
-
-type credProviderError struct {
- Err error
-}
-
-func (c credProviderError) Retrieve() (credentials.Value, error) {
- return credentials.Value{}, c.Err
-}
-func (c credProviderError) IsExpired() bool {
- return true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport.go b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport.go
deleted file mode 100644
index 4390ad52f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport.go
+++ /dev/null
@@ -1,28 +0,0 @@
-//go:build go1.13
-// +build go1.13
-
-package session
-
-import (
- "net"
- "net/http"
- "time"
-)
-
-// Transport that should be used when a custom CA bundle is specified with the
-// SDK.
-func getCustomTransport() *http.Transport {
- return &http.Transport{
- Proxy: http.ProxyFromEnvironment,
- DialContext: (&net.Dialer{
- Timeout: 30 * time.Second,
- KeepAlive: 30 * time.Second,
- DualStack: true,
- }).DialContext,
- ForceAttemptHTTP2: true,
- MaxIdleConns: 100,
- IdleConnTimeout: 90 * time.Second,
- TLSHandshakeTimeout: 10 * time.Second,
- ExpectContinueTimeout: 1 * time.Second,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.12.go b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.12.go
deleted file mode 100644
index 668565bea..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.12.go
+++ /dev/null
@@ -1,27 +0,0 @@
-//go:build !go1.13 && go1.7
-// +build !go1.13,go1.7
-
-package session
-
-import (
- "net"
- "net/http"
- "time"
-)
-
-// Transport that should be used when a custom CA bundle is specified with the
-// SDK.
-func getCustomTransport() *http.Transport {
- return &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,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.5.go b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.5.go
deleted file mode 100644
index e101aa6b6..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.5.go
+++ /dev/null
@@ -1,23 +0,0 @@
-//go:build !go1.6 && go1.5
-// +build !go1.6,go1.5
-
-package session
-
-import (
- "net"
- "net/http"
- "time"
-)
-
-// Transport that should be used when a custom CA bundle is specified with the
-// SDK.
-func getCustomTransport() *http.Transport {
- return &http.Transport{
- Proxy: http.ProxyFromEnvironment,
- Dial: (&net.Dialer{
- Timeout: 30 * time.Second,
- KeepAlive: 30 * time.Second,
- }).Dial,
- TLSHandshakeTimeout: 10 * time.Second,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.6.go b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.6.go
deleted file mode 100644
index b5fcbe0d1..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.6.go
+++ /dev/null
@@ -1,24 +0,0 @@
-//go:build !go1.7 && go1.6
-// +build !go1.7,go1.6
-
-package session
-
-import (
- "net"
- "net/http"
- "time"
-)
-
-// Transport that should be used when a custom CA bundle is specified with the
-// SDK.
-func getCustomTransport() *http.Transport {
- return &http.Transport{
- Proxy: http.ProxyFromEnvironment,
- Dial: (&net.Dialer{
- Timeout: 30 * time.Second,
- KeepAlive: 30 * time.Second,
- }).Dial,
- TLSHandshakeTimeout: 10 * time.Second,
- ExpectContinueTimeout: 1 * time.Second,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go
deleted file mode 100644
index ff3cc012a..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
-Package session provides configuration for the SDK's service clients. Sessions
-can be shared across service clients that share the same base configuration.
-
-Sessions are safe to use concurrently as long as the Session is not being
-modified. Sessions should be cached when possible, because creating a new
-Session will load all configuration values from the environment, and config
-files each time the Session is created. Sharing the Session value across all of
-your service clients will ensure the configuration is loaded the fewest number
-of times possible.
-
-Sessions options from Shared Config
-
-By default NewSession will only load credentials from the shared credentials
-file (~/.aws/credentials). If the AWS_SDK_LOAD_CONFIG environment variable is
-set to a truthy value the Session will be created from the configuration
-values from the shared config (~/.aws/config) and shared credentials
-(~/.aws/credentials) files. Using the NewSessionWithOptions with
-SharedConfigState set to SharedConfigEnable will create the session as if the
-AWS_SDK_LOAD_CONFIG environment variable was set.
-
-Credential and config loading order
-
-The Session will attempt to load configuration and credentials from the
-environment, configuration files, and other credential sources. The order
-configuration is loaded in is:
-
- * Environment Variables
- * Shared Credentials file
- * Shared Configuration file (if SharedConfig is enabled)
- * EC2 Instance Metadata (credentials only)
-
-The Environment variables for credentials will have precedence over shared
-config even if SharedConfig is enabled. To override this behavior, and use
-shared config credentials instead specify the session.Options.Profile, (e.g.
-when using credential_source=Environment to assume a role).
-
- sess, err := session.NewSessionWithOptions(session.Options{
- Profile: "myProfile",
- })
-
-Creating Sessions
-
-Creating a Session without additional options will load credentials region, and
-profile loaded from the environment and shared config automatically. See,
-"Environment Variables" section for information on environment variables used
-by Session.
-
- // Create Session
- sess, err := session.NewSession()
-
-
-When creating Sessions optional aws.Config values can be passed in that will
-override the default, or loaded, config values the Session is being created
-with. This allows you to provide additional, or case based, configuration
-as needed.
-
- // Create a Session with a custom region
- sess, err := session.NewSession(&aws.Config{
- Region: aws.String("us-west-2"),
- })
-
-Use NewSessionWithOptions to provide additional configuration driving how the
-Session's configuration will be loaded. Such as, specifying shared config
-profile, or override the shared config state, (AWS_SDK_LOAD_CONFIG).
-
- // Equivalent to session.NewSession()
- sess, err := session.NewSessionWithOptions(session.Options{
- // Options
- })
-
- sess, err := session.NewSessionWithOptions(session.Options{
- // Specify profile to load for the session's config
- Profile: "profile_name",
-
- // Provide SDK Config options, such as Region.
- Config: aws.Config{
- Region: aws.String("us-west-2"),
- },
-
- // Force enable Shared Config support
- SharedConfigState: session.SharedConfigEnable,
- })
-
-Adding Handlers
-
-You can add handlers to a session to decorate API operation, (e.g. adding HTTP
-headers). All clients that use the Session receive a copy of the Session's
-handlers. For example, the following request handler added to the Session logs
-every requests made.
-
- // Create a session, and add additional handlers for all service
- // clients created with the Session to inherit. Adds logging handler.
- sess := session.Must(session.NewSession())
-
- sess.Handlers.Send.PushFront(func(r *request.Request) {
- // Log every request made and its payload
- logger.Printf("Request: %s/%s, Params: %s",
- r.ClientInfo.ServiceName, r.Operation, r.Params)
- })
-
-Shared Config Fields
-
-By default the SDK will only load the shared credentials file's
-(~/.aws/credentials) credentials values, and all other config is provided by
-the environment variables, SDK defaults, and user provided aws.Config values.
-
-If the AWS_SDK_LOAD_CONFIG environment variable is set, or SharedConfigEnable
-option is used to create the Session the full shared config values will be
-loaded. This includes credentials, region, and support for assume role. In
-addition the Session will load its configuration from both the shared config
-file (~/.aws/config) and shared credentials file (~/.aws/credentials). Both
-files have the same format.
-
-If both config files are present the configuration from both files will be
-read. The Session will be created from configuration values from the shared
-credentials file (~/.aws/credentials) over those in the shared config file
-(~/.aws/config).
-
-Credentials are the values the SDK uses to authenticating requests with AWS
-Services. When specified in a file, both aws_access_key_id and
-aws_secret_access_key must be provided together in the same file to be
-considered valid. They will be ignored if both are not present.
-aws_session_token is an optional field that can be provided in addition to the
-other two fields.
-
- aws_access_key_id = AKID
- aws_secret_access_key = SECRET
- aws_session_token = TOKEN
-
- ; region only supported if SharedConfigEnabled.
- region = us-east-1
-
-Assume Role configuration
-
-The role_arn field allows you to configure the SDK to assume an IAM role using
-a set of credentials from another source. Such as when paired with static
-credentials, "profile_source", "credential_process", or "credential_source"
-fields. If "role_arn" is provided, a source of credentials must also be
-specified, such as "source_profile", "credential_source", or
-"credential_process".
-
- role_arn = arn:aws:iam:::role/
- source_profile = profile_with_creds
- external_id = 1234
- mfa_serial =
- role_session_name = session_name
-
-
-The SDK supports assuming a role with MFA token. If "mfa_serial" is set, you
-must also set the Session Option.AssumeRoleTokenProvider. The Session will fail
-to load if the AssumeRoleTokenProvider is not specified.
-
- sess := session.Must(session.NewSessionWithOptions(session.Options{
- AssumeRoleTokenProvider: stscreds.StdinTokenProvider,
- }))
-
-To setup Assume Role outside of a session see the stscreds.AssumeRoleProvider
-documentation.
-
-Environment Variables
-
-When a Session is created several environment variables can be set to adjust
-how the SDK functions, and what configuration data it loads when creating
-Sessions. All environment values are optional, but some values like credentials
-require multiple of the values to set or the partial values will be ignored.
-All environment variable values are strings unless otherwise noted.
-
-Environment configuration values. If set both Access Key ID and Secret Access
-Key must be provided. Session Token and optionally also be provided, but is
-not required.
-
- # Access Key ID
- AWS_ACCESS_KEY_ID=AKID
- AWS_ACCESS_KEY=AKID # only read if AWS_ACCESS_KEY_ID is not set.
-
- # Secret Access Key
- AWS_SECRET_ACCESS_KEY=SECRET
- AWS_SECRET_KEY=SECRET=SECRET # only read if AWS_SECRET_ACCESS_KEY is not set.
-
- # Session Token
- AWS_SESSION_TOKEN=TOKEN
-
-Region value will instruct the SDK where to make service API requests to. If is
-not provided in the environment the region must be provided before a service
-client request is made.
-
- AWS_REGION=us-east-1
-
- # AWS_DEFAULT_REGION is only read if AWS_SDK_LOAD_CONFIG is also set,
- # and AWS_REGION is not also set.
- AWS_DEFAULT_REGION=us-east-1
-
-Profile name the SDK should load use when loading shared config from the
-configuration files. If not provided "default" will be used as the profile name.
-
- AWS_PROFILE=my_profile
-
- # AWS_DEFAULT_PROFILE is only read if AWS_SDK_LOAD_CONFIG is also set,
- # and AWS_PROFILE is not also set.
- AWS_DEFAULT_PROFILE=my_profile
-
-SDK load config instructs the SDK to load the shared config in addition to
-shared credentials. This also expands the configuration loaded so the shared
-credentials will have parity with the shared config file. This also enables
-Region and Profile support for the AWS_DEFAULT_REGION and AWS_DEFAULT_PROFILE
-env values as well.
-
- AWS_SDK_LOAD_CONFIG=1
-
-Custom Shared Config and Credential Files
-
-Shared credentials file path can be set to instruct the SDK to use an alternative
-file for the shared credentials. If not set the file will be loaded from
-$HOME/.aws/credentials on Linux/Unix based systems, and
-%USERPROFILE%\.aws\credentials on Windows.
-
- AWS_SHARED_CREDENTIALS_FILE=$HOME/my_shared_credentials
-
-Shared config file path can be set to instruct the SDK to use an alternative
-file for the shared config. If not set the file will be loaded from
-$HOME/.aws/config on Linux/Unix based systems, and
-%USERPROFILE%\.aws\config on Windows.
-
- AWS_CONFIG_FILE=$HOME/my_shared_config
-
-Custom CA Bundle
-
-Path to a custom Credentials Authority (CA) bundle PEM file that the SDK
-will use instead of the default system's root CA bundle. Use this only
-if you want to replace the CA bundle the SDK uses for TLS requests.
-
- AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle
-
-Enabling this option will attempt to merge the Transport into the SDK's HTTP
-client. If the client's Transport is not a http.Transport an error will be
-returned. If the Transport's TLS config is set this option will cause the SDK
-to overwrite the Transport's TLS config's RootCAs value. If the CA bundle file
-contains multiple certificates all of them will be loaded.
-
-The Session option CustomCABundle is also available when creating sessions
-to also enable this feature. CustomCABundle session option field has priority
-over the AWS_CA_BUNDLE environment variable, and will be used if both are set.
-
-Setting a custom HTTPClient in the aws.Config options will override this setting.
-To use this option and custom HTTP client, the HTTP client needs to be provided
-when creating the session. Not the service client.
-
-Custom Client TLS Certificate
-
-The SDK supports the environment and session option being configured with
-Client TLS certificates that are sent as a part of the client's TLS handshake
-for client authentication. If used, both Cert and Key values are required. If
-one is missing, or either fail to load the contents of the file an error will
-be returned.
-
-HTTP Client's Transport concrete implementation must be a http.Transport
-or creating the session will fail.
-
- AWS_SDK_GO_CLIENT_TLS_KEY=$HOME/my_client_key
- AWS_SDK_GO_CLIENT_TLS_CERT=$HOME/my_client_cert
-
-This can also be configured via the session.Options ClientTLSCert and ClientTLSKey.
-
- sess, err := session.NewSessionWithOptions(session.Options{
- ClientTLSCert: myCertFile,
- ClientTLSKey: myKeyFile,
- })
-
-Custom EC2 IMDS Endpoint
-
-The endpoint of the EC2 IMDS client can be configured via the environment
-variable, AWS_EC2_METADATA_SERVICE_ENDPOINT when creating the client with a
-Session. See Options.EC2IMDSEndpoint for more details.
-
- AWS_EC2_METADATA_SERVICE_ENDPOINT=http://169.254.169.254
-
-If using an URL with an IPv6 address literal, the IPv6 address
-component must be enclosed in square brackets.
-
- AWS_EC2_METADATA_SERVICE_ENDPOINT=http://[::1]
-
-The custom EC2 IMDS endpoint can also be specified via the Session options.
-
- sess, err := session.NewSessionWithOptions(session.Options{
- EC2MetadataEndpoint: "http://[::1]",
- })
-
-FIPS and DualStack Endpoints
-
-The SDK can be configured to resolve an endpoint with certain capabilities such as FIPS and DualStack.
-
-You can configure a FIPS endpoint using an environment variable, shared config ($HOME/.aws/config),
-or programmatically.
-
-To configure a FIPS endpoint set the environment variable set the AWS_USE_FIPS_ENDPOINT to true or false to enable
-or disable FIPS endpoint resolution.
-
- AWS_USE_FIPS_ENDPOINT=true
-
-To configure a FIPS endpoint using shared config, set use_fips_endpoint to true or false to enable
-or disable FIPS endpoint resolution.
-
- [profile myprofile]
- region=us-west-2
- use_fips_endpoint=true
-
-To configure a FIPS endpoint programmatically
-
- // Option 1: Configure it on a session for all clients
- sess, err := session.NewSessionWithOptions(session.Options{
- UseFIPSEndpoint: endpoints.FIPSEndpointStateEnabled,
- })
- if err != nil {
- // handle error
- }
-
- client := s3.New(sess)
-
- // Option 2: Configure it per client
- sess, err := session.NewSession()
- if err != nil {
- // handle error
- }
-
- client := s3.New(sess, &aws.Config{
- UseFIPSEndpoint: endpoints.FIPSEndpointStateEnabled,
- })
-
-You can configure a DualStack endpoint using an environment variable, shared config ($HOME/.aws/config),
-or programmatically.
-
-To configure a DualStack endpoint set the environment variable set the AWS_USE_DUALSTACK_ENDPOINT to true or false to
-enable or disable DualStack endpoint resolution.
-
- AWS_USE_DUALSTACK_ENDPOINT=true
-
-To configure a DualStack endpoint using shared config, set use_dualstack_endpoint to true or false to enable
-or disable DualStack endpoint resolution.
-
- [profile myprofile]
- region=us-west-2
- use_dualstack_endpoint=true
-
-To configure a DualStack endpoint programmatically
-
- // Option 1: Configure it on a session for all clients
- sess, err := session.NewSessionWithOptions(session.Options{
- UseDualStackEndpoint: endpoints.DualStackEndpointStateEnabled,
- })
- if err != nil {
- // handle error
- }
-
- client := s3.New(sess)
-
- // Option 2: Configure it per client
- sess, err := session.NewSession()
- if err != nil {
- // handle error
- }
-
- client := s3.New(sess, &aws.Config{
- UseDualStackEndpoint: endpoints.DualStackEndpointStateEnabled,
- })
-*/
-package session
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
deleted file mode 100644
index d6fa24776..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
+++ /dev/null
@@ -1,471 +0,0 @@
-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.
-const EnvProviderName = "EnvConfigCredentials"
-
-// envConfig is a collection of environment values the SDK will read
-// setup config from. All environment values are optional. But some values
-// such as credentials require multiple values to be complete or the values
-// will be ignored.
-type envConfig struct {
- // Environment configuration values. If set both Access Key ID and Secret Access
- // Key must be provided. Session Token and optionally also be provided, but is
- // not required.
- //
- // # Access Key ID
- // AWS_ACCESS_KEY_ID=AKID
- // AWS_ACCESS_KEY=AKID # only read if AWS_ACCESS_KEY_ID is not set.
- //
- // # Secret Access Key
- // AWS_SECRET_ACCESS_KEY=SECRET
- // AWS_SECRET_KEY=SECRET=SECRET # only read if AWS_SECRET_ACCESS_KEY is not set.
- //
- // # Session Token
- // AWS_SESSION_TOKEN=TOKEN
- Creds credentials.Value
-
- // Region value will instruct the SDK where to make service API requests to. If is
- // not provided in the environment the region must be provided before a service
- // client request is made.
- //
- // AWS_REGION=us-east-1
- //
- // # AWS_DEFAULT_REGION is only read if AWS_SDK_LOAD_CONFIG is also set,
- // # and AWS_REGION is not also set.
- // AWS_DEFAULT_REGION=us-east-1
- Region string
-
- // Profile name the SDK should load use when loading shared configuration from the
- // shared configuration files. If not provided "default" will be used as the
- // profile name.
- //
- // AWS_PROFILE=my_profile
- //
- // # AWS_DEFAULT_PROFILE is only read if AWS_SDK_LOAD_CONFIG is also set,
- // # and AWS_PROFILE is not also set.
- // AWS_DEFAULT_PROFILE=my_profile
- Profile string
-
- // SDK load config instructs the SDK to load the shared config in addition to
- // shared credentials. This also expands the configuration loaded from the shared
- // credentials to have parity with the shared config file. This also enables
- // Region and Profile support for the AWS_DEFAULT_REGION and AWS_DEFAULT_PROFILE
- // env values as well.
- //
- // AWS_SDK_LOAD_CONFIG=1
- EnableSharedConfig bool
-
- // Shared credentials file path can be set to instruct the SDK to use an alternate
- // file for the shared credentials. If not set the file will be loaded from
- // $HOME/.aws/credentials on Linux/Unix based systems, and
- // %USERPROFILE%\.aws\credentials on Windows.
- //
- // AWS_SHARED_CREDENTIALS_FILE=$HOME/my_shared_credentials
- SharedCredentialsFile string
-
- // Shared config file path can be set to instruct the SDK to use an alternate
- // file for the shared config. If not set the file will be loaded from
- // $HOME/.aws/config on Linux/Unix based systems, and
- // %USERPROFILE%\.aws\config on Windows.
- //
- // AWS_CONFIG_FILE=$HOME/my_shared_config
- SharedConfigFile string
-
- // Sets the path to a custom Credentials Authority (CA) Bundle PEM file
- // that the SDK will use instead of the system's root CA bundle.
- // Only use this if you want to configure the SDK to use a custom set
- // of CAs.
- //
- // Enabling this option will attempt to merge the Transport
- // into the SDK's HTTP client. If the client's Transport is
- // not a http.Transport an error will be returned. If the
- // Transport's TLS config is set this option will cause the
- // SDK to overwrite the Transport's TLS config's RootCAs value.
- //
- // Setting a custom HTTPClient in the aws.Config options will override this setting.
- // To use this option and custom HTTP client, the HTTP client needs to be provided
- // when creating the session. Not the service client.
- //
- // AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle
- CustomCABundle string
-
- // Sets the TLC client certificate that should be used by the SDK's HTTP transport
- // when making requests. The certificate must be paired with a TLS client key file.
- //
- // AWS_SDK_GO_CLIENT_TLS_CERT=$HOME/my_client_cert
- ClientTLSCert string
-
- // Sets the TLC client key that should be used by the SDK's HTTP transport
- // when making requests. The key must be paired with a TLS client certificate file.
- //
- // AWS_SDK_GO_CLIENT_TLS_KEY=$HOME/my_client_key
- ClientTLSKey string
-
- csmEnabled string
- CSMEnabled *bool
- CSMPort string
- CSMHost string
- CSMClientID string
-
- // Enables endpoint discovery via environment variables.
- //
- // AWS_ENABLE_ENDPOINT_DISCOVERY=true
- EnableEndpointDiscovery *bool
- enableEndpointDiscovery string
-
- // Specifies the WebIdentity token the SDK should use to assume a role
- // with.
- //
- // AWS_WEB_IDENTITY_TOKEN_FILE=file_path
- WebIdentityTokenFilePath string
-
- // Specifies the IAM role arn to use when assuming an role.
- //
- // AWS_ROLE_ARN=role_arn
- RoleARN string
-
- // Specifies the IAM role session name to use when assuming a role.
- //
- // 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
-
- // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EC2IMDSEndpointMode.
- //
- // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://[::1]
- EC2IMDSEndpoint string
-
- // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
- //
- // AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE=IPv6
- EC2IMDSEndpointMode endpoints.EC2IMDSEndpointModeState
-
- // Specifies that SDK clients must resolve a dual-stack endpoint for
- // services.
- //
- // AWS_USE_DUALSTACK_ENDPOINT=true
- UseDualStackEndpoint endpoints.DualStackEndpointState
-
- // Specifies that SDK clients must resolve a FIPS endpoint for
- // services.
- //
- // AWS_USE_FIPS_ENDPOINT=true
- UseFIPSEndpoint endpoints.FIPSEndpointState
-}
-
-var (
- csmEnabledEnvKey = []string{
- "AWS_CSM_ENABLED",
- }
- csmHostEnvKey = []string{
- "AWS_CSM_HOST",
- }
- csmPortEnvKey = []string{
- "AWS_CSM_PORT",
- }
- csmClientIDEnvKey = []string{
- "AWS_CSM_CLIENT_ID",
- }
- credAccessEnvKey = []string{
- "AWS_ACCESS_KEY_ID",
- "AWS_ACCESS_KEY",
- }
- credSecretEnvKey = []string{
- "AWS_SECRET_ACCESS_KEY",
- "AWS_SECRET_KEY",
- }
- credSessionEnvKey = []string{
- "AWS_SESSION_TOKEN",
- }
-
- enableEndpointDiscoveryEnvKey = []string{
- "AWS_ENABLE_ENDPOINT_DISCOVERY",
- }
-
- regionEnvKeys = []string{
- "AWS_REGION",
- "AWS_DEFAULT_REGION", // Only read if AWS_SDK_LOAD_CONFIG is also set
- }
- profileEnvKeys = []string{
- "AWS_PROFILE",
- "AWS_DEFAULT_PROFILE", // Only read if AWS_SDK_LOAD_CONFIG is also set
- }
- sharedCredsFileEnvKey = []string{
- "AWS_SHARED_CREDENTIALS_FILE",
- }
- sharedConfigFileEnvKey = []string{
- "AWS_CONFIG_FILE",
- }
- webIdentityTokenFilePathEnvKey = []string{
- "AWS_WEB_IDENTITY_TOKEN_FILE",
- }
- roleARNEnvKey = []string{
- "AWS_ROLE_ARN",
- }
- 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",
- }
- ec2IMDSEndpointEnvKey = []string{
- "AWS_EC2_METADATA_SERVICE_ENDPOINT",
- }
- ec2IMDSEndpointModeEnvKey = []string{
- "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",
- }
- useCABundleKey = []string{
- "AWS_CA_BUNDLE",
- }
- useClientTLSCert = []string{
- "AWS_SDK_GO_CLIENT_TLS_CERT",
- }
- useClientTLSKey = []string{
- "AWS_SDK_GO_CLIENT_TLS_KEY",
- }
- awsUseDualStackEndpoint = []string{
- "AWS_USE_DUALSTACK_ENDPOINT",
- }
- awsUseFIPSEndpoint = []string{
- "AWS_USE_FIPS_ENDPOINT",
- }
-)
-
-// loadEnvConfig retrieves the SDK's environment configuration.
-// See `envConfig` for the values that will be retrieved.
-//
-// 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, error) {
- enableSharedConfig, _ := strconv.ParseBool(os.Getenv("AWS_SDK_LOAD_CONFIG"))
- return envConfigLoad(enableSharedConfig)
-}
-
-// loadEnvSharedConfig retrieves the SDK's environment configuration, and the
-// SDK shared config. See `envConfig` for the values that will be retrieved.
-//
-// 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, error) {
- return envConfigLoad(true)
-}
-
-func envConfigLoad(enableSharedConfig bool) (envConfig, error) {
- cfg := envConfig{}
-
- cfg.EnableSharedConfig = enableSharedConfig
-
- // Static environment credentials
- var creds credentials.Value
- setFromEnvVal(&creds.AccessKeyID, credAccessEnvKey)
- setFromEnvVal(&creds.SecretAccessKey, credSecretEnvKey)
- setFromEnvVal(&creds.SessionToken, credSessionEnvKey)
- if creds.HasKeys() {
- // Require logical grouping of credentials
- creds.ProviderName = EnvProviderName
- cfg.Creds = creds
- }
-
- // Role Metadata
- setFromEnvVal(&cfg.RoleARN, roleARNEnvKey)
- setFromEnvVal(&cfg.RoleSessionName, roleSessionNameEnvKey)
-
- // Web identity environment variables
- setFromEnvVal(&cfg.WebIdentityTokenFilePath, webIdentityTokenFilePathEnvKey)
-
- // CSM environment variables
- setFromEnvVal(&cfg.csmEnabled, csmEnabledEnvKey)
- setFromEnvVal(&cfg.CSMHost, csmHostEnvKey)
- setFromEnvVal(&cfg.CSMPort, csmPortEnvKey)
- setFromEnvVal(&cfg.CSMClientID, csmClientIDEnvKey)
-
- if len(cfg.csmEnabled) != 0 {
- v, _ := strconv.ParseBool(cfg.csmEnabled)
- cfg.CSMEnabled = &v
- }
-
- regionKeys := regionEnvKeys
- profileKeys := profileEnvKeys
- if !cfg.EnableSharedConfig {
- regionKeys = regionKeys[:1]
- profileKeys = profileKeys[:1]
- }
-
- setFromEnvVal(&cfg.Region, regionKeys)
- setFromEnvVal(&cfg.Profile, profileKeys)
-
- // endpoint discovery is in reference to it being enabled.
- setFromEnvVal(&cfg.enableEndpointDiscovery, enableEndpointDiscoveryEnvKey)
- if len(cfg.enableEndpointDiscovery) > 0 {
- cfg.EnableEndpointDiscovery = aws.Bool(cfg.enableEndpointDiscovery != "false")
- }
-
- setFromEnvVal(&cfg.SharedCredentialsFile, sharedCredsFileEnvKey)
- setFromEnvVal(&cfg.SharedConfigFile, sharedConfigFileEnvKey)
-
- if len(cfg.SharedCredentialsFile) == 0 {
- cfg.SharedCredentialsFile = defaults.SharedCredentialsFilename()
- }
- if len(cfg.SharedConfigFile) == 0 {
- cfg.SharedConfigFile = defaults.SharedConfigFilename()
- }
-
- setFromEnvVal(&cfg.CustomCABundle, useCABundleKey)
- setFromEnvVal(&cfg.ClientTLSCert, useClientTLSCert)
- setFromEnvVal(&cfg.ClientTLSKey, useClientTLSKey)
-
- 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)
- }
- }
-
- setFromEnvVal(&cfg.EC2IMDSEndpoint, ec2IMDSEndpointEnvKey)
- if err := setEC2IMDSEndpointMode(&cfg.EC2IMDSEndpointMode, ec2IMDSEndpointModeEnvKey); err != nil {
- return envConfig{}, err
- }
-
- if err := setUseDualStackEndpointFromEnvVal(&cfg.UseDualStackEndpoint, awsUseDualStackEndpoint); err != nil {
- return cfg, err
- }
-
- if err := setUseFIPSEndpointFromEnvVal(&cfg.UseFIPSEndpoint, awsUseFIPSEndpoint); err != nil {
- return cfg, err
- }
-
- return cfg, nil
-}
-
-func setFromEnvVal(dst *string, keys []string) {
- for _, k := range keys {
- if v := os.Getenv(k); len(v) != 0 {
- *dst = v
- break
- }
- }
-}
-
-func setEC2IMDSEndpointMode(mode *endpoints.EC2IMDSEndpointModeState, keys []string) error {
- for _, k := range keys {
- value := os.Getenv(k)
- if len(value) == 0 {
- continue
- }
- if err := mode.SetFromString(value); err != nil {
- return fmt.Errorf("invalid value for environment variable, %s=%s, %v", k, value, err)
- }
- return nil
- }
- return nil
-}
-
-func setUseDualStackEndpointFromEnvVal(dst *endpoints.DualStackEndpointState, keys []string) error {
- for _, k := range keys {
- value := os.Getenv(k)
- if len(value) == 0 {
- continue // skip if empty
- }
-
- switch {
- case strings.EqualFold(value, "true"):
- *dst = endpoints.DualStackEndpointStateEnabled
- case strings.EqualFold(value, "false"):
- *dst = endpoints.DualStackEndpointStateDisabled
- default:
- return fmt.Errorf(
- "invalid value for environment variable, %s=%s, need true, false",
- k, value)
- }
- }
- return nil
-}
-
-func setUseFIPSEndpointFromEnvVal(dst *endpoints.FIPSEndpointState, keys []string) error {
- for _, k := range keys {
- value := os.Getenv(k)
- if len(value) == 0 {
- continue // skip if empty
- }
-
- switch {
- case strings.EqualFold(value, "true"):
- *dst = endpoints.FIPSEndpointStateEnabled
- case strings.EqualFold(value, "false"):
- *dst = endpoints.FIPSEndpointStateDisabled
- default:
- return fmt.Errorf(
- "invalid value for environment variable, %s=%s, need true, false",
- k, value)
- }
- }
- return nil
-}
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
deleted file mode 100644
index 4293dbe10..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
+++ /dev/null
@@ -1,997 +0,0 @@
-package session
-
-import (
- "crypto/tls"
- "crypto/x509"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "os"
- "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/corehandlers"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/csm"
- "github.com/aws/aws-sdk-go/aws/defaults"
- "github.com/aws/aws-sdk-go/aws/endpoints"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-const (
- // ErrCodeSharedConfig represents an error that occurs in the shared
- // configuration logic
- ErrCodeSharedConfig = "SharedConfigErr"
-
- // ErrCodeLoadCustomCABundle error code for unable to load custom CA bundle.
- ErrCodeLoadCustomCABundle = "LoadCustomCABundleError"
-
- // ErrCodeLoadClientTLSCert error code for unable to load client TLS
- // certificate or key
- ErrCodeLoadClientTLSCert = "LoadClientTLSCertError"
-)
-
-// ErrSharedConfigSourceCollision will be returned if a section contains both
-// source_profile and credential_source
-var ErrSharedConfigSourceCollision = awserr.New(ErrCodeSharedConfig, "only one credential type may be specified per profile: source profile, credential source, credential process, web identity token, or sso", nil)
-
-// ErrSharedConfigECSContainerEnvVarEmpty will be returned if the environment
-// variables are empty and Environment was set as the credential source
-var ErrSharedConfigECSContainerEnvVarEmpty = awserr.New(ErrCodeSharedConfig, "EcsContainer was specified as the credential_source, but 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI' was not set", nil)
-
-// ErrSharedConfigInvalidCredSource will be returned if an invalid credential source was provided
-var ErrSharedConfigInvalidCredSource = awserr.New(ErrCodeSharedConfig, "credential source values must be EcsContainer, Ec2InstanceMetadata, or Environment", nil)
-
-// A Session provides a central location to create service clients from and
-// store configurations and request handlers for those services.
-//
-// Sessions are safe to create service clients concurrently, but it is not safe
-// to mutate the Session concurrently.
-//
-// The Session satisfies the service client's client.ConfigProvider.
-type Session struct {
- Config *aws.Config
- Handlers request.Handlers
-
- options Options
-}
-
-// New creates a new instance of the handlers merging in the provided configs
-// on top of the SDK's default configurations. Once the Session is created it
-// can be mutated to modify the Config or Handlers. The Session is safe to be
-// read concurrently, but it should not be written to concurrently.
-//
-// If the AWS_SDK_LOAD_CONFIG environment is set to a truthy value, the New
-// method could now encounter an error when loading the configuration. When
-// The environment variable is set, and an error occurs, New will return a
-// session that will fail all requests reporting the error that occurred while
-// loading the session. Use NewSession to get the error when creating the
-// session.
-//
-// If the AWS_SDK_LOAD_CONFIG environment variable is set to a truthy value
-// the shared config file (~/.aws/config) will also be loaded, in addition to
-// the shared credentials file (~/.aws/credentials). Values set in both the
-// shared config, and shared credentials will be taken from the shared
-// credentials file.
-//
-// Deprecated: Use NewSession functions to create sessions instead. NewSession
-// has the same functionality as New except an error can be returned when the
-// 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, envErr := loadEnvConfig()
-
- if envCfg.EnableSharedConfig {
- var cfg aws.Config
- cfg.MergeIn(cfgs...)
- s, err := NewSessionWithOptions(Options{
- Config: cfg,
- SharedConfigState: SharedConfigEnable,
- })
- if err != nil {
- // Old session.New expected all errors to be discovered when
- // a request is made, and would report the errors then. This
- // needs to be replicated if an error occurs while creating
- // the session.
- msg := "failed to create session with AWS_SDK_LOAD_CONFIG enabled. " +
- "Use session.NewSession to handle errors occurring during session creation."
-
- // Session creation failed, need to report the error and prevent
- // any requests from succeeding.
- s = &Session{Config: defaults.Config()}
- s.logDeprecatedNewSessionError(msg, err, cfgs)
- }
-
- return s
- }
-
- s := deprecatedNewSession(envCfg, 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 {
- l.Log(fmt.Sprintf("ERROR: failed to load CSM configuration, %v", err))
- }
- } else if csmCfg.Enabled {
- err := enableCSM(&s.Handlers, csmCfg, s.Config.Logger)
- if err != nil {
- msg := "failed to enable CSM"
- s.logDeprecatedNewSessionError(msg, err, cfgs)
- }
- }
-
- return s
-}
-
-// NewSession returns a new Session created from SDK defaults, config files,
-// environment, and user provided config files. Once the Session is created
-// it can be mutated to modify the Config or Handlers. The Session is safe to
-// be read concurrently, but it should not be written to concurrently.
-//
-// If the AWS_SDK_LOAD_CONFIG environment variable is set to a truthy value
-// the shared config file (~/.aws/config) will also be loaded in addition to
-// the shared credentials file (~/.aws/credentials). Values set in both the
-// shared config, and shared credentials will be taken from the shared
-// credentials file. Enabling the Shared Config will also allow the Session
-// to be built with retrieving credentials with AssumeRole set in the config.
-//
-// See the NewSessionWithOptions func for information on how to override or
-// control through code how the Session will be created, such as specifying the
-// config profile, and controlling if shared config is enabled or not.
-func NewSession(cfgs ...*aws.Config) (*Session, error) {
- opts := Options{}
- opts.Config.MergeIn(cfgs...)
-
- return NewSessionWithOptions(opts)
-}
-
-// SharedConfigState provides the ability to optionally override the state
-// of the session's creation based on the shared config being enabled or
-// disabled.
-type SharedConfigState int
-
-const (
- // SharedConfigStateFromEnv does not override any state of the
- // AWS_SDK_LOAD_CONFIG env var. It is the default value of the
- // SharedConfigState type.
- SharedConfigStateFromEnv SharedConfigState = iota
-
- // SharedConfigDisable overrides the AWS_SDK_LOAD_CONFIG env var value
- // and disables the shared config functionality.
- SharedConfigDisable
-
- // SharedConfigEnable overrides the AWS_SDK_LOAD_CONFIG env var value
- // and enables the shared config functionality.
- SharedConfigEnable
-)
-
-// Options provides the means to control how a Session is created and what
-// configuration values will be loaded.
-//
-type Options struct {
- // Provides config values for the SDK to use when creating service clients
- // and making API requests to services. Any value set in with this field
- // will override the associated value provided by the SDK defaults,
- // environment or config files where relevant.
- //
- // If not set, configuration values from from SDK defaults, environment,
- // config will be used.
- Config aws.Config
-
- // Overrides the config profile the Session should be created from. If not
- // set the value of the environment variable will be loaded (AWS_PROFILE,
- // or AWS_DEFAULT_PROFILE if the Shared Config is enabled).
- //
- // If not set and environment variables are not set the "default"
- // (DefaultSharedConfigProfile) will be used as the profile to load the
- // session config from.
- Profile string
-
- // Instructs how the Session will be created based on the AWS_SDK_LOAD_CONFIG
- // environment variable. By default a Session will be created using the
- // value provided by the AWS_SDK_LOAD_CONFIG environment variable.
- //
- // Setting this value to SharedConfigEnable or SharedConfigDisable
- // will allow you to override the AWS_SDK_LOAD_CONFIG environment variable
- // and enable or disable the shared config functionality.
- SharedConfigState SharedConfigState
-
- // Ordered list of files the session will load configuration from.
- // It will override environment variable AWS_SHARED_CREDENTIALS_FILE, AWS_CONFIG_FILE.
- SharedConfigFiles []string
-
- // When the SDK's shared config is configured to assume a role with MFA
- // this option is required in order to provide the mechanism that will
- // retrieve the MFA token. There is no default value for this field. If
- // it is not set an error will be returned when creating the session.
- //
- // This token provider will be called when ever the assumed role's
- // credentials need to be refreshed. Within the context of service clients
- // all sharing the same session the SDK will ensure calls to the token
- // provider are atomic. When sharing a token provider across multiple
- // sessions additional synchronization logic is needed to ensure the
- // token providers do not introduce race conditions. It is recommend to
- // share the session where possible.
- //
- // stscreds.StdinTokenProvider is a basic implementation that will prompt
- // from stdin for the MFA token code.
- //
- // This field is only used if the shared configuration is enabled, and
- // the config enables assume role wit MFA via the mfa_serial field.
- AssumeRoleTokenProvider func() (string, error)
-
- // When the SDK's shared config is configured to assume a role this option
- // may be provided to set the expiry duration of the STS credentials.
- // Defaults to 15 minutes if not set as documented in the
- // stscreds.AssumeRoleProvider.
- AssumeRoleDuration time.Duration
-
- // Reader for a custom Credentials Authority (CA) bundle in PEM format that
- // the SDK will use instead of the default system's root CA bundle. Use this
- // only if you want to replace the CA bundle the SDK uses for TLS requests.
- //
- // HTTP Client's Transport concrete implementation must be a http.Transport
- // or creating the session will fail.
- //
- // If the Transport's TLS config is set this option will cause the SDK
- // to overwrite the Transport's TLS config's RootCAs value. If the CA
- // bundle reader contains multiple certificates all of them will be loaded.
- //
- // Can also be specified via the environment variable:
- //
- // AWS_CA_BUNDLE=$HOME/ca_bundle
- //
- // Can also be specified via the shared config field:
- //
- // ca_bundle = $HOME/ca_bundle
- CustomCABundle io.Reader
-
- // Reader for the TLC client certificate that should be used by the SDK's
- // HTTP transport when making requests. The certificate must be paired with
- // a TLS client key file. Will be ignored if both are not provided.
- //
- // HTTP Client's Transport concrete implementation must be a http.Transport
- // or creating the session will fail.
- //
- // Can also be specified via the environment variable:
- //
- // AWS_SDK_GO_CLIENT_TLS_CERT=$HOME/my_client_cert
- ClientTLSCert io.Reader
-
- // Reader for the TLC client key that should be used by the SDK's HTTP
- // transport when making requests. The key must be paired with a TLS client
- // certificate file. Will be ignored if both are not provided.
- //
- // HTTP Client's Transport concrete implementation must be a http.Transport
- // or creating the session will fail.
- //
- // Can also be specified via the environment variable:
- //
- // AWS_SDK_GO_CLIENT_TLS_KEY=$HOME/my_client_key
- ClientTLSKey io.Reader
-
- // The handlers that the session and all API clients will be created with.
- // This must be a complete set of handlers. Use the defaults.Handlers()
- // function to initialize this value before changing the handlers to be
- // used by the SDK.
- Handlers request.Handlers
-
- // Allows specifying a custom endpoint to be used by the EC2 IMDS client
- // when making requests to the EC2 IMDS API. The endpoint value should
- // include the URI scheme. If the scheme is not present it will be defaulted to http.
- //
- // If unset, will the EC2 IMDS client will use its default endpoint.
- //
- // Can also be specified via the environment variable,
- // AWS_EC2_METADATA_SERVICE_ENDPOINT.
- //
- // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://169.254.169.254
- //
- // If using an URL with an IPv6 address literal, the IPv6 address
- // component must be enclosed in square brackets.
- //
- // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://[::1]
- EC2IMDSEndpoint string
-
- // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
- //
- // AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE=IPv6
- EC2IMDSEndpointMode endpoints.EC2IMDSEndpointModeState
-
- // Specifies options for creating credential providers.
- // These are only used if the aws.Config does not already
- // include credentials.
- CredentialsProviderOptions *CredentialsProviderOptions
-}
-
-// NewSessionWithOptions returns a new Session created from SDK defaults, config files,
-// environment, and user provided config files. This func uses the Options
-// values to configure how the Session is created.
-//
-// If the AWS_SDK_LOAD_CONFIG environment variable is set to a truthy value
-// the shared config file (~/.aws/config) will also be loaded in addition to
-// the shared credentials file (~/.aws/credentials). Values set in both the
-// shared config, and shared credentials will be taken from the shared
-// credentials file. Enabling the Shared Config will also allow the Session
-// to be built with retrieving credentials with AssumeRole set in the config.
-//
-// // Equivalent to session.New
-// sess := session.Must(session.NewSessionWithOptions(session.Options{}))
-//
-// // Specify profile to load for the session's config
-// sess := session.Must(session.NewSessionWithOptions(session.Options{
-// Profile: "profile_name",
-// }))
-//
-// // Specify profile for config and region for requests
-// sess := session.Must(session.NewSessionWithOptions(session.Options{
-// Config: aws.Config{Region: aws.String("us-east-1")},
-// Profile: "profile_name",
-// }))
-//
-// // Force enable Shared Config support
-// sess := session.Must(session.NewSessionWithOptions(session.Options{
-// SharedConfigState: session.SharedConfigEnable,
-// }))
-func NewSessionWithOptions(opts Options) (*Session, error) {
- var envCfg envConfig
- var err error
- if opts.SharedConfigState == SharedConfigEnable {
- envCfg, err = loadSharedEnvConfig()
- if err != nil {
- return nil, fmt.Errorf("failed to load shared config, %v", err)
- }
- } else {
- envCfg, err = loadEnvConfig()
- if err != nil {
- return nil, fmt.Errorf("failed to load environment config, %v", err)
- }
- }
-
- if len(opts.Profile) != 0 {
- envCfg.Profile = opts.Profile
- }
-
- switch opts.SharedConfigState {
- case SharedConfigDisable:
- envCfg.EnableSharedConfig = false
- case SharedConfigEnable:
- envCfg.EnableSharedConfig = true
- }
-
- return newSession(opts, envCfg, &opts.Config)
-}
-
-// Must is a helper function to ensure the Session is valid and there was no
-// error when calling a NewSession function.
-//
-// This helper is intended to be used in variable initialization to load the
-// Session and configuration at startup. Such as:
-//
-// var sess = session.Must(session.NewSession())
-func Must(sess *Session, err error) *Session {
- if err != nil {
- panic(err)
- }
-
- return sess
-}
-
-// Wraps the endpoint resolver with a resolver that will return a custom
-// endpoint for EC2 IMDS.
-func wrapEC2IMDSEndpoint(resolver endpoints.Resolver, endpoint string, mode endpoints.EC2IMDSEndpointModeState) endpoints.Resolver {
- return endpoints.ResolverFunc(
- func(service, region string, opts ...func(*endpoints.Options)) (
- endpoints.ResolvedEndpoint, error,
- ) {
- if service == ec2MetadataServiceID && len(endpoint) > 0 {
- return endpoints.ResolvedEndpoint{
- URL: endpoint,
- SigningName: ec2MetadataServiceID,
- SigningRegion: region,
- }, nil
- } else if service == ec2MetadataServiceID {
- opts = append(opts, func(o *endpoints.Options) {
- o.EC2MetadataEndpointMode = mode
- })
- }
- return resolver.EndpointFor(service, region, opts...)
- })
-}
-
-func deprecatedNewSession(envCfg envConfig, cfgs ...*aws.Config) *Session {
- cfg := defaults.Config()
- handlers := defaults.Handlers()
-
- // Apply the passed in configs so the configuration can be applied to the
- // default credential chain
- cfg.MergeIn(cfgs...)
- if cfg.EndpointResolver == nil {
- // An endpoint resolver is required for a session to be able to provide
- // endpoints for service client configurations.
- cfg.EndpointResolver = endpoints.DefaultResolver()
- }
-
- if !(len(envCfg.EC2IMDSEndpoint) == 0 && envCfg.EC2IMDSEndpointMode == endpoints.EC2IMDSEndpointModeStateUnset) {
- cfg.EndpointResolver = wrapEC2IMDSEndpoint(cfg.EndpointResolver, envCfg.EC2IMDSEndpoint, envCfg.EC2IMDSEndpointMode)
- }
-
- cfg.Credentials = defaults.CredChain(cfg, handlers)
-
- // Reapply any passed in configs to override credentials if set
- cfg.MergeIn(cfgs...)
-
- s := &Session{
- Config: cfg,
- Handlers: handlers,
- options: Options{
- EC2IMDSEndpoint: envCfg.EC2IMDSEndpoint,
- },
- }
-
- initHandlers(s)
- return s
-}
-
-func enableCSM(handlers *request.Handlers, cfg csmConfig, logger aws.Logger) error {
- if logger != nil {
- logger.Log("Enabling CSM")
- }
-
- r, err := csm.Start(cfg.ClientID, csm.AddressWithDefaults(cfg.Host, cfg.Port))
- if err != nil {
- return err
- }
- r.InjectHandlers(handlers)
-
- return nil
-}
-
-func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, error) {
- cfg := defaults.Config()
-
- handlers := opts.Handlers
- if handlers.IsEmpty() {
- handlers = defaults.Handlers()
- }
-
- // Get a merged version of the user provided config to determine if
- // credentials were.
- userCfg := &aws.Config{}
- userCfg.MergeIn(cfgs...)
- cfg.MergeIn(userCfg)
-
- // Ordered config files will be loaded in with later files overwriting
- // previous config file values.
- var cfgFiles []string
- if opts.SharedConfigFiles != nil {
- cfgFiles = opts.SharedConfigFiles
- } else {
- cfgFiles = []string{envCfg.SharedConfigFile, envCfg.SharedCredentialsFile}
- if !envCfg.EnableSharedConfig {
- // The shared config file (~/.aws/config) is only loaded if instructed
- // to load via the envConfig.EnableSharedConfig (AWS_SDK_LOAD_CONFIG).
- cfgFiles = cfgFiles[1:]
- }
- }
-
- // Load additional config from file(s)
- sharedCfg, err := loadSharedConfig(envCfg.Profile, cfgFiles, envCfg.EnableSharedConfig)
- if err != nil {
- if len(envCfg.Profile) == 0 && !envCfg.EnableSharedConfig && (envCfg.Creds.HasKeys() || userCfg.Credentials != nil) {
- // Special case where the user has not explicitly specified an AWS_PROFILE,
- // or session.Options.profile, shared config is not enabled, and the
- // environment has credentials, allow the shared config file to fail to
- // load since the user has already provided credentials, and nothing else
- // is required to be read file. Github(aws/aws-sdk-go#2455)
- } else if _, ok := err.(SharedConfigProfileNotExistsError); !ok {
- return nil, err
- }
- }
-
- if err := mergeConfigSrcs(cfg, userCfg, envCfg, sharedCfg, handlers, opts); err != nil {
- return nil, err
- }
-
- if err := setTLSOptions(&opts, cfg, envCfg, sharedCfg); err != nil {
- return nil, err
- }
-
- s := &Session{
- Config: cfg,
- Handlers: handlers,
- options: opts,
- }
-
- initHandlers(s)
-
- if csmCfg, err := loadCSMConfig(envCfg, cfgFiles); err != nil {
- if l := s.Config.Logger; l != nil {
- l.Log(fmt.Sprintf("ERROR: failed to load CSM configuration, %v", err))
- }
- } else if csmCfg.Enabled {
- err = enableCSM(&s.Handlers, csmCfg, s.Config.Logger)
- if err != nil {
- return nil, err
- }
- }
-
- return s, nil
-}
-
-type csmConfig struct {
- Enabled bool
- Host string
- Port string
- ClientID string
-}
-
-var csmProfileName = "aws_csm"
-
-func loadCSMConfig(envCfg envConfig, cfgFiles []string) (csmConfig, error) {
- if envCfg.CSMEnabled != nil {
- if *envCfg.CSMEnabled {
- return csmConfig{
- Enabled: true,
- ClientID: envCfg.CSMClientID,
- Host: envCfg.CSMHost,
- Port: envCfg.CSMPort,
- }, nil
- }
- return csmConfig{}, nil
- }
-
- sharedCfg, err := loadSharedConfig(csmProfileName, cfgFiles, false)
- if err != nil {
- if _, ok := err.(SharedConfigProfileNotExistsError); !ok {
- return csmConfig{}, err
- }
- }
- if sharedCfg.CSMEnabled != nil && *sharedCfg.CSMEnabled == true {
- return csmConfig{
- Enabled: true,
- ClientID: sharedCfg.CSMClientID,
- Host: sharedCfg.CSMHost,
- Port: sharedCfg.CSMPort,
- }, nil
- }
-
- return csmConfig{}, nil
-}
-
-func setTLSOptions(opts *Options, cfg *aws.Config, envCfg envConfig, sharedCfg sharedConfig) error {
- // CA Bundle can be specified in both environment variable shared config file.
- var caBundleFilename = envCfg.CustomCABundle
- if len(caBundleFilename) == 0 {
- caBundleFilename = sharedCfg.CustomCABundle
- }
-
- // Only use environment value if session option is not provided.
- customTLSOptions := map[string]struct {
- filename string
- field *io.Reader
- errCode string
- }{
- "custom CA bundle PEM": {filename: caBundleFilename, field: &opts.CustomCABundle, errCode: ErrCodeLoadCustomCABundle},
- "custom client TLS cert": {filename: envCfg.ClientTLSCert, field: &opts.ClientTLSCert, errCode: ErrCodeLoadClientTLSCert},
- "custom client TLS key": {filename: envCfg.ClientTLSKey, field: &opts.ClientTLSKey, errCode: ErrCodeLoadClientTLSCert},
- }
- for name, v := range customTLSOptions {
- if len(v.filename) != 0 && *v.field == nil {
- f, err := os.Open(v.filename)
- if err != nil {
- return awserr.New(v.errCode, fmt.Sprintf("failed to open %s file", name), err)
- }
- defer f.Close()
- *v.field = f
- }
- }
-
- // Setup HTTP client with custom cert bundle if enabled
- if opts.CustomCABundle != nil {
- if err := loadCustomCABundle(cfg.HTTPClient, opts.CustomCABundle); err != nil {
- return err
- }
- }
-
- // Setup HTTP client TLS certificate and key for client TLS authentication.
- if opts.ClientTLSCert != nil && opts.ClientTLSKey != nil {
- if err := loadClientTLSCert(cfg.HTTPClient, opts.ClientTLSCert, opts.ClientTLSKey); err != nil {
- return err
- }
- } else if opts.ClientTLSCert == nil && opts.ClientTLSKey == nil {
- // Do nothing if neither values are available.
-
- } else {
- return awserr.New(ErrCodeLoadClientTLSCert,
- fmt.Sprintf("client TLS cert(%t) and key(%t) must both be provided",
- opts.ClientTLSCert != nil, opts.ClientTLSKey != nil), nil)
- }
-
- return nil
-}
-
-func getHTTPTransport(client *http.Client) (*http.Transport, error) {
- var t *http.Transport
- switch v := client.Transport.(type) {
- case *http.Transport:
- t = v
- default:
- if client.Transport != nil {
- return nil, fmt.Errorf("unsupported transport, %T", client.Transport)
- }
- }
- if t == nil {
- // Nil transport implies `http.DefaultTransport` should be used. Since
- // the SDK cannot modify, nor copy the `DefaultTransport` specifying
- // the values the next closest behavior.
- t = getCustomTransport()
- }
-
- return t, nil
-}
-
-func loadCustomCABundle(client *http.Client, bundle io.Reader) error {
- t, err := getHTTPTransport(client)
- if err != nil {
- return awserr.New(ErrCodeLoadCustomCABundle,
- "unable to load custom CA bundle, HTTPClient's transport unsupported type", err)
- }
-
- p, err := loadCertPool(bundle)
- if err != nil {
- return err
- }
- if t.TLSClientConfig == nil {
- t.TLSClientConfig = &tls.Config{}
- }
- t.TLSClientConfig.RootCAs = p
-
- client.Transport = t
-
- return nil
-}
-
-func loadCertPool(r io.Reader) (*x509.CertPool, error) {
- b, err := ioutil.ReadAll(r)
- if err != nil {
- return nil, awserr.New(ErrCodeLoadCustomCABundle,
- "failed to read custom CA bundle PEM file", err)
- }
-
- p := x509.NewCertPool()
- if !p.AppendCertsFromPEM(b) {
- return nil, awserr.New(ErrCodeLoadCustomCABundle,
- "failed to load custom CA bundle PEM file", err)
- }
-
- return p, nil
-}
-
-func loadClientTLSCert(client *http.Client, certFile, keyFile io.Reader) error {
- t, err := getHTTPTransport(client)
- if err != nil {
- return awserr.New(ErrCodeLoadClientTLSCert,
- "unable to get usable HTTP transport from client", err)
- }
-
- cert, err := ioutil.ReadAll(certFile)
- if err != nil {
- return awserr.New(ErrCodeLoadClientTLSCert,
- "unable to get read client TLS cert file", err)
- }
-
- key, err := ioutil.ReadAll(keyFile)
- if err != nil {
- return awserr.New(ErrCodeLoadClientTLSCert,
- "unable to get read client TLS key file", err)
- }
-
- clientCert, err := tls.X509KeyPair(cert, key)
- if err != nil {
- return awserr.New(ErrCodeLoadClientTLSCert,
- "unable to load x509 key pair from client cert", err)
- }
-
- tlsCfg := t.TLSClientConfig
- if tlsCfg == nil {
- tlsCfg = &tls.Config{}
- }
-
- tlsCfg.Certificates = append(tlsCfg.Certificates, clientCert)
-
- t.TLSClientConfig = tlsCfg
- client.Transport = t
-
- return nil
-}
-
-func mergeConfigSrcs(cfg, userCfg *aws.Config,
- envCfg envConfig, sharedCfg sharedConfig,
- handlers request.Handlers,
- sessOpts Options,
-) error {
-
- // Region if not already set by user
- if len(aws.StringValue(cfg.Region)) == 0 {
- if len(envCfg.Region) > 0 {
- cfg.WithRegion(envCfg.Region)
- } else if envCfg.EnableSharedConfig && len(sharedCfg.Region) > 0 {
- cfg.WithRegion(sharedCfg.Region)
- }
- }
-
- if cfg.EnableEndpointDiscovery == nil {
- if envCfg.EnableEndpointDiscovery != nil {
- cfg.WithEndpointDiscovery(*envCfg.EnableEndpointDiscovery)
- } else if envCfg.EnableSharedConfig && sharedCfg.EnableEndpointDiscovery != nil {
- cfg.WithEndpointDiscovery(*sharedCfg.EnableEndpointDiscovery)
- }
- }
-
- // 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,
- })
-
- var ec2IMDSEndpoint string
- for _, v := range []string{
- sessOpts.EC2IMDSEndpoint,
- envCfg.EC2IMDSEndpoint,
- sharedCfg.EC2IMDSEndpoint,
- } {
- if len(v) != 0 {
- ec2IMDSEndpoint = v
- break
- }
- }
-
- var endpointMode endpoints.EC2IMDSEndpointModeState
- for _, v := range []endpoints.EC2IMDSEndpointModeState{
- sessOpts.EC2IMDSEndpointMode,
- envCfg.EC2IMDSEndpointMode,
- sharedCfg.EC2IMDSEndpointMode,
- } {
- if v != endpoints.EC2IMDSEndpointModeStateUnset {
- endpointMode = v
- break
- }
- }
-
- if len(ec2IMDSEndpoint) != 0 || endpointMode != endpoints.EC2IMDSEndpointModeStateUnset {
- cfg.EndpointResolver = wrapEC2IMDSEndpoint(cfg.EndpointResolver, ec2IMDSEndpoint, endpointMode)
- }
-
- // Configure credentials if not already set by the user when creating the
- // Session.
- if cfg.Credentials == credentials.AnonymousCredentials && userCfg.Credentials == nil {
- creds, err := resolveCredentials(cfg, envCfg, sharedCfg, handlers, sessOpts)
- if err != nil {
- return err
- }
- cfg.Credentials = creds
- }
-
- cfg.S3UseARNRegion = userCfg.S3UseARNRegion
- if cfg.S3UseARNRegion == nil {
- cfg.S3UseARNRegion = &envCfg.S3UseARNRegion
- }
- if cfg.S3UseARNRegion == nil {
- cfg.S3UseARNRegion = &sharedCfg.S3UseARNRegion
- }
-
- for _, v := range []endpoints.DualStackEndpointState{userCfg.UseDualStackEndpoint, envCfg.UseDualStackEndpoint, sharedCfg.UseDualStackEndpoint} {
- if v != endpoints.DualStackEndpointStateUnset {
- cfg.UseDualStackEndpoint = v
- break
- }
- }
-
- for _, v := range []endpoints.FIPSEndpointState{userCfg.UseFIPSEndpoint, envCfg.UseFIPSEndpoint, sharedCfg.UseFIPSEndpoint} {
- if v != endpoints.FIPSEndpointStateUnset {
- cfg.UseFIPSEndpoint = v
- break
- }
- }
-
- 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)
- if !aws.BoolValue(s.Config.DisableParamValidation) {
- s.Handlers.Validate.PushBackNamed(corehandlers.ValidateParametersHandler)
- }
-}
-
-// Copy creates and returns a copy of the current Session, copying the config
-// and handlers. If any additional configs are provided they will be merged
-// on top of the Session's copied config.
-//
-// // Create a copy of the current Session, configured for the us-west-2 region.
-// sess.Copy(&aws.Config{Region: aws.String("us-west-2")})
-func (s *Session) Copy(cfgs ...*aws.Config) *Session {
- newSession := &Session{
- Config: s.Config.Copy(cfgs...),
- Handlers: s.Handlers.Copy(),
- options: s.options,
- }
-
- initHandlers(newSession)
-
- return newSession
-}
-
-// 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(service string, cfgs ...*aws.Config) client.Config {
- s = s.Copy(cfgs...)
-
- resolvedRegion := normalizeRegion(s.Config)
-
- region := aws.StringValue(s.Config.Region)
- resolved, err := s.resolveEndpoint(service, region, resolvedRegion, 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,
- ResolvedRegion: resolvedRegion,
- }
-}
-
-const ec2MetadataServiceID = "ec2metadata"
-
-func (s *Session) resolveEndpoint(service, region, resolvedRegion 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)
- opt.UseDualStackEndpoint = cfg.UseDualStackEndpoint
-
- opt.UseFIPSEndpoint = cfg.UseFIPSEndpoint
-
- // 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
-
- opt.ResolvedRegion = resolvedRegion
-
- opt.Logger = cfg.Logger
- opt.LogDeprecated = cfg.LogLevel.Matches(aws.LogDebugWithDeprecated)
- },
- )
- if err != nil {
- return endpoints.ResolvedEndpoint{}, err
- }
-
- return resolved, nil
-}
-
-// ClientConfigNoResolveEndpoint is the same as ClientConfig with the exception
-// that the EndpointResolver will not be used to resolve the endpoint. The only
-// endpoint set must come from the aws.Config.Endpoint field.
-func (s *Session) ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) client.Config {
- s = s.Copy(cfgs...)
-
- resolvedRegion := normalizeRegion(s.Config)
-
- var resolved endpoints.ResolvedEndpoint
- if ep := aws.StringValue(s.Config.Endpoint); len(ep) > 0 {
- resolved.URL = endpoints.AddScheme(ep, aws.BoolValue(s.Config.DisableSSL))
- resolved.SigningRegion = aws.StringValue(s.Config.Region)
- }
-
- return client.Config{
- Config: s.Config,
- Handlers: s.Handlers,
- Endpoint: resolved.URL,
- SigningRegion: resolved.SigningRegion,
- SigningNameDerived: resolved.SigningNameDerived,
- SigningName: resolved.SigningName,
- ResolvedRegion: resolvedRegion,
- }
-}
-
-// 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
- })
-}
-
-// normalizeRegion resolves / normalizes the configured region (converts pseudo fips regions), and modifies the provided
-// config to have the equivalent options for resolution and returns the resolved region name.
-func normalizeRegion(cfg *aws.Config) (resolved string) {
- const fipsInfix = "-fips-"
- const fipsPrefix = "-fips"
- const fipsSuffix = "fips-"
-
- region := aws.StringValue(cfg.Region)
-
- if strings.Contains(region, fipsInfix) ||
- strings.Contains(region, fipsPrefix) ||
- strings.Contains(region, fipsSuffix) {
- resolved = strings.Replace(strings.Replace(strings.Replace(
- region, fipsInfix, "-", -1), fipsPrefix, "", -1), fipsSuffix, "", -1)
- cfg.UseFIPSEndpoint = endpoints.FIPSEndpointStateEnabled
- }
-
- return resolved
-}
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
deleted file mode 100644
index 424c82b4d..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
+++ /dev/null
@@ -1,729 +0,0 @@
-package session
-
-import (
- "fmt"
- "strings"
- "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"
-)
-
-const (
- // Static Credentials group
- accessKeyIDKey = `aws_access_key_id` // group required
- secretAccessKey = `aws_secret_access_key` // group required
- 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
- roleDurationSecondsKey = "duration_seconds" // optional
-
- // AWS Single Sign-On (AWS SSO) group
- ssoAccountIDKey = "sso_account_id"
- ssoRegionKey = "sso_region"
- ssoRoleNameKey = "sso_role_name"
- ssoStartURL = "sso_start_url"
-
- // CSM options
- csmEnabledKey = `csm_enabled`
- csmHostKey = `csm_host`
- csmPortKey = `csm_port`
- csmClientIDKey = `csm_client_id`
-
- // Additional Config fields
- regionKey = `region`
-
- // custom CA Bundle filename
- customCABundleKey = `ca_bundle`
-
- // endpoint discovery group
- enableEndpointDiscoveryKey = `endpoint_discovery_enabled` // optional
-
- // External Credential Process
- credentialProcessKey = `credential_process` // optional
-
- // 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"
-
- // EC2 IMDS Endpoint Mode
- ec2MetadataServiceEndpointModeKey = "ec2_metadata_service_endpoint_mode"
-
- // EC2 IMDS Endpoint
- ec2MetadataServiceEndpointKey = "ec2_metadata_service_endpoint"
-
- // Use DualStack Endpoint Resolution
- useDualStackEndpoint = "use_dualstack_endpoint"
-
- // Use FIPS Endpoint Resolution
- useFIPSEndpointKey = "use_fips_endpoint"
-)
-
-// sharedConfig represents the configuration fields of the SDK config files.
-type sharedConfig struct {
- Profile string
-
- // Credentials values from the config file. Both aws_access_key_id and
- // aws_secret_access_key must be provided together in the same file to be
- // considered valid. The values will be ignored if not a complete group.
- // aws_session_token is an optional field that can be provided if both of
- // the other two fields are also provided.
- //
- // aws_access_key_id
- // aws_secret_access_key
- // aws_session_token
- Creds credentials.Value
-
- CredentialSource string
- CredentialProcess string
- WebIdentityTokenFile string
-
- SSOAccountID string
- SSORegion string
- SSORoleName string
- SSOStartURL string
-
- RoleARN string
- RoleSessionName string
- ExternalID string
- MFASerial string
- AssumeRoleDuration *time.Duration
-
- SourceProfileName string
- SourceProfile *sharedConfig
-
- // Region is the region the SDK should use for looking up AWS service
- // endpoints and signing requests.
- //
- // region
- Region string
-
- // CustomCABundle is the file path to a PEM file the SDK will read and
- // use to configure the HTTP transport with additional CA certs that are
- // not present in the platforms default CA store.
- //
- // This value will be ignored if the file does not exist.
- //
- // ca_bundle
- CustomCABundle string
-
- // EnableEndpointDiscovery can be enabled in the shared config by setting
- // endpoint_discovery_enabled to true
- //
- // endpoint_discovery_enabled = true
- EnableEndpointDiscovery *bool
-
- // CSM Options
- CSMEnabled *bool
- 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
-
- // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
- //
- // ec2_metadata_service_endpoint_mode=IPv6
- EC2IMDSEndpointMode endpoints.EC2IMDSEndpointModeState
-
- // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EC2IMDSEndpointMode.
- //
- // ec2_metadata_service_endpoint=http://fd00:ec2::254
- EC2IMDSEndpoint string
-
- // Specifies that SDK clients must resolve a dual-stack endpoint for
- // services.
- //
- // use_dualstack_endpoint=true
- UseDualStackEndpoint endpoints.DualStackEndpointState
-
- // Specifies that SDK clients must resolve a FIPS endpoint for
- // services.
- //
- // use_fips_endpoint=true
- UseFIPSEndpoint endpoints.FIPSEndpointState
-}
-
-type sharedConfigFile struct {
- Filename string
- IniData ini.Sections
-}
-
-// loadSharedConfig retrieves the configuration from the list of files using
-// the profile provided. The order the files are listed will determine
-// precedence. Values in subsequent files will overwrite values defined in
-// earlier files.
-//
-// For example, given two files A and B. Both define credentials. If the order
-// of the files are A then B, B's credential values will be used instead of
-// A's.
-//
-// See sharedConfig.setFromFile for information how the config files
-// will be loaded.
-func loadSharedConfig(profile string, filenames []string, exOpts bool) (sharedConfig, error) {
- if len(profile) == 0 {
- profile = DefaultSharedConfigProfile
- }
-
- files, err := loadSharedConfigIniFiles(filenames)
- if err != nil {
- return sharedConfig{}, err
- }
-
- cfg := sharedConfig{}
- profiles := map[string]struct{}{}
- if err = cfg.setFromIniFiles(profiles, profile, files, exOpts); err != nil {
- return sharedConfig{}, err
- }
-
- return cfg, nil
-}
-
-func loadSharedConfigIniFiles(filenames []string) ([]sharedConfigFile, error) {
- files := make([]sharedConfigFile, 0, len(filenames))
-
- for _, filename := range filenames {
- sections, err := ini.OpenFile(filename)
- if aerr, ok := err.(awserr.Error); ok && aerr.Code() == ini.ErrCodeUnableToReadFile {
- // Skip files which can't be opened and read for whatever reason
- continue
- } else if err != nil {
- return nil, SharedConfigLoadError{Filename: filename, Err: err}
- }
-
- files = append(files, sharedConfigFile{
- Filename: filename, IniData: sections,
- })
- }
-
- return files, nil
-}
-
-func (cfg *sharedConfig) setFromIniFiles(profiles map[string]struct{}, profile string, files []sharedConfigFile, exOpts bool) error {
- cfg.Profile = profile
-
- // Trim files from the list that don't exist.
- var skippedFiles int
- var profileNotFoundErr error
- for _, f := range files {
- if err := cfg.setFromIniFile(profile, f, exOpts); err != nil {
- if _, ok := err.(SharedConfigProfileNotExistsError); ok {
- // Ignore profiles not defined in individual files.
- profileNotFoundErr = err
- skippedFiles++
- continue
- }
- return err
- }
- }
- if skippedFiles == len(files) {
- // If all files were skipped because the profile is not found, return
- // the original profile not found error.
- return profileNotFoundErr
- }
-
- if _, ok := profiles[profile]; ok {
- // if this is the second instance of the profile the Assume Role
- // options must be cleared because they are only valid for the
- // first reference of a profile. The self linked instance of the
- // profile only have credential provider options.
- cfg.clearAssumeRoleOptions()
- } else {
- // First time a profile has been seen, It must either be a assume role
- // credentials, or SSO. Assert if the credential type requires a role ARN,
- // the ARN is also set, or validate that the SSO configuration is complete.
- if err := cfg.validateCredentialsConfig(profile); err != nil {
- return err
- }
- }
- profiles[profile] = struct{}{}
-
- if err := cfg.validateCredentialType(); err != nil {
- return err
- }
-
- // Link source profiles for assume roles
- if len(cfg.SourceProfileName) != 0 {
- // Linked profile via source_profile ignore credential provider
- // options, the source profile must provide the credentials.
- cfg.clearCredentialOptions()
-
- srcCfg := &sharedConfig{}
- err := srcCfg.setFromIniFiles(profiles, cfg.SourceProfileName, files, exOpts)
- if err != nil {
- // SourceProfile that doesn't exist is an error in configuration.
- if _, ok := err.(SharedConfigProfileNotExistsError); ok {
- err = SharedConfigAssumeRoleError{
- RoleARN: cfg.RoleARN,
- SourceProfile: cfg.SourceProfileName,
- }
- }
- return err
- }
-
- if !srcCfg.hasCredentials() {
- return SharedConfigAssumeRoleError{
- RoleARN: cfg.RoleARN,
- SourceProfile: cfg.SourceProfileName,
- }
- }
-
- cfg.SourceProfile = srcCfg
- }
-
- return nil
-}
-
-// setFromFile loads the configuration from the file using the profile
-// provided. A sharedConfig pointer type value is used so that multiple config
-// file loadings can be chained.
-//
-// Only loads complete logically grouped values, and will not set fields in cfg
-// for incomplete grouped values in the config. Such as credentials. For
-// example if a config file only includes aws_access_key_id but no
-// aws_secret_access_key the aws_access_key_id will be ignored.
-func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile, exOpts bool) error {
- section, ok := file.IniData.GetSection(profile)
- if !ok {
- // Fallback to to alternate profile name: profile
- section, ok = file.IniData.GetSection(fmt.Sprintf("profile %s", profile))
- if !ok {
- return SharedConfigProfileNotExistsError{Profile: profile, Err: nil}
- }
- }
-
- if exOpts {
- // Assume Role Parameters
- updateString(&cfg.RoleARN, section, roleArnKey)
- updateString(&cfg.ExternalID, section, externalIDKey)
- updateString(&cfg.MFASerial, section, mfaSerialKey)
- updateString(&cfg.RoleSessionName, section, roleSessionNameKey)
- updateString(&cfg.SourceProfileName, section, sourceProfileKey)
- updateString(&cfg.CredentialSource, section, credentialSourceKey)
- updateString(&cfg.Region, section, regionKey)
- updateString(&cfg.CustomCABundle, section, customCABundleKey)
-
- 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
- }
-
- // AWS Single Sign-On (AWS SSO)
- updateString(&cfg.SSOAccountID, section, ssoAccountIDKey)
- updateString(&cfg.SSORegion, section, ssoRegionKey)
- updateString(&cfg.SSORoleName, section, ssoRoleNameKey)
- updateString(&cfg.SSOStartURL, section, ssoStartURL)
-
- if err := updateEC2MetadataServiceEndpointMode(&cfg.EC2IMDSEndpointMode, section, ec2MetadataServiceEndpointModeKey); err != nil {
- return fmt.Errorf("failed to load %s from shared config, %s, %v",
- ec2MetadataServiceEndpointModeKey, file.Filename, err)
- }
- updateString(&cfg.EC2IMDSEndpoint, section, ec2MetadataServiceEndpointKey)
-
- updateUseDualStackEndpoint(&cfg.UseDualStackEndpoint, section, useDualStackEndpoint)
-
- updateUseFIPSEndpoint(&cfg.UseFIPSEndpoint, section, useFIPSEndpointKey)
- }
-
- updateString(&cfg.CredentialProcess, section, credentialProcessKey)
- updateString(&cfg.WebIdentityTokenFile, section, webIdentityTokenFileKey)
-
- // Shared Credentials
- creds := credentials.Value{
- AccessKeyID: section.String(accessKeyIDKey),
- SecretAccessKey: section.String(secretAccessKey),
- SessionToken: section.String(sessionTokenKey),
- ProviderName: fmt.Sprintf("SharedConfigCredentials: %s", file.Filename),
- }
- if creds.HasKeys() {
- cfg.Creds = creds
- }
-
- // Endpoint discovery
- updateBoolPtr(&cfg.EnableEndpointDiscovery, section, enableEndpointDiscoveryKey)
-
- // CSM options
- updateBoolPtr(&cfg.CSMEnabled, section, csmEnabledKey)
- updateString(&cfg.CSMHost, section, csmHostKey)
- updateString(&cfg.CSMPort, section, csmPortKey)
- updateString(&cfg.CSMClientID, section, csmClientIDKey)
-
- updateBool(&cfg.S3UseARNRegion, section, s3UseARNRegionKey)
-
- return nil
-}
-
-func updateEC2MetadataServiceEndpointMode(endpointMode *endpoints.EC2IMDSEndpointModeState, section ini.Section, key string) error {
- if !section.Has(key) {
- return nil
- }
- value := section.String(key)
- return endpointMode.SetFromString(value)
-}
-
-func (cfg *sharedConfig) validateCredentialsConfig(profile string) error {
- if err := cfg.validateCredentialsRequireARN(profile); err != nil {
- return err
- }
-
- return nil
-}
-
-func (cfg *sharedConfig) validateCredentialsRequireARN(profile string) error {
- var credSource string
-
- switch {
- case len(cfg.SourceProfileName) != 0:
- credSource = sourceProfileKey
- case len(cfg.CredentialSource) != 0:
- credSource = credentialSourceKey
- case len(cfg.WebIdentityTokenFile) != 0:
- credSource = webIdentityTokenFileKey
- }
-
- if len(credSource) != 0 && len(cfg.RoleARN) == 0 {
- return CredentialRequiresARNError{
- Type: credSource,
- Profile: profile,
- }
- }
-
- return nil
-}
-
-func (cfg *sharedConfig) validateCredentialType() error {
- // Only one or no credential type can be defined.
- if !oneOrNone(
- len(cfg.SourceProfileName) != 0,
- len(cfg.CredentialSource) != 0,
- len(cfg.CredentialProcess) != 0,
- len(cfg.WebIdentityTokenFile) != 0,
- ) {
- return ErrSharedConfigSourceCollision
- }
-
- return nil
-}
-
-func (cfg *sharedConfig) validateSSOConfiguration() error {
- if !cfg.hasSSOConfiguration() {
- return nil
- }
-
- var missing []string
- if len(cfg.SSOAccountID) == 0 {
- missing = append(missing, ssoAccountIDKey)
- }
-
- if len(cfg.SSORegion) == 0 {
- missing = append(missing, ssoRegionKey)
- }
-
- if len(cfg.SSORoleName) == 0 {
- missing = append(missing, ssoRoleNameKey)
- }
-
- if len(cfg.SSOStartURL) == 0 {
- missing = append(missing, ssoStartURL)
- }
-
- if len(missing) > 0 {
- return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s",
- cfg.Profile, strings.Join(missing, ", "))
- }
-
- return nil
-}
-
-func (cfg *sharedConfig) hasCredentials() bool {
- switch {
- case len(cfg.SourceProfileName) != 0:
- case len(cfg.CredentialSource) != 0:
- case len(cfg.CredentialProcess) != 0:
- case len(cfg.WebIdentityTokenFile) != 0:
- case cfg.hasSSOConfiguration():
- case cfg.Creds.HasKeys():
- default:
- return false
- }
-
- return true
-}
-
-func (cfg *sharedConfig) clearCredentialOptions() {
- cfg.CredentialSource = ""
- cfg.CredentialProcess = ""
- cfg.WebIdentityTokenFile = ""
- cfg.Creds = credentials.Value{}
- cfg.SSOAccountID = ""
- cfg.SSORegion = ""
- cfg.SSORoleName = ""
- cfg.SSOStartURL = ""
-}
-
-func (cfg *sharedConfig) clearAssumeRoleOptions() {
- cfg.RoleARN = ""
- cfg.ExternalID = ""
- cfg.MFASerial = ""
- cfg.RoleSessionName = ""
- cfg.SourceProfileName = ""
-}
-
-func (cfg *sharedConfig) hasSSOConfiguration() bool {
- switch {
- case len(cfg.SSOAccountID) != 0:
- case len(cfg.SSORegion) != 0:
- case len(cfg.SSORoleName) != 0:
- case len(cfg.SSOStartURL) != 0:
- default:
- return false
- }
- return true
-}
-
-func oneOrNone(bs ...bool) bool {
- var count int
-
- for _, b := range bs {
- if b {
- count++
- if count > 1 {
- return false
- }
- }
- }
-
- return true
-}
-
-// updateString will only update the dst with the value in the section key, key
-// is present in the section.
-func updateString(dst *string, section ini.Section, key string) {
- if !section.Has(key) {
- return
- }
- *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) {
- if !section.Has(key) {
- return
- }
- *dst = new(bool)
- **dst = section.Bool(key)
-}
-
-// SharedConfigLoadError is an error for the shared config file failed to load.
-type SharedConfigLoadError struct {
- Filename string
- Err error
-}
-
-// Code is the short id of the error.
-func (e SharedConfigLoadError) Code() string {
- return "SharedConfigLoadError"
-}
-
-// Message is the description of the error
-func (e SharedConfigLoadError) Message() string {
- return fmt.Sprintf("failed to load config file, %s", e.Filename)
-}
-
-// OrigErr is the underlying error that caused the failure.
-func (e SharedConfigLoadError) OrigErr() error {
- return e.Err
-}
-
-// Error satisfies the error interface.
-func (e SharedConfigLoadError) Error() string {
- return awserr.SprintError(e.Code(), e.Message(), "", e.Err)
-}
-
-// SharedConfigProfileNotExistsError is an error for the shared config when
-// the profile was not find in the config file.
-type SharedConfigProfileNotExistsError struct {
- Profile string
- Err error
-}
-
-// Code is the short id of the error.
-func (e SharedConfigProfileNotExistsError) Code() string {
- return "SharedConfigProfileNotExistsError"
-}
-
-// Message is the description of the error
-func (e SharedConfigProfileNotExistsError) Message() string {
- return fmt.Sprintf("failed to get profile, %s", e.Profile)
-}
-
-// OrigErr is the underlying error that caused the failure.
-func (e SharedConfigProfileNotExistsError) OrigErr() error {
- return e.Err
-}
-
-// Error satisfies the error interface.
-func (e SharedConfigProfileNotExistsError) Error() string {
- return awserr.SprintError(e.Code(), e.Message(), "", e.Err)
-}
-
-// SharedConfigAssumeRoleError is an error for the shared config when the
-// profile contains assume role information, but that information is invalid
-// or not complete.
-type SharedConfigAssumeRoleError struct {
- RoleARN string
- SourceProfile string
-}
-
-// Code is the short id of the error.
-func (e SharedConfigAssumeRoleError) Code() string {
- return "SharedConfigAssumeRoleError"
-}
-
-// Message is the description of the error
-func (e SharedConfigAssumeRoleError) Message() string {
- return fmt.Sprintf(
- "failed to load assume role for %s, source profile %s has no shared credentials",
- e.RoleARN, e.SourceProfile,
- )
-}
-
-// OrigErr is the underlying error that caused the failure.
-func (e SharedConfigAssumeRoleError) OrigErr() error {
- return nil
-}
-
-// Error satisfies the error interface.
-func (e SharedConfigAssumeRoleError) Error() string {
- return awserr.SprintError(e.Code(), e.Message(), "", nil)
-}
-
-// CredentialRequiresARNError provides the error for shared config credentials
-// that are incorrectly configured in the shared config or credentials file.
-type CredentialRequiresARNError struct {
- // type of credentials that were configured.
- Type string
-
- // Profile name the credentials were in.
- Profile string
-}
-
-// Code is the short id of the error.
-func (e CredentialRequiresARNError) Code() string {
- return "CredentialRequiresARNError"
-}
-
-// Message is the description of the error
-func (e CredentialRequiresARNError) Message() string {
- return fmt.Sprintf(
- "credential type %s requires role_arn, profile %s",
- e.Type, e.Profile,
- )
-}
-
-// OrigErr is the underlying error that caused the failure.
-func (e CredentialRequiresARNError) OrigErr() error {
- return nil
-}
-
-// Error satisfies the error interface.
-func (e CredentialRequiresARNError) Error() string {
- return awserr.SprintError(e.Code(), e.Message(), "", nil)
-}
-
-// updateEndpointDiscoveryType will only update the dst with the value in the section, if
-// a valid key and corresponding EndpointDiscoveryType is found.
-func updateUseDualStackEndpoint(dst *endpoints.DualStackEndpointState, section ini.Section, key string) {
- if !section.Has(key) {
- return
- }
-
- if section.Bool(key) {
- *dst = endpoints.DualStackEndpointStateEnabled
- } else {
- *dst = endpoints.DualStackEndpointStateDisabled
- }
-
- return
-}
-
-// updateEndpointDiscoveryType will only update the dst with the value in the section, if
-// a valid key and corresponding EndpointDiscoveryType is found.
-func updateUseFIPSEndpoint(dst *endpoints.FIPSEndpointState, section ini.Section, key string) {
- if !section.Has(key) {
- return
- }
-
- if section.Bool(key) {
- *dst = endpoints.FIPSEndpointStateEnabled
- } else {
- *dst = endpoints.FIPSEndpointStateDisabled
- }
-
- return
-}
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
deleted file mode 100644
index 993753831..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package v4
-
-import (
- "github.com/aws/aws-sdk-go/internal/strings"
-)
-
-// validator houses a set of rule needed for validation of a
-// string value
-type rules []rule
-
-// rule interface allows for more flexible rules and just simply
-// checks whether or not a value adheres to that rule
-type rule interface {
- IsValid(value string) bool
-}
-
-// IsValid will iterate through all rules and see if any rules
-// apply to the value and supports nested rules
-func (r rules) IsValid(value string) bool {
- for _, rule := range r {
- if rule.IsValid(value) {
- return true
- }
- }
- return false
-}
-
-// mapRule generic rule for maps
-type mapRule map[string]struct{}
-
-// IsValid for the map rule satisfies whether it exists in the map
-func (m mapRule) IsValid(value string) bool {
- _, ok := m[value]
- return ok
-}
-
-// allowList is a generic rule for allow listing
-type allowList struct {
- rule
-}
-
-// IsValid for allow list checks if the value is within the allow list
-func (w allowList) IsValid(value string) bool {
- return w.rule.IsValid(value)
-}
-
-// excludeList is a generic rule for exclude listing
-type excludeList struct {
- rule
-}
-
-// IsValid for exclude list checks if the value is within the exclude list
-func (b excludeList) IsValid(value string) bool {
- return !b.rule.IsValid(value)
-}
-
-type patterns []string
-
-// IsValid for patterns checks each pattern and returns if a match has
-// been found
-func (p patterns) IsValid(value string) bool {
- for _, pattern := range p {
- if strings.HasPrefixFold(value, pattern) {
- return true
- }
- }
- return false
-}
-
-// inclusiveRules rules allow for rules to depend on one another
-type inclusiveRules []rule
-
-// IsValid will return true if all rules are true
-func (r inclusiveRules) IsValid(value string) bool {
- for _, rule := range r {
- if !rule.IsValid(value) {
- return false
- }
- }
- return true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go
deleted file mode 100644
index 6aa2ed241..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package v4
-
-// WithUnsignedPayload will enable and set the UnsignedPayload field to
-// true of the signer.
-func WithUnsignedPayload(v4 *Signer) {
- v4.UnsignedPayload = true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.5.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.5.go
deleted file mode 100644
index cf672b6ac..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.5.go
+++ /dev/null
@@ -1,14 +0,0 @@
-//go:build !go1.7
-// +build !go1.7
-
-package v4
-
-import (
- "net/http"
-
- "github.com/aws/aws-sdk-go/aws"
-)
-
-func requestContext(r *http.Request) aws.Context {
- return aws.BackgroundContext()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.7.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.7.go
deleted file mode 100644
index 21fe74e6f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.7.go
+++ /dev/null
@@ -1,14 +0,0 @@
-//go:build go1.7
-// +build go1.7
-
-package v4
-
-import (
- "net/http"
-
- "github.com/aws/aws-sdk-go/aws"
-)
-
-func requestContext(r *http.Request) aws.Context {
- return r.Context()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/stream.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/stream.go
deleted file mode 100644
index 02cbd97e2..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/stream.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package v4
-
-import (
- "encoding/hex"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/credentials"
-)
-
-type credentialValueProvider interface {
- Get() (credentials.Value, error)
-}
-
-// StreamSigner implements signing of event stream encoded payloads
-type StreamSigner struct {
- region string
- service string
-
- credentials credentialValueProvider
-
- prevSig []byte
-}
-
-// NewStreamSigner creates a SigV4 signer used to sign Event Stream encoded messages
-func NewStreamSigner(region, service string, seedSignature []byte, credentials *credentials.Credentials) *StreamSigner {
- return &StreamSigner{
- region: region,
- service: service,
- credentials: credentials,
- prevSig: seedSignature,
- }
-}
-
-// GetSignature takes an event stream encoded headers and payload and returns a signature
-func (s *StreamSigner) GetSignature(headers, payload []byte, date time.Time) ([]byte, error) {
- credValue, err := s.credentials.Get()
- if err != nil {
- return nil, err
- }
-
- sigKey := deriveSigningKey(s.region, s.service, credValue.SecretAccessKey, date)
-
- keyPath := buildSigningScope(s.region, s.service, date)
-
- stringToSign := buildEventStreamStringToSign(headers, payload, s.prevSig, keyPath, date)
-
- signature := hmacSHA256(sigKey, []byte(stringToSign))
- s.prevSig = signature
-
- return signature, nil
-}
-
-func buildEventStreamStringToSign(headers, payload, prevSig []byte, scope string, date time.Time) string {
- return strings.Join([]string{
- "AWS4-HMAC-SHA256-PAYLOAD",
- formatTime(date),
- scope,
- hex.EncodeToString(prevSig),
- hex.EncodeToString(hashSHA256(headers)),
- hex.EncodeToString(hashSHA256(payload)),
- }, "\n")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/uri_path.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/uri_path.go
deleted file mode 100644
index 7711ec737..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/uri_path.go
+++ /dev/null
@@ -1,25 +0,0 @@
-//go:build go1.5
-// +build go1.5
-
-package v4
-
-import (
- "net/url"
- "strings"
-)
-
-func getURIPath(u *url.URL) string {
- var uri string
-
- if len(u.Opaque) > 0 {
- uri = "/" + strings.Join(strings.Split(u.Opaque, "/")[3:], "/")
- } else {
- uri = u.EscapedPath()
- }
-
- if len(uri) == 0 {
- uri = "/"
- }
-
- return uri
-}
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
deleted file mode 100644
index 4d78162c0..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
+++ /dev/null
@@ -1,854 +0,0 @@
-// Package v4 implements signing for AWS V4 signer
-//
-// Provides request signing for request that need to be signed with
-// AWS V4 Signatures.
-//
-// Standalone Signer
-//
-// Generally using the signer outside of the SDK should not require any additional
-// logic when using Go v1.5 or higher. The signer does this by taking advantage
-// of the URL.EscapedPath method. If your request URI requires additional escaping
-// you many need to use the URL.Opaque to define what the raw URI should be sent
-// to the service as.
-//
-// The signer will first check the URL.Opaque field, and use its value if set.
-// The signer does require the URL.Opaque field to be set in the form of:
-//
-// "///"
-//
-// // e.g.
-// "//example.com/some/path"
-//
-// The leading "//" and hostname are required or the URL.Opaque escaping will
-// not work correctly.
-//
-// If URL.Opaque is not set the signer will fallback to the URL.EscapedPath()
-// method and using the returned value. If you're using Go v1.4 you must set
-// URL.Opaque if the URI path needs escaping. If URL.Opaque is not set with
-// Go v1.5 the signer will fallback to URL.Path.
-//
-// AWS v4 signature validation requires that the canonical string's URI path
-// element must be the URI escaped form of the HTTP request's path.
-// http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
-//
-// The Go HTTP client will perform escaping automatically on the request. Some
-// of these escaping may cause signature validation errors because the HTTP
-// request differs from the URI path or query that the signature was generated.
-// https://golang.org/pkg/net/url/#URL.EscapedPath
-//
-// Because of this, it is recommended that when using the signer outside of the
-// SDK that explicitly escaping the request prior to being signed is preferable,
-// and will help prevent signature validation errors. This can be done by setting
-// the URL.Opaque or URL.RawPath. The SDK will use URL.Opaque first and then
-// call URL.EscapedPath() if Opaque is not set.
-//
-// If signing a request intended for HTTP2 server, and you're using Go 1.6.2
-// through 1.7.4 you should use the URL.RawPath as the pre-escaped form of the
-// request URL. https://github.com/golang/go/issues/16847 points to a bug in
-// Go pre 1.8 that fails to make HTTP2 requests using absolute URL in the HTTP
-// message. URL.Opaque generally will force Go to make requests with absolute URL.
-// URL.RawPath does not do this, but RawPath must be a valid escaping of Path
-// or url.EscapedPath will ignore the RawPath escaping.
-//
-// Test `TestStandaloneSign` provides a complete example of using the signer
-// outside of the SDK and pre-escaping the URI path.
-package v4
-
-import (
- "crypto/hmac"
- "crypto/sha256"
- "encoding/hex"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "net/url"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/sdkio"
- "github.com/aws/aws-sdk-go/private/protocol/rest"
-)
-
-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`
-)
-
-var ignoredHeaders = rules{
- excludeList{
- mapRule{
- authorizationHeader: struct{}{},
- "User-Agent": struct{}{},
- "X-Amzn-Trace-Id": struct{}{},
- },
- },
-}
-
-// requiredSignedHeaders is a allow list for build canonical headers.
-var requiredSignedHeaders = rules{
- allowList{
- mapRule{
- "Cache-Control": struct{}{},
- "Content-Disposition": struct{}{},
- "Content-Encoding": struct{}{},
- "Content-Language": struct{}{},
- "Content-Md5": struct{}{},
- "Content-Type": struct{}{},
- "Expires": struct{}{},
- "If-Match": struct{}{},
- "If-Modified-Since": struct{}{},
- "If-None-Match": struct{}{},
- "If-Unmodified-Since": struct{}{},
- "Range": struct{}{},
- "X-Amz-Acl": struct{}{},
- "X-Amz-Copy-Source": struct{}{},
- "X-Amz-Copy-Source-If-Match": struct{}{},
- "X-Amz-Copy-Source-If-Modified-Since": struct{}{},
- "X-Amz-Copy-Source-If-None-Match": struct{}{},
- "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{},
- "X-Amz-Copy-Source-Range": struct{}{},
- "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{},
- "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{},
- "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{},
- "X-Amz-Grant-Full-control": struct{}{},
- "X-Amz-Grant-Read": struct{}{},
- "X-Amz-Grant-Read-Acp": struct{}{},
- "X-Amz-Grant-Write": struct{}{},
- "X-Amz-Grant-Write-Acp": struct{}{},
- "X-Amz-Metadata-Directive": struct{}{},
- "X-Amz-Mfa": struct{}{},
- "X-Amz-Request-Payer": struct{}{},
- "X-Amz-Server-Side-Encryption": struct{}{},
- "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id": struct{}{},
- "X-Amz-Server-Side-Encryption-Customer-Algorithm": struct{}{},
- "X-Amz-Server-Side-Encryption-Customer-Key": struct{}{},
- "X-Amz-Server-Side-Encryption-Customer-Key-Md5": struct{}{},
- "X-Amz-Storage-Class": struct{}{},
- "X-Amz-Tagging": struct{}{},
- "X-Amz-Website-Redirect-Location": struct{}{},
- "X-Amz-Content-Sha256": struct{}{},
- },
- },
- patterns{"X-Amz-Meta-"},
- patterns{"X-Amz-Object-Lock-"},
-}
-
-// allowedHoisting is a allow list for build query headers. The boolean value
-// represents whether or not it is a pattern.
-var allowedQueryHoisting = inclusiveRules{
- excludeList{requiredSignedHeaders},
- patterns{"X-Amz-"},
-}
-
-// Signer applies AWS v4 signing to given request. Use this to sign requests
-// that need to be signed with AWS V4 Signatures.
-type Signer struct {
- // The authentication credentials the request will be signed against.
- // This value must be set to sign requests.
- Credentials *credentials.Credentials
-
- // Sets the log level the signer should use when reporting information to
- // the logger. If the logger is nil nothing will be logged. See
- // aws.LogLevelType for more information on available logging levels
- //
- // By default nothing will be logged.
- Debug aws.LogLevelType
-
- // The logger loging information will be written to. If there the logger
- // is nil, nothing will be logged.
- Logger aws.Logger
-
- // Disables the Signer's moving HTTP header key/value pairs from the HTTP
- // request header to the request's query string. This is most commonly used
- // with pre-signed requests preventing headers from being added to the
- // request's query string.
- DisableHeaderHoisting bool
-
- // Disables the automatic escaping of the URI path of the request for the
- // siganture's canonical string's path. For services that do not need additional
- // escaping then use this to disable the signer escaping the path.
- //
- // S3 is an example of a service that does not need additional escaping.
- //
- // http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
- DisableURIPathEscaping bool
-
- // Disables the automatical setting of the HTTP request's Body field with the
- // io.ReadSeeker passed in to the signer. This is useful if you're using a
- // custom wrapper around the body for the io.ReadSeeker and want to preserve
- // the Body value on the Request.Body.
- //
- // This does run the risk of signing a request with a body that will not be
- // sent in the request. Need to ensure that the underlying data of the Body
- // values are the same.
- DisableRequestBodyOverwrite bool
-
- // currentTimeFn returns the time value which represents the current time.
- // This value should only be used for testing. If it is nil the default
- // time.Now will be used.
- currentTimeFn func() time.Time
-
- // UnsignedPayload will prevent signing of the payload. This will only
- // work for services that have support for this.
- UnsignedPayload bool
-}
-
-// NewSigner returns a Signer pointer configured with the credentials and optional
-// option values provided. If not options are provided the Signer will use its
-// default configuration.
-func NewSigner(credentials *credentials.Credentials, options ...func(*Signer)) *Signer {
- v4 := &Signer{
- Credentials: credentials,
- }
-
- for _, option := range options {
- option(v4)
- }
-
- return v4
-}
-
-type signingCtx struct {
- ServiceName string
- Region string
- Request *http.Request
- Body io.ReadSeeker
- Query url.Values
- Time time.Time
- ExpireTime time.Duration
- SignedHeaderVals http.Header
-
- DisableURIPathEscaping bool
-
- credValues credentials.Value
- isPresign bool
- unsignedPayload bool
-
- bodyDigest string
- signedHeaders string
- canonicalHeaders string
- canonicalString string
- credentialString string
- stringToSign string
- signature string
- authorization string
-}
-
-// Sign signs AWS v4 requests with the provided body, service name, region the
-// request is made to, and time the request is signed at. The signTime allows
-// you to specify that a request is signed for the future, and cannot be
-// used until then.
-//
-// Returns a list of HTTP headers that were included in the signature or an
-// error if signing the request failed. Generally for signed requests this value
-// is not needed as the full request context will be captured by the http.Request
-// value. It is included for reference though.
-//
-// Sign will set the request's Body to be the `body` parameter passed in. If
-// the body is not already an io.ReadCloser, it will be wrapped within one. If
-// a `nil` body parameter passed to Sign, the request's Body field will be
-// also set to nil. Its important to note that this functionality will not
-// change the request's ContentLength of the request.
-//
-// Sign differs from Presign in that it will sign the request using HTTP
-// header values. This type of signing is intended for http.Request values that
-// will not be shared, or are shared in a way the header values on the request
-// will not be lost.
-//
-// The requests body is an io.ReadSeeker so the SHA256 of the body can be
-// generated. To bypass the signer computing the hash you can set the
-// "X-Amz-Content-Sha256" header with a precomputed value. The signer will
-// only compute the hash if the request header value is empty.
-func (v4 Signer) Sign(r *http.Request, body io.ReadSeeker, service, region string, signTime time.Time) (http.Header, error) {
- return v4.signWithBody(r, body, service, region, 0, false, signTime)
-}
-
-// Presign signs AWS v4 requests with the provided body, service name, region
-// the request is made to, and time the request is signed at. The signTime
-// allows you to specify that a request is signed for the future, and cannot
-// be used until then.
-//
-// Returns a list of HTTP headers that were included in the signature or an
-// error if signing the request failed. For presigned requests these headers
-// and their values must be included on the HTTP request when it is made. This
-// is helpful to know what header values need to be shared with the party the
-// presigned request will be distributed to.
-//
-// Presign differs from Sign in that it will sign the request using query string
-// instead of header values. This allows you to share the Presigned Request's
-// URL with third parties, or distribute it throughout your system with minimal
-// dependencies.
-//
-// Presign also takes an exp value which is the duration the
-// signed request will be valid after the signing time. This is allows you to
-// set when the request will expire.
-//
-// The requests body is an io.ReadSeeker so the SHA256 of the body can be
-// generated. To bypass the signer computing the hash you can set the
-// "X-Amz-Content-Sha256" header with a precomputed value. The signer will
-// only compute the hash if the request header value is empty.
-//
-// Presigning a S3 request will not compute the body's SHA256 hash by default.
-// This is done due to the general use case for S3 presigned URLs is to share
-// PUT/GET capabilities. If you would like to include the body's SHA256 in the
-// presigned request's signature you can set the "X-Amz-Content-Sha256"
-// HTTP header and that will be included in the request's signature.
-func (v4 Signer) Presign(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, signTime time.Time) (http.Header, error) {
- return v4.signWithBody(r, body, service, region, exp, true, signTime)
-}
-
-func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, isPresign bool, signTime time.Time) (http.Header, error) {
- currentTimeFn := v4.currentTimeFn
- if currentTimeFn == nil {
- currentTimeFn = time.Now
- }
-
- ctx := &signingCtx{
- Request: r,
- Body: body,
- Query: r.URL.Query(),
- Time: signTime,
- ExpireTime: exp,
- isPresign: isPresign,
- ServiceName: service,
- Region: region,
- DisableURIPathEscaping: v4.DisableURIPathEscaping,
- unsignedPayload: v4.UnsignedPayload,
- }
-
- for key := range ctx.Query {
- sort.Strings(ctx.Query[key])
- }
-
- if ctx.isRequestSigned() {
- ctx.Time = currentTimeFn()
- ctx.handlePresignRemoval()
- }
-
- var err error
- ctx.credValues, err = v4.Credentials.GetWithContext(requestContext(r))
- if err != nil {
- return http.Header{}, err
- }
-
- ctx.sanitizeHostForHeader()
- ctx.assignAmzQueryValues()
- if err := ctx.build(v4.DisableHeaderHoisting); err != nil {
- return nil, err
- }
-
- // If the request is not presigned the body should be attached to it. This
- // prevents the confusion of wanting to send a signed request without
- // the body the request was signed for attached.
- if !(v4.DisableRequestBodyOverwrite || ctx.isPresign) {
- var reader io.ReadCloser
- if body != nil {
- var ok bool
- if reader, ok = body.(io.ReadCloser); !ok {
- reader = ioutil.NopCloser(body)
- }
- }
- r.Body = reader
- }
-
- if v4.Debug.Matches(aws.LogDebugWithSigning) {
- v4.logSigningInfo(ctx)
- }
-
- return ctx.SignedHeaderVals, nil
-}
-
-func (ctx *signingCtx) sanitizeHostForHeader() {
- request.SanitizeHostForHeader(ctx.Request)
-}
-
-func (ctx *signingCtx) handlePresignRemoval() {
- if !ctx.isPresign {
- return
- }
-
- // The credentials have expired for this request. The current signing
- // is invalid, and needs to be request because the request will fail.
- ctx.removePresign()
-
- // Update the request's query string to ensure the values stays in
- // sync in the case retrieving the new credentials fails.
- ctx.Request.URL.RawQuery = ctx.Query.Encode()
-}
-
-func (ctx *signingCtx) assignAmzQueryValues() {
- if ctx.isPresign {
- ctx.Query.Set("X-Amz-Algorithm", authHeaderPrefix)
- if ctx.credValues.SessionToken != "" {
- ctx.Query.Set("X-Amz-Security-Token", ctx.credValues.SessionToken)
- } else {
- ctx.Query.Del("X-Amz-Security-Token")
- }
-
- return
- }
-
- if ctx.credValues.SessionToken != "" {
- ctx.Request.Header.Set("X-Amz-Security-Token", ctx.credValues.SessionToken)
- }
-}
-
-// SignRequestHandler is a named request handler the SDK will use to sign
-// service client request with using the V4 signature.
-var SignRequestHandler = request.NamedHandler{
- Name: "v4.SignRequestHandler", Fn: SignSDKRequest,
-}
-
-// SignSDKRequest signs an AWS request with the V4 signature. This
-// request handler should only be used with the SDK's built in service client's
-// API operation requests.
-//
-// This function should not be used on its own, but in conjunction with
-// an AWS service client's API operation call. To sign a standalone request
-// not created by a service client's API operation method use the "Sign" or
-// "Presign" functions of the "Signer" type.
-//
-// If the credentials of the request's config are set to
-// credentials.AnonymousCredentials the request will not be signed.
-func SignSDKRequest(req *request.Request) {
- SignSDKRequestWithCurrentTime(req, time.Now)
-}
-
-// BuildNamedHandler will build a generic handler for signing.
-func BuildNamedHandler(name string, opts ...func(*Signer)) request.NamedHandler {
- return request.NamedHandler{
- Name: name,
- Fn: func(req *request.Request) {
- SignSDKRequestWithCurrentTime(req, time.Now, opts...)
- },
- }
-}
-
-// SignSDKRequestWithCurrentTime will sign the SDK's request using the time
-// function passed in. Behaves the same as SignSDKRequest with the exception
-// the request is signed with the value returned by the current time function.
-func SignSDKRequestWithCurrentTime(req *request.Request, curTimeFn func() time.Time, opts ...func(*Signer)) {
- // If the request does not need to be signed ignore the signing of the
- // request if the AnonymousCredentials object is used.
- if req.Config.Credentials == credentials.AnonymousCredentials {
- return
- }
-
- region := req.ClientInfo.SigningRegion
- if region == "" {
- region = aws.StringValue(req.Config.Region)
- }
-
- name := req.ClientInfo.SigningName
- if name == "" {
- name = req.ClientInfo.ServiceName
- }
-
- v4 := NewSigner(req.Config.Credentials, func(v4 *Signer) {
- v4.Debug = req.Config.LogLevel.Value()
- v4.Logger = req.Config.Logger
- v4.DisableHeaderHoisting = req.NotHoist
- v4.currentTimeFn = curTimeFn
- if name == "s3" {
- // S3 service should not have any escaping applied
- v4.DisableURIPathEscaping = true
- }
- // Prevents setting the HTTPRequest's Body. Since the Body could be
- // wrapped in a custom io.Closer that we do not want to be stompped
- // on top of by the signer.
- v4.DisableRequestBodyOverwrite = true
- })
-
- for _, opt := range opts {
- opt(v4)
- }
-
- curTime := curTimeFn()
- signedHeaders, err := v4.signWithBody(req.HTTPRequest, req.GetBody(),
- name, region, req.ExpireTime, req.ExpireTime > 0, curTime,
- )
- if err != nil {
- req.Error = err
- req.SignedHeaderVals = nil
- return
- }
-
- req.SignedHeaderVals = signedHeaders
- req.LastSignedAt = curTime
-}
-
-const logSignInfoMsg = `DEBUG: Request Signature:
----[ CANONICAL STRING ]-----------------------------
-%s
----[ STRING TO SIGN ]--------------------------------
-%s%s
------------------------------------------------------`
-const logSignedURLMsg = `
----[ SIGNED URL ]------------------------------------
-%s`
-
-func (v4 *Signer) logSigningInfo(ctx *signingCtx) {
- signedURLMsg := ""
- if ctx.isPresign {
- signedURLMsg = fmt.Sprintf(logSignedURLMsg, ctx.Request.URL.String())
- }
- msg := fmt.Sprintf(logSignInfoMsg, ctx.canonicalString, ctx.stringToSign, signedURLMsg)
- v4.Logger.Log(msg)
-}
-
-func (ctx *signingCtx) build(disableHeaderHoisting bool) error {
- ctx.buildTime() // no depends
- ctx.buildCredentialString() // no depends
-
- if err := ctx.buildBodyDigest(); err != nil {
- return err
- }
-
- unsignedHeaders := ctx.Request.Header
- if ctx.isPresign {
- if !disableHeaderHoisting {
- urlValues := url.Values{}
- urlValues, unsignedHeaders = buildQuery(allowedQueryHoisting, unsignedHeaders) // no depends
- for k := range urlValues {
- ctx.Query[k] = urlValues[k]
- }
- }
- }
-
- ctx.buildCanonicalHeaders(ignoredHeaders, unsignedHeaders)
- ctx.buildCanonicalString() // depends on canon headers / signed headers
- ctx.buildStringToSign() // depends on canon string
- ctx.buildSignature() // depends on string to sign
-
- if ctx.isPresign {
- ctx.Request.URL.RawQuery += "&" + signatureQueryKey + "=" + ctx.signature
- } else {
- parts := []string{
- authHeaderPrefix + " Credential=" + ctx.credValues.AccessKeyID + "/" + ctx.credentialString,
- "SignedHeaders=" + ctx.signedHeaders,
- authHeaderSignatureElem + ctx.signature,
- }
- ctx.Request.Header.Set(authorizationHeader, strings.Join(parts, ", "))
- }
-
- return nil
-}
-
-// 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", formatTime(ctx.Time))
- ctx.Query.Set("X-Amz-Expires", strconv.FormatInt(duration, 10))
- } else {
- ctx.Request.Header.Set("X-Amz-Date", formatTime(ctx.Time))
- }
-}
-
-func (ctx *signingCtx) buildCredentialString() {
- ctx.credentialString = buildSigningScope(ctx.Region, ctx.ServiceName, ctx.Time)
-
- if ctx.isPresign {
- ctx.Query.Set("X-Amz-Credential", ctx.credValues.AccessKeyID+"/"+ctx.credentialString)
- }
-}
-
-func buildQuery(r rule, header http.Header) (url.Values, http.Header) {
- query := url.Values{}
- unsignedHeaders := http.Header{}
- for k, h := range header {
- if r.IsValid(k) {
- query[k] = h
- } else {
- unsignedHeaders[k] = h
- }
- }
-
- return query, unsignedHeaders
-}
-func (ctx *signingCtx) buildCanonicalHeaders(r rule, header http.Header) {
- var headers []string
- headers = append(headers, "host")
- for k, v := range header {
- if !r.IsValid(k) {
- continue // ignored header
- }
- if ctx.SignedHeaderVals == nil {
- ctx.SignedHeaderVals = make(http.Header)
- }
-
- lowerCaseKey := strings.ToLower(k)
- if _, ok := ctx.SignedHeaderVals[lowerCaseKey]; ok {
- // include additional values
- ctx.SignedHeaderVals[lowerCaseKey] = append(ctx.SignedHeaderVals[lowerCaseKey], v...)
- continue
- }
-
- headers = append(headers, lowerCaseKey)
- ctx.SignedHeaderVals[lowerCaseKey] = v
- }
- sort.Strings(headers)
-
- ctx.signedHeaders = strings.Join(headers, ";")
-
- if ctx.isPresign {
- ctx.Query.Set("X-Amz-SignedHeaders", ctx.signedHeaders)
- }
-
- headerItems := make([]string, len(headers))
- for i, k := range headers {
- if k == "host" {
- if ctx.Request.Host != "" {
- headerItems[i] = "host:" + ctx.Request.Host
- } else {
- headerItems[i] = "host:" + ctx.Request.URL.Host
- }
- } else {
- headerValues := make([]string, len(ctx.SignedHeaderVals[k]))
- for i, v := range ctx.SignedHeaderVals[k] {
- headerValues[i] = strings.TrimSpace(v)
- }
- headerItems[i] = k + ":" +
- strings.Join(headerValues, ",")
- }
- }
- stripExcessSpaces(headerItems)
- ctx.canonicalHeaders = strings.Join(headerItems, "\n")
-}
-
-func (ctx *signingCtx) buildCanonicalString() {
- ctx.Request.URL.RawQuery = strings.Replace(ctx.Query.Encode(), "+", "%20", -1)
-
- uri := getURIPath(ctx.Request.URL)
-
- if !ctx.DisableURIPathEscaping {
- uri = rest.EscapePath(uri, false)
- }
-
- ctx.canonicalString = strings.Join([]string{
- ctx.Request.Method,
- uri,
- ctx.Request.URL.RawQuery,
- ctx.canonicalHeaders + "\n",
- ctx.signedHeaders,
- ctx.bodyDigest,
- }, "\n")
-}
-
-func (ctx *signingCtx) buildStringToSign() {
- ctx.stringToSign = strings.Join([]string{
- authHeaderPrefix,
- formatTime(ctx.Time),
- ctx.credentialString,
- hex.EncodeToString(hashSHA256([]byte(ctx.canonicalString))),
- }, "\n")
-}
-
-func (ctx *signingCtx) buildSignature() {
- creds := deriveSigningKey(ctx.Region, ctx.ServiceName, ctx.credValues.SecretAccessKey, ctx.Time)
- signature := hmacSHA256(creds, []byte(ctx.stringToSign))
- ctx.signature = hex.EncodeToString(signature)
-}
-
-func (ctx *signingCtx) buildBodyDigest() error {
- hash := ctx.Request.Header.Get("X-Amz-Content-Sha256")
- if hash == "" {
- includeSHA256Header := ctx.unsignedPayload ||
- ctx.ServiceName == "s3" ||
- ctx.ServiceName == "s3-object-lambda" ||
- ctx.ServiceName == "glacier"
-
- s3Presign := ctx.isPresign &&
- (ctx.ServiceName == "s3" ||
- ctx.ServiceName == "s3-object-lambda")
-
- if ctx.unsignedPayload || s3Presign {
- hash = "UNSIGNED-PAYLOAD"
- includeSHA256Header = !s3Presign
- } else if ctx.Body == nil {
- hash = emptyStringSHA256
- } else {
- if !aws.IsReaderSeekable(ctx.Body) {
- return fmt.Errorf("cannot use unseekable request body %T, for signed request with body", ctx.Body)
- }
- hashBytes, err := makeSha256Reader(ctx.Body)
- if err != nil {
- return err
- }
- hash = hex.EncodeToString(hashBytes)
- }
-
- if includeSHA256Header {
- ctx.Request.Header.Set("X-Amz-Content-Sha256", hash)
- }
- }
- ctx.bodyDigest = hash
-
- return nil
-}
-
-// isRequestSigned returns if the request is currently signed or presigned
-func (ctx *signingCtx) isRequestSigned() bool {
- if ctx.isPresign && ctx.Query.Get("X-Amz-Signature") != "" {
- return true
- }
- if ctx.Request.Header.Get("Authorization") != "" {
- return true
- }
-
- return false
-}
-
-// unsign removes signing flags for both signed and presigned requests.
-func (ctx *signingCtx) removePresign() {
- ctx.Query.Del("X-Amz-Algorithm")
- ctx.Query.Del("X-Amz-Signature")
- ctx.Query.Del("X-Amz-Security-Token")
- ctx.Query.Del("X-Amz-Date")
- ctx.Query.Del("X-Amz-Expires")
- ctx.Query.Del("X-Amz-Credential")
- ctx.Query.Del("X-Amz-SignedHeaders")
-}
-
-func hmacSHA256(key []byte, data []byte) []byte {
- hash := hmac.New(sha256.New, key)
- hash.Write(data)
- return hash.Sum(nil)
-}
-
-func hashSHA256(data []byte) []byte {
- hash := sha256.New()
- hash.Write(data)
- return hash.Sum(nil)
-}
-
-func makeSha256Reader(reader io.ReadSeeker) (hashBytes []byte, err error) {
- hash := sha256.New()
- start, err := reader.Seek(0, sdkio.SeekCurrent)
- if err != nil {
- return nil, err
- }
- defer func() {
- // ensure error is return if unable to seek back to start of payload.
- _, err = reader.Seek(start, sdkio.SeekStart)
- }()
-
- // Use CopyN to avoid allocating the 32KB buffer in io.Copy for bodies
- // smaller than 32KB. Fall back to io.Copy if we fail to determine the size.
- size, err := aws.SeekerLen(reader)
- if err != nil {
- io.Copy(hash, reader)
- } else {
- io.CopyN(hash, reader, size)
- }
-
- return hash.Sum(nil), nil
-}
-
-const doubleSpace = " "
-
-// stripExcessSpaces will rewrite the passed in slice's string values to not
-// contain multiple side-by-side spaces.
-func stripExcessSpaces(vals []string) {
- var j, k, l, m, spaces int
- for i, str := range vals {
- // Trim trailing spaces
- for j = len(str) - 1; j >= 0 && str[j] == ' '; j-- {
- }
-
- // Trim leading spaces
- for k = 0; k < j && str[k] == ' '; k++ {
- }
- str = str[k : j+1]
-
- // Strip multiple spaces.
- j = strings.Index(str, doubleSpace)
- if j < 0 {
- vals[i] = str
- continue
- }
-
- buf := []byte(str)
- for k, m, l = j, j, len(buf); k < l; k++ {
- if buf[k] == ' ' {
- if spaces == 0 {
- // First space.
- buf[m] = buf[k]
- m++
- }
- spaces++
- } else {
- // End of multiple spaces.
- spaces = 0
- buf[m] = buf[k]
- m++
- }
- }
-
- 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/url.go b/vendor/github.com/aws/aws-sdk-go/aws/url.go
deleted file mode 100644
index fed561bd5..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/url.go
+++ /dev/null
@@ -1,13 +0,0 @@
-//go:build go1.8
-// +build go1.8
-
-package aws
-
-import "net/url"
-
-// URLHostname will extract the Hostname without port from the URL value.
-//
-// Wrapper of net/url#URL.Hostname for backwards Go version compatibility.
-func URLHostname(url *url.URL) string {
- return url.Hostname()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go
deleted file mode 100644
index 95282db03..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go
+++ /dev/null
@@ -1,30 +0,0 @@
-//go:build !go1.8
-// +build !go1.8
-
-package aws
-
-import (
- "net/url"
- "strings"
-)
-
-// URLHostname will extract the Hostname without port from the URL value.
-//
-// Copy of Go 1.8's net/url#URL.Hostname functionality.
-func URLHostname(url *url.URL) string {
- return stripPort(url.Host)
-
-}
-
-// stripPort is copy of Go 1.8 url#URL.Hostname functionality.
-// https://golang.org/src/net/url/url.go
-func stripPort(hostport string) string {
- colon := strings.IndexByte(hostport, ':')
- if colon == -1 {
- return hostport
- }
- if i := strings.IndexByte(hostport, ']'); i != -1 {
- return strings.TrimPrefix(hostport[:i], "[")
- }
- return hostport[:colon]
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/context/background_go1.5.go b/vendor/github.com/aws/aws-sdk-go/internal/context/background_go1.5.go
deleted file mode 100644
index 365345353..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/context/background_go1.5.go
+++ /dev/null
@@ -1,41 +0,0 @@
-//go:build !go1.7
-// +build !go1.7
-
-package context
-
-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"
-}
-
-// BackgroundCtx is the common base context.
-var BackgroundCtx = new(emptyCtx)
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go
deleted file mode 100644
index 1e55bbd07..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Package ini is an LL(1) parser for configuration files.
-//
-// Example:
-// sections, err := ini.OpenFile("/path/to/file")
-// if err != nil {
-// panic(err)
-// }
-//
-// profile := "foo"
-// section, ok := sections.GetSection(profile)
-// if !ok {
-// fmt.Printf("section %q could not be found", profile)
-// }
-//
-// Below is the BNF that describes this parser
-// Grammar:
-// stmt -> section | stmt'
-// stmt' -> epsilon | expr
-// expr -> value (stmt)* | equal_expr (stmt)*
-// equal_expr -> value ( ':' | '=' ) equal_expr'
-// equal_expr' -> number | string | quoted_string
-// quoted_string -> " quoted_string'
-// quoted_string' -> string quoted_string_end
-// quoted_string_end -> "
-//
-// section -> [ section'
-// section' -> section_value section_close
-// section_value -> number | string_subset | boolean | quoted_string_subset
-// quoted_string_subset -> " quoted_string_subset'
-// quoted_string_subset' -> string_subset quoted_string_end
-// quoted_string_subset -> "
-// section_close -> ]
-//
-// value -> number | string_subset | boolean
-// string -> ? UTF-8 Code-Points except '\n' (U+000A) and '\r\n' (U+000D U+000A) ?
-// string_subset -> ? Code-points excepted by grammar except ':' (U+003A), '=' (U+003D), '[' (U+005B), and ']' (U+005D) ?
-//
-// SkipState will skip (NL WS)+
-//
-// comment -> # comment' | ; comment'
-// comment' -> epsilon | value
-package ini
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go
deleted file mode 100644
index 6e545b63b..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go
+++ /dev/null
@@ -1,18 +0,0 @@
-//go:build gofuzz
-// +build gofuzz
-
-package ini
-
-import (
- "bytes"
-)
-
-func Fuzz(data []byte) int {
- b := bytes.NewReader(data)
-
- if _, err := Parse(b); err != nil {
- return 0
- }
-
- return 1
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_error.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_error.go
deleted file mode 100644
index 457287019..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_error.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package ini
-
-import "fmt"
-
-const (
- // ErrCodeParseError is returned when a parsing error
- // has occurred.
- ErrCodeParseError = "INIParseError"
-)
-
-// ParseError is an error which is returned during any part of
-// the parsing process.
-type ParseError struct {
- msg string
-}
-
-// NewParseError will return a new ParseError where message
-// is the description of the error.
-func NewParseError(message string) *ParseError {
- return &ParseError{
- msg: message,
- }
-}
-
-// Code will return the ErrCodeParseError
-func (err *ParseError) Code() string {
- return ErrCodeParseError
-}
-
-// Message returns the error's message
-func (err *ParseError) Message() string {
- return err.msg
-}
-
-// OrigError return nothing since there will never be any
-// original error.
-func (err *ParseError) OrigError() error {
- return nil
-}
-
-func (err *ParseError) Error() string {
- return fmt.Sprintf("%s: %s", err.Code(), err.Message())
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/resource_request.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/resource_request.go
deleted file mode 100644
index ef43d6c58..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/resource_request.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package s3shared
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- awsarn "github.com/aws/aws-sdk-go/aws/arn"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/s3shared/arn"
-)
-
-// ResourceRequest represents the request and arn resource
-type ResourceRequest struct {
- Resource arn.Resource
- Request *request.Request
-}
-
-// ARN returns the resource ARN
-func (r ResourceRequest) ARN() awsarn.ARN {
- return r.Resource.GetARN()
-}
-
-// AllowCrossRegion returns a bool value to denote if S3UseARNRegion flag is set
-func (r ResourceRequest) AllowCrossRegion() bool {
- return aws.BoolValue(r.Request.Config.S3UseARNRegion)
-}
-
-// IsCrossPartition returns true if client is configured for another partition, than
-// the partition that resource ARN region resolves to.
-func (r ResourceRequest) IsCrossPartition() bool {
- return r.Request.ClientInfo.PartitionID != r.Resource.GetARN().Partition
-}
-
-// IsCrossRegion returns true if ARN region is different than client configured region
-func (r ResourceRequest) IsCrossRegion() bool {
- return IsCrossRegion(r.Request, r.Resource.GetARN().Region)
-}
-
-// HasCustomEndpoint returns true if custom client endpoint is provided
-func (r ResourceRequest) HasCustomEndpoint() bool {
- return len(aws.StringValue(r.Request.Config.Endpoint)) > 0
-}
-
-// IsCrossRegion returns true if request signing region is not same as configured region
-func IsCrossRegion(req *request.Request, otherRegion string) bool {
- return req.ClientInfo.SigningRegion != otherRegion
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/s3err/error.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/s3err/error.go
deleted file mode 100644
index 0b9b0dfce..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/s3err/error.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package s3err
-
-import (
- "fmt"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// RequestFailure provides additional S3 specific metadata for the request
-// failure.
-type RequestFailure struct {
- awserr.RequestFailure
-
- hostID string
-}
-
-// NewRequestFailure returns a request failure error decordated with S3
-// specific metadata.
-func NewRequestFailure(err awserr.RequestFailure, hostID string) *RequestFailure {
- return &RequestFailure{RequestFailure: err, hostID: hostID}
-}
-
-func (r RequestFailure) Error() string {
- extra := fmt.Sprintf("status code: %d, request id: %s, host id: %s",
- r.StatusCode(), r.RequestID(), r.hostID)
- return awserr.SprintError(r.Code(), r.Message(), extra, r.OrigErr())
-}
-func (r RequestFailure) String() string {
- return r.Error()
-}
-
-// HostID returns the HostID request response value.
-func (r RequestFailure) HostID() string {
- return r.hostID
-}
-
-// RequestFailureWrapperHandler returns a handler to rap an
-// awserr.RequestFailure with the S3 request ID 2 from the response.
-func RequestFailureWrapperHandler() request.NamedHandler {
- return request.NamedHandler{
- Name: "awssdk.s3.errorHandler",
- Fn: func(req *request.Request) {
- reqErr, ok := req.Error.(awserr.RequestFailure)
- if !ok || reqErr == nil {
- return
- }
-
- hostID := req.HTTPResponse.Header.Get("X-Amz-Id-2")
- if req.Error == nil {
- return
- }
-
- req.Error = NewRequestFailure(reqErr, hostID)
- },
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.6.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.6.go
deleted file mode 100644
index 037a998c4..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.6.go
+++ /dev/null
@@ -1,11 +0,0 @@
-//go:build !go1.7
-// +build !go1.7
-
-package sdkio
-
-// Copy of Go 1.7 io package's Seeker constants.
-const (
- SeekStart = 0 // seek relative to the origin of the file
- SeekCurrent = 1 // seek relative to the current offset
- SeekEnd = 2 // seek relative to the end
-)
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.7.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.7.go
deleted file mode 100644
index 65e7c60c4..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.7.go
+++ /dev/null
@@ -1,13 +0,0 @@
-//go:build go1.7
-// +build go1.7
-
-package sdkio
-
-import "io"
-
-// Alias for Go 1.7 io package Seeker constants
-const (
- SeekStart = io.SeekStart // seek relative to the origin of the file
- SeekCurrent = io.SeekCurrent // seek relative to the current offset
- SeekEnd = io.SeekEnd // seek relative to the end
-)
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor.go
deleted file mode 100644
index a84528783..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor.go
+++ /dev/null
@@ -1,16 +0,0 @@
-//go:build go1.10
-// +build go1.10
-
-package sdkmath
-
-import "math"
-
-// Round returns the nearest integer, rounding half away from zero.
-//
-// Special cases are:
-// Round(±0) = ±0
-// Round(±Inf) = ±Inf
-// Round(NaN) = NaN
-func Round(x float64) float64 {
- return math.Round(x)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor_go1.9.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor_go1.9.go
deleted file mode 100644
index a3ae3e5db..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor_go1.9.go
+++ /dev/null
@@ -1,57 +0,0 @@
-//go:build !go1.10
-// +build !go1.10
-
-package sdkmath
-
-import "math"
-
-// Copied from the Go standard library's (Go 1.12) math/floor.go for use in
-// Go version prior to Go 1.10.
-const (
- uvone = 0x3FF0000000000000
- mask = 0x7FF
- shift = 64 - 11 - 1
- bias = 1023
- signMask = 1 << 63
- fracMask = 1<= 0.5 {
- // return t + Copysign(1, x)
- // }
- // return t
- // }
- bits := math.Float64bits(x)
- e := uint(bits>>shift) & mask
- if e < bias {
- // Round abs(x) < 1 including denormals.
- bits &= signMask // +-0
- if e == bias-1 {
- bits |= uvone // +-1
- }
- } else if e < bias+shift {
- // Round any abs(x) >= 1 containing a fractional component [0,1).
- //
- // Numbers with larger exponents are returned unchanged since they
- // must be either an integer, infinity, or NaN.
- const half = 1 << (shift - 1)
- e -= bias
- bits += half >> e
- bits &^= fracMask >> e
- }
- return math.Float64frombits(bits)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/locked_source.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/locked_source.go
deleted file mode 100644
index 0c9802d87..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/locked_source.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package sdkrand
-
-import (
- "math/rand"
- "sync"
- "time"
-)
-
-// lockedSource is a thread-safe implementation of rand.Source
-type lockedSource struct {
- lk sync.Mutex
- src rand.Source
-}
-
-func (r *lockedSource) Int63() (n int64) {
- r.lk.Lock()
- n = r.src.Int63()
- r.lk.Unlock()
- return
-}
-
-func (r *lockedSource) Seed(seed int64) {
- r.lk.Lock()
- r.src.Seed(seed)
- r.lk.Unlock()
-}
-
-// SeededRand is a new RNG using a thread safe implementation of rand.Source
-var SeededRand = rand.New(&lockedSource{src: rand.NewSource(time.Now().UnixNano())})
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read.go
deleted file mode 100644
index 4bae66cee..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read.go
+++ /dev/null
@@ -1,12 +0,0 @@
-//go:build go1.6
-// +build go1.6
-
-package sdkrand
-
-import "math/rand"
-
-// Read provides the stub for math.Rand.Read method support for go version's
-// 1.6 and greater.
-func Read(r *rand.Rand, p []byte) (int, error) {
- return r.Read(p)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read_1_5.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read_1_5.go
deleted file mode 100644
index 3a6ab8825..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read_1_5.go
+++ /dev/null
@@ -1,25 +0,0 @@
-//go:build !go1.6
-// +build !go1.6
-
-package sdkrand
-
-import "math/rand"
-
-// Read backfills Go 1.6's math.Rand.Reader for Go 1.5
-func Read(r *rand.Rand, p []byte) (n int, err error) {
- // Copy of Go standard libraries math package's read function not added to
- // standard library until Go 1.6.
- var pos int8
- var val int64
- for n = 0; n < len(p); n++ {
- if pos == 0 {
- val = r.Int63()
- pos = 7
- }
- p[n] = byte(val)
- val >>= 8
- pos--
- }
-
- return n, err
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go
deleted file mode 100644
index 38ea61afe..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package sdkuri
-
-import (
- "path"
- "strings"
-)
-
-// PathJoin will join the elements of the path delimited by the "/"
-// character. Similar to path.Join with the exception the trailing "/"
-// character is preserved if present.
-func PathJoin(elems ...string) string {
- if len(elems) == 0 {
- return ""
- }
-
- hasTrailing := strings.HasSuffix(elems[len(elems)-1], "/")
- str := path.Join(elems...)
- if hasTrailing && str != "/" {
- str += "/"
- }
-
- return str
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go
deleted file mode 100644
index 7da8a49ce..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package shareddefaults
-
-const (
- // ECSCredsProviderEnvVar is an environmental variable key used to
- // determine which path needs to be hit.
- ECSCredsProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
-)
-
-// ECSContainerCredentialsURI is the endpoint to retrieve container
-// credentials. This can be overridden to test to ensure the credential process
-// is behaving correctly.
-var ECSContainerCredentialsURI = "http://169.254.170.2"
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go
deleted file mode 100644
index ebcbc2b40..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package shareddefaults
-
-import (
- "os"
- "path/filepath"
- "runtime"
-)
-
-// SharedCredentialsFilename returns the SDK's default file path
-// for the shared credentials file.
-//
-// Builds the shared config file path based on the OS's platform.
-//
-// - Linux/Unix: $HOME/.aws/credentials
-// - Windows: %USERPROFILE%\.aws\credentials
-func SharedCredentialsFilename() string {
- return filepath.Join(UserHomeDir(), ".aws", "credentials")
-}
-
-// SharedConfigFilename returns the SDK's default file path for
-// the shared config file.
-//
-// Builds the shared config file path based on the OS's platform.
-//
-// - Linux/Unix: $HOME/.aws/config
-// - Windows: %USERPROFILE%\.aws\config
-func SharedConfigFilename() string {
- return filepath.Join(UserHomeDir(), ".aws", "config")
-}
-
-// UserHomeDir returns the home directory for the user the process is
-// running under.
-func UserHomeDir() string {
- if runtime.GOOS == "windows" { // Windows
- return os.Getenv("USERPROFILE")
- }
-
- // *nix
- return os.Getenv("HOME")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/checksum/content_md5.go b/vendor/github.com/aws/aws-sdk-go/private/checksum/content_md5.go
deleted file mode 100644
index e045f38d8..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/checksum/content_md5.go
+++ /dev/null
@@ -1,53 +0,0 @@
-package checksum
-
-import (
- "crypto/md5"
- "encoding/base64"
- "fmt"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-const contentMD5Header = "Content-Md5"
-
-// AddBodyContentMD5Handler computes and sets the HTTP Content-MD5 header for requests that
-// require it.
-func AddBodyContentMD5Handler(r *request.Request) {
- // if Content-MD5 header is already present, return
- if v := r.HTTPRequest.Header.Get(contentMD5Header); len(v) != 0 {
- return
- }
-
- // if S3DisableContentMD5Validation flag is set, return
- if aws.BoolValue(r.Config.S3DisableContentMD5Validation) {
- return
- }
-
- // if request is presigned, return
- if r.IsPresigned() {
- return
- }
-
- // if body is not seekable, return
- 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
- }
-
- h := md5.New()
-
- if _, err := aws.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)
-}
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
deleted file mode 100644
index 0a63340e4..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/error.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package eventstreamapi
-
-import (
- "fmt"
- "sync"
-)
-
-// InputWriterCloseErrorCode is used to denote an error occurred
-// while closing the event stream input writer.
-const InputWriterCloseErrorCode = "EventStreamInputWriterCloseError"
-
-type messageError struct {
- code string
- msg string
-}
-
-func (e messageError) Code() string {
- return e.code
-}
-
-func (e messageError) Message() string {
- return e.msg
-}
-
-func (e messageError) Error() string {
- return fmt.Sprintf("%s: %s", e.code, e.msg)
-}
-
-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/eventstreamapi/reader.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/reader.go
deleted file mode 100644
index 0e4aa42f3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/reader.go
+++ /dev/null
@@ -1,173 +0,0 @@
-package eventstreamapi
-
-import (
- "fmt"
-
- "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
-}
-
-// EventReader provides reading from the EventStream of an reader.
-type EventReader struct {
- 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(
- decoder *eventstream.Decoder,
- payloadUnmarshaler protocol.PayloadUnmarshaler,
- unmarshalerForEventType func(string) (Unmarshaler, error),
-) *EventReader {
- return &EventReader{
- decoder: decoder,
- payloadUnmarshaler: payloadUnmarshaler,
- unmarshalerForEventType: unmarshalerForEventType,
- payloadBuf: make([]byte, 10*1024),
- }
-}
-
-// 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:
- return nil, r.unmarshalEventException(msg)
- case ErrorMessageType:
- return nil, r.unmarshalErrorMessage(msg)
- default:
- return nil, &UnknownMessageTypeError{
- Type: typ, Message: msg.Clone(),
- }
- }
-}
-
-// UnknownMessageTypeError provides an error when a message is received from
-// the stream, but the reader is unable to determine what kind of message it is.
-type UnknownMessageTypeError struct {
- Type string
- Message eventstream.Message
-}
-
-func (e *UnknownMessageTypeError) Error() string {
- return "unknown eventstream message type, " + e.Type
-}
-
-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
-}
-
-// 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/signer.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/signer.go
deleted file mode 100644
index 3a7ba5cd5..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/signer.go
+++ /dev/null
@@ -1,123 +0,0 @@
-package eventstreamapi
-
-import (
- "bytes"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/private/protocol/eventstream"
-)
-
-var timeNow = time.Now
-
-// StreamSigner defines an interface for the implementation of signing of event stream payloads
-type StreamSigner interface {
- GetSignature(headers, payload []byte, date time.Time) ([]byte, error)
-}
-
-// SignEncoder envelopes event stream messages
-// into an event stream message payload with included
-// signature headers using the provided signer and encoder.
-type SignEncoder struct {
- signer StreamSigner
- encoder Encoder
- bufEncoder *BufferEncoder
-
- closeErr error
- closed bool
-}
-
-// NewSignEncoder returns a new SignEncoder using the provided stream signer and
-// event stream encoder.
-func NewSignEncoder(signer StreamSigner, encoder Encoder) *SignEncoder {
- // TODO: Need to pass down logging
-
- return &SignEncoder{
- signer: signer,
- encoder: encoder,
- bufEncoder: NewBufferEncoder(),
- }
-}
-
-// Close encodes a final event stream signing envelope with an empty event stream
-// payload. This final end-frame is used to mark the conclusion of the stream.
-func (s *SignEncoder) Close() error {
- if s.closed {
- return s.closeErr
- }
-
- if err := s.encode([]byte{}); err != nil {
- if strings.Contains(err.Error(), "on closed pipe") {
- return nil
- }
-
- s.closeErr = err
- s.closed = true
- return s.closeErr
- }
-
- return nil
-}
-
-// Encode takes the provided message and add envelopes the message
-// with the required signature.
-func (s *SignEncoder) Encode(msg eventstream.Message) error {
- payload, err := s.bufEncoder.Encode(msg)
- if err != nil {
- return err
- }
-
- return s.encode(payload)
-}
-
-func (s SignEncoder) encode(payload []byte) error {
- date := timeNow()
-
- var msg eventstream.Message
- msg.Headers.Set(DateHeader, eventstream.TimestampValue(date))
- msg.Payload = payload
-
- var headers bytes.Buffer
- if err := eventstream.EncodeHeaders(&headers, msg.Headers); err != nil {
- return err
- }
-
- sig, err := s.signer.GetSignature(headers.Bytes(), msg.Payload, date)
- if err != nil {
- return err
- }
-
- msg.Headers.Set(ChunkSignatureHeader, eventstream.BytesValue(sig))
-
- return s.encoder.Encode(msg)
-}
-
-// BufferEncoder is a utility that provides a buffered
-// event stream encoder
-type BufferEncoder struct {
- encoder Encoder
- buffer *bytes.Buffer
-}
-
-// NewBufferEncoder returns a new BufferEncoder initialized
-// with a 1024 byte buffer.
-func NewBufferEncoder() *BufferEncoder {
- buf := bytes.NewBuffer(make([]byte, 1024))
- return &BufferEncoder{
- encoder: eventstream.NewEncoder(buf),
- buffer: buf,
- }
-}
-
-// Encode returns the encoded message as a byte slice.
-// The returned byte slice will be modified on the next encode call
-// and should not be held onto.
-func (e *BufferEncoder) Encode(msg eventstream.Message) ([]byte, error) {
- e.buffer.Reset()
-
- if err := e.encoder.Encode(msg); err != nil {
- return nil, err
- }
-
- return e.buffer.Bytes(), nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/stream_writer.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/stream_writer.go
deleted file mode 100644
index 433bb1630..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/stream_writer.go
+++ /dev/null
@@ -1,129 +0,0 @@
-package eventstreamapi
-
-import (
- "fmt"
- "io"
- "sync"
-
- "github.com/aws/aws-sdk-go/aws"
-)
-
-// StreamWriter provides concurrent safe writing to an event stream.
-type StreamWriter struct {
- eventWriter *EventWriter
- stream chan eventWriteAsyncReport
-
- done chan struct{}
- closeOnce sync.Once
- err *OnceError
-
- streamCloser io.Closer
-}
-
-// NewStreamWriter returns a StreamWriter for the event writer, and stream
-// closer provided.
-func NewStreamWriter(eventWriter *EventWriter, streamCloser io.Closer) *StreamWriter {
- w := &StreamWriter{
- eventWriter: eventWriter,
- streamCloser: streamCloser,
- stream: make(chan eventWriteAsyncReport),
- done: make(chan struct{}),
- err: NewOnceError(),
- }
- go w.writeStream()
-
- return w
-}
-
-// Close terminates the writers ability to write new events to the stream. Any
-// future call to Send will fail with an error.
-func (w *StreamWriter) Close() error {
- w.closeOnce.Do(w.safeClose)
- return w.Err()
-}
-
-func (w *StreamWriter) safeClose() {
- close(w.done)
-}
-
-// ErrorSet returns a channel which will be closed
-// if an error occurs.
-func (w *StreamWriter) ErrorSet() <-chan struct{} {
- return w.err.ErrorSet()
-}
-
-// Err returns any error that occurred while attempting to write an event to the
-// stream.
-func (w *StreamWriter) Err() error {
- return w.err.Err()
-}
-
-// Send writes a single event to the stream returning an error if the write
-// failed.
-//
-// Send may be called concurrently. Events will be written to the stream
-// safely.
-func (w *StreamWriter) Send(ctx aws.Context, event Marshaler) error {
- if err := w.Err(); err != nil {
- return err
- }
-
- resultCh := make(chan error)
- wrapped := eventWriteAsyncReport{
- Event: event,
- Result: resultCh,
- }
-
- select {
- case w.stream <- wrapped:
- case <-ctx.Done():
- return ctx.Err()
- case <-w.done:
- return fmt.Errorf("stream closed, unable to send event")
- }
-
- select {
- case err := <-resultCh:
- return err
- case <-ctx.Done():
- return ctx.Err()
- case <-w.done:
- return fmt.Errorf("stream closed, unable to send event")
- }
-}
-
-func (w *StreamWriter) writeStream() {
- defer w.Close()
-
- for {
- select {
- case wrapper := <-w.stream:
- err := w.eventWriter.WriteEvent(wrapper.Event)
- wrapper.ReportResult(w.done, err)
- if err != nil {
- w.err.SetError(err)
- return
- }
-
- case <-w.done:
- if err := w.streamCloser.Close(); err != nil {
- w.err.SetError(err)
- }
- return
- }
- }
-}
-
-type eventWriteAsyncReport struct {
- Event Marshaler
- Result chan<- error
-}
-
-func (e eventWriteAsyncReport) ReportResult(cancel <-chan struct{}, err error) bool {
- select {
- case e.Result <- err:
- return true
- case <-cancel:
- return false
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/transport.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/transport.go
deleted file mode 100644
index 4bf2b27b2..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/transport.go
+++ /dev/null
@@ -1,10 +0,0 @@
-//go:build go1.18
-// +build go1.18
-
-package eventstreamapi
-
-import "github.com/aws/aws-sdk-go/aws/request"
-
-// ApplyHTTPTransportFixes is a no-op for Go 1.18 and above.
-func ApplyHTTPTransportFixes(r *request.Request) {
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/transport_go1.17.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/transport_go1.17.go
deleted file mode 100644
index 2ee2c36fd..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/transport_go1.17.go
+++ /dev/null
@@ -1,19 +0,0 @@
-//go:build !go1.18
-// +build !go1.18
-
-package eventstreamapi
-
-import "github.com/aws/aws-sdk-go/aws/request"
-
-// ApplyHTTPTransportFixes applies fixes to the HTTP request for proper event
-// stream functionality. Go 1.15 through 1.17 HTTP client could hang forever
-// when an HTTP/2 connection failed with an non-200 status code and err. Using
-// Expect 100-Continue, allows the HTTP client to gracefully handle the non-200
-// status code, and close the connection.
-//
-// This is a no-op for Go 1.18 and above.
-func ApplyHTTPTransportFixes(r *request.Request) {
- r.Handlers.Sign.PushBack(func(r *request.Request) {
- r.HTTPRequest.Header.Set("Expect", "100-Continue")
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/writer.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/writer.go
deleted file mode 100644
index 7d7a79352..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/writer.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package eventstreamapi
-
-import (
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/eventstream"
-)
-
-// Marshaler provides a marshaling interface for event types to event stream
-// messages.
-type Marshaler interface {
- MarshalEvent(protocol.PayloadMarshaler) (eventstream.Message, error)
-}
-
-// Encoder is an stream encoder that will encode an event stream message for
-// the transport.
-type Encoder interface {
- Encode(eventstream.Message) error
-}
-
-// EventWriter provides a wrapper around the underlying event stream encoder
-// for an io.WriteCloser.
-type EventWriter struct {
- encoder Encoder
- payloadMarshaler protocol.PayloadMarshaler
- eventTypeFor func(Marshaler) (string, error)
-}
-
-// NewEventWriter returns a new event stream writer, that will write to the
-// writer provided. Use the WriteEvent method to write an event to the stream.
-func NewEventWriter(encoder Encoder, pm protocol.PayloadMarshaler, eventTypeFor func(Marshaler) (string, error),
-) *EventWriter {
- return &EventWriter{
- encoder: encoder,
- payloadMarshaler: pm,
- eventTypeFor: eventTypeFor,
- }
-}
-
-// WriteEvent writes an event to the stream. Returns an error if the event
-// fails to marshal into a message, or writing to the underlying writer fails.
-func (w *EventWriter) WriteEvent(event Marshaler) error {
- msg, err := w.marshal(event)
- if err != nil {
- return err
- }
-
- return w.encoder.Encode(msg)
-}
-
-func (w *EventWriter) marshal(event Marshaler) (eventstream.Message, error) {
- eventType, err := w.eventTypeFor(event)
- if err != nil {
- return eventstream.Message{}, err
- }
-
- msg, err := event.MarshalEvent(w.payloadMarshaler)
- if err != nil {
- return eventstream.Message{}, err
- }
-
- msg.Headers.Set(EventTypeHeader, eventstream.StringValue(eventType))
- return msg, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go
deleted file mode 100644
index 1f1d27aea..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go
+++ /dev/null
@@ -1,104 +0,0 @@
-package protocol
-
-import (
- "github.com/aws/aws-sdk-go/aws/request"
- "net"
- "strconv"
- "strings"
-)
-
-// ValidateEndpointHostHandler is a request handler that will validate the
-// request endpoint's hosts is a valid RFC 3986 host.
-var ValidateEndpointHostHandler = request.NamedHandler{
- Name: "awssdk.protocol.ValidateEndpointHostHandler",
- Fn: func(r *request.Request) {
- err := ValidateEndpointHost(r.Operation.Name, r.HTTPRequest.URL.Host)
- if err != nil {
- r.Error = err
- }
- },
-}
-
-// ValidateEndpointHost validates that the host string passed in is a valid RFC
-// 3986 host. Returns error if the host is not valid.
-func ValidateEndpointHost(opName, host string) error {
- paramErrs := request.ErrInvalidParams{Context: opName}
-
- var hostname string
- var port string
- var err error
-
- if strings.Contains(host, ":") {
- hostname, port, err = net.SplitHostPort(host)
-
- if err != nil {
- paramErrs.Add(request.NewErrParamFormat("endpoint", err.Error(), host))
- }
-
- if !ValidPortNumber(port) {
- paramErrs.Add(request.NewErrParamFormat("endpoint port number", "[0-65535]", port))
- }
- } else {
- hostname = host
- }
-
- labels := strings.Split(hostname, ".")
- for i, label := range labels {
- if i == len(labels)-1 && len(label) == 0 {
- // Allow trailing dot for FQDN hosts.
- continue
- }
-
- if !ValidHostLabel(label) {
- paramErrs.Add(request.NewErrParamFormat(
- "endpoint host label", "[a-zA-Z0-9-]{1,63}", label))
- }
- }
-
- if len(hostname) == 0 {
- paramErrs.Add(request.NewErrParamMinLen("endpoint host", 1))
- }
-
- if len(hostname) > 255 {
- paramErrs.Add(request.NewErrParamMaxLen(
- "endpoint host", 255, host,
- ))
- }
-
- if paramErrs.Len() > 0 {
- return paramErrs
- }
- return nil
-}
-
-// ValidHostLabel returns if the label is a valid RFC 3986 host label.
-func ValidHostLabel(label string) bool {
- if l := len(label); l == 0 || l > 63 {
- return false
- }
- for _, r := range label {
- switch {
- case r >= '0' && r <= '9':
- case r >= 'A' && r <= 'Z':
- case r >= 'a' && r <= 'z':
- case r == '-':
- default:
- return false
- }
- }
-
- return true
-}
-
-// ValidPortNumber return if the port is valid RFC 3986 port
-func ValidPortNumber(port string) bool {
- i, err := strconv.Atoi(port)
- if err != nil {
- return false
- }
-
- if i < 0 || i > 65535 {
- return false
- }
- return true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/host_prefix.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/host_prefix.go
deleted file mode 100644
index 915b0fcaf..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/host_prefix.go
+++ /dev/null
@@ -1,54 +0,0 @@
-package protocol
-
-import (
- "strings"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// HostPrefixHandlerName is the handler name for the host prefix request
-// handler.
-const HostPrefixHandlerName = "awssdk.endpoint.HostPrefixHandler"
-
-// NewHostPrefixHandler constructs a build handler
-func NewHostPrefixHandler(prefix string, labelsFn func() map[string]string) request.NamedHandler {
- builder := HostPrefixBuilder{
- Prefix: prefix,
- LabelsFn: labelsFn,
- }
-
- return request.NamedHandler{
- Name: HostPrefixHandlerName,
- Fn: builder.Build,
- }
-}
-
-// HostPrefixBuilder provides the request handler to expand and prepend
-// the host prefix into the operation's request endpoint host.
-type HostPrefixBuilder struct {
- Prefix string
- LabelsFn func() map[string]string
-}
-
-// Build updates the passed in Request with the HostPrefix template expanded.
-func (h HostPrefixBuilder) Build(r *request.Request) {
- if aws.BoolValue(r.Config.DisableEndpointHostPrefix) {
- return
- }
-
- var labels map[string]string
- if h.LabelsFn != nil {
- labels = h.LabelsFn()
- }
-
- prefix := h.Prefix
- for name, value := range labels {
- prefix = strings.Replace(prefix, "{"+name+"}", value, -1)
- }
-
- r.HTTPRequest.URL.Host = prefix + r.HTTPRequest.URL.Host
- if len(r.HTTPRequest.Host) > 0 {
- r.HTTPRequest.Host = prefix + r.HTTPRequest.Host
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/idempotency.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/idempotency.go
deleted file mode 100644
index 53831dff9..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/idempotency.go
+++ /dev/null
@@ -1,75 +0,0 @@
-package protocol
-
-import (
- "crypto/rand"
- "fmt"
- "reflect"
-)
-
-// RandReader is the random reader the protocol package will use to read
-// random bytes from. This is exported for testing, and should not be used.
-var RandReader = rand.Reader
-
-const idempotencyTokenFillTag = `idempotencyToken`
-
-// CanSetIdempotencyToken returns true if the struct field should be
-// automatically populated with a Idempotency token.
-//
-// Only *string and string type fields that are tagged with idempotencyToken
-// which are not already set can be auto filled.
-func CanSetIdempotencyToken(v reflect.Value, f reflect.StructField) bool {
- switch u := v.Interface().(type) {
- // To auto fill an Idempotency token the field must be a string,
- // tagged for auto fill, and have a zero value.
- case *string:
- return u == nil && len(f.Tag.Get(idempotencyTokenFillTag)) != 0
- case string:
- return len(u) == 0 && len(f.Tag.Get(idempotencyTokenFillTag)) != 0
- }
-
- return false
-}
-
-// GetIdempotencyToken returns a randomly generated idempotency token.
-func GetIdempotencyToken() string {
- b := make([]byte, 16)
- RandReader.Read(b)
-
- return UUIDVersion4(b)
-}
-
-// SetIdempotencyToken will set the value provided with a Idempotency Token.
-// Given that the value can be set. Will panic if value is not setable.
-func SetIdempotencyToken(v reflect.Value) {
- if v.Kind() == reflect.Ptr {
- if v.IsNil() && v.CanSet() {
- v.Set(reflect.New(v.Type().Elem()))
- }
- v = v.Elem()
- }
- v = reflect.Indirect(v)
-
- if !v.CanSet() {
- panic(fmt.Sprintf("unable to set idempotnecy token %v", v))
- }
-
- b := make([]byte, 16)
- _, err := rand.Read(b)
- if err != nil {
- // TODO handle error
- return
- }
-
- v.Set(reflect.ValueOf(UUIDVersion4(b)))
-}
-
-// UUIDVersion4 returns a Version 4 random UUID from the byte slice provided
-func UUIDVersion4(u []byte) string {
- // https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_.28random.29
- // 13th character is "4"
- u[6] = (u[6] | 0x40) & 0x4F
- // 17th character is "8", "9", "a", or "b"
- u[8] = (u[8] | 0x80) & 0xBF
-
- return fmt.Sprintf(`%X-%X-%X-%X-%X`, u[0:4], u[4:6], u[6:8], u[8:10], u[10:])
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go
deleted file mode 100644
index 2aec80661..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go
+++ /dev/null
@@ -1,298 +0,0 @@
-// Package jsonutil provides JSON serialization of AWS requests and responses.
-package jsonutil
-
-import (
- "bytes"
- "encoding/base64"
- "encoding/json"
- "fmt"
- "math"
- "reflect"
- "sort"
- "strconv"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-var timeType = reflect.ValueOf(time.Time{}).Type()
-var byteSliceType = reflect.ValueOf([]byte{}).Type()
-
-// BuildJSON builds a JSON string for a given object v.
-func BuildJSON(v interface{}) ([]byte, error) {
- var buf bytes.Buffer
-
- err := buildAny(reflect.ValueOf(v), &buf, "")
- return buf.Bytes(), err
-}
-
-func buildAny(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error {
- origVal := value
- value = reflect.Indirect(value)
- if !value.IsValid() {
- return nil
- }
-
- vtype := value.Type()
-
- t := tag.Get("type")
- if t == "" {
- switch vtype.Kind() {
- case reflect.Struct:
- // also it can't be a time object
- if value.Type() != timeType {
- t = "structure"
- }
- case reflect.Slice:
- // also it can't be a byte slice
- if _, ok := value.Interface().([]byte); !ok {
- t = "list"
- }
- case reflect.Map:
- // cannot be a JSONValue map
- if _, ok := value.Interface().(aws.JSONValue); !ok {
- t = "map"
- }
- }
- }
-
- switch t {
- case "structure":
- if field, ok := vtype.FieldByName("_"); ok {
- tag = field.Tag
- }
- return buildStruct(value, buf, tag)
- case "list":
- return buildList(value, buf, tag)
- case "map":
- return buildMap(value, buf, tag)
- default:
- return buildScalar(origVal, buf, tag)
- }
-}
-
-func buildStruct(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error {
- if !value.IsValid() {
- return nil
- }
-
- // unwrap payloads
- if payload := tag.Get("payload"); payload != "" {
- field, _ := value.Type().FieldByName(payload)
- tag = field.Tag
- value = elemOf(value.FieldByName(payload))
- if !value.IsValid() && tag.Get("type") != "structure" {
- return nil
- }
- }
-
- buf.WriteByte('{')
- defer buf.WriteString("}")
-
- if !value.IsValid() {
- return nil
- }
-
- t := value.Type()
- first := true
- for i := 0; i < t.NumField(); i++ {
- member := value.Field(i)
-
- // This allocates the most memory.
- // Additionally, we cannot skip nil fields due to
- // idempotency auto filling.
- field := t.Field(i)
-
- if field.PkgPath != "" {
- continue // ignore unexported fields
- }
- if field.Tag.Get("json") == "-" {
- continue
- }
- if field.Tag.Get("location") != "" {
- continue // ignore non-body elements
- }
- if field.Tag.Get("ignore") != "" {
- continue
- }
-
- if protocol.CanSetIdempotencyToken(member, field) {
- token := protocol.GetIdempotencyToken()
- member = reflect.ValueOf(&token)
- }
-
- if (member.Kind() == reflect.Ptr || member.Kind() == reflect.Slice || member.Kind() == reflect.Map) && member.IsNil() {
- continue // ignore unset fields
- }
-
- if first {
- first = false
- } else {
- buf.WriteByte(',')
- }
-
- // figure out what this field is called
- name := field.Name
- if locName := field.Tag.Get("locationName"); locName != "" {
- name = locName
- }
-
- writeString(name, buf)
- buf.WriteString(`:`)
-
- err := buildAny(member, buf, field.Tag)
- if err != nil {
- return err
- }
-
- }
-
- return nil
-}
-
-func buildList(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error {
- buf.WriteString("[")
-
- for i := 0; i < value.Len(); i++ {
- buildAny(value.Index(i), buf, "")
-
- if i < value.Len()-1 {
- buf.WriteString(",")
- }
- }
-
- buf.WriteString("]")
-
- return nil
-}
-
-type sortedValues []reflect.Value
-
-func (sv sortedValues) Len() int { return len(sv) }
-func (sv sortedValues) Swap(i, j int) { sv[i], sv[j] = sv[j], sv[i] }
-func (sv sortedValues) Less(i, j int) bool { return sv[i].String() < sv[j].String() }
-
-func buildMap(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error {
- buf.WriteString("{")
-
- sv := sortedValues(value.MapKeys())
- sort.Sort(sv)
-
- for i, k := range sv {
- if i > 0 {
- buf.WriteByte(',')
- }
-
- writeString(k.String(), buf)
- buf.WriteString(`:`)
-
- buildAny(value.MapIndex(k), buf, "")
- }
-
- buf.WriteString("}")
-
- return nil
-}
-
-func buildScalar(v reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error {
- // prevents allocation on the heap.
- scratch := [64]byte{}
- switch value := reflect.Indirect(v); value.Kind() {
- case reflect.String:
- writeString(value.String(), buf)
- case reflect.Bool:
- if value.Bool() {
- buf.WriteString("true")
- } else {
- buf.WriteString("false")
- }
- case reflect.Int64:
- buf.Write(strconv.AppendInt(scratch[:0], value.Int(), 10))
- case reflect.Float64:
- f := value.Float()
- if math.IsInf(f, 0) || math.IsNaN(f) {
- return &json.UnsupportedValueError{Value: v, Str: strconv.FormatFloat(f, 'f', -1, 64)}
- }
- buf.Write(strconv.AppendFloat(scratch[:0], f, 'f', -1, 64))
- default:
- switch converted := value.Interface().(type) {
- case time.Time:
- format := tag.Get("timestampFormat")
- if len(format) == 0 {
- format = protocol.UnixTimeFormatName
- }
-
- ts := protocol.FormatTime(format, converted)
- if format != protocol.UnixTimeFormatName {
- ts = `"` + ts + `"`
- }
-
- buf.WriteString(ts)
- case []byte:
- if !value.IsNil() {
- buf.WriteByte('"')
- if len(converted) < 1024 {
- // for small buffers, using Encode directly is much faster.
- dst := make([]byte, base64.StdEncoding.EncodedLen(len(converted)))
- base64.StdEncoding.Encode(dst, converted)
- buf.Write(dst)
- } else {
- // for large buffers, avoid unnecessary extra temporary
- // buffer space.
- enc := base64.NewEncoder(base64.StdEncoding, buf)
- enc.Write(converted)
- enc.Close()
- }
- buf.WriteByte('"')
- }
- case aws.JSONValue:
- str, err := protocol.EncodeJSONValue(converted, protocol.QuotedEscape)
- if err != nil {
- return fmt.Errorf("unable to encode JSONValue, %v", err)
- }
- buf.WriteString(str)
- default:
- return fmt.Errorf("unsupported JSON value %v (%s)", value.Interface(), value.Type())
- }
- }
- return nil
-}
-
-var hex = "0123456789abcdef"
-
-func writeString(s string, buf *bytes.Buffer) {
- buf.WriteByte('"')
- for i := 0; i < len(s); i++ {
- if s[i] == '"' {
- buf.WriteString(`\"`)
- } else if s[i] == '\\' {
- buf.WriteString(`\\`)
- } else if s[i] == '\b' {
- buf.WriteString(`\b`)
- } else if s[i] == '\f' {
- buf.WriteString(`\f`)
- } else if s[i] == '\r' {
- buf.WriteString(`\r`)
- } else if s[i] == '\t' {
- buf.WriteString(`\t`)
- } else if s[i] == '\n' {
- buf.WriteString(`\n`)
- } else if s[i] < 32 {
- buf.WriteString("\\u00")
- buf.WriteByte(hex[s[i]>>4])
- buf.WriteByte(hex[s[i]&0xF])
- } else {
- buf.WriteByte(s[i])
- }
- }
- buf.WriteByte('"')
-}
-
-// Returns the reflection element of a value, if it is a pointer.
-func elemOf(value reflect.Value) reflect.Value {
- for value.Kind() == reflect.Ptr {
- value = value.Elem()
- }
- return value
-}
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
deleted file mode 100644
index 8b2c9bbeb..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go
+++ /dev/null
@@ -1,304 +0,0 @@
-package jsonutil
-
-import (
- "bytes"
- "encoding/base64"
- "encoding/json"
- "fmt"
- "io"
- "math/big"
- "reflect"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-var millisecondsFloat = new(big.Float).SetInt64(1e3)
-
-// UnmarshalJSONError unmarshal's the reader's JSON document into the passed in
-// type. The value to unmarshal the json document into must be a pointer to the
-// type.
-func UnmarshalJSONError(v interface{}, stream io.Reader) error {
- var errBuf bytes.Buffer
- body := io.TeeReader(stream, &errBuf)
-
- err := json.NewDecoder(body).Decode(v)
- if err != nil {
- msg := "failed decoding error message"
- if err == io.EOF {
- msg = "error message missing"
- err = nil
- }
- return awserr.NewUnmarshalError(err, msg, errBuf.Bytes())
- }
-
- return nil
-}
-
-// UnmarshalJSON reads a stream and unmarshals the results in object v.
-func UnmarshalJSON(v interface{}, stream io.Reader) error {
- var out interface{}
-
- decoder := json.NewDecoder(stream)
- decoder.UseNumber()
- err := decoder.Decode(&out)
- if err == io.EOF {
- return nil
- } else if err != nil {
- return err
- }
-
- return unmarshaler{}.unmarshalAny(reflect.ValueOf(v), out, "")
-}
-
-// 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{}
-
- decoder := json.NewDecoder(stream)
- decoder.UseNumber()
- err := decoder.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
- }
-
- t := tag.Get("type")
- if t == "" {
- switch vtype.Kind() {
- case reflect.Struct:
- // also it can't be a time object
- if _, ok := value.Interface().(*time.Time); !ok {
- t = "structure"
- }
- case reflect.Slice:
- // also it can't be a byte slice
- if _, ok := value.Interface().([]byte); !ok {
- t = "list"
- }
- case reflect.Map:
- // cannot be a JSONValue map
- if _, ok := value.Interface().(aws.JSONValue); !ok {
- t = "map"
- }
- }
- }
-
- switch t {
- case "structure":
- if field, ok := vtype.FieldByName("_"); ok {
- tag = field.Tag
- }
- return u.unmarshalStruct(value, data, tag)
- case "list":
- return u.unmarshalList(value, data, tag)
- case "map":
- return u.unmarshalMap(value, data, tag)
- default:
- return u.unmarshalScalar(value, data, tag)
- }
-}
-
-func (u unmarshaler) unmarshalStruct(value reflect.Value, data interface{}, tag reflect.StructTag) error {
- if data == nil {
- return nil
- }
- mapData, ok := data.(map[string]interface{})
- if !ok {
- return fmt.Errorf("JSON value is not a structure (%#v)", data)
- }
-
- t := value.Type()
- if value.Kind() == reflect.Ptr {
- if value.IsNil() { // create the structure if it's nil
- s := reflect.New(value.Type().Elem())
- value.Set(s)
- value = s
- }
-
- value = value.Elem()
- t = t.Elem()
- }
-
- // unwrap any payloads
- if payload := tag.Get("payload"); payload != "" {
- field, _ := t.FieldByName(payload)
- return u.unmarshalAny(value.FieldByName(payload), data, field.Tag)
- }
-
- for i := 0; i < t.NumField(); i++ {
- field := t.Field(i)
- if field.PkgPath != "" {
- continue // ignore unexported fields
- }
-
- // figure out what this field is called
- name := field.Name
- 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 := u.unmarshalAny(member, mapData[name], field.Tag)
- if err != nil {
- return err
- }
- }
- return nil
-}
-
-func (u unmarshaler) unmarshalList(value reflect.Value, data interface{}, tag reflect.StructTag) error {
- if data == nil {
- return nil
- }
- listData, ok := data.([]interface{})
- if !ok {
- return fmt.Errorf("JSON value is not a list (%#v)", data)
- }
-
- if value.IsNil() {
- l := len(listData)
- value.Set(reflect.MakeSlice(value.Type(), l, l))
- }
-
- for i, c := range listData {
- err := u.unmarshalAny(value.Index(i), c, "")
- if err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func (u unmarshaler) unmarshalMap(value reflect.Value, data interface{}, tag reflect.StructTag) error {
- if data == nil {
- return nil
- }
- mapData, ok := data.(map[string]interface{})
- if !ok {
- return fmt.Errorf("JSON value is not a map (%#v)", data)
- }
-
- if value.IsNil() {
- value.Set(reflect.MakeMap(value.Type()))
- }
-
- for k, v := range mapData {
- kvalue := reflect.ValueOf(k)
- vvalue := reflect.New(value.Type().Elem()).Elem()
-
- u.unmarshalAny(vvalue, v, "")
- value.SetMapIndex(kvalue, vvalue)
- }
-
- return nil
-}
-
-func (u unmarshaler) unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTag) error {
-
- switch d := data.(type) {
- case nil:
- return nil // nothing to do here
- case string:
- switch value.Interface().(type) {
- case *string:
- value.Set(reflect.ValueOf(&d))
- case []byte:
- b, err := base64.StdEncoding.DecodeString(d)
- if err != nil {
- return err
- }
- value.Set(reflect.ValueOf(b))
- case *time.Time:
- format := tag.Get("timestampFormat")
- if len(format) == 0 {
- format = protocol.ISO8601TimeFormatName
- }
-
- t, err := protocol.ParseTime(format, d)
- if err != nil {
- return err
- }
- value.Set(reflect.ValueOf(&t))
- case aws.JSONValue:
- // No need to use escaping as the value is a non-quoted string.
- v, err := protocol.DecodeJSONValue(d, protocol.NoEscape)
- if err != nil {
- return err
- }
- value.Set(reflect.ValueOf(v))
- default:
- return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type())
- }
- case json.Number:
- switch value.Interface().(type) {
- case *int64:
- // Retain the old behavior where we would just truncate the float64
- // calling d.Int64() here could cause an invalid syntax error due to the usage of strconv.ParseInt
- f, err := d.Float64()
- if err != nil {
- return err
- }
- di := int64(f)
- value.Set(reflect.ValueOf(&di))
- case *float64:
- f, err := d.Float64()
- if err != nil {
- return err
- }
- value.Set(reflect.ValueOf(&f))
- case *time.Time:
- float, ok := new(big.Float).SetString(d.String())
- if !ok {
- return fmt.Errorf("unsupported float time representation: %v", d.String())
- }
- float = float.Mul(float, millisecondsFloat)
- ms, _ := float.Int64()
- t := time.Unix(0, ms*1e6).UTC()
- value.Set(reflect.ValueOf(&t))
- default:
- return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type())
- }
- case bool:
- switch value.Interface().(type) {
- case *bool:
- value.Set(reflect.ValueOf(&d))
- default:
- return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type())
- }
- default:
- return fmt.Errorf("unsupported JSON value (%v)", data)
- }
- return 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
deleted file mode 100644
index d9aa27114..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Package jsonrpc provides JSON RPC utilities for serialization of AWS
-// requests and responses.
-package jsonrpc
-
-//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 (
- "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"
- "github.com/aws/aws-sdk-go/private/protocol/rest"
-)
-
-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,
-}
-
-// 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) {
- var buf []byte
- var err error
- if req.ParamsFilled() {
- buf, err = jsonutil.BuildJSON(req.Params)
- if err != nil {
- req.Error = awserr.New(request.ErrCodeSerialization, "failed encoding JSON RPC request", err)
- return
- }
- } else {
- buf = emptyJSON
- }
-
- // Always serialize the body, don't suppress it.
- req.SetBufferBody(buf)
-
- if req.ClientInfo.TargetPrefix != "" {
- target := req.ClientInfo.TargetPrefix + "." + req.Operation.Name
- req.HTTPRequest.Header.Add("X-Amz-Target", target)
- }
-
- // Only set the content type if one is not already specified and an
- // JSONVersion is specified.
- if ct, v := req.HTTPRequest.Header.Get("Content-Type"), req.ClientInfo.JSONVersion; len(ct) == 0 && len(v) != 0 {
- jsonVersion := req.ClientInfo.JSONVersion
- req.HTTPRequest.Header.Set("Content-Type", "application/x-amz-json-"+jsonVersion)
- }
-}
-
-// Unmarshal unmarshals a response for a JSON RPC service.
-func Unmarshal(req *request.Request) {
- defer req.HTTPResponse.Body.Close()
- if req.DataFilled() {
- err := jsonutil.UnmarshalJSON(req.Data, req.HTTPResponse.Body)
- if err != nil {
- req.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization, "failed decoding JSON RPC response", err),
- req.HTTPResponse.StatusCode,
- req.RequestID,
- )
- }
- }
- return
-}
-
-// UnmarshalMeta unmarshals headers from a response for a JSON RPC service.
-func UnmarshalMeta(req *request.Request) {
- rest.UnmarshalMeta(req)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/unmarshal_error.go
deleted file mode 100644
index c0c52e2db..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/unmarshal_error.go
+++ /dev/null
@@ -1,107 +0,0 @@
-package jsonrpc
-
-import (
- "bytes"
- "io"
- "io/ioutil"
- "net/http"
- "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"
- "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil"
-)
-
-// UnmarshalTypedError provides unmarshaling errors API response errors
-// for both typed and untyped errors.
-type UnmarshalTypedError struct {
- exceptions map[string]func(protocol.ResponseMetadata) error
-}
-
-// NewUnmarshalTypedError returns an UnmarshalTypedError initialized for the
-// set of exception names to the error unmarshalers
-func NewUnmarshalTypedError(exceptions map[string]func(protocol.ResponseMetadata) error) *UnmarshalTypedError {
- return &UnmarshalTypedError{
- exceptions: exceptions,
- }
-}
-
-// UnmarshalError attempts to unmarshal the HTTP response error as a known
-// error type. If unable to unmarshal the error type, the generic SDK error
-// type will be used.
-func (u *UnmarshalTypedError) UnmarshalError(
- resp *http.Response,
- respMeta protocol.ResponseMetadata,
-) (error, error) {
-
- var buf bytes.Buffer
- var jsonErr jsonErrorResponse
- teeReader := io.TeeReader(resp.Body, &buf)
- err := jsonutil.UnmarshalJSONError(&jsonErr, teeReader)
- if err != nil {
- return nil, err
- }
- body := ioutil.NopCloser(&buf)
-
- // Code may be separated by hash(#), with the last element being the code
- // used by the SDK.
- codeParts := strings.SplitN(jsonErr.Code, "#", 2)
- code := codeParts[len(codeParts)-1]
- msg := jsonErr.Message
-
- if fn, ok := u.exceptions[code]; ok {
- // If exception code is know, use associated constructor to get a value
- // for the exception that the JSON body can be unmarshaled into.
- v := fn(respMeta)
- err := jsonutil.UnmarshalJSONCaseInsensitive(v, body)
- if err != nil {
- return nil, err
- }
-
- return v, nil
- }
-
- // fallback to unmodeled generic exceptions
- return awserr.NewRequestFailure(
- awserr.New(code, msg, nil),
- respMeta.StatusCode,
- respMeta.RequestID,
- ), nil
-}
-
-// UnmarshalErrorHandler is a named request handler for unmarshaling jsonrpc
-// protocol request errors
-var UnmarshalErrorHandler = request.NamedHandler{
- Name: "awssdk.jsonrpc.UnmarshalError",
- Fn: UnmarshalError,
-}
-
-// 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/jsonvalue.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue.go
deleted file mode 100644
index 776d11018..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue.go
+++ /dev/null
@@ -1,76 +0,0 @@
-package protocol
-
-import (
- "encoding/base64"
- "encoding/json"
- "fmt"
- "strconv"
-
- "github.com/aws/aws-sdk-go/aws"
-)
-
-// EscapeMode is the mode that should be use for escaping a value
-type EscapeMode uint
-
-// The modes for escaping a value before it is marshaled, and unmarshaled.
-const (
- NoEscape EscapeMode = iota
- Base64Escape
- QuotedEscape
-)
-
-// EncodeJSONValue marshals the value into a JSON string, and optionally base64
-// encodes the string before returning it.
-//
-// Will panic if the escape mode is unknown.
-func EncodeJSONValue(v aws.JSONValue, escape EscapeMode) (string, error) {
- b, err := json.Marshal(v)
- if err != nil {
- return "", err
- }
-
- switch escape {
- case NoEscape:
- return string(b), nil
- case Base64Escape:
- return base64.StdEncoding.EncodeToString(b), nil
- case QuotedEscape:
- return strconv.Quote(string(b)), nil
- }
-
- panic(fmt.Sprintf("EncodeJSONValue called with unknown EscapeMode, %v", escape))
-}
-
-// DecodeJSONValue will attempt to decode the string input as a JSONValue.
-// Optionally decoding base64 the value first before JSON unmarshaling.
-//
-// Will panic if the escape mode is unknown.
-func DecodeJSONValue(v string, escape EscapeMode) (aws.JSONValue, error) {
- var b []byte
- var err error
-
- switch escape {
- case NoEscape:
- b = []byte(v)
- case Base64Escape:
- b, err = base64.StdEncoding.DecodeString(v)
- case QuotedEscape:
- var u string
- u, err = strconv.Unquote(v)
- b = []byte(u)
- default:
- panic(fmt.Sprintf("DecodeJSONValue called with unknown EscapeMode, %v", escape))
- }
-
- if err != nil {
- return nil, err
- }
-
- m := aws.JSONValue{}
- err = json.Unmarshal(b, &m)
- if err != nil {
- return nil, err
- }
-
- return m, nil
-}
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
deleted file mode 100644
index 0ea0647a5..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/payload.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package protocol
-
-import (
- "io"
- "io/ioutil"
- "net/http"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// PayloadUnmarshaler provides the interface for unmarshaling a payload's
-// reader into a SDK shape.
-type PayloadUnmarshaler interface {
- UnmarshalPayload(io.Reader, interface{}) error
-}
-
-// HandlerPayloadUnmarshal implements the PayloadUnmarshaler from a
-// HandlerList. This provides the support for unmarshaling a payload reader to
-// a shape without needing a SDK request first.
-type HandlerPayloadUnmarshal struct {
- Unmarshalers request.HandlerList
-}
-
-// UnmarshalPayload unmarshals the io.Reader payload into the SDK shape using
-// the Unmarshalers HandlerList provided. Returns an error if unable
-// unmarshaling fails.
-func (h HandlerPayloadUnmarshal) UnmarshalPayload(r io.Reader, v interface{}) error {
- req := &request.Request{
- HTTPRequest: &http.Request{},
- HTTPResponse: &http.Response{
- StatusCode: 200,
- Header: http.Header{},
- Body: ioutil.NopCloser(r),
- },
- Data: v,
- }
-
- h.Unmarshalers.Run(req)
-
- return req.Error
-}
-
-// PayloadMarshaler provides the interface for marshaling a SDK shape into and
-// io.Writer.
-type PayloadMarshaler interface {
- MarshalPayload(io.Writer, interface{}) error
-}
-
-// HandlerPayloadMarshal implements the PayloadMarshaler from a HandlerList.
-// This provides support for marshaling a SDK shape into an io.Writer without
-// needing a SDK request first.
-type HandlerPayloadMarshal struct {
- Marshalers request.HandlerList
-}
-
-// MarshalPayload marshals the SDK shape into the io.Writer using the
-// Marshalers HandlerList provided. Returns an error if unable if marshal
-// fails.
-func (h HandlerPayloadMarshal) MarshalPayload(w io.Writer, v interface{}) error {
- req := request.New(
- aws.Config{},
- metadata.ClientInfo{},
- request.Handlers{},
- nil,
- &request.Operation{HTTPMethod: "PUT"},
- v,
- nil,
- )
-
- h.Marshalers.Run(req)
-
- if req.Error != nil {
- return req.Error
- }
-
- io.Copy(w, req.GetBody())
-
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/protocol.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/protocol.go
deleted file mode 100644
index 9d521dcb9..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/protocol.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package protocol
-
-import (
- "fmt"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// RequireHTTPMinProtocol request handler is used to enforce that
-// the target endpoint supports the given major and minor HTTP protocol version.
-type RequireHTTPMinProtocol struct {
- Major, Minor int
-}
-
-// Handler will mark the request.Request with an error if the
-// target endpoint did not connect with the required HTTP protocol
-// major and minor version.
-func (p RequireHTTPMinProtocol) Handler(r *request.Request) {
- if r.Error != nil || r.HTTPResponse == nil {
- return
- }
-
- if !strings.HasPrefix(r.HTTPResponse.Proto, "HTTP") {
- r.Error = newMinHTTPProtoError(p.Major, p.Minor, r)
- }
-
- if r.HTTPResponse.ProtoMajor < p.Major || r.HTTPResponse.ProtoMinor < p.Minor {
- r.Error = newMinHTTPProtoError(p.Major, p.Minor, r)
- }
-}
-
-// ErrCodeMinimumHTTPProtocolError error code is returned when the target endpoint
-// did not match the required HTTP major and minor protocol version.
-const ErrCodeMinimumHTTPProtocolError = "MinimumHTTPProtocolError"
-
-func newMinHTTPProtoError(major, minor int, r *request.Request) error {
- return awserr.NewRequestFailure(
- awserr.New("MinimumHTTPProtocolError",
- fmt.Sprintf(
- "operation requires minimum HTTP protocol of HTTP/%d.%d, but was %s",
- major, minor, r.HTTPResponse.Proto,
- ),
- nil,
- ),
- r.HTTPResponse.StatusCode, r.RequestID,
- )
-}
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
deleted file mode 100644
index d40346a77..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// Package query provides serialization of AWS query requests, and responses.
-package query
-
-//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/input/query.json build_test.go
-
-import (
- "net/url"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/query/queryutil"
-)
-
-// BuildHandler is a named request handler for building query protocol requests
-var BuildHandler = request.NamedHandler{Name: "awssdk.query.Build", Fn: Build}
-
-// Build builds a request for an AWS Query service.
-func Build(r *request.Request) {
- body := url.Values{
- "Action": {r.Operation.Name},
- "Version": {r.ClientInfo.APIVersion},
- }
- if err := queryutil.Parse(body, r.Params, false); err != nil {
- r.Error = awserr.New(request.ErrCodeSerialization, "failed encoding Query request", err)
- return
- }
-
- if !r.IsPresigned() {
- r.HTTPRequest.Method = "POST"
- r.HTTPRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")
- r.SetBufferBody([]byte(body.Encode()))
- } else { // This is a pre-signed request
- r.HTTPRequest.Method = "GET"
- r.HTTPRequest.URL.RawQuery = body.Encode()
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
deleted file mode 100644
index 75866d012..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
+++ /dev/null
@@ -1,246 +0,0 @@
-package queryutil
-
-import (
- "encoding/base64"
- "fmt"
- "net/url"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-// Parse parses an object i and fills a url.Values object. The isEC2 flag
-// indicates if this is the EC2 Query sub-protocol.
-func Parse(body url.Values, i interface{}, isEC2 bool) error {
- q := queryParser{isEC2: isEC2}
- return q.parseValue(body, reflect.ValueOf(i), "", "")
-}
-
-func elemOf(value reflect.Value) reflect.Value {
- for value.Kind() == reflect.Ptr {
- value = value.Elem()
- }
- return value
-}
-
-type queryParser struct {
- isEC2 bool
-}
-
-func (q *queryParser) parseValue(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error {
- value = elemOf(value)
-
- // no need to handle zero values
- if !value.IsValid() {
- return nil
- }
-
- t := tag.Get("type")
- if t == "" {
- switch value.Kind() {
- case reflect.Struct:
- t = "structure"
- case reflect.Slice:
- t = "list"
- case reflect.Map:
- t = "map"
- }
- }
-
- switch t {
- case "structure":
- return q.parseStruct(v, value, prefix)
- case "list":
- return q.parseList(v, value, prefix, tag)
- case "map":
- return q.parseMap(v, value, prefix, tag)
- default:
- return q.parseScalar(v, value, prefix, tag)
- }
-}
-
-func (q *queryParser) parseStruct(v url.Values, value reflect.Value, prefix string) error {
- if !value.IsValid() {
- return nil
- }
-
- t := value.Type()
- for i := 0; i < value.NumField(); i++ {
- elemValue := elemOf(value.Field(i))
- field := t.Field(i)
-
- if field.PkgPath != "" {
- continue // ignore unexported fields
- }
- if field.Tag.Get("ignore") != "" {
- continue
- }
-
- if protocol.CanSetIdempotencyToken(value.Field(i), field) {
- token := protocol.GetIdempotencyToken()
- elemValue = reflect.ValueOf(token)
- }
-
- var name string
- if q.isEC2 {
- name = field.Tag.Get("queryName")
- }
- if name == "" {
- if field.Tag.Get("flattened") != "" && field.Tag.Get("locationNameList") != "" {
- name = field.Tag.Get("locationNameList")
- } else if locName := field.Tag.Get("locationName"); locName != "" {
- name = locName
- }
- if name != "" && q.isEC2 {
- name = strings.ToUpper(name[0:1]) + name[1:]
- }
- }
- if name == "" {
- name = field.Name
- }
-
- if prefix != "" {
- name = prefix + "." + name
- }
-
- if err := q.parseValue(v, elemValue, name, field.Tag); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (q *queryParser) parseList(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error {
- // If it's empty, generate an empty value
- if !value.IsNil() && value.Len() == 0 {
- v.Set(prefix, "")
- return nil
- }
-
- if _, ok := value.Interface().([]byte); ok {
- return q.parseScalar(v, value, prefix, tag)
- }
-
- // check for unflattened list member
- if !q.isEC2 && tag.Get("flattened") == "" {
- if listName := tag.Get("locationNameList"); listName == "" {
- prefix += ".member"
- } else {
- prefix += "." + listName
- }
- }
-
- for i := 0; i < value.Len(); i++ {
- slicePrefix := prefix
- if slicePrefix == "" {
- slicePrefix = strconv.Itoa(i + 1)
- } else {
- slicePrefix = slicePrefix + "." + strconv.Itoa(i+1)
- }
- if err := q.parseValue(v, value.Index(i), slicePrefix, ""); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (q *queryParser) parseMap(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error {
- // If it's empty, generate an empty value
- if !value.IsNil() && value.Len() == 0 {
- v.Set(prefix, "")
- return nil
- }
-
- // check for unflattened list member
- if !q.isEC2 && tag.Get("flattened") == "" {
- prefix += ".entry"
- }
-
- // sort keys for improved serialization consistency.
- // this is not strictly necessary for protocol support.
- mapKeyValues := value.MapKeys()
- mapKeys := map[string]reflect.Value{}
- mapKeyNames := make([]string, len(mapKeyValues))
- for i, mapKey := range mapKeyValues {
- name := mapKey.String()
- mapKeys[name] = mapKey
- mapKeyNames[i] = name
- }
- sort.Strings(mapKeyNames)
-
- for i, mapKeyName := range mapKeyNames {
- mapKey := mapKeys[mapKeyName]
- mapValue := value.MapIndex(mapKey)
-
- kname := tag.Get("locationNameKey")
- if kname == "" {
- kname = "key"
- }
- vname := tag.Get("locationNameValue")
- if vname == "" {
- vname = "value"
- }
-
- // serialize key
- var keyName string
- if prefix == "" {
- keyName = strconv.Itoa(i+1) + "." + kname
- } else {
- keyName = prefix + "." + strconv.Itoa(i+1) + "." + kname
- }
-
- if err := q.parseValue(v, mapKey, keyName, ""); err != nil {
- return err
- }
-
- // serialize value
- var valueName string
- if prefix == "" {
- valueName = strconv.Itoa(i+1) + "." + vname
- } else {
- valueName = prefix + "." + strconv.Itoa(i+1) + "." + vname
- }
-
- if err := q.parseValue(v, mapValue, valueName, ""); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func (q *queryParser) parseScalar(v url.Values, r reflect.Value, name string, tag reflect.StructTag) error {
- switch value := r.Interface().(type) {
- case string:
- v.Set(name, value)
- case []byte:
- if !r.IsNil() {
- v.Set(name, base64.StdEncoding.EncodeToString(value))
- }
- case bool:
- v.Set(name, strconv.FormatBool(value))
- case int64:
- v.Set(name, strconv.FormatInt(value, 10))
- case int:
- v.Set(name, strconv.Itoa(value))
- case float64:
- v.Set(name, strconv.FormatFloat(value, 'f', -1, 64))
- case float32:
- v.Set(name, strconv.FormatFloat(float64(value), 'f', -1, 32))
- case time.Time:
- const ISO8601UTC = "2006-01-02T15:04:05Z"
- format := tag.Get("timestampFormat")
- if len(format) == 0 {
- format = protocol.ISO8601TimeFormatName
- }
-
- v.Set(name, protocol.FormatTime(format, value))
- default:
- return fmt.Errorf("unsupported value for param %s: %v (%s)", name, r.Interface(), r.Type().Name())
- }
- return nil
-}
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
deleted file mode 100644
index 9231e95d1..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package query
-
-//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/output/query.json unmarshal_test.go
-
-import (
- "encoding/xml"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
-)
-
-// UnmarshalHandler is a named request handler for unmarshaling query protocol requests
-var UnmarshalHandler = request.NamedHandler{Name: "awssdk.query.Unmarshal", Fn: Unmarshal}
-
-// UnmarshalMetaHandler is a named request handler for unmarshaling query protocol request metadata
-var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.query.UnmarshalMeta", Fn: UnmarshalMeta}
-
-// Unmarshal unmarshals a response for an AWS Query service.
-func Unmarshal(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
- if r.DataFilled() {
- decoder := xml.NewDecoder(r.HTTPResponse.Body)
- err := xmlutil.UnmarshalXML(r.Data, decoder, r.Operation.Name+"Result")
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization, "failed decoding Query response", err),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
- return
- }
- }
-}
-
-// UnmarshalMeta unmarshals header response values for an AWS Query service.
-func UnmarshalMeta(r *request.Request) {
- r.RequestID = r.HTTPResponse.Header.Get("X-Amzn-Requestid")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go
deleted file mode 100644
index 2c0cbba90..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package query
-
-import (
- "encoding/xml"
- "fmt"
- "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/xml/xmlutil"
-)
-
-// UnmarshalErrorHandler is a name request handler to unmarshal request errors
-var UnmarshalErrorHandler = request.NamedHandler{Name: "awssdk.query.UnmarshalError", Fn: UnmarshalError}
-
-type xmlErrorResponse struct {
- Code string `xml:"Error>Code"`
- Message string `xml:"Error>Message"`
- RequestID string `xml:"RequestId"`
-}
-
-type xmlResponseError struct {
- xmlErrorResponse
-}
-
-func (e *xmlResponseError) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
- const svcUnavailableTagName = "ServiceUnavailableException"
- const errorResponseTagName = "ErrorResponse"
-
- switch start.Name.Local {
- case svcUnavailableTagName:
- e.Code = svcUnavailableTagName
- e.Message = "service is unavailable"
- return d.Skip()
-
- case errorResponseTagName:
- return d.DecodeElement(&e.xmlErrorResponse, &start)
-
- default:
- return fmt.Errorf("unknown error response tag, %v", start)
- }
-}
-
-// UnmarshalError unmarshals an error response for an AWS Query service.
-func UnmarshalError(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
-
- var respErr xmlResponseError
- err := xmlutil.UnmarshalXMLError(&respErr, r.HTTPResponse.Body)
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization,
- "failed to unmarshal error message", err),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
- return
- }
-
- reqID := respErr.RequestID
- if len(reqID) == 0 {
- reqID = r.RequestID
- }
-
- r.Error = awserr.NewRequestFailure(
- awserr.New(strings.TrimSpace(respErr.Code), strings.TrimSpace(respErr.Message), nil),
- r.HTTPResponse.StatusCode,
- reqID,
- )
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
deleted file mode 100644
index 63f66af2c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
+++ /dev/null
@@ -1,333 +0,0 @@
-// Package rest provides RESTful serialization of AWS requests and responses.
-package rest
-
-import (
- "bytes"
- "encoding/base64"
- "fmt"
- "io"
- "net/http"
- "net/url"
- "path"
- "reflect"
- "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/private/protocol"
-)
-
-// Whether the byte value can be sent without escaping in AWS URLs
-var noEscape [256]bool
-
-var errValueNotSet = fmt.Errorf("value not set")
-
-var byteSliceType = reflect.TypeOf([]byte{})
-
-func init() {
- for i := 0; i < len(noEscape); i++ {
- // AWS expects every character except these to be escaped
- noEscape[i] = (i >= 'A' && i <= 'Z') ||
- (i >= 'a' && i <= 'z') ||
- (i >= '0' && i <= '9') ||
- i == '-' ||
- i == '.' ||
- i == '_' ||
- i == '~'
- }
-}
-
-// BuildHandler is a named request handler for building rest protocol requests
-var BuildHandler = request.NamedHandler{Name: "awssdk.rest.Build", Fn: Build}
-
-// Build builds the REST component of a service request.
-func Build(r *request.Request) {
- if r.ParamsFilled() {
- v := reflect.ValueOf(r.Params).Elem()
- buildLocationElements(r, v, false)
- buildBody(r, v)
- }
-}
-
-// BuildAsGET builds the REST component of a service request with the ability to hoist
-// data from the body.
-func BuildAsGET(r *request.Request) {
- if r.ParamsFilled() {
- v := reflect.ValueOf(r.Params).Elem()
- buildLocationElements(r, v, true)
- buildBody(r, v)
- }
-}
-
-func buildLocationElements(r *request.Request, v reflect.Value, buildGETQuery bool) {
- query := r.HTTPRequest.URL.Query()
-
- // Setup the raw path to match the base path pattern. This is needed
- // so that when the path is mutated a custom escaped version can be
- // stored in RawPath that will be used by the Go client.
- r.HTTPRequest.URL.RawPath = r.HTTPRequest.URL.Path
-
- for i := 0; i < v.NumField(); i++ {
- m := v.Field(i)
- if n := v.Type().Field(i).Name; n[0:1] == strings.ToLower(n[0:1]) {
- continue
- }
-
- if m.IsValid() {
- field := v.Type().Field(i)
- name := field.Tag.Get("locationName")
- if name == "" {
- name = field.Name
- }
- if kind := m.Kind(); kind == reflect.Ptr {
- m = m.Elem()
- } else if kind == reflect.Interface {
- if !m.Elem().IsValid() {
- continue
- }
- }
- if !m.IsValid() {
- continue
- }
- if field.Tag.Get("ignore") != "" {
- continue
- }
-
- // Support the ability to customize values to be marshaled as a
- // blob even though they were modeled as a string. Required for S3
- // API operations like SSECustomerKey is modeled as string but
- // required to be base64 encoded in request.
- if field.Tag.Get("marshal-as") == "blob" {
- m = m.Convert(byteSliceType)
- }
-
- var err error
- switch field.Tag.Get("location") {
- case "headers": // header maps
- err = buildHeaderMap(&r.HTTPRequest.Header, m, field.Tag)
- case "header":
- err = buildHeader(&r.HTTPRequest.Header, m, name, field.Tag)
- case "uri":
- err = buildURI(r.HTTPRequest.URL, m, name, field.Tag)
- case "querystring":
- err = buildQueryString(query, m, name, field.Tag)
- default:
- if buildGETQuery {
- err = buildQueryString(query, m, name, field.Tag)
- }
- }
- r.Error = err
- }
- if r.Error != nil {
- return
- }
- }
-
- r.HTTPRequest.URL.RawQuery = query.Encode()
- if !aws.BoolValue(r.Config.DisableRestProtocolURICleaning) {
- cleanPath(r.HTTPRequest.URL)
- }
-}
-
-func buildBody(r *request.Request, v reflect.Value) {
- if field, ok := v.Type().FieldByName("_"); ok {
- if payloadName := field.Tag.Get("payload"); payloadName != "" {
- pfield, _ := v.Type().FieldByName(payloadName)
- if ptag := pfield.Tag.Get("type"); ptag != "" && ptag != "structure" {
- payload := reflect.Indirect(v.FieldByName(payloadName))
- if payload.IsValid() && payload.Interface() != nil {
- switch reader := payload.Interface().(type) {
- case io.ReadSeeker:
- r.SetReaderBody(reader)
- case []byte:
- r.SetBufferBody(reader)
- case string:
- r.SetStringBody(reader)
- default:
- r.Error = awserr.New(request.ErrCodeSerialization,
- "failed to encode REST request",
- fmt.Errorf("unknown payload type %s", payload.Type()))
- }
- }
- }
- }
- }
-}
-
-func buildHeader(header *http.Header, v reflect.Value, name string, tag reflect.StructTag) error {
- str, err := convertType(v, tag)
- if err == errValueNotSet {
- return nil
- } else if err != nil {
- return awserr.New(request.ErrCodeSerialization, "failed to encode REST request", err)
- }
-
- name = strings.TrimSpace(name)
- str = strings.TrimSpace(str)
-
- header.Add(name, str)
-
- return nil
-}
-
-func buildHeaderMap(header *http.Header, v reflect.Value, tag reflect.StructTag) error {
- prefix := tag.Get("locationName")
- for _, key := range v.MapKeys() {
- str, err := convertType(v.MapIndex(key), tag)
- if err == errValueNotSet {
- continue
- } else if err != nil {
- return awserr.New(request.ErrCodeSerialization, "failed to encode REST request", err)
-
- }
- keyStr := strings.TrimSpace(key.String())
- str = strings.TrimSpace(str)
-
- header.Add(prefix+keyStr, str)
- }
- return nil
-}
-
-func buildURI(u *url.URL, v reflect.Value, name string, tag reflect.StructTag) error {
- value, err := convertType(v, tag)
- if err == errValueNotSet {
- return nil
- } else if err != nil {
- return awserr.New(request.ErrCodeSerialization, "failed to encode REST request", err)
- }
-
- u.Path = strings.Replace(u.Path, "{"+name+"}", value, -1)
- u.Path = strings.Replace(u.Path, "{"+name+"+}", value, -1)
-
- u.RawPath = strings.Replace(u.RawPath, "{"+name+"}", EscapePath(value, true), -1)
- u.RawPath = strings.Replace(u.RawPath, "{"+name+"+}", EscapePath(value, false), -1)
-
- return nil
-}
-
-func buildQueryString(query url.Values, v reflect.Value, name string, tag reflect.StructTag) error {
- switch value := v.Interface().(type) {
- case []*string:
- for _, item := range value {
- query.Add(name, *item)
- }
- case map[string]*string:
- for key, item := range value {
- query.Add(key, *item)
- }
- case map[string][]*string:
- for key, items := range value {
- for _, item := range items {
- query.Add(key, *item)
- }
- }
- default:
- str, err := convertType(v, tag)
- if err == errValueNotSet {
- return nil
- } else if err != nil {
- return awserr.New(request.ErrCodeSerialization, "failed to encode REST request", err)
- }
- query.Set(name, str)
- }
-
- return nil
-}
-
-func cleanPath(u *url.URL) {
- hasSlash := strings.HasSuffix(u.Path, "/")
-
- // clean up path, removing duplicate `/`
- u.Path = path.Clean(u.Path)
- u.RawPath = path.Clean(u.RawPath)
-
- if hasSlash && !strings.HasSuffix(u.Path, "/") {
- u.Path += "/"
- u.RawPath += "/"
- }
-}
-
-// EscapePath escapes part of a URL path in Amazon style
-func EscapePath(path string, encodeSep bool) string {
- var buf bytes.Buffer
- for i := 0; i < len(path); i++ {
- c := path[i]
- if noEscape[c] || (c == '/' && !encodeSep) {
- buf.WriteByte(c)
- } else {
- fmt.Fprintf(&buf, "%%%02X", c)
- }
- }
- return buf.String()
-}
-
-func convertType(v reflect.Value, tag reflect.StructTag) (str string, err error) {
- v = reflect.Indirect(v)
- if !v.IsValid() {
- return "", errValueNotSet
- }
-
- switch value := v.Interface().(type) {
- case string:
- if tag.Get("suppressedJSONValue") == "true" && tag.Get("location") == "header" {
- value = base64.StdEncoding.EncodeToString([]byte(value))
- }
- str = value
- case []*string:
- if tag.Get("location") != "header" || tag.Get("enum") == "" {
- return "", fmt.Errorf("%T is only supported with location header and enum shapes", value)
- }
- buff := &bytes.Buffer{}
- for i, sv := range value {
- if sv == nil || len(*sv) == 0 {
- continue
- }
- if i != 0 {
- buff.WriteRune(',')
- }
- item := *sv
- if strings.Index(item, `,`) != -1 || strings.Index(item, `"`) != -1 {
- item = strconv.Quote(item)
- }
- buff.WriteString(item)
- }
- str = string(buff.Bytes())
- case []byte:
- str = base64.StdEncoding.EncodeToString(value)
- case bool:
- str = strconv.FormatBool(value)
- case int64:
- str = strconv.FormatInt(value, 10)
- case float64:
- str = strconv.FormatFloat(value, 'f', -1, 64)
- case time.Time:
- format := tag.Get("timestampFormat")
- if len(format) == 0 {
- format = protocol.RFC822TimeFormatName
- if tag.Get("location") == "querystring" {
- format = protocol.ISO8601TimeFormatName
- }
- }
- str = protocol.FormatTime(format, value)
- case aws.JSONValue:
- if len(value) == 0 {
- return "", errValueNotSet
- }
- escaping := protocol.NoEscape
- if tag.Get("location") == "header" {
- escaping = protocol.Base64Escape
- }
- str, err = protocol.EncodeJSONValue(value, escaping)
- if err != nil {
- return "", fmt.Errorf("unable to encode JSONValue, %v", err)
- }
- default:
- err := fmt.Errorf("unsupported value for param %v (%s)", v.Interface(), v.Type())
- return "", err
- }
-
- return str, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go
deleted file mode 100644
index b54c99eda..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go
+++ /dev/null
@@ -1,54 +0,0 @@
-package rest
-
-import "reflect"
-
-// PayloadMember returns the payload field member of i if there is one, or nil.
-func PayloadMember(i interface{}) interface{} {
- if i == nil {
- return nil
- }
-
- v := reflect.ValueOf(i).Elem()
- if !v.IsValid() {
- return nil
- }
- if field, ok := v.Type().FieldByName("_"); ok {
- if payloadName := field.Tag.Get("payload"); payloadName != "" {
- field, _ := v.Type().FieldByName(payloadName)
- if field.Tag.Get("type") != "structure" {
- return nil
- }
-
- payload := v.FieldByName(payloadName)
- if payload.IsValid() || (payload.Kind() == reflect.Ptr && !payload.IsNil()) {
- return payload.Interface()
- }
- }
- }
- return nil
-}
-
-const nopayloadPayloadType = "nopayload"
-
-// PayloadType returns the type of a payload field member of i if there is one,
-// or "".
-func PayloadType(i interface{}) string {
- v := reflect.Indirect(reflect.ValueOf(i))
- if !v.IsValid() {
- return ""
- }
-
- if field, ok := v.Type().FieldByName("_"); ok {
- if noPayload := field.Tag.Get(nopayloadPayloadType); noPayload != "" {
- return nopayloadPayloadType
- }
-
- if payloadName := field.Tag.Get("payload"); payloadName != "" {
- if member, ok := v.Type().FieldByName(payloadName); ok {
- return member.Tag.Get("type")
- }
- }
- }
-
- return ""
-}
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
deleted file mode 100644
index cdef403e2..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
+++ /dev/null
@@ -1,264 +0,0 @@
-package rest
-
-import (
- "bytes"
- "encoding/base64"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "reflect"
- "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"
- awsStrings "github.com/aws/aws-sdk-go/internal/strings"
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-// UnmarshalHandler is a named request handler for unmarshaling rest protocol requests
-var UnmarshalHandler = request.NamedHandler{Name: "awssdk.rest.Unmarshal", Fn: Unmarshal}
-
-// UnmarshalMetaHandler is a named request handler for unmarshaling rest protocol request metadata
-var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.rest.UnmarshalMeta", Fn: UnmarshalMeta}
-
-// Unmarshal unmarshals the REST component of a response in a REST service.
-func Unmarshal(r *request.Request) {
- if r.DataFilled() {
- v := reflect.Indirect(reflect.ValueOf(r.Data))
- if err := unmarshalBody(r, v); err != nil {
- r.Error = err
- }
- }
-}
-
-// UnmarshalMeta unmarshals the REST metadata of a response in a REST service
-func UnmarshalMeta(r *request.Request) {
- r.RequestID = r.HTTPResponse.Header.Get("X-Amzn-Requestid")
- if r.RequestID == "" {
- // Alternative version of request id in the header
- r.RequestID = r.HTTPResponse.Header.Get("X-Amz-Request-Id")
- }
- if r.DataFilled() {
- if err := UnmarshalResponse(r.HTTPResponse, r.Data, aws.BoolValue(r.Config.LowerCaseHeaderMaps)); err != nil {
- r.Error = err
- }
- }
-}
-
-// 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)
- if ptag := pfield.Tag.Get("type"); ptag != "" && ptag != "structure" {
- payload := v.FieldByName(payloadName)
- if payload.IsValid() {
- switch payload.Interface().(type) {
- case []byte:
- defer r.HTTPResponse.Body.Close()
- b, err := ioutil.ReadAll(r.HTTPResponse.Body)
- if err != nil {
- 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 {
- 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 {
- return awserr.New(request.ErrCodeSerialization,
- "failed to read response body", err)
- }
- payload.Set(reflect.ValueOf(ioutil.NopCloser(bytes.NewReader(b))))
-
- default:
- io.Copy(ioutil.Discard, r.HTTPResponse.Body)
- r.HTTPResponse.Body.Close()
- return awserr.New(request.ErrCodeSerialization,
- "failed to decode REST response",
- fmt.Errorf("unknown payload type %s", payload.Type()))
- }
- }
- }
- }
- }
- }
-
- return nil
-}
-
-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]) {
- continue
- }
-
- if m.IsValid() {
- name := field.Tag.Get("locationName")
- if name == "" {
- name = field.Name
- }
-
- switch field.Tag.Get("location") {
- case "statusCode":
- unmarshalStatusCode(m, resp.StatusCode)
-
- case "header":
- err := unmarshalHeader(m, resp.Header.Get(name), field.Tag)
- if err != nil {
- return awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
- }
-
- case "headers":
- prefix := field.Tag.Get("locationName")
- err := unmarshalHeaderMap(m, resp.Header, prefix, lowerCaseHeaderMaps)
- if err != nil {
- return awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
- }
- }
- }
- }
-
- return nil
-}
-
-func unmarshalStatusCode(v reflect.Value, statusCode int) {
- if !v.IsValid() {
- return
- }
-
- switch v.Interface().(type) {
- case *int64:
- s := int64(statusCode)
- v.Set(reflect.ValueOf(&s))
- }
-}
-
-func unmarshalHeaderMap(r reflect.Value, headers http.Header, prefix string, normalize bool) error {
- if len(headers) == 0 {
- return nil
- }
- switch r.Interface().(type) {
- case map[string]*string: // we only support string map value types
- out := map[string]*string{}
- for k, v := range headers {
- if awsStrings.HasPrefixFold(k, prefix) {
- if normalize == true {
- k = strings.ToLower(k)
- } else {
- k = http.CanonicalHeaderKey(k)
- }
- out[k[len(prefix):]] = &v[0]
- }
- }
- if len(out) != 0 {
- r.Set(reflect.ValueOf(out))
- }
-
- }
- return nil
-}
-
-func unmarshalHeader(v reflect.Value, header string, tag reflect.StructTag) error {
- switch tag.Get("type") {
- case "jsonvalue":
- if len(header) == 0 {
- return nil
- }
- case "blob":
- if len(header) == 0 {
- return nil
- }
- default:
- if !v.IsValid() || (header == "" && v.Elem().Kind() != reflect.String) {
- return nil
- }
- }
-
- switch v.Interface().(type) {
- case *string:
- if tag.Get("suppressedJSONValue") == "true" && tag.Get("location") == "header" {
- b, err := base64.StdEncoding.DecodeString(header)
- if err != nil {
- return fmt.Errorf("failed to decode JSONValue, %v", err)
- }
- header = string(b)
- }
- v.Set(reflect.ValueOf(&header))
- case []byte:
- b, err := base64.StdEncoding.DecodeString(header)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(b))
- case *bool:
- b, err := strconv.ParseBool(header)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(&b))
- case *int64:
- i, err := strconv.ParseInt(header, 10, 64)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(&i))
- case *float64:
- f, err := strconv.ParseFloat(header, 64)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(&f))
- case *time.Time:
- format := tag.Get("timestampFormat")
- if len(format) == 0 {
- format = protocol.RFC822TimeFormatName
- }
- t, err := protocol.ParseTime(format, header)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(&t))
- case aws.JSONValue:
- escaping := protocol.NoEscape
- if tag.Get("location") == "header" {
- escaping = protocol.Base64Escape
- }
- m, err := protocol.DecodeJSONValue(header, escaping)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(m))
- default:
- err := fmt.Errorf("Unsupported value for param %v (%s)", v.Interface(), v.Type())
- return err
- }
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go
deleted file mode 100644
index 2e0e205af..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Package restjson provides RESTful JSON serialization of AWS
-// requests and responses.
-package restjson
-
-//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/input/rest-json.json build_test.go
-//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/output/rest-json.json unmarshal_test.go
-
-import (
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
- "github.com/aws/aws-sdk-go/private/protocol/rest"
-)
-
-// BuildHandler is a named request handler for building restjson protocol
-// requests
-var BuildHandler = request.NamedHandler{
- Name: "awssdk.restjson.Build",
- Fn: Build,
-}
-
-// UnmarshalHandler is a named request handler for unmarshaling restjson
-// protocol requests
-var UnmarshalHandler = request.NamedHandler{
- Name: "awssdk.restjson.Unmarshal",
- Fn: Unmarshal,
-}
-
-// UnmarshalMetaHandler is a named request handler for unmarshaling restjson
-// protocol request metadata
-var UnmarshalMetaHandler = request.NamedHandler{
- Name: "awssdk.restjson.UnmarshalMeta",
- Fn: UnmarshalMeta,
-}
-
-// Build builds a request for the REST JSON protocol.
-func Build(r *request.Request) {
- rest.Build(r)
-
- if t := rest.PayloadType(r.Params); t == "structure" || t == "" {
- if v := r.HTTPRequest.Header.Get("Content-Type"); len(v) == 0 {
- r.HTTPRequest.Header.Set("Content-Type", "application/json")
- }
- jsonrpc.Build(r)
- }
-}
-
-// Unmarshal unmarshals a response body for the REST JSON protocol.
-func Unmarshal(r *request.Request) {
- if t := rest.PayloadType(r.Data); t == "structure" || t == "" {
- jsonrpc.Unmarshal(r)
- } else {
- rest.Unmarshal(r)
- }
-}
-
-// UnmarshalMeta unmarshals response headers for the REST JSON protocol.
-func UnmarshalMeta(r *request.Request) {
- rest.UnmarshalMeta(r)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/unmarshal_error.go
deleted file mode 100644
index d756d8cc5..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/unmarshal_error.go
+++ /dev/null
@@ -1,134 +0,0 @@
-package restjson
-
-import (
- "bytes"
- "io"
- "io/ioutil"
- "net/http"
- "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"
- "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil"
- "github.com/aws/aws-sdk-go/private/protocol/rest"
-)
-
-const (
- errorTypeHeader = "X-Amzn-Errortype"
- errorMessageHeader = "X-Amzn-Errormessage"
-)
-
-// UnmarshalTypedError provides unmarshaling errors API response errors
-// for both typed and untyped errors.
-type UnmarshalTypedError struct {
- exceptions map[string]func(protocol.ResponseMetadata) error
-}
-
-// NewUnmarshalTypedError returns an UnmarshalTypedError initialized for the
-// set of exception names to the error unmarshalers
-func NewUnmarshalTypedError(exceptions map[string]func(protocol.ResponseMetadata) error) *UnmarshalTypedError {
- return &UnmarshalTypedError{
- exceptions: exceptions,
- }
-}
-
-// UnmarshalError attempts to unmarshal the HTTP response error as a known
-// error type. If unable to unmarshal the error type, the generic SDK error
-// type will be used.
-func (u *UnmarshalTypedError) UnmarshalError(
- resp *http.Response,
- respMeta protocol.ResponseMetadata,
-) (error, error) {
-
- code := resp.Header.Get(errorTypeHeader)
- msg := resp.Header.Get(errorMessageHeader)
-
- body := resp.Body
- if len(code) == 0 {
- // If unable to get code from HTTP headers have to parse JSON message
- // to determine what kind of exception this will be.
- var buf bytes.Buffer
- var jsonErr jsonErrorResponse
- teeReader := io.TeeReader(resp.Body, &buf)
- err := jsonutil.UnmarshalJSONError(&jsonErr, teeReader)
- if err != nil {
- return nil, err
- }
-
- body = ioutil.NopCloser(&buf)
- code = jsonErr.Code
- msg = jsonErr.Message
- }
-
- // If code has colon separators remove them so can compare against modeled
- // exception names.
- code = strings.SplitN(code, ":", 2)[0]
-
- if fn, ok := u.exceptions[code]; ok {
- // If exception code is know, use associated constructor to get a value
- // for the exception that the JSON body can be unmarshaled into.
- v := fn(respMeta)
- if err := jsonutil.UnmarshalJSONCaseInsensitive(v, body); err != nil {
- return nil, err
- }
-
- if err := rest.UnmarshalResponse(resp, v, true); err != nil {
- return nil, err
- }
-
- return v, nil
- }
-
- // fallback to unmodeled generic exceptions
- return awserr.NewRequestFailure(
- awserr.New(code, msg, nil),
- respMeta.StatusCode,
- respMeta.RequestID,
- ), nil
-}
-
-// UnmarshalErrorHandler is a named request handler for unmarshaling restjson
-// protocol request errors
-var UnmarshalErrorHandler = request.NamedHandler{
- Name: "awssdk.restjson.UnmarshalError",
- Fn: UnmarshalError,
-}
-
-// UnmarshalError unmarshals a response error for the REST JSON protocol.
-func UnmarshalError(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
-
- var jsonErr jsonErrorResponse
- err := jsonutil.UnmarshalJSONError(&jsonErr, r.HTTPResponse.Body)
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization,
- "failed to unmarshal response error", err),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
- return
- }
-
- code := r.HTTPResponse.Header.Get(errorTypeHeader)
- if code == "" {
- code = jsonErr.Code
- }
- msg := r.HTTPResponse.Header.Get(errorMessageHeader)
- if msg == "" {
- msg = jsonErr.Message
- }
-
- code = strings.SplitN(code, ":", 2)[0]
- r.Error = awserr.NewRequestFailure(
- awserr.New(code, jsonErr.Message, nil),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
-}
-
-type jsonErrorResponse struct {
- Code string `json:"code"`
- Message string `json:"message"`
-}
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
deleted file mode 100644
index b1ae36487..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Package restxml provides RESTful XML serialization of AWS
-// requests and responses.
-package restxml
-
-//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"
- "encoding/xml"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/query"
- "github.com/aws/aws-sdk-go/private/protocol/rest"
- "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
-)
-
-// BuildHandler is a named request handler for building restxml protocol requests
-var BuildHandler = request.NamedHandler{Name: "awssdk.restxml.Build", Fn: Build}
-
-// UnmarshalHandler is a named request handler for unmarshaling restxml protocol requests
-var UnmarshalHandler = request.NamedHandler{Name: "awssdk.restxml.Unmarshal", Fn: Unmarshal}
-
-// UnmarshalMetaHandler is a named request handler for unmarshaling restxml protocol request metadata
-var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.restxml.UnmarshalMeta", Fn: UnmarshalMeta}
-
-// UnmarshalErrorHandler is a named request handler for unmarshaling restxml protocol request errors
-var UnmarshalErrorHandler = request.NamedHandler{Name: "awssdk.restxml.UnmarshalError", Fn: UnmarshalError}
-
-// Build builds a request payload for the REST XML protocol.
-func Build(r *request.Request) {
- rest.Build(r)
-
- if t := rest.PayloadType(r.Params); t == "structure" || t == "" {
- var buf bytes.Buffer
- err := xmlutil.BuildXML(r.Params, xml.NewEncoder(&buf))
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization,
- "failed to encode rest XML request", err),
- 0,
- r.RequestID,
- )
- return
- }
- r.SetBufferBody(buf.Bytes())
- }
-}
-
-// Unmarshal unmarshals a payload response for the REST XML protocol.
-func Unmarshal(r *request.Request) {
- if t := rest.PayloadType(r.Data); t == "structure" || t == "" {
- defer r.HTTPResponse.Body.Close()
- decoder := xml.NewDecoder(r.HTTPResponse.Body)
- err := xmlutil.UnmarshalXML(r.Data, decoder, "")
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization,
- "failed to decode REST XML response", err),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
- return
- }
- } else {
- rest.Unmarshal(r)
- }
-}
-
-// UnmarshalMeta unmarshals response headers for the REST XML protocol.
-func UnmarshalMeta(r *request.Request) {
- rest.UnmarshalMeta(r)
-}
-
-// UnmarshalError unmarshals a response error for the REST XML protocol.
-func UnmarshalError(r *request.Request) {
- query.UnmarshalError(r)
-}
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
deleted file mode 100644
index d9a4e7649..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go
+++ /dev/null
@@ -1,134 +0,0 @@
-package protocol
-
-import (
- "bytes"
- "fmt"
- "math"
- "strconv"
- "time"
-
- "github.com/aws/aws-sdk-go/internal/sdkmath"
-)
-
-// Names of time formats supported by the SDK
-const (
- RFC822TimeFormatName = "rfc822"
- ISO8601TimeFormatName = "iso8601"
- UnixTimeFormatName = "unixTimestamp"
-)
-
-// Time formats supported by the SDK
-// Output time is intended to not contain decimals
-const (
- // RFC 7231#section-7.1.1.1 timetamp format. e.g Tue, 29 Apr 2014 18:30:38 GMT
- RFC822TimeFormat = "Mon, 2 Jan 2006 15:04:05 GMT"
- rfc822TimeFormatSingleDigitDay = "Mon, _2 Jan 2006 15:04:05 GMT"
- rfc822TimeFormatSingleDigitDayTwoDigitYear = "Mon, _2 Jan 06 15:04:05 GMT"
-
- // This format is used for output time without seconds precision
- RFC822OutputTimeFormat = "Mon, 02 Jan 2006 15:04:05 GMT"
-
- // RFC3339 a subset of the ISO8601 timestamp format. e.g 2014-04-29T18:30:38Z
- ISO8601TimeFormat = "2006-01-02T15:04:05.999999999Z"
- iso8601TimeFormatNoZ = "2006-01-02T15:04:05.999999999"
-
- // This format is used for output time with fractional second precision up to milliseconds
- ISO8601OutputTimeFormat = "2006-01-02T15:04:05.999999999Z"
-)
-
-// IsKnownTimestampFormat returns if the timestamp format name
-// is know to the SDK's protocols.
-func IsKnownTimestampFormat(name string) bool {
- switch name {
- case RFC822TimeFormatName:
- fallthrough
- case ISO8601TimeFormatName:
- fallthrough
- case UnixTimeFormatName:
- return true
- default:
- return false
- }
-}
-
-// FormatTime returns a string value of the time.
-func FormatTime(name string, t time.Time) string {
- t = t.UTC().Truncate(time.Millisecond)
-
- switch name {
- case RFC822TimeFormatName:
- return t.Format(RFC822OutputTimeFormat)
- case ISO8601TimeFormatName:
- return t.Format(ISO8601OutputTimeFormat)
- case UnixTimeFormatName:
- ms := t.UnixNano() / int64(time.Millisecond)
- return strconv.FormatFloat(float64(ms)/1e3, 'f', -1, 64)
- default:
- panic("unknown timestamp format name, " + name)
- }
-}
-
-// ParseTime attempts to parse the time given the format. Returns
-// the time if it was able to be parsed, and fails otherwise.
-func ParseTime(formatName, value string) (time.Time, error) {
- switch formatName {
- case RFC822TimeFormatName: // Smithy HTTPDate format
- return tryParse(value,
- RFC822TimeFormat,
- rfc822TimeFormatSingleDigitDay,
- rfc822TimeFormatSingleDigitDayTwoDigitYear,
- time.RFC850,
- time.ANSIC,
- )
- case ISO8601TimeFormatName: // Smithy DateTime format
- return tryParse(value,
- ISO8601TimeFormat,
- iso8601TimeFormatNoZ,
- time.RFC3339Nano,
- time.RFC3339,
- )
- case UnixTimeFormatName:
- v, err := strconv.ParseFloat(value, 64)
- _, dec := math.Modf(v)
- dec = sdkmath.Round(dec*1e3) / 1e3 //Rounds 0.1229999 to 0.123
- if err != nil {
- return time.Time{}, err
- }
- return time.Unix(int64(v), int64(dec*(1e9))), nil
- default:
- panic("unknown timestamp format name, " + formatName)
- }
-}
-
-func tryParse(v string, formats ...string) (time.Time, error) {
- var errs parseErrors
- for _, f := range formats {
- t, err := time.Parse(f, v)
- if err != nil {
- errs = append(errs, parseError{
- Format: f,
- Err: err,
- })
- continue
- }
- return t, nil
- }
-
- return time.Time{}, fmt.Errorf("unable to parse time string, %v", errs)
-}
-
-type parseErrors []parseError
-
-func (es parseErrors) Error() string {
- var s bytes.Buffer
- for _, e := range es {
- fmt.Fprintf(&s, "\n * %q: %v", e.Format, e.Err)
- }
-
- return "parse errors:" + s.String()
-}
-
-type parseError struct {
- Format string
- Err error
-}
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
deleted file mode 100644
index f614ef898..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package protocol
-
-import (
- "io"
- "io/ioutil"
-
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// UnmarshalDiscardBodyHandler is a named request handler to empty and close a response's body
-var UnmarshalDiscardBodyHandler = request.NamedHandler{Name: "awssdk.shared.UnmarshalDiscardBody", Fn: UnmarshalDiscardBody}
-
-// UnmarshalDiscardBody is a request handler to empty a response's body and closing it.
-func UnmarshalDiscardBody(r *request.Request) {
- if r.HTTPResponse == nil || r.HTTPResponse.Body == nil {
- return
- }
-
- 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/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal_error.go
deleted file mode 100644
index cc857f136..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal_error.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package protocol
-
-import (
- "net/http"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// UnmarshalErrorHandler provides unmarshaling errors API response errors for
-// both typed and untyped errors.
-type UnmarshalErrorHandler struct {
- unmarshaler ErrorUnmarshaler
-}
-
-// ErrorUnmarshaler is an abstract interface for concrete implementations to
-// unmarshal protocol specific response errors.
-type ErrorUnmarshaler interface {
- UnmarshalError(*http.Response, ResponseMetadata) (error, error)
-}
-
-// NewUnmarshalErrorHandler returns an UnmarshalErrorHandler
-// initialized for the set of exception names to the error unmarshalers
-func NewUnmarshalErrorHandler(unmarshaler ErrorUnmarshaler) *UnmarshalErrorHandler {
- return &UnmarshalErrorHandler{
- unmarshaler: unmarshaler,
- }
-}
-
-// UnmarshalErrorHandlerName is the name of the named handler.
-const UnmarshalErrorHandlerName = "awssdk.protocol.UnmarshalError"
-
-// NamedHandler returns a NamedHandler for the unmarshaler using the set of
-// errors the unmarshaler was initialized for.
-func (u *UnmarshalErrorHandler) NamedHandler() request.NamedHandler {
- return request.NamedHandler{
- Name: UnmarshalErrorHandlerName,
- Fn: u.UnmarshalError,
- }
-}
-
-// UnmarshalError will attempt to unmarshal the API response's error message
-// into either a generic SDK error type, or a typed error corresponding to the
-// errors exception name.
-func (u *UnmarshalErrorHandler) UnmarshalError(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
-
- respMeta := ResponseMetadata{
- StatusCode: r.HTTPResponse.StatusCode,
- RequestID: r.RequestID,
- }
-
- v, err := u.unmarshaler.UnmarshalError(r.HTTPResponse, respMeta)
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization,
- "failed to unmarshal response error", err),
- respMeta.StatusCode,
- respMeta.RequestID,
- )
- return
- }
-
- r.Error = v
-}
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
deleted file mode 100644
index 2fbb93ae7..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go
+++ /dev/null
@@ -1,317 +0,0 @@
-// Package xmlutil provides XML serialization of AWS requests and responses.
-package xmlutil
-
-import (
- "encoding/base64"
- "encoding/xml"
- "fmt"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-// BuildXML will serialize params into an xml.Encoder. Error will be returned
-// if the serialization of any of the params or nested values fails.
-func BuildXML(params interface{}, e *xml.Encoder) error {
- return buildXML(params, e, false)
-}
-
-func buildXML(params interface{}, e *xml.Encoder, sorted bool) error {
- b := xmlBuilder{encoder: e, namespaces: map[string]string{}}
- root := NewXMLElement(xml.Name{})
- if err := b.buildValue(reflect.ValueOf(params), root, ""); err != nil {
- return err
- }
- for _, c := range root.Children {
- for _, v := range c {
- return StructToXML(e, v, sorted)
- }
- }
- return nil
-}
-
-// Returns the reflection element of a value, if it is a pointer.
-func elemOf(value reflect.Value) reflect.Value {
- for value.Kind() == reflect.Ptr {
- value = value.Elem()
- }
- return value
-}
-
-// A xmlBuilder serializes values from Go code to XML
-type xmlBuilder struct {
- encoder *xml.Encoder
- namespaces map[string]string
-}
-
-// buildValue generic XMLNode builder for any type. Will build value for their specific type
-// struct, list, map, scalar.
-//
-// Also takes a "type" tag value to set what type a value should be converted to XMLNode as. If
-// type is not provided reflect will be used to determine the value's type.
-func (b *xmlBuilder) buildValue(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
- value = elemOf(value)
- if !value.IsValid() { // no need to handle zero values
- return nil
- } else if tag.Get("location") != "" { // don't handle non-body location values
- 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() {
- case reflect.Struct:
- t = "structure"
- case reflect.Slice:
- t = "list"
- case reflect.Map:
- t = "map"
- }
- }
-
- switch t {
- case "structure":
- if field, ok := value.Type().FieldByName("_"); ok {
- tag = tag + reflect.StructTag(" ") + field.Tag
- }
- return b.buildStruct(value, current, tag)
- case "list":
- return b.buildList(value, current, tag)
- case "map":
- return b.buildMap(value, current, tag)
- default:
- return b.buildScalar(value, current, tag)
- }
-}
-
-// buildStruct adds a struct and its fields to the current XMLNode. All fields and any nested
-// types are converted to XMLNodes also.
-func (b *xmlBuilder) buildStruct(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
- if !value.IsValid() {
- return nil
- }
-
- // unwrap payloads
- if payload := tag.Get("payload"); payload != "" {
- field, _ := value.Type().FieldByName(payload)
- tag = field.Tag
- value = elemOf(value.FieldByName(payload))
-
- if !value.IsValid() {
- return nil
- }
- }
-
- child := NewXMLElement(xml.Name{Local: tag.Get("locationName")})
-
- // there is an xmlNamespace associated with this struct
- if prefix, uri := tag.Get("xmlPrefix"), tag.Get("xmlURI"); uri != "" {
- ns := xml.Attr{
- Name: xml.Name{Local: "xmlns"},
- Value: uri,
- }
- if prefix != "" {
- b.namespaces[prefix] = uri // register the namespace
- ns.Name.Local = "xmlns:" + prefix
- }
-
- child.Attr = append(child.Attr, ns)
- }
-
- var payloadFields, nonPayloadFields int
-
- t := value.Type()
- for i := 0; i < value.NumField(); i++ {
- member := elemOf(value.Field(i))
- field := t.Field(i)
-
- if field.PkgPath != "" {
- continue // ignore unexported fields
- }
- if field.Tag.Get("ignore") != "" {
- continue
- }
-
- mTag := field.Tag
- if mTag.Get("location") != "" { // skip non-body members
- nonPayloadFields++
- continue
- }
- payloadFields++
-
- if protocol.CanSetIdempotencyToken(value.Field(i), field) {
- token := protocol.GetIdempotencyToken()
- member = reflect.ValueOf(token)
- }
-
- memberName := mTag.Get("locationName")
- if memberName == "" {
- memberName = field.Name
- mTag = reflect.StructTag(string(mTag) + ` locationName:"` + memberName + `"`)
- }
- if err := b.buildValue(member, child, mTag); err != nil {
- return err
- }
- }
-
- // Only case where the child shape is not added is if the shape only contains
- // non-payload fields, e.g headers/query.
- if !(payloadFields == 0 && nonPayloadFields > 0) {
- current.AddChild(child)
- }
-
- return nil
-}
-
-// buildList adds the value's list items to the current XMLNode as children nodes. All
-// nested values in the list are converted to XMLNodes also.
-func (b *xmlBuilder) buildList(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
- if value.IsNil() { // don't build omitted lists
- return nil
- }
-
- // check for unflattened list member
- flattened := tag.Get("flattened") != ""
-
- xname := xml.Name{Local: tag.Get("locationName")}
- if flattened {
- for i := 0; i < value.Len(); i++ {
- child := NewXMLElement(xname)
- current.AddChild(child)
- if err := b.buildValue(value.Index(i), child, ""); err != nil {
- return err
- }
- }
- } else {
- list := NewXMLElement(xname)
- current.AddChild(list)
-
- for i := 0; i < value.Len(); i++ {
- iname := tag.Get("locationNameList")
- if iname == "" {
- iname = "member"
- }
-
- child := NewXMLElement(xml.Name{Local: iname})
- list.AddChild(child)
- if err := b.buildValue(value.Index(i), child, ""); err != nil {
- return err
- }
- }
- }
-
- return nil
-}
-
-// buildMap adds the value's key/value pairs to the current XMLNode as children nodes. All
-// nested values in the map are converted to XMLNodes also.
-//
-// Error will be returned if it is unable to build the map's values into XMLNodes
-func (b *xmlBuilder) buildMap(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
- if value.IsNil() { // don't build omitted maps
- return nil
- }
-
- maproot := NewXMLElement(xml.Name{Local: tag.Get("locationName")})
- current.AddChild(maproot)
- current = maproot
-
- kname, vname := "key", "value"
- if n := tag.Get("locationNameKey"); n != "" {
- kname = n
- }
- if n := tag.Get("locationNameValue"); n != "" {
- vname = n
- }
-
- // sorting is not required for compliance, but it makes testing easier
- keys := make([]string, value.Len())
- for i, k := range value.MapKeys() {
- keys[i] = k.String()
- }
- sort.Strings(keys)
-
- for _, k := range keys {
- v := value.MapIndex(reflect.ValueOf(k))
-
- mapcur := current
- if tag.Get("flattened") == "" { // add "entry" tag to non-flat maps
- child := NewXMLElement(xml.Name{Local: "entry"})
- mapcur.AddChild(child)
- mapcur = child
- }
-
- kchild := NewXMLElement(xml.Name{Local: kname})
- kchild.Text = k
- vchild := NewXMLElement(xml.Name{Local: vname})
- mapcur.AddChild(kchild)
- mapcur.AddChild(vchild)
-
- if err := b.buildValue(v, vchild, ""); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-// buildScalar will convert the value into a string and append it as a attribute or child
-// of the current XMLNode.
-//
-// The value will be added as an attribute if tag contains a "xmlAttribute" attribute value.
-//
-// Error will be returned if the value type is unsupported.
-func (b *xmlBuilder) buildScalar(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
- var str string
- switch converted := value.Interface().(type) {
- case string:
- str = converted
- case []byte:
- if !value.IsNil() {
- str = base64.StdEncoding.EncodeToString(converted)
- }
- case bool:
- str = strconv.FormatBool(converted)
- case int64:
- str = strconv.FormatInt(converted, 10)
- case int:
- str = strconv.Itoa(converted)
- case float64:
- str = strconv.FormatFloat(converted, 'f', -1, 64)
- case float32:
- str = strconv.FormatFloat(float64(converted), 'f', -1, 32)
- case time.Time:
- format := tag.Get("timestampFormat")
- if len(format) == 0 {
- format = protocol.ISO8601TimeFormatName
- }
-
- str = protocol.FormatTime(format, converted)
- default:
- return fmt.Errorf("unsupported value for param %s: %v (%s)",
- tag.Get("locationName"), value.Interface(), value.Type().Name())
- }
-
- xname := xml.Name{Local: tag.Get("locationName")}
- if tag.Get("xmlAttribute") != "" { // put into current node's attribute list
- attr := xml.Attr{Name: xname, Value: str}
- current.Attr = append(current.Attr, attr)
- } else if len(xname.Local) == 0 {
- current.Text = str
- } else { // regular text node
- current.AddChild(&XMLNode{Name: xname, Text: str})
- }
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/sort.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/sort.go
deleted file mode 100644
index c1a511851..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/sort.go
+++ /dev/null
@@ -1,32 +0,0 @@
-package xmlutil
-
-import (
- "encoding/xml"
- "strings"
-)
-
-type xmlAttrSlice []xml.Attr
-
-func (x xmlAttrSlice) Len() int {
- return len(x)
-}
-
-func (x xmlAttrSlice) Less(i, j int) bool {
- spaceI, spaceJ := x[i].Name.Space, x[j].Name.Space
- localI, localJ := x[i].Name.Local, x[j].Name.Local
- valueI, valueJ := x[i].Value, x[j].Value
-
- spaceCmp := strings.Compare(spaceI, spaceJ)
- localCmp := strings.Compare(localI, localJ)
- valueCmp := strings.Compare(valueI, valueJ)
-
- if spaceCmp == -1 || (spaceCmp == 0 && (localCmp == -1 || (localCmp == 0 && valueCmp == -1))) {
- return true
- }
-
- return false
-}
-
-func (x xmlAttrSlice) Swap(i, j int) {
- x[i], x[j] = x[j], x[i]
-}
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
deleted file mode 100644
index 107c053f8..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go
+++ /dev/null
@@ -1,299 +0,0 @@
-package xmlutil
-
-import (
- "bytes"
- "encoding/base64"
- "encoding/xml"
- "fmt"
- "io"
- "reflect"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-// UnmarshalXMLError unmarshals the XML error from the stream into the value
-// type specified. The value must be a pointer. If the message fails to
-// unmarshal, the message content will be included in the returned error as a
-// awserr.UnmarshalError.
-func UnmarshalXMLError(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 nil
-}
-
-// UnmarshalXML deserializes an xml.Decoder into the container v. V
-// needs to match the shape of the XML expected to be decoded.
-// If the shape doesn't match unmarshaling will fail.
-func UnmarshalXML(v interface{}, d *xml.Decoder, wrapper string) error {
- n, err := XMLToStruct(d, nil)
- if err != nil {
- return err
- }
- if n.Children != nil {
- for _, root := range n.Children {
- for _, c := range root {
- if wrappedChild, ok := c.Children[wrapper]; ok {
- c = wrappedChild[0] // pull out wrapped element
- }
-
- err = parse(reflect.ValueOf(v), c, "")
- if err != nil {
- if err == io.EOF {
- return nil
- }
- return err
- }
- }
- }
- return nil
- }
- return nil
-}
-
-// 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
- }
-
- t := tag.Get("type")
- if t == "" {
- switch rtype.Kind() {
- case reflect.Struct:
- // also it can't be a time object
- if _, ok := r.Interface().(*time.Time); !ok {
- t = "structure"
- }
- case reflect.Slice:
- // also it can't be a byte slice
- if _, ok := r.Interface().([]byte); !ok {
- t = "list"
- }
- case reflect.Map:
- t = "map"
- }
- }
-
- switch t {
- case "structure":
- if field, ok := rtype.FieldByName("_"); ok {
- tag = field.Tag
- }
- return parseStruct(r, node, tag)
- case "list":
- return parseList(r, node, tag)
- case "map":
- return parseMap(r, node, tag)
- default:
- return parseScalar(r, node, tag)
- }
-}
-
-// parseStruct deserializes a structure and its fields from an XMLNode. Any nested
-// types in the structure will also be deserialized.
-func parseStruct(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- t := r.Type()
- if r.Kind() == reflect.Ptr {
- if r.IsNil() { // create the structure if it's nil
- s := reflect.New(r.Type().Elem())
- r.Set(s)
- r = s
- }
-
- r = r.Elem()
- t = t.Elem()
- }
-
- // unwrap any payloads
- if payload := tag.Get("payload"); payload != "" {
- field, _ := t.FieldByName(payload)
- return parseStruct(r.FieldByName(payload), node, field.Tag)
- }
-
- for i := 0; i < t.NumField(); i++ {
- field := t.Field(i)
- if c := field.Name[0:1]; strings.ToLower(c) == c {
- continue // ignore unexported fields
- }
-
- // figure out what this field is called
- name := field.Name
- if field.Tag.Get("flattened") != "" && field.Tag.Get("locationNameList") != "" {
- name = field.Tag.Get("locationNameList")
- } else if locName := field.Tag.Get("locationName"); locName != "" {
- name = locName
- }
-
- // try to find the field by name in elements
- elems := node.Children[name]
-
- if elems == nil { // try to find the field in attributes
- if val, ok := node.findElem(name); ok {
- elems = []*XMLNode{{Text: val}}
- }
- }
-
- member := r.FieldByName(field.Name)
- for _, elem := range elems {
- err := parse(member, elem, field.Tag)
- if err != nil {
- return err
- }
- }
- }
- return nil
-}
-
-// parseList deserializes a list of values from an XML node. Each list entry
-// will also be deserialized.
-func parseList(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- t := r.Type()
-
- if tag.Get("flattened") == "" { // look at all item entries
- mname := "member"
- if name := tag.Get("locationNameList"); name != "" {
- mname = name
- }
-
- if Children, ok := node.Children[mname]; ok {
- if r.IsNil() {
- r.Set(reflect.MakeSlice(t, len(Children), len(Children)))
- }
-
- for i, c := range Children {
- err := parse(r.Index(i), c, "")
- if err != nil {
- return err
- }
- }
- }
- } else { // flattened list means this is a single element
- if r.IsNil() {
- r.Set(reflect.MakeSlice(t, 0, 0))
- }
-
- childR := reflect.Zero(t.Elem())
- r.Set(reflect.Append(r, childR))
- err := parse(r.Index(r.Len()-1), node, "")
- if err != nil {
- return err
- }
- }
-
- return nil
-}
-
-// parseMap deserializes a map from an XMLNode. The direct children of the XMLNode
-// will also be deserialized as map entries.
-func parseMap(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- if r.IsNil() {
- r.Set(reflect.MakeMap(r.Type()))
- }
-
- if tag.Get("flattened") == "" { // look at all child entries
- for _, entry := range node.Children["entry"] {
- parseMapEntry(r, entry, tag)
- }
- } else { // this element is itself an entry
- parseMapEntry(r, node, tag)
- }
-
- return nil
-}
-
-// parseMapEntry deserializes a map entry from a XML node.
-func parseMapEntry(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- kname, vname := "key", "value"
- if n := tag.Get("locationNameKey"); n != "" {
- kname = n
- }
- if n := tag.Get("locationNameValue"); n != "" {
- vname = n
- }
-
- keys, ok := node.Children[kname]
- values := node.Children[vname]
- if ok {
- for i, key := range keys {
- keyR := reflect.ValueOf(key.Text)
- value := values[i]
- valueR := reflect.New(r.Type().Elem()).Elem()
-
- parse(valueR, value, "")
- r.SetMapIndex(keyR, valueR)
- }
- }
- return nil
-}
-
-// parseScaller deserializes an XMLNode value into a concrete type based on the
-// interface type of r.
-//
-// Error is returned if the deserialization fails due to invalid type conversion,
-// or unsupported interface type.
-func parseScalar(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- switch r.Interface().(type) {
- case *string:
- r.Set(reflect.ValueOf(&node.Text))
- return nil
- case []byte:
- b, err := base64.StdEncoding.DecodeString(node.Text)
- if err != nil {
- return err
- }
- r.Set(reflect.ValueOf(b))
- case *bool:
- v, err := strconv.ParseBool(node.Text)
- if err != nil {
- return err
- }
- r.Set(reflect.ValueOf(&v))
- case *int64:
- v, err := strconv.ParseInt(node.Text, 10, 64)
- if err != nil {
- return err
- }
- r.Set(reflect.ValueOf(&v))
- case *float64:
- v, err := strconv.ParseFloat(node.Text, 64)
- if err != nil {
- return err
- }
- r.Set(reflect.ValueOf(&v))
- case *time.Time:
- format := tag.Get("timestampFormat")
- if len(format) == 0 {
- format = protocol.ISO8601TimeFormatName
- }
-
- t, err := protocol.ParseTime(format, node.Text)
- if err != nil {
- return err
- }
- r.Set(reflect.ValueOf(&t))
- default:
- return fmt.Errorf("unsupported value: %v (%s)", r.Interface(), r.Type())
- }
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go
deleted file mode 100644
index c85b79fdd..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go
+++ /dev/null
@@ -1,173 +0,0 @@
-package xmlutil
-
-import (
- "encoding/xml"
- "fmt"
- "io"
- "sort"
-)
-
-// A XMLNode contains the values to be encoded or decoded.
-type XMLNode struct {
- Name xml.Name `json:",omitempty"`
- Children map[string][]*XMLNode `json:",omitempty"`
- Text string `json:",omitempty"`
- Attr []xml.Attr `json:",omitempty"`
-
- namespaces map[string]string
- parent *XMLNode
-}
-
-// textEncoder is a string type alias that implemnts the TextMarshaler interface.
-// This alias type is used to ensure that the line feed (\n) (U+000A) is escaped.
-type textEncoder string
-
-func (t textEncoder) MarshalText() ([]byte, error) {
- return []byte(t), nil
-}
-
-// NewXMLElement returns a pointer to a new XMLNode initialized to default values.
-func NewXMLElement(name xml.Name) *XMLNode {
- return &XMLNode{
- Name: name,
- Children: map[string][]*XMLNode{},
- Attr: []xml.Attr{},
- }
-}
-
-// AddChild adds child to the XMLNode.
-func (n *XMLNode) AddChild(child *XMLNode) {
- child.parent = n
- if _, ok := n.Children[child.Name.Local]; !ok {
- n.Children[child.Name.Local] = []*XMLNode{}
- }
- n.Children[child.Name.Local] = append(n.Children[child.Name.Local], child)
-}
-
-// XMLToStruct converts a xml.Decoder stream to XMLNode with nested values.
-func XMLToStruct(d *xml.Decoder, s *xml.StartElement) (*XMLNode, error) {
- out := &XMLNode{}
- for {
- tok, err := d.Token()
- if err != nil {
- if err == io.EOF {
- break
- } else {
- return out, err
- }
- }
-
- if tok == nil {
- break
- }
-
- switch typed := tok.(type) {
- case xml.CharData:
- out.Text = string(typed.Copy())
- case xml.StartElement:
- el := typed.Copy()
- out.Attr = el.Attr
- if out.Children == nil {
- out.Children = map[string][]*XMLNode{}
- }
-
- name := typed.Name.Local
- slice := out.Children[name]
- if slice == nil {
- slice = []*XMLNode{}
- }
- node, e := XMLToStruct(d, &el)
- out.findNamespaces()
- if e != nil {
- return out, e
- }
- node.Name = typed.Name
- node.findNamespaces()
- tempOut := *out
- // Save into a temp variable, simply because out gets squashed during
- // loop iterations
- node.parent = &tempOut
- slice = append(slice, node)
- out.Children[name] = slice
- case xml.EndElement:
- if s != nil && s.Name.Local == typed.Name.Local { // matching end token
- return out, nil
- }
- out = &XMLNode{}
- }
- }
- return out, nil
-}
-
-func (n *XMLNode) findNamespaces() {
- ns := map[string]string{}
- for _, a := range n.Attr {
- if a.Name.Space == "xmlns" {
- ns[a.Value] = a.Name.Local
- }
- }
-
- n.namespaces = ns
-}
-
-func (n *XMLNode) findElem(name string) (string, bool) {
- for node := n; node != nil; node = node.parent {
- for _, a := range node.Attr {
- namespace := a.Name.Space
- if v, ok := node.namespaces[namespace]; ok {
- namespace = v
- }
- if name == fmt.Sprintf("%s:%s", namespace, a.Name.Local) {
- return a.Value, true
- }
- }
- }
- return "", false
-}
-
-// StructToXML writes an XMLNode to a xml.Encoder as tokens.
-func StructToXML(e *xml.Encoder, node *XMLNode, sorted bool) error {
- // Sort Attributes
- attrs := node.Attr
- if sorted {
- sortedAttrs := make([]xml.Attr, len(attrs))
- for _, k := range node.Attr {
- sortedAttrs = append(sortedAttrs, k)
- }
- sort.Sort(xmlAttrSlice(sortedAttrs))
- attrs = sortedAttrs
- }
-
- startElement := xml.StartElement{Name: node.Name, Attr: attrs}
-
- if node.Text != "" {
- e.EncodeElement(textEncoder(node.Text), startElement)
- return e.Flush()
- }
-
- e.EncodeToken(startElement)
-
- if sorted {
- sortedNames := []string{}
- for k := range node.Children {
- sortedNames = append(sortedNames, k)
- }
- sort.Strings(sortedNames)
-
- for _, k := range sortedNames {
- for _, v := range node.Children[k] {
- StructToXML(e, v, sorted)
- }
- }
- } else {
- for _, c := range node.Children {
- for _, v := range c {
- StructToXML(e, v, sorted)
- }
- }
- }
-
- e.EncodeToken(startElement.End())
-
- return e.Flush()
-}
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
deleted file mode 100644
index 56e0e9b4a..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go
+++ /dev/null
@@ -1,42109 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package s3
-
-import (
- "bytes"
- "fmt"
- "io"
- "sync"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "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/aws/signer/v4"
- "github.com/aws/aws-sdk-go/internal/s3shared/arn"
- "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"
-)
-
-const opAbortMultipartUpload = "AbortMultipartUpload"
-
-// AbortMultipartUploadRequest generates a "aws/request.Request" representing the
-// client's request for the AbortMultipartUpload 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 AbortMultipartUpload for more information on using the AbortMultipartUpload
-// 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 AbortMultipartUploadRequest method.
-// req, resp := client.AbortMultipartUploadRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
-func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) {
- op := &request.Operation{
- Name: opAbortMultipartUpload,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &AbortMultipartUploadInput{}
- }
-
- output = &AbortMultipartUploadOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// AbortMultipartUpload API operation for Amazon Simple Storage Service.
-//
-// This action 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 ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-// action and ensure that the parts list is empty.
-//
-// For information about permissions required to use the multipart upload, see
-// Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
-//
-// The following operations are related to AbortMultipartUpload:
-//
-// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation AbortMultipartUpload for usage and error information.
-//
-// Returned Error Codes:
-// - ErrCodeNoSuchUpload "NoSuchUpload"
-// The specified multipart upload does not exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
-func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
- req, out := c.AbortMultipartUploadRequest(input)
- return out, req.Send()
-}
-
-// AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of
-// the ability to pass a context and additional request options.
-//
-// See AbortMultipartUpload for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error) {
- req, out := c.AbortMultipartUploadRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCompleteMultipartUpload = "CompleteMultipartUpload"
-
-// CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
-// client's request for the CompleteMultipartUpload 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 CompleteMultipartUpload for more information on using the CompleteMultipartUpload
-// 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 CompleteMultipartUploadRequest method.
-// req, resp := client.CompleteMultipartUploadRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
-func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) {
- op := &request.Operation{
- Name: opCompleteMultipartUpload,
- HTTPMethod: "POST",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &CompleteMultipartUploadInput{}
- }
-
- output = &CompleteMultipartUploadOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CompleteMultipartUpload API operation for Amazon Simple Storage Service.
-//
-// Completes a multipart upload by assembling previously uploaded parts.
-//
-// You first initiate the multipart upload and then upload all parts using the
-// UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-// operation. After successfully uploading all relevant parts of an upload,
-// you call this action 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 action
-// 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).
-//
-// You cannot use Content-Type: application/x-www-form-urlencoded with Complete
-// Multipart Upload requests. Also, if you do not provide a Content-Type header,
-// CompleteMultipartUpload returns a 200 OK response.
-//
-// 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 and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
-//
-// CompleteMultipartUpload 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation CompleteMultipartUpload for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
-func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
- req, out := c.CompleteMultipartUploadRequest(input)
- return out, req.Send()
-}
-
-// CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CompleteMultipartUpload for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*CompleteMultipartUploadOutput, error) {
- req, out := c.CompleteMultipartUploadRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCopyObject = "CopyObject"
-
-// CopyObjectRequest generates a "aws/request.Request" representing the
-// client's request for the CopyObject 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 CopyObject for more information on using the CopyObject
-// 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 CopyObjectRequest method.
-// req, resp := client.CopyObjectRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
-func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) {
- op := &request.Operation{
- Name: opCopyObject,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &CopyObjectInput{}
- }
-
- output = &CopyObjectOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CopyObject API operation for Amazon Simple Storage Service.
-//
-// 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 action using this
-// API. However, to copy an object greater than 5 GB, you must use the multipart
-// upload Upload Part - Copy (UploadPartCopy) 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
-// action 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 (http://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 User 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.
-//
-// # Server-side encryption
-//
-// When you perform a CopyObject operation, you can optionally use the appropriate
-// encryption-related headers to encrypt the object using server-side encryption
-// with Amazon Web Services managed encryption keys (SSE-S3 or SSE-KMS) or 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. For more information about server-side encryption,
-// see Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html).
-//
-// If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the
-// object. For more information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
-// in the Amazon S3 User Guide.
-//
-// # 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
-// Amazon Web Services 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).
-//
-// If the bucket that you're copying objects to uses the bucket owner enforced
-// setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions.
-// Buckets that use this setting only accept PUT requests that don't specify
-// an ACL or PUT requests that specify bucket owner full control ACLs, such
-// as the bucket-owner-full-control canned ACL or an equivalent form of this
-// ACL expressed in the XML format.
-//
-// For more information, see Controlling ownership of objects and disabling
-// ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
-// in the Amazon S3 User Guide.
-//
-// If your bucket uses the bucket owner enforced setting for Object Ownership,
-// all objects written to the bucket by any account will be owned by the bucket
-// owner.
-//
-// # Checksums
-//
-// When copying an object, if it has a checksum, that checksum will be copied
-// to the new object by default. When you copy the object over, you may optionally
-// specify a different checksum algorithm to use with the x-amz-checksum-algorithm
-// header.
-//
-// # Storage Class Options
-//
-// You can use the CopyObject action 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 User 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 RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html).
-//
-// The following operations are related to CopyObject:
-//
-// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// 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.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation CopyObject for usage and error information.
-//
-// Returned Error Codes:
-// - ErrCodeObjectNotInActiveTierError "ObjectNotInActiveTierError"
-// The source object of the COPY action is not in the active tier and is 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) {
- req, out := c.CopyObjectRequest(input)
- return out, req.Send()
-}
-
-// CopyObjectWithContext is the same as CopyObject with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CopyObject for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput, opts ...request.Option) (*CopyObjectOutput, error) {
- req, out := c.CopyObjectRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateBucket = "CreateBucket"
-
-// CreateBucketRequest generates a "aws/request.Request" representing the
-// client's request for the CreateBucket 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 CreateBucket for more information on using the CreateBucket
-// 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 CreateBucketRequest method.
-// req, resp := client.CreateBucketRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
-func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) {
- op := &request.Operation{
- Name: opCreateBucket,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}",
- }
-
- if input == nil {
- input = &CreateBucketInput{}
- }
-
- output = &CreateBucketOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateBucket API operation for Amazon Simple Storage Service.
-//
-// Creates a new S3 bucket. To create a bucket, you must register with Amazon
-// S3 and have a valid Amazon Web Services 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 about bucket
-// naming restrictions, see Bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
-//
-// If you want to create an Amazon S3 on Outposts bucket, see Create Bucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.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
-// Accessing a bucket (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).
-//
-// Access control lists (ACLs)
-//
-// When creating a bucket using this operation, you can optionally configure
-// the bucket ACL to specify the accounts or groups that should be granted specific
-// permissions on the bucket.
-//
-// If your CreateBucket request sets bucket owner enforced for S3 Object Ownership
-// and specifies a bucket ACL that provides access to an external Amazon Web
-// Services account, your request fails with a 400 error and returns the InvalidBucketAclWithObjectOwnership
-// error code. For more information, see Controlling object ownership (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
-// in the Amazon S3 User Guide.
-//
-// 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/userguide/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 Amazon Web Services account uri – if you are granting permissions
-// to a predefined group emailAddress – if the value specified is the email
-// address of an Amazon Web Services account Using email addresses to specify
-// a grantee is only supported in the following Amazon Web Services 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 Amazon Web Services General Reference. For example, the following
-// x-amz-grant-read header grants the Amazon Web Services 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.
-//
-// # Permissions
-//
-// In addition to s3:CreateBucket, the following permissions are required when
-// your CreateBucket includes specific headers:
-//
-// - ACLs - If your CreateBucket request specifies ACL permissions and the
-// ACL is public-read, public-read-write, authenticated-read, or if you specify
-// access permissions explicitly through any other ACL, both s3:CreateBucket
-// and s3:PutBucketAcl permissions are needed. If the ACL the CreateBucket
-// request is private or doesn't specify any ACLs, only s3:CreateBucket permission
-// is needed.
-//
-// - Object Lock - If ObjectLockEnabledForBucket is set to true in your CreateBucket
-// request, s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning
-// permissions are required.
-//
-// - S3 Object Ownership - If your CreateBucket request includes the the
-// x-amz-object-ownership header, s3:PutBucketOwnershipControls permission
-// is required.
-//
-// The following operations are related to CreateBucket:
-//
-// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation CreateBucket for usage and error information.
-//
-// Returned Error Codes:
-//
-// - ErrCodeBucketAlreadyExists "BucketAlreadyExists"
-// The requested bucket name is not available. The bucket namespace is shared
-// by all users of the system. 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 Amazon Web Services 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) {
- req, out := c.CreateBucketRequest(input)
- return out, req.Send()
-}
-
-// CreateBucketWithContext is the same as CreateBucket with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateBucket for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error) {
- req, out := c.CreateBucketRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateMultipartUpload = "CreateMultipartUpload"
-
-// CreateMultipartUploadRequest generates a "aws/request.Request" representing the
-// client's request for the CreateMultipartUpload 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 CreateMultipartUpload for more information on using the CreateMultipartUpload
-// 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 CreateMultipartUploadRequest method.
-// req, resp := client.CreateMultipartUploadRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
-func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) {
- op := &request.Operation{
- Name: opCreateMultipartUpload,
- HTTPMethod: "POST",
- HTTPPath: "/{Bucket}/{Key+}?uploads",
- }
-
- if input == nil {
- input = &CreateMultipartUploadInput{}
- }
-
- output = &CreateMultipartUploadOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateMultipartUpload API operation for Amazon Simple Storage Service.
-//
-// This action 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)).
-// You also include this upload ID in the final request to either complete or
-// abort the multipart upload request.
-//
-// 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 action 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 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 (Amazon Web Services
-// 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 Amazon Web Services KMS keys or Amazon S3-managed encryption keys.
-// If you choose to provide your own encryption key, the request headers you
-// provide in UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-// and UploadPartCopy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
-// 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 Amazon Web Services
-// KMS key, the requester must have permission to the kms:Decrypt and kms:GenerateDataKey*
-// 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. For more information, see Multipart upload API and permissions
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions)
-// in the Amazon S3 User Guide.
-//
-// If your Identity and Access Management (IAM) user or role is in the same
-// Amazon Web Services account as the KMS key, 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 Amazon Web Services managed encryption keys or provide your own encryption
-// key.
-//
-// - Use encryption keys managed by Amazon S3 or customer managed key stored
-// in Amazon Web Services Key Management Service (Amazon Web Services KMS)
-// – If you want Amazon Web Services 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 Amazon
-// Web Services managed key in Amazon Web Services KMS to protect the data.
-// All GET and PUT requests for an object protected by Amazon Web Services
-// KMS fail if you don't make them with SSL or by using SigV4. For more information
-// about server-side encryption with KMS key (SSE-KMS), see Protecting Data
-// Using Server-Side Encryption with KMS keys (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 KMS keys (SSE-KMS), see Protecting Data Using
-// Server-Side Encryption with KMS keys (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
-// Amazon Web Services 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 Amazon Web Services 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
-// Amazon Web Services account uri – if you are granting permissions to
-// a predefined group emailAddress – if the value specified is the email
-// address of an Amazon Web Services account Using email addresses to specify
-// a grantee is only supported in the following Amazon Web Services 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 Amazon Web Services General Reference. For example, the following
-// x-amz-grant-read header grants the Amazon Web Services 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation CreateMultipartUpload for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
-func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
- req, out := c.CreateMultipartUploadRequest(input)
- return out, req.Send()
-}
-
-// CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateMultipartUpload for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput, opts ...request.Option) (*CreateMultipartUploadOutput, error) {
- req, out := c.CreateMultipartUploadRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucket = "DeleteBucket"
-
-// DeleteBucketRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucket 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 DeleteBucket for more information on using the DeleteBucket
-// 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 DeleteBucketRequest method.
-// req, resp := client.DeleteBucketRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
-func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) {
- op := &request.Operation{
- Name: opDeleteBucket,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}",
- }
-
- if input == nil {
- input = &DeleteBucketInput{}
- }
-
- output = &DeleteBucketOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucket API operation for Amazon Simple Storage Service.
-//
-// Deletes the S3 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
-//
-// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucket for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
-func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
- req, out := c.DeleteBucketRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketWithContext is the same as DeleteBucket with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucket for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error) {
- req, out := c.DeleteBucketRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration"
-
-// DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketAnalyticsConfiguration 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 DeleteBucketAnalyticsConfiguration for more information on using the DeleteBucketAnalyticsConfiguration
-// 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 DeleteBucketAnalyticsConfigurationRequest method.
-// req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
-func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyticsConfigurationInput) (req *request.Request, output *DeleteBucketAnalyticsConfigurationOutput) {
- op := &request.Operation{
- Name: opDeleteBucketAnalyticsConfiguration,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?analytics",
- }
-
- if input == nil {
- input = &DeleteBucketAnalyticsConfigurationInput{}
- }
-
- output = &DeleteBucketAnalyticsConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
-//
-// Deletes an analytics configuration for the bucket (specified by the analytics
-// configuration ID).
-//
-// 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/userguide/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/userguide/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:
-//
-// - GetBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
-//
-// - ListBucketAnalyticsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
-//
-// - PutBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketAnalyticsConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
-func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) {
- req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketAnalyticsConfigurationWithContext is the same as DeleteBucketAnalyticsConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketAnalyticsConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *DeleteBucketAnalyticsConfigurationInput, opts ...request.Option) (*DeleteBucketAnalyticsConfigurationOutput, error) {
- req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketCors = "DeleteBucketCors"
-
-// DeleteBucketCorsRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketCors 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 DeleteBucketCors for more information on using the DeleteBucketCors
-// 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 DeleteBucketCorsRequest method.
-// req, resp := client.DeleteBucketCorsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
-func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) {
- op := &request.Operation{
- Name: opDeleteBucketCors,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?cors",
- }
-
- if input == nil {
- input = &DeleteBucketCorsInput{}
- }
-
- output = &DeleteBucketCorsOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketCors API operation for Amazon Simple Storage Service.
-//
-// 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 S3 User Guide.
-//
-// Related Resources:
-//
-// - PutBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html)
-//
-// - RESTOPTIONSobject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketCors for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
-func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
- req, out := c.DeleteBucketCorsRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketCors for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error) {
- req, out := c.DeleteBucketCorsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketEncryption = "DeleteBucketEncryption"
-
-// DeleteBucketEncryptionRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketEncryption operation. The "output" return
-// value will be populated with the request's response once the request 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 DeleteBucketEncryption for more information on using the DeleteBucketEncryption
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-// // Example sending a request using the DeleteBucketEncryptionRequest method.
-// req, resp := client.DeleteBucketEncryptionRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
-func (c *S3) DeleteBucketEncryptionRequest(input *DeleteBucketEncryptionInput) (req *request.Request, output *DeleteBucketEncryptionOutput) {
- op := &request.Operation{
- Name: opDeleteBucketEncryption,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?encryption",
- }
-
- if input == nil {
- input = &DeleteBucketEncryptionInput{}
- }
-
- output = &DeleteBucketEncryptionOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketEncryption API operation for Amazon Simple Storage Service.
-//
-// This implementation of the DELETE action 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 S3 User 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/userguide/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/userguide/s3-access-control.html)
-// in the Amazon S3 User Guide.
-//
-// Related Resources
-//
-// - PutBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html)
-//
-// - GetBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketEncryption for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
-func (c *S3) DeleteBucketEncryption(input *DeleteBucketEncryptionInput) (*DeleteBucketEncryptionOutput, error) {
- req, out := c.DeleteBucketEncryptionRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketEncryptionWithContext is the same as DeleteBucketEncryption with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketEncryption for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketEncryptionWithContext(ctx aws.Context, input *DeleteBucketEncryptionInput, opts ...request.Option) (*DeleteBucketEncryptionOutput, error) {
- req, out := c.DeleteBucketEncryptionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketIntelligentTieringConfiguration = "DeleteBucketIntelligentTieringConfiguration"
-
-// DeleteBucketIntelligentTieringConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketIntelligentTieringConfiguration 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 DeleteBucketIntelligentTieringConfiguration for more information on using the DeleteBucketIntelligentTieringConfiguration
-// 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 DeleteBucketIntelligentTieringConfigurationRequest method.
-// req, resp := client.DeleteBucketIntelligentTieringConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketIntelligentTieringConfiguration
-func (c *S3) DeleteBucketIntelligentTieringConfigurationRequest(input *DeleteBucketIntelligentTieringConfigurationInput) (req *request.Request, output *DeleteBucketIntelligentTieringConfigurationOutput) {
- op := &request.Operation{
- Name: opDeleteBucketIntelligentTieringConfiguration,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?intelligent-tiering",
- }
-
- if input == nil {
- input = &DeleteBucketIntelligentTieringConfigurationInput{}
- }
-
- output = &DeleteBucketIntelligentTieringConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketIntelligentTieringConfiguration API operation for Amazon Simple Storage Service.
-//
-// Deletes the S3 Intelligent-Tiering configuration from the specified bucket.
-//
-// The S3 Intelligent-Tiering storage class is designed to optimize storage
-// costs by automatically moving data to the most cost-effective storage access
-// tier, without performance impact or operational overhead. S3 Intelligent-Tiering
-// delivers automatic cost savings in three low latency and high throughput
-// access tiers. To get the lowest storage cost on data that can be accessed
-// in minutes to hours, you can choose to activate additional archiving capabilities.
-//
-// The S3 Intelligent-Tiering storage class is the ideal storage class for data
-// with unknown, changing, or unpredictable access patterns, independent of
-// object size or retention period. If the size of an object is less than 128
-// KB, it is not monitored and not eligible for auto-tiering. Smaller objects
-// can be stored, but they are always charged at the Frequent Access tier rates
-// in the S3 Intelligent-Tiering storage class.
-//
-// For more information, see Storage class for automatically optimizing frequently
-// and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
-//
-// Operations related to DeleteBucketIntelligentTieringConfiguration include:
-//
-// - GetBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
-//
-// - PutBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
-//
-// - ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketIntelligentTieringConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketIntelligentTieringConfiguration
-func (c *S3) DeleteBucketIntelligentTieringConfiguration(input *DeleteBucketIntelligentTieringConfigurationInput) (*DeleteBucketIntelligentTieringConfigurationOutput, error) {
- req, out := c.DeleteBucketIntelligentTieringConfigurationRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketIntelligentTieringConfigurationWithContext is the same as DeleteBucketIntelligentTieringConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketIntelligentTieringConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketIntelligentTieringConfigurationWithContext(ctx aws.Context, input *DeleteBucketIntelligentTieringConfigurationInput, opts ...request.Option) (*DeleteBucketIntelligentTieringConfigurationOutput, error) {
- req, out := c.DeleteBucketIntelligentTieringConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration"
-
-// DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketInventoryConfiguration 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 DeleteBucketInventoryConfiguration for more information on using the DeleteBucketInventoryConfiguration
-// 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 DeleteBucketInventoryConfigurationRequest method.
-// req, resp := client.DeleteBucketInventoryConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
-func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInventoryConfigurationInput) (req *request.Request, output *DeleteBucketInventoryConfigurationOutput) {
- op := &request.Operation{
- Name: opDeleteBucketInventoryConfiguration,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?inventory",
- }
-
- if input == nil {
- input = &DeleteBucketInventoryConfigurationInput{}
- }
-
- output = &DeleteBucketInventoryConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
-//
-// 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/userguide/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/userguide/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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
-//
-// - PutBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
-//
-// - ListBucketInventoryConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketInventoryConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
-func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) {
- req, out := c.DeleteBucketInventoryConfigurationRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketInventoryConfigurationWithContext is the same as DeleteBucketInventoryConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketInventoryConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketInventoryConfigurationWithContext(ctx aws.Context, input *DeleteBucketInventoryConfigurationInput, opts ...request.Option) (*DeleteBucketInventoryConfigurationOutput, error) {
- req, out := c.DeleteBucketInventoryConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
-
-// DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketLifecycle 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 DeleteBucketLifecycle for more information on using the DeleteBucketLifecycle
-// 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 DeleteBucketLifecycleRequest method.
-// req, resp := client.DeleteBucketLifecycleRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
-func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) {
- op := &request.Operation{
- Name: opDeleteBucketLifecycle,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?lifecycle",
- }
-
- if input == nil {
- input = &DeleteBucketLifecycleInput{}
- }
-
- output = &DeleteBucketLifecycleOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
-//
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
-//
-// - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketLifecycle for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
-func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
- req, out := c.DeleteBucketLifecycleRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketLifecycle for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error) {
- req, out := c.DeleteBucketLifecycleRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
-
-// DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketMetricsConfiguration 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 DeleteBucketMetricsConfiguration for more information on using the DeleteBucketMetricsConfiguration
-// 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 DeleteBucketMetricsConfigurationRequest method.
-// req, resp := client.DeleteBucketMetricsConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
-func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsConfigurationInput) (req *request.Request, output *DeleteBucketMetricsConfigurationOutput) {
- op := &request.Operation{
- Name: opDeleteBucketMetricsConfiguration,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?metrics",
- }
-
- if input == nil {
- input = &DeleteBucketMetricsConfigurationInput{}
- }
-
- output = &DeleteBucketMetricsConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
-//
-// 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/userguide/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/userguide/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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
-//
-// - PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
-//
-// - ListBucketMetricsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
-//
-// - 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
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketMetricsConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
-func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) {
- req, out := c.DeleteBucketMetricsConfigurationRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketMetricsConfigurationWithContext is the same as DeleteBucketMetricsConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketMetricsConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input *DeleteBucketMetricsConfigurationInput, opts ...request.Option) (*DeleteBucketMetricsConfigurationOutput, error) {
- req, out := c.DeleteBucketMetricsConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketOwnershipControls = "DeleteBucketOwnershipControls"
-
-// DeleteBucketOwnershipControlsRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketOwnershipControls 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 DeleteBucketOwnershipControls for more information on using the DeleteBucketOwnershipControls
-// 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 DeleteBucketOwnershipControlsRequest method.
-// req, resp := client.DeleteBucketOwnershipControlsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketOwnershipControls
-func (c *S3) DeleteBucketOwnershipControlsRequest(input *DeleteBucketOwnershipControlsInput) (req *request.Request, output *DeleteBucketOwnershipControlsOutput) {
- op := &request.Operation{
- Name: opDeleteBucketOwnershipControls,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?ownershipControls",
- }
-
- if input == nil {
- input = &DeleteBucketOwnershipControlsInput{}
- }
-
- output = &DeleteBucketOwnershipControlsOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketOwnershipControls API operation for Amazon Simple Storage Service.
-//
-// Removes OwnershipControls for an Amazon S3 bucket. To use this operation,
-// you must have the s3:PutBucketOwnershipControls 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 information about Amazon S3 Object Ownership, see Using Object Ownership
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html).
-//
-// The following operations are related to DeleteBucketOwnershipControls:
-//
-// - GetBucketOwnershipControls
-//
-// - PutBucketOwnershipControls
-//
-// Returns awserr.Error for 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 DeleteBucketOwnershipControls for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketOwnershipControls
-func (c *S3) DeleteBucketOwnershipControls(input *DeleteBucketOwnershipControlsInput) (*DeleteBucketOwnershipControlsOutput, error) {
- req, out := c.DeleteBucketOwnershipControlsRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketOwnershipControlsWithContext is the same as DeleteBucketOwnershipControls with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketOwnershipControls for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketOwnershipControlsWithContext(ctx aws.Context, input *DeleteBucketOwnershipControlsInput, opts ...request.Option) (*DeleteBucketOwnershipControlsOutput, error) {
- req, out := c.DeleteBucketOwnershipControlsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketPolicy = "DeleteBucketPolicy"
-
-// DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketPolicy 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 DeleteBucketPolicy for more information on using the DeleteBucketPolicy
-// 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 DeleteBucketPolicyRequest method.
-// req, resp := client.DeleteBucketPolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
-func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
- op := &request.Operation{
- Name: opDeleteBucketPolicy,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?policy",
- }
-
- if input == nil {
- input = &DeleteBucketPolicyInput{}
- }
-
- output = &DeleteBucketPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketPolicy API operation for Amazon Simple Storage Service.
-//
-// This implementation of the DELETE action 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 Amazon Web Services 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 Amazon Web Services 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketPolicy for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
-func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
- req, out := c.DeleteBucketPolicyRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketPolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) {
- req, out := c.DeleteBucketPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketReplication = "DeleteBucketReplication"
-
-// DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketReplication 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 DeleteBucketReplication for more information on using the DeleteBucketReplication
-// 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 DeleteBucketReplicationRequest method.
-// req, resp := client.DeleteBucketReplicationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
-func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) {
- op := &request.Operation{
- Name: opDeleteBucketReplication,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?replication",
- }
-
- if input == nil {
- input = &DeleteBucketReplicationInput{}
- }
-
- output = &DeleteBucketReplicationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketReplication API operation for Amazon Simple Storage Service.
-//
-// 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/userguide/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/userguide/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 User Guide.
-//
-// The following operations are related to DeleteBucketReplication:
-//
-// - PutBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html)
-//
-// - GetBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketReplication for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
-func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
- req, out := c.DeleteBucketReplicationRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketReplication for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error) {
- req, out := c.DeleteBucketReplicationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketTagging = "DeleteBucketTagging"
-
-// DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketTagging 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 DeleteBucketTagging for more information on using the DeleteBucketTagging
-// 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 DeleteBucketTaggingRequest method.
-// req, resp := client.DeleteBucketTaggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
-func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
- op := &request.Operation{
- Name: opDeleteBucketTagging,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?tagging",
- }
-
- if input == nil {
- input = &DeleteBucketTaggingInput{}
- }
-
- output = &DeleteBucketTaggingOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketTagging API operation for Amazon Simple Storage Service.
-//
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html)
-//
-// - PutBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketTagging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
-func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
- req, out := c.DeleteBucketTaggingRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketTagging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) {
- req, out := c.DeleteBucketTaggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketWebsite = "DeleteBucketWebsite"
-
-// DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketWebsite 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 DeleteBucketWebsite for more information on using the DeleteBucketWebsite
-// 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 DeleteBucketWebsiteRequest method.
-// req, resp := client.DeleteBucketWebsiteRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
-func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) {
- op := &request.Operation{
- Name: opDeleteBucketWebsite,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?website",
- }
-
- if input == nil {
- input = &DeleteBucketWebsiteInput{}
- }
-
- output = &DeleteBucketWebsiteOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketWebsite API operation for Amazon Simple Storage Service.
-//
-// This action 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 action 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketWebsite.html)
-//
-// - PutBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketWebsite for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
-func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
- req, out := c.DeleteBucketWebsiteRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketWebsite for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error) {
- req, out := c.DeleteBucketWebsiteRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteObject = "DeleteObject"
-
-// DeleteObjectRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteObject 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 DeleteObject for more information on using the DeleteObject
-// 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 DeleteObjectRequest method.
-// req, resp := client.DeleteObjectRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
-func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
- op := &request.Operation{
- Name: opDeleteObject,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &DeleteObjectInput{}
- }
-
- output = &DeleteObjectOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DeleteObject API operation for Amazon Simple Storage Service.
-//
-// Removes the null version (if there is one) of an object and inserts a delete
-// marker, which becomes the latest version of the object. If there isn't a
-// null version, Amazon S3 does not remove any objects but will still respond
-// that the command was successful.
-//
-// 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 DELETE Object or configure its
-// lifecycle (PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html))
-// 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 action is related to DeleteObject:
-//
-// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteObject for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
-func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
- req, out := c.DeleteObjectRequest(input)
- return out, req.Send()
-}
-
-// DeleteObjectWithContext is the same as DeleteObject with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteObject for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) {
- req, out := c.DeleteObjectRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteObjectTagging = "DeleteObjectTagging"
-
-// DeleteObjectTaggingRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteObjectTagging 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 DeleteObjectTagging for more information on using the DeleteObjectTagging
-// 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 DeleteObjectTaggingRequest method.
-// req, resp := client.DeleteObjectTaggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
-func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *request.Request, output *DeleteObjectTaggingOutput) {
- op := &request.Operation{
- Name: opDeleteObjectTagging,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}/{Key+}?tagging",
- }
-
- if input == nil {
- input = &DeleteObjectTaggingInput{}
- }
-
- output = &DeleteObjectTaggingOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DeleteObjectTagging API operation for Amazon Simple Storage Service.
-//
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html)
-//
-// - GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteObjectTagging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
-func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
- req, out := c.DeleteObjectTaggingRequest(input)
- return out, req.Send()
-}
-
-// DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteObjectTagging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error) {
- req, out := c.DeleteObjectTaggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteObjects = "DeleteObjects"
-
-// DeleteObjectsRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteObjects 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 DeleteObjects for more information on using the DeleteObjects
-// 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 DeleteObjectsRequest method.
-// req, resp := client.DeleteObjectsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
-func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) {
- op := &request.Operation{
- Name: opDeleteObjects,
- HTTPMethod: "POST",
- HTTPPath: "/{Bucket}?delete",
- }
-
- if input == nil {
- input = &DeleteObjectsInput{}
- }
-
- 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 action enables you to delete multiple objects from a bucket using a
-// single HTTP request. If you know the object keys that you want to delete,
-// then this action 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 action 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 action supports two modes for the response: verbose and quiet. By default,
-// the action 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 action encountered an error. For a successful
-// deletion, the action does not return any information about the delete in
-// the response body.
-//
-// When performing this action 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteObjects for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
-func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
- req, out := c.DeleteObjectsRequest(input)
- return out, req.Send()
-}
-
-// DeleteObjectsWithContext is the same as DeleteObjects with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteObjects for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error) {
- req, out := c.DeleteObjectsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeletePublicAccessBlock = "DeletePublicAccessBlock"
-
-// DeletePublicAccessBlockRequest generates a "aws/request.Request" representing the
-// client's request for the DeletePublicAccessBlock 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 DeletePublicAccessBlock for more information on using the DeletePublicAccessBlock
-// 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 DeletePublicAccessBlockRequest method.
-// req, resp := client.DeletePublicAccessBlockRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock
-func (c *S3) DeletePublicAccessBlockRequest(input *DeletePublicAccessBlockInput) (req *request.Request, output *DeletePublicAccessBlockOutput) {
- op := &request.Operation{
- Name: opDeletePublicAccessBlock,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?publicAccessBlock",
- }
-
- if input == nil {
- input = &DeletePublicAccessBlockInput{}
- }
-
- output = &DeletePublicAccessBlockOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeletePublicAccessBlock API operation for Amazon Simple Storage Service.
-//
-// 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/userguide/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/userguide/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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
-//
-// - PutPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
-//
-// - GetBucketPolicyStatus (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeletePublicAccessBlock for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock
-func (c *S3) DeletePublicAccessBlock(input *DeletePublicAccessBlockInput) (*DeletePublicAccessBlockOutput, error) {
- req, out := c.DeletePublicAccessBlockRequest(input)
- return out, req.Send()
-}
-
-// DeletePublicAccessBlockWithContext is the same as DeletePublicAccessBlock with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeletePublicAccessBlock for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeletePublicAccessBlockWithContext(ctx aws.Context, input *DeletePublicAccessBlockInput, opts ...request.Option) (*DeletePublicAccessBlockOutput, error) {
- req, out := c.DeletePublicAccessBlockRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
-
-// GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketAccelerateConfiguration 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 GetBucketAccelerateConfiguration for more information on using the GetBucketAccelerateConfiguration
-// 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 GetBucketAccelerateConfigurationRequest method.
-// req, resp := client.GetBucketAccelerateConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
-func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) {
- op := &request.Operation{
- Name: opGetBucketAccelerateConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?accelerate",
- }
-
- if input == nil {
- input = &GetBucketAccelerateConfigurationInput{}
- }
-
- output = &GetBucketAccelerateConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
-//
-// This implementation of the GET action 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/userguide/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/userguide/s3-access-control.html)
-// in the Amazon S3 User Guide.
-//
-// You set the Transfer Acceleration state of an existing bucket to Enabled
-// or Suspended by using the PutBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html)
-// 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 S3 User Guide.
-//
-// Related Resources
-//
-// - PutBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketAccelerateConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
-func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
- req, out := c.GetBucketAccelerateConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketAccelerateConfigurationWithContext is the same as GetBucketAccelerateConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketAccelerateConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketAccelerateConfigurationWithContext(ctx aws.Context, input *GetBucketAccelerateConfigurationInput, opts ...request.Option) (*GetBucketAccelerateConfigurationOutput, error) {
- req, out := c.GetBucketAccelerateConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketAcl = "GetBucketAcl"
-
-// GetBucketAclRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketAcl 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 GetBucketAcl for more information on using the GetBucketAcl
-// 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 GetBucketAclRequest method.
-// req, resp := client.GetBucketAclRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
-func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) {
- op := &request.Operation{
- Name: opGetBucketAcl,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?acl",
- }
-
- if input == nil {
- input = &GetBucketAclInput{}
- }
-
- output = &GetBucketAclOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketAcl API operation for Amazon Simple Storage Service.
-//
-// This implementation of the GET action 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.
-//
-// If your bucket uses the bucket owner enforced setting for S3 Object Ownership,
-// requests to read ACLs are still supported and return the bucket-owner-full-control
-// ACL with the owner being the account that created the bucket. For more information,
-// see Controlling object ownership and disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
-// in the Amazon S3 User Guide.
-//
-// Related Resources
-//
-// - ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketAcl for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
-func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
- req, out := c.GetBucketAclRequest(input)
- return out, req.Send()
-}
-
-// GetBucketAclWithContext is the same as GetBucketAcl with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketAcl for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error) {
- req, out := c.GetBucketAclRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
-
-// GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketAnalyticsConfiguration 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 GetBucketAnalyticsConfiguration for more information on using the GetBucketAnalyticsConfiguration
-// 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 GetBucketAnalyticsConfigurationRequest method.
-// req, resp := client.GetBucketAnalyticsConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
-func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsConfigurationInput) (req *request.Request, output *GetBucketAnalyticsConfigurationOutput) {
- op := &request.Operation{
- Name: opGetBucketAnalyticsConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?analytics",
- }
-
- if input == nil {
- input = &GetBucketAnalyticsConfigurationInput{}
- }
-
- output = &GetBucketAnalyticsConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
-//
-// This implementation of the GET action 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/userguide/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/userguide/s3-access-control.html)
-// in the Amazon S3 User 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 S3 User Guide.
-//
-// Related Resources
-//
-// - DeleteBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
-//
-// - ListBucketAnalyticsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
-//
-// - PutBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketAnalyticsConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
-func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) {
- req, out := c.GetBucketAnalyticsConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketAnalyticsConfigurationWithContext is the same as GetBucketAnalyticsConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketAnalyticsConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *GetBucketAnalyticsConfigurationInput, opts ...request.Option) (*GetBucketAnalyticsConfigurationOutput, error) {
- req, out := c.GetBucketAnalyticsConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketCors = "GetBucketCors"
-
-// GetBucketCorsRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketCors 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 GetBucketCors for more information on using the GetBucketCors
-// 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 GetBucketCorsRequest method.
-// req, resp := client.GetBucketCorsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
-func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) {
- op := &request.Operation{
- Name: opGetBucketCors,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?cors",
- }
-
- if input == nil {
- input = &GetBucketCorsInput{}
- }
-
- output = &GetBucketCorsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketCors API operation for Amazon Simple Storage Service.
-//
-// Returns the Cross-Origin Resource Sharing (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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html)
-//
-// - DeleteBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketCors for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
-func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
- req, out := c.GetBucketCorsRequest(input)
- return out, req.Send()
-}
-
-// GetBucketCorsWithContext is the same as GetBucketCors with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketCors for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error) {
- req, out := c.GetBucketCorsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketEncryption = "GetBucketEncryption"
-
-// GetBucketEncryptionRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketEncryption operation. The "output" return
-// value will be populated with the request's response once the request 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 GetBucketEncryption for more information on using the GetBucketEncryption
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-// // Example sending a request using the GetBucketEncryptionRequest method.
-// req, resp := client.GetBucketEncryptionRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
-func (c *S3) GetBucketEncryptionRequest(input *GetBucketEncryptionInput) (req *request.Request, output *GetBucketEncryptionOutput) {
- op := &request.Operation{
- Name: opGetBucketEncryption,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?encryption",
- }
-
- if input == nil {
- input = &GetBucketEncryptionInput{}
- }
-
- output = &GetBucketEncryptionOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketEncryption API operation for Amazon Simple Storage Service.
-//
-// Returns the default encryption configuration for an Amazon S3 bucket. If
-// the bucket does not have a default encryption configuration, GetBucketEncryption
-// returns ServerSideEncryptionConfigurationNotFoundError.
-//
-// 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/userguide/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/userguide/s3-access-control.html).
-//
-// The following operations are related to GetBucketEncryption:
-//
-// - PutBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html)
-//
-// - DeleteBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketEncryption for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
-func (c *S3) GetBucketEncryption(input *GetBucketEncryptionInput) (*GetBucketEncryptionOutput, error) {
- req, out := c.GetBucketEncryptionRequest(input)
- return out, req.Send()
-}
-
-// GetBucketEncryptionWithContext is the same as GetBucketEncryption with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketEncryption for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketEncryptionWithContext(ctx aws.Context, input *GetBucketEncryptionInput, opts ...request.Option) (*GetBucketEncryptionOutput, error) {
- req, out := c.GetBucketEncryptionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketIntelligentTieringConfiguration = "GetBucketIntelligentTieringConfiguration"
-
-// GetBucketIntelligentTieringConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketIntelligentTieringConfiguration 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 GetBucketIntelligentTieringConfiguration for more information on using the GetBucketIntelligentTieringConfiguration
-// 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 GetBucketIntelligentTieringConfigurationRequest method.
-// req, resp := client.GetBucketIntelligentTieringConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketIntelligentTieringConfiguration
-func (c *S3) GetBucketIntelligentTieringConfigurationRequest(input *GetBucketIntelligentTieringConfigurationInput) (req *request.Request, output *GetBucketIntelligentTieringConfigurationOutput) {
- op := &request.Operation{
- Name: opGetBucketIntelligentTieringConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?intelligent-tiering",
- }
-
- if input == nil {
- input = &GetBucketIntelligentTieringConfigurationInput{}
- }
-
- output = &GetBucketIntelligentTieringConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketIntelligentTieringConfiguration API operation for Amazon Simple Storage Service.
-//
-// Gets the S3 Intelligent-Tiering configuration from the specified bucket.
-//
-// The S3 Intelligent-Tiering storage class is designed to optimize storage
-// costs by automatically moving data to the most cost-effective storage access
-// tier, without performance impact or operational overhead. S3 Intelligent-Tiering
-// delivers automatic cost savings in three low latency and high throughput
-// access tiers. To get the lowest storage cost on data that can be accessed
-// in minutes to hours, you can choose to activate additional archiving capabilities.
-//
-// The S3 Intelligent-Tiering storage class is the ideal storage class for data
-// with unknown, changing, or unpredictable access patterns, independent of
-// object size or retention period. If the size of an object is less than 128
-// KB, it is not monitored and not eligible for auto-tiering. Smaller objects
-// can be stored, but they are always charged at the Frequent Access tier rates
-// in the S3 Intelligent-Tiering storage class.
-//
-// For more information, see Storage class for automatically optimizing frequently
-// and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
-//
-// Operations related to GetBucketIntelligentTieringConfiguration include:
-//
-// - DeleteBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
-//
-// - PutBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
-//
-// - ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketIntelligentTieringConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketIntelligentTieringConfiguration
-func (c *S3) GetBucketIntelligentTieringConfiguration(input *GetBucketIntelligentTieringConfigurationInput) (*GetBucketIntelligentTieringConfigurationOutput, error) {
- req, out := c.GetBucketIntelligentTieringConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketIntelligentTieringConfigurationWithContext is the same as GetBucketIntelligentTieringConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketIntelligentTieringConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketIntelligentTieringConfigurationWithContext(ctx aws.Context, input *GetBucketIntelligentTieringConfigurationInput, opts ...request.Option) (*GetBucketIntelligentTieringConfigurationOutput, error) {
- req, out := c.GetBucketIntelligentTieringConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
-
-// GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketInventoryConfiguration 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 GetBucketInventoryConfiguration for more information on using the GetBucketInventoryConfiguration
-// 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 GetBucketInventoryConfigurationRequest method.
-// req, resp := client.GetBucketInventoryConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
-func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryConfigurationInput) (req *request.Request, output *GetBucketInventoryConfigurationOutput) {
- op := &request.Operation{
- Name: opGetBucketInventoryConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?inventory",
- }
-
- if input == nil {
- input = &GetBucketInventoryConfigurationInput{}
- }
-
- output = &GetBucketInventoryConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
-//
-// 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/userguide/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/userguide/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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
-//
-// - ListBucketInventoryConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
-//
-// - PutBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketInventoryConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
-func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) {
- req, out := c.GetBucketInventoryConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketInventoryConfigurationWithContext is the same as GetBucketInventoryConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketInventoryConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketInventoryConfigurationWithContext(ctx aws.Context, input *GetBucketInventoryConfigurationInput, opts ...request.Option) (*GetBucketInventoryConfigurationOutput, error) {
- req, out := c.GetBucketInventoryConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketLifecycle = "GetBucketLifecycle"
-
-// GetBucketLifecycleRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketLifecycle 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 GetBucketLifecycle for more information on using the GetBucketLifecycle
-// 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 GetBucketLifecycleRequest method.
-// req, resp := client.GetBucketLifecycleRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
-//
-// Deprecated: GetBucketLifecycle has been deprecated
-func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
- if c.Client.Config.Logger != nil {
- c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
- }
- op := &request.Operation{
- Name: opGetBucketLifecycle,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?lifecycle",
- }
-
- if input == nil {
- input = &GetBucketLifecycleInput{}
- }
-
- output = &GetBucketLifecycleOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketLifecycle API operation for Amazon Simple Storage Service.
-//
-// For an updated version of this API, see GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html).
-// 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/userguide/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/userguide/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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
-//
-// - PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)
-//
-// - DeleteBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketLifecycle for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
-//
-// Deprecated: GetBucketLifecycle has been deprecated
-func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
- req, out := c.GetBucketLifecycleRequest(input)
- return out, req.Send()
-}
-
-// GetBucketLifecycleWithContext is the same as GetBucketLifecycle with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketLifecycle 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.
-//
-// Deprecated: GetBucketLifecycleWithContext has been deprecated
-func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) {
- req, out := c.GetBucketLifecycleRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
-
-// GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketLifecycleConfiguration 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 GetBucketLifecycleConfiguration for more information on using the GetBucketLifecycleConfiguration
-// 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 GetBucketLifecycleConfigurationRequest method.
-// req, resp := client.GetBucketLifecycleConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
-func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) {
- op := &request.Operation{
- Name: opGetBucketLifecycleConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?lifecycle",
- }
-
- if input == nil {
- input = &GetBucketLifecycleConfigurationInput{}
- }
-
- output = &GetBucketLifecycleConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
-//
-// 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 using a previous version
-// of the lifecycle configuration, it still works. For the earlier action, see
-// GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html).
-//
-// 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/userguide/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/userguide/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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html)
-//
-// - PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)
-//
-// - DeleteBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketLifecycleConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
-func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
- req, out := c.GetBucketLifecycleConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketLifecycleConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error) {
- req, out := c.GetBucketLifecycleConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketLocation = "GetBucketLocation"
-
-// GetBucketLocationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketLocation 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 GetBucketLocation for more information on using the GetBucketLocation
-// 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 GetBucketLocationRequest method.
-// req, resp := client.GetBucketLocationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
-func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) {
- op := &request.Operation{
- Name: opGetBucketLocation,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?location",
- }
-
- if input == nil {
- input = &GetBucketLocationInput{}
- }
-
- output = &GetBucketLocationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketLocation API operation for Amazon Simple Storage Service.
-//
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html).
-//
-// To use this implementation of the operation, you must be the bucket owner.
-//
-// To use this API against an access point, provide the alias of the access
-// point in place of the bucket name.
-//
-// The following operations are related to GetBucketLocation:
-//
-// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketLocation for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
-func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
- req, out := c.GetBucketLocationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketLocationWithContext is the same as GetBucketLocation with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketLocation for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error) {
- req, out := c.GetBucketLocationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketLogging = "GetBucketLogging"
-
-// GetBucketLoggingRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketLogging 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 GetBucketLogging for more information on using the GetBucketLogging
-// 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 GetBucketLoggingRequest method.
-// req, resp := client.GetBucketLoggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
-func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) {
- op := &request.Operation{
- Name: opGetBucketLogging,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?logging",
- }
-
- if input == nil {
- input = &GetBucketLoggingInput{}
- }
-
- output = &GetBucketLoggingOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketLogging API operation for Amazon Simple Storage Service.
-//
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// - PutBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLogging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketLogging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
-func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
- req, out := c.GetBucketLoggingRequest(input)
- return out, req.Send()
-}
-
-// GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketLogging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error) {
- req, out := c.GetBucketLoggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
-
-// GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketMetricsConfiguration 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 GetBucketMetricsConfiguration for more information on using the GetBucketMetricsConfiguration
-// 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 GetBucketMetricsConfigurationRequest method.
-// req, resp := client.GetBucketMetricsConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
-func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigurationInput) (req *request.Request, output *GetBucketMetricsConfigurationOutput) {
- op := &request.Operation{
- Name: opGetBucketMetricsConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?metrics",
- }
-
- if input == nil {
- input = &GetBucketMetricsConfigurationInput{}
- }
-
- output = &GetBucketMetricsConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
-//
-// Gets a metrics configuration (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: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/userguide/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/userguide/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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
-//
-// - DeleteBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
-//
-// - ListBucketMetricsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
-//
-// - 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
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketMetricsConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
-func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) {
- req, out := c.GetBucketMetricsConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketMetricsConfigurationWithContext is the same as GetBucketMetricsConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketMetricsConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketMetricsConfigurationWithContext(ctx aws.Context, input *GetBucketMetricsConfigurationInput, opts ...request.Option) (*GetBucketMetricsConfigurationOutput, error) {
- req, out := c.GetBucketMetricsConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketNotification = "GetBucketNotification"
-
-// GetBucketNotificationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketNotification 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 GetBucketNotification for more information on using the GetBucketNotification
-// 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 GetBucketNotificationRequest method.
-// req, resp := client.GetBucketNotificationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
-//
-// Deprecated: GetBucketNotification has been deprecated
-func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
- if c.Client.Config.Logger != nil {
- c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
- }
- op := &request.Operation{
- Name: opGetBucketNotification,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?notification",
- }
-
- if input == nil {
- input = &GetBucketNotificationConfigurationRequest{}
- }
-
- output = &NotificationConfigurationDeprecated{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketNotification API operation for Amazon Simple Storage Service.
-//
-// No longer used, see GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html).
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketNotification for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
-//
-// Deprecated: GetBucketNotification has been deprecated
-func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
- req, out := c.GetBucketNotificationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketNotificationWithContext is the same as GetBucketNotification with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketNotification 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.
-//
-// Deprecated: GetBucketNotificationWithContext has been deprecated
-func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) {
- req, out := c.GetBucketNotificationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
-
-// GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketNotificationConfiguration 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 GetBucketNotificationConfiguration for more information on using the GetBucketNotificationConfiguration
-// 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 GetBucketNotificationConfigurationRequest method.
-// req, resp := client.GetBucketNotificationConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
-func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) {
- op := &request.Operation{
- Name: opGetBucketNotificationConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?notification",
- }
-
- if input == nil {
- input = &GetBucketNotificationConfigurationRequest{}
- }
-
- output = &NotificationConfiguration{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
-//
-// Returns the notification configuration of a bucket.
-//
-// If notifications are not enabled on the bucket, the action 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 action is related to GetBucketNotification:
-//
-// - PutBucketNotification (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotification.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketNotificationConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
-func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
- req, out := c.GetBucketNotificationConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketNotificationConfigurationWithContext is the same as GetBucketNotificationConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketNotificationConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfiguration, error) {
- req, out := c.GetBucketNotificationConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketOwnershipControls = "GetBucketOwnershipControls"
-
-// GetBucketOwnershipControlsRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketOwnershipControls 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 GetBucketOwnershipControls for more information on using the GetBucketOwnershipControls
-// 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 GetBucketOwnershipControlsRequest method.
-// req, resp := client.GetBucketOwnershipControlsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketOwnershipControls
-func (c *S3) GetBucketOwnershipControlsRequest(input *GetBucketOwnershipControlsInput) (req *request.Request, output *GetBucketOwnershipControlsOutput) {
- op := &request.Operation{
- Name: opGetBucketOwnershipControls,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?ownershipControls",
- }
-
- if input == nil {
- input = &GetBucketOwnershipControlsInput{}
- }
-
- output = &GetBucketOwnershipControlsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketOwnershipControls API operation for Amazon Simple Storage Service.
-//
-// Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation,
-// you must have the s3:GetBucketOwnershipControls permission. For more information
-// about Amazon S3 permissions, see Specifying permissions in a policy (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html).
-//
-// For information about Amazon S3 Object Ownership, see Using Object Ownership
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html).
-//
-// The following operations are related to GetBucketOwnershipControls:
-//
-// - PutBucketOwnershipControls
-//
-// - DeleteBucketOwnershipControls
-//
-// Returns awserr.Error for 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 GetBucketOwnershipControls for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketOwnershipControls
-func (c *S3) GetBucketOwnershipControls(input *GetBucketOwnershipControlsInput) (*GetBucketOwnershipControlsOutput, error) {
- req, out := c.GetBucketOwnershipControlsRequest(input)
- return out, req.Send()
-}
-
-// GetBucketOwnershipControlsWithContext is the same as GetBucketOwnershipControls with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketOwnershipControls for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketOwnershipControlsWithContext(ctx aws.Context, input *GetBucketOwnershipControlsInput, opts ...request.Option) (*GetBucketOwnershipControlsOutput, error) {
- req, out := c.GetBucketOwnershipControlsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketPolicy = "GetBucketPolicy"
-
-// GetBucketPolicyRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketPolicy 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 GetBucketPolicy for more information on using the GetBucketPolicy
-// 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 GetBucketPolicyRequest method.
-// req, resp := client.GetBucketPolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
-func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) {
- op := &request.Operation{
- Name: opGetBucketPolicy,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?policy",
- }
-
- if input == nil {
- input = &GetBucketPolicyInput{}
- }
-
- output = &GetBucketPolicyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketPolicy API operation for Amazon Simple Storage Service.
-//
-// Returns the policy of a specified bucket. If you are using an identity other
-// than the root user of the Amazon Web Services 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 Amazon Web Services 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 action is related to GetBucketPolicy:
-//
-// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketPolicy for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
-func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
- req, out := c.GetBucketPolicyRequest(input)
- return out, req.Send()
-}
-
-// GetBucketPolicyWithContext is the same as GetBucketPolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketPolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput, opts ...request.Option) (*GetBucketPolicyOutput, error) {
- req, out := c.GetBucketPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketPolicyStatus = "GetBucketPolicyStatus"
-
-// GetBucketPolicyStatusRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketPolicyStatus 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 GetBucketPolicyStatus for more information on using the GetBucketPolicyStatus
-// 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 GetBucketPolicyStatusRequest method.
-// req, resp := client.GetBucketPolicyStatusRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus
-func (c *S3) GetBucketPolicyStatusRequest(input *GetBucketPolicyStatusInput) (req *request.Request, output *GetBucketPolicyStatusOutput) {
- op := &request.Operation{
- Name: opGetBucketPolicyStatus,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?policyStatus",
- }
-
- if input == nil {
- input = &GetBucketPolicyStatusInput{}
- }
-
- output = &GetBucketPolicyStatusOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketPolicyStatus API operation for Amazon Simple Storage Service.
-//
-// Retrieves the policy status for an Amazon S3 bucket, indicating whether the
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
-//
-// - PutPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
-//
-// - DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketPolicyStatus for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus
-func (c *S3) GetBucketPolicyStatus(input *GetBucketPolicyStatusInput) (*GetBucketPolicyStatusOutput, error) {
- req, out := c.GetBucketPolicyStatusRequest(input)
- return out, req.Send()
-}
-
-// GetBucketPolicyStatusWithContext is the same as GetBucketPolicyStatus with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketPolicyStatus for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketPolicyStatusWithContext(ctx aws.Context, input *GetBucketPolicyStatusInput, opts ...request.Option) (*GetBucketPolicyStatusOutput, error) {
- req, out := c.GetBucketPolicyStatusRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketReplication = "GetBucketReplication"
-
-// GetBucketReplicationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketReplication 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 GetBucketReplication for more information on using the GetBucketReplication
-// 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 GetBucketReplicationRequest method.
-// req, resp := client.GetBucketReplicationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
-func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) {
- op := &request.Operation{
- Name: opGetBucketReplication,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?replication",
- }
-
- if input == nil {
- input = &GetBucketReplicationInput{}
- }
-
- output = &GetBucketReplicationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketReplication API operation for Amazon Simple Storage Service.
-//
-// Returns the replication configuration of a bucket.
-//
-// It can take a while to propagate the put or delete a replication configuration
-// 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 S3 User Guide.
-//
-// This action 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 List of replication-related
-// error codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList)
-//
-// The following operations are related to GetBucketReplication:
-//
-// - PutBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html)
-//
-// - DeleteBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketReplication for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
-func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
- req, out := c.GetBucketReplicationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketReplication for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error) {
- req, out := c.GetBucketReplicationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketRequestPayment = "GetBucketRequestPayment"
-
-// GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketRequestPayment 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 GetBucketRequestPayment for more information on using the GetBucketRequestPayment
-// 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 GetBucketRequestPaymentRequest method.
-// req, resp := client.GetBucketRequestPaymentRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
-func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) {
- op := &request.Operation{
- Name: opGetBucketRequestPayment,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?requestPayment",
- }
-
- if input == nil {
- input = &GetBucketRequestPaymentInput{}
- }
-
- output = &GetBucketRequestPaymentOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketRequestPayment API operation for Amazon Simple Storage Service.
-//
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketRequestPayment for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
-func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
- req, out := c.GetBucketRequestPaymentRequest(input)
- return out, req.Send()
-}
-
-// GetBucketRequestPaymentWithContext is the same as GetBucketRequestPayment with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketRequestPayment for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput, opts ...request.Option) (*GetBucketRequestPaymentOutput, error) {
- req, out := c.GetBucketRequestPaymentRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketTagging = "GetBucketTagging"
-
-// GetBucketTaggingRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketTagging 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 GetBucketTagging for more information on using the GetBucketTagging
-// 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 GetBucketTaggingRequest method.
-// req, resp := client.GetBucketTaggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
-func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) {
- op := &request.Operation{
- Name: opGetBucketTagging,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?tagging",
- }
-
- if input == nil {
- input = &GetBucketTaggingInput{}
- }
-
- output = &GetBucketTaggingOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketTagging API operation for Amazon Simple Storage Service.
-//
-// 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: NoSuchTagSet Description: There is no tag set associated
-// with the bucket.
-//
-// The following operations are related to GetBucketTagging:
-//
-// - PutBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html)
-//
-// - DeleteBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketTagging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
-func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
- req, out := c.GetBucketTaggingRequest(input)
- return out, req.Send()
-}
-
-// GetBucketTaggingWithContext is the same as GetBucketTagging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketTagging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketTaggingWithContext(ctx aws.Context, input *GetBucketTaggingInput, opts ...request.Option) (*GetBucketTaggingOutput, error) {
- req, out := c.GetBucketTaggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketVersioning = "GetBucketVersioning"
-
-// GetBucketVersioningRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketVersioning 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 GetBucketVersioning for more information on using the GetBucketVersioning
-// 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 GetBucketVersioningRequest method.
-// req, resp := client.GetBucketVersioningRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
-func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) {
- op := &request.Operation{
- Name: opGetBucketVersioning,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?versioning",
- }
-
- if input == nil {
- input = &GetBucketVersioningInput{}
- }
-
- output = &GetBucketVersioningOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketVersioning API operation for Amazon Simple Storage Service.
-//
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketVersioning for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
-func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
- req, out := c.GetBucketVersioningRequest(input)
- return out, req.Send()
-}
-
-// GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketVersioning for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error) {
- req, out := c.GetBucketVersioningRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketWebsite = "GetBucketWebsite"
-
-// GetBucketWebsiteRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketWebsite 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 GetBucketWebsite for more information on using the GetBucketWebsite
-// 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 GetBucketWebsiteRequest method.
-// req, resp := client.GetBucketWebsiteRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
-func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) {
- op := &request.Operation{
- Name: opGetBucketWebsite,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?website",
- }
-
- if input == nil {
- input = &GetBucketWebsiteInput{}
- }
-
- output = &GetBucketWebsiteOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketWebsite API operation for Amazon Simple Storage Service.
-//
-// 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 action 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketWebsite.html)
-//
-// - PutBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketWebsite for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
-func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
- req, out := c.GetBucketWebsiteRequest(input)
- return out, req.Send()
-}
-
-// GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketWebsite for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error) {
- req, out := c.GetBucketWebsiteRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetObject = "GetObject"
-
-// GetObjectRequest generates a "aws/request.Request" representing the
-// client's request for the GetObject 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 GetObject for more information on using the GetObject
-// 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 GetObjectRequest method.
-// req, resp := client.GetObjectRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
-func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
- op := &request.Operation{
- Name: opGetObject,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &GetObjectInput{}
- }
-
- output = &GetObjectOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetObject API operation for Amazon Simple Storage Service.
-//
-// 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).
-//
-// For more information about returning the ACL of an object, see GetObjectAcl
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html).
-//
-// If the object you are retrieving is stored in the S3 Glacier or S3 Glacier
-// Deep Archive storage class, or S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering
-// Deep Archive tiers, before you can retrieve the object you must first restore
-// a copy using RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html).
-// Otherwise, this action 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
-// KMS keys (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 the relevant permission to read object tags, 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
-// to retrieve the tag set associated with an object.
-//
-// # Permissions
-//
-// You need the relevant read object (or version) 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 action returns the current version of an object. To return
-// a different version, use the versionId subresource.
-//
-// - If you supply a versionId, you need the s3:GetObjectVersion permission
-// to access a specific version of an object. If you request a specific version,
-// you do not need to have the s3:GetObject permission.
-//
-// - 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html).
-//
-// # 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
-//
-// - GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetObject for usage and error information.
-//
-// Returned Error Codes:
-//
-// - ErrCodeNoSuchKey "NoSuchKey"
-// The specified key does not exist.
-//
-// - ErrCodeInvalidObjectState "InvalidObjectState"
-// Object is archived and inaccessible until restored.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
-func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
- req, out := c.GetObjectRequest(input)
- return out, req.Send()
-}
-
-// GetObjectWithContext is the same as GetObject with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetObject for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) {
- req, out := c.GetObjectRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetObjectAcl = "GetObjectAcl"
-
-// GetObjectAclRequest generates a "aws/request.Request" representing the
-// client's request for the GetObjectAcl 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 GetObjectAcl for more information on using the GetObjectAcl
-// 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 GetObjectAclRequest method.
-// req, resp := client.GetObjectAclRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
-func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) {
- op := &request.Operation{
- Name: opGetObjectAcl,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}/{Key+}?acl",
- }
-
- if input == nil {
- input = &GetObjectAclInput{}
- }
-
- output = &GetObjectAclOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetObjectAcl API operation for Amazon Simple Storage Service.
-//
-// Returns the access control list (ACL) of an object. To use this operation,
-// you must have s3:GetObjectAcl permissions or READ_ACP access to the object.
-// For more information, see Mapping of ACL permissions and access policy permissions
-// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#acl-access-policy-permission-mapping)
-// in the Amazon S3 User Guide
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// # 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.
-//
-// If your bucket uses the bucket owner enforced setting for S3 Object Ownership,
-// requests to read ACLs are still supported and return the bucket-owner-full-control
-// ACL with the owner being the account that created the bucket. For more information,
-// see Controlling object ownership and disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
-// in the Amazon S3 User Guide.
-//
-// The following operations are related to GetObjectAcl:
-//
-// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
-//
-// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
-//
-// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetObjectAcl for usage and error information.
-//
-// Returned Error Codes:
-// - ErrCodeNoSuchKey "NoSuchKey"
-// The specified key does not exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
-func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
- req, out := c.GetObjectAclRequest(input)
- return out, req.Send()
-}
-
-// GetObjectAclWithContext is the same as GetObjectAcl with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetObjectAcl for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error) {
- req, out := c.GetObjectAclRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetObjectAttributes = "GetObjectAttributes"
-
-// GetObjectAttributesRequest generates a "aws/request.Request" representing the
-// client's request for the GetObjectAttributes 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 GetObjectAttributes for more information on using the GetObjectAttributes
-// 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 GetObjectAttributesRequest method.
-// req, resp := client.GetObjectAttributesRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAttributes
-func (c *S3) GetObjectAttributesRequest(input *GetObjectAttributesInput) (req *request.Request, output *GetObjectAttributesOutput) {
- op := &request.Operation{
- Name: opGetObjectAttributes,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}/{Key+}?attributes",
- }
-
- if input == nil {
- input = &GetObjectAttributesInput{}
- }
-
- output = &GetObjectAttributesOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetObjectAttributes API operation for Amazon Simple Storage Service.
-//
-// Retrieves all the metadata from an object without returning the object itself.
-// This action is useful if you're interested only in an object's metadata.
-// To use GetObjectAttributes, you must have READ access to the object.
-//
-// GetObjectAttributes combines the functionality of GetObjectAcl, GetObjectLegalHold,
-// GetObjectLockConfiguration, GetObjectRetention, GetObjectTagging, HeadObject,
-// and ListParts. All of the data returned with each of those individual calls
-// can be returned with a single call to GetObjectAttributes.
-//
-// 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)
-// in the Amazon S3 User Guide.
-//
-// - Encryption request headers, such as x-amz-server-side-encryption, should
-// not be sent for GET requests if your object uses server-side encryption
-// with Amazon Web Services KMS keys stored in Amazon Web Services Key Management
-// Service (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 Bad Request error.
-//
-// - The last modified property in this case is the creation date of the
-// object.
-//
-// Consider the following when using request headers:
-//
-// - If both of the If-Match and If-Unmodified-Since headers are present
-// in the request as follows, then Amazon S3 returns the HTTP status code
-// 200 OK and the data requested: If-Match condition evaluates to true. If-Unmodified-Since
-// condition evaluates to false.
-//
-// - If both of the If-None-Match and If-Modified-Since headers are present
-// in the request as follows, then Amazon S3 returns the HTTP status code
-// 304 Not Modified: If-None-Match condition evaluates to false. If-Modified-Since
-// condition evaluates to true.
-//
-// For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232).
-//
-// # Permissions
-//
-// The permissions that you need to use this operation depend on whether the
-// bucket is versioned. If the bucket is versioned, you need both the s3:GetObjectVersion
-// and s3:GetObjectVersionAttributes permissions for this operation. If the
-// bucket is not versioned, you need the s3:GetObject and s3:GetObjectAttributes
-// permissions. For more information, see Specifying Permissions in a Policy
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
-// in the Amazon S3 User Guide. If the object that 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 Not Found ("no such key") error.
-//
-// - If you don't have the s3:ListBucket permission, Amazon S3 returns an
-// HTTP status code 403 Forbidden ("access denied") error.
-//
-// The following actions are related to GetObjectAttributes:
-//
-// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// - GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
-//
-// - GetObjectLegalHold (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLegalHold.html)
-//
-// - GetObjectLockConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLockConfiguration.html)
-//
-// - GetObjectRetention (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectRetention.html)
-//
-// - GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
-//
-// - HeadObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html)
-//
-// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetObjectAttributes for usage and error information.
-//
-// Returned Error Codes:
-// - ErrCodeNoSuchKey "NoSuchKey"
-// The specified key does not exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAttributes
-func (c *S3) GetObjectAttributes(input *GetObjectAttributesInput) (*GetObjectAttributesOutput, error) {
- req, out := c.GetObjectAttributesRequest(input)
- return out, req.Send()
-}
-
-// GetObjectAttributesWithContext is the same as GetObjectAttributes with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetObjectAttributes for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetObjectAttributesWithContext(ctx aws.Context, input *GetObjectAttributesInput, opts ...request.Option) (*GetObjectAttributesOutput, error) {
- req, out := c.GetObjectAttributesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetObjectLegalHold = "GetObjectLegalHold"
-
-// GetObjectLegalHoldRequest generates a "aws/request.Request" representing the
-// client's request for the GetObjectLegalHold 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 GetObjectLegalHold for more information on using the GetObjectLegalHold
-// 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 GetObjectLegalHoldRequest method.
-// req, resp := client.GetObjectLegalHoldRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold
-func (c *S3) GetObjectLegalHoldRequest(input *GetObjectLegalHoldInput) (req *request.Request, output *GetObjectLegalHoldOutput) {
- op := &request.Operation{
- Name: opGetObjectLegalHold,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}/{Key+}?legal-hold",
- }
-
- if input == nil {
- input = &GetObjectLegalHoldInput{}
- }
-
- output = &GetObjectLegalHoldOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetObjectLegalHold API operation for Amazon Simple Storage Service.
-//
-// 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).
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// The following action is related to GetObjectLegalHold:
-//
-// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetObjectLegalHold for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold
-func (c *S3) GetObjectLegalHold(input *GetObjectLegalHoldInput) (*GetObjectLegalHoldOutput, error) {
- req, out := c.GetObjectLegalHoldRequest(input)
- return out, req.Send()
-}
-
-// GetObjectLegalHoldWithContext is the same as GetObjectLegalHold with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetObjectLegalHold for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetObjectLegalHoldWithContext(ctx aws.Context, input *GetObjectLegalHoldInput, opts ...request.Option) (*GetObjectLegalHoldOutput, error) {
- req, out := c.GetObjectLegalHoldRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetObjectLockConfiguration = "GetObjectLockConfiguration"
-
-// GetObjectLockConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetObjectLockConfiguration 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 GetObjectLockConfiguration for more information on using the GetObjectLockConfiguration
-// 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 GetObjectLockConfigurationRequest method.
-// req, resp := client.GetObjectLockConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration
-func (c *S3) GetObjectLockConfigurationRequest(input *GetObjectLockConfigurationInput) (req *request.Request, output *GetObjectLockConfigurationOutput) {
- op := &request.Operation{
- Name: opGetObjectLockConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?object-lock",
- }
-
- if input == nil {
- input = &GetObjectLockConfigurationInput{}
- }
-
- output = &GetObjectLockConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// 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. For more information, see Locking Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
-//
-// The following action is related to GetObjectLockConfiguration:
-//
-// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetObjectLockConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration
-func (c *S3) GetObjectLockConfiguration(input *GetObjectLockConfigurationInput) (*GetObjectLockConfigurationOutput, error) {
- req, out := c.GetObjectLockConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetObjectLockConfigurationWithContext is the same as GetObjectLockConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetObjectLockConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetObjectLockConfigurationWithContext(ctx aws.Context, input *GetObjectLockConfigurationInput, opts ...request.Option) (*GetObjectLockConfigurationOutput, error) {
- req, out := c.GetObjectLockConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetObjectRetention = "GetObjectRetention"
-
-// GetObjectRetentionRequest generates a "aws/request.Request" representing the
-// client's request for the GetObjectRetention 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 GetObjectRetention for more information on using the GetObjectRetention
-// 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 GetObjectRetentionRequest method.
-// req, resp := client.GetObjectRetentionRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention
-func (c *S3) GetObjectRetentionRequest(input *GetObjectRetentionInput) (req *request.Request, output *GetObjectRetentionOutput) {
- op := &request.Operation{
- Name: opGetObjectRetention,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}/{Key+}?retention",
- }
-
- if input == nil {
- input = &GetObjectRetentionInput{}
- }
-
- output = &GetObjectRetentionOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetObjectRetention API operation for Amazon Simple Storage Service.
-//
-// Retrieves an object's retention settings. For more information, see Locking
-// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// The following action is related to GetObjectRetention:
-//
-// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetObjectRetention for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention
-func (c *S3) GetObjectRetention(input *GetObjectRetentionInput) (*GetObjectRetentionOutput, error) {
- req, out := c.GetObjectRetentionRequest(input)
- return out, req.Send()
-}
-
-// GetObjectRetentionWithContext is the same as GetObjectRetention with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetObjectRetention for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetObjectRetentionWithContext(ctx aws.Context, input *GetObjectRetentionInput, opts ...request.Option) (*GetObjectRetentionOutput, error) {
- req, out := c.GetObjectRetentionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetObjectTagging = "GetObjectTagging"
-
-// GetObjectTaggingRequest generates a "aws/request.Request" representing the
-// client's request for the GetObjectTagging 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 GetObjectTagging for more information on using the GetObjectTagging
-// 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 GetObjectTaggingRequest method.
-// req, resp := client.GetObjectTaggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
-func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) {
- op := &request.Operation{
- Name: opGetObjectTagging,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}/{Key+}?tagging",
- }
-
- if input == nil {
- input = &GetObjectTaggingInput{}
- }
-
- output = &GetObjectTaggingOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetObjectTagging API operation for Amazon Simple Storage Service.
-//
-// 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 action 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 actions are related to GetObjectTagging:
-//
-// - DeleteObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html)
-//
-// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
-//
-// - PutObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetObjectTagging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
-func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
- req, out := c.GetObjectTaggingRequest(input)
- return out, req.Send()
-}
-
-// GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetObjectTagging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) {
- req, out := c.GetObjectTaggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetObjectTorrent = "GetObjectTorrent"
-
-// GetObjectTorrentRequest generates a "aws/request.Request" representing the
-// client's request for the GetObjectTorrent 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 GetObjectTorrent for more information on using the GetObjectTorrent
-// 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 GetObjectTorrentRequest method.
-// req, resp := client.GetObjectTorrentRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
-func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) {
- op := &request.Operation{
- Name: opGetObjectTorrent,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}/{Key+}?torrent",
- }
-
- if input == nil {
- input = &GetObjectTorrentInput{}
- }
-
- output = &GetObjectTorrentOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetObjectTorrent API operation for Amazon Simple Storage Service.
-//
-// Returns torrent files from a bucket. BitTorrent can save you bandwidth when
-// you're distributing large files. For more information about BitTorrent, see
-// Using BitTorrent with Amazon S3 (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 a customer-provided
-// encryption key.
-//
-// To use GET, you must have READ access to the object.
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// The following action is related to GetObjectTorrent:
-//
-// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetObjectTorrent for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
-func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
- req, out := c.GetObjectTorrentRequest(input)
- return out, req.Send()
-}
-
-// GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetObjectTorrent for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) {
- req, out := c.GetObjectTorrentRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetPublicAccessBlock = "GetPublicAccessBlock"
-
-// GetPublicAccessBlockRequest generates a "aws/request.Request" representing the
-// client's request for the GetPublicAccessBlock 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 GetPublicAccessBlock for more information on using the GetPublicAccessBlock
-// 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 GetPublicAccessBlockRequest method.
-// req, resp := client.GetPublicAccessBlockRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock
-func (c *S3) GetPublicAccessBlockRequest(input *GetPublicAccessBlockInput) (req *request.Request, output *GetPublicAccessBlockOutput) {
- op := &request.Operation{
- Name: opGetPublicAccessBlock,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?publicAccessBlock",
- }
-
- if input == nil {
- input = &GetPublicAccessBlockInput{}
- }
-
- output = &GetPublicAccessBlockOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetPublicAccessBlock API operation for Amazon Simple Storage Service.
-//
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
-//
-// - GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
-//
-// - DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetPublicAccessBlock for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock
-func (c *S3) GetPublicAccessBlock(input *GetPublicAccessBlockInput) (*GetPublicAccessBlockOutput, error) {
- req, out := c.GetPublicAccessBlockRequest(input)
- return out, req.Send()
-}
-
-// GetPublicAccessBlockWithContext is the same as GetPublicAccessBlock with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetPublicAccessBlock for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetPublicAccessBlockWithContext(ctx aws.Context, input *GetPublicAccessBlockInput, opts ...request.Option) (*GetPublicAccessBlockOutput, error) {
- req, out := c.GetPublicAccessBlockRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opHeadBucket = "HeadBucket"
-
-// HeadBucketRequest generates a "aws/request.Request" representing the
-// client's request for the HeadBucket 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 HeadBucket for more information on using the HeadBucket
-// 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 HeadBucketRequest method.
-// req, resp := client.HeadBucketRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
-func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) {
- op := &request.Operation{
- Name: opHeadBucket,
- HTTPMethod: "HEAD",
- HTTPPath: "/{Bucket}",
- }
-
- if input == nil {
- input = &HeadBucketInput{}
- }
-
- output = &HeadBucketOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// HeadBucket API operation for Amazon Simple Storage Service.
-//
-// This action is useful to determine if a bucket exists and you have permission
-// to access it. The action returns a 200 OK if the bucket exists and you have
-// permission to access it.
-//
-// If the bucket does not exist or you do not have permission to access it,
-// the HEAD request returns a generic 404 Not Found or 403 Forbidden code. A
-// message body is not included, so you cannot determine the exception beyond
-// these error codes.
-//
-// 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/userguide/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/userguide/s3-access-control.html).
-//
-// To use this API against an access point, you must provide the alias of the
-// access point in place of the bucket name or specify the access point ARN.
-// When using the access point ARN, 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 the Amazon Web Services SDKs, you provide the ARN in place of
-// the bucket name. For more information see, Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html).
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation HeadBucket for usage and error information.
-//
-// Returned Error Codes:
-// - ErrCodeNoSuchBucket "NoSuchBucket"
-// The specified bucket does not exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
-func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
- req, out := c.HeadBucketRequest(input)
- return out, req.Send()
-}
-
-// HeadBucketWithContext is the same as HeadBucket with the addition of
-// the ability to pass a context and additional request options.
-//
-// See HeadBucket for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) {
- req, out := c.HeadBucketRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opHeadObject = "HeadObject"
-
-// HeadObjectRequest generates a "aws/request.Request" representing the
-// client's request for the HeadObject 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 HeadObject for more information on using the HeadObject
-// 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 HeadObjectRequest method.
-// req, resp := client.HeadObjectRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
-func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) {
- op := &request.Operation{
- Name: opHeadObject,
- HTTPMethod: "HEAD",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &HeadObjectInput{}
- }
-
- output = &HeadObjectOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// HeadObject API operation for Amazon Simple Storage Service.
-//
-// The HEAD action retrieves metadata from an object without returning the object
-// itself. This action 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 action on an object. The response
-// is identical to the GET response except that there is no response body. Because
-// of this, if the HEAD request generates an error, it returns a generic 404
-// Not Found or 403 Forbidden code. It is not possible to retrieve the exact
-// exception beyond these error codes.
-//
-// 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 KMS keys (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.
-//
-// - The last modified property in this case is the creation date of the
-// object.
-//
-// 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 relevant read object (or version) 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 actions are related to HeadObject:
-//
-// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
-//
-// See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses
-// for more information on returned errors.
-//
-// Returns awserr.Error for 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 HeadObject for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
-func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
- req, out := c.HeadObjectRequest(input)
- return out, req.Send()
-}
-
-// HeadObjectWithContext is the same as HeadObject with the addition of
-// the ability to pass a context and additional request options.
-//
-// See HeadObject for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) {
- req, out := c.HeadObjectRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
-
-// ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the
-// client's request for the ListBucketAnalyticsConfigurations 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 ListBucketAnalyticsConfigurations for more information on using the ListBucketAnalyticsConfigurations
-// 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 ListBucketAnalyticsConfigurationsRequest method.
-// req, resp := client.ListBucketAnalyticsConfigurationsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
-func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) {
- op := &request.Operation{
- Name: opListBucketAnalyticsConfigurations,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?analytics",
- }
-
- if input == nil {
- input = &ListBucketAnalyticsConfigurationsInput{}
- }
-
- output = &ListBucketAnalyticsConfigurationsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service.
-//
-// Lists the analytics configurations for the bucket. You can have up to 1,000
-// analytics configurations per bucket.
-//
-// This action 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/userguide/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/userguide/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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
-//
-// - DeleteBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
-//
-// - PutBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListBucketAnalyticsConfigurations for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
-func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) {
- req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
- return out, req.Send()
-}
-
-// ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListBucketAnalyticsConfigurations for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) {
- req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListBucketIntelligentTieringConfigurations = "ListBucketIntelligentTieringConfigurations"
-
-// ListBucketIntelligentTieringConfigurationsRequest generates a "aws/request.Request" representing the
-// client's request for the ListBucketIntelligentTieringConfigurations 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 ListBucketIntelligentTieringConfigurations for more information on using the ListBucketIntelligentTieringConfigurations
-// 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 ListBucketIntelligentTieringConfigurationsRequest method.
-// req, resp := client.ListBucketIntelligentTieringConfigurationsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketIntelligentTieringConfigurations
-func (c *S3) ListBucketIntelligentTieringConfigurationsRequest(input *ListBucketIntelligentTieringConfigurationsInput) (req *request.Request, output *ListBucketIntelligentTieringConfigurationsOutput) {
- op := &request.Operation{
- Name: opListBucketIntelligentTieringConfigurations,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?intelligent-tiering",
- }
-
- if input == nil {
- input = &ListBucketIntelligentTieringConfigurationsInput{}
- }
-
- output = &ListBucketIntelligentTieringConfigurationsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListBucketIntelligentTieringConfigurations API operation for Amazon Simple Storage Service.
-//
-// Lists the S3 Intelligent-Tiering configuration from the specified bucket.
-//
-// The S3 Intelligent-Tiering storage class is designed to optimize storage
-// costs by automatically moving data to the most cost-effective storage access
-// tier, without performance impact or operational overhead. S3 Intelligent-Tiering
-// delivers automatic cost savings in three low latency and high throughput
-// access tiers. To get the lowest storage cost on data that can be accessed
-// in minutes to hours, you can choose to activate additional archiving capabilities.
-//
-// The S3 Intelligent-Tiering storage class is the ideal storage class for data
-// with unknown, changing, or unpredictable access patterns, independent of
-// object size or retention period. If the size of an object is less than 128
-// KB, it is not monitored and not eligible for auto-tiering. Smaller objects
-// can be stored, but they are always charged at the Frequent Access tier rates
-// in the S3 Intelligent-Tiering storage class.
-//
-// For more information, see Storage class for automatically optimizing frequently
-// and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
-//
-// Operations related to ListBucketIntelligentTieringConfigurations include:
-//
-// - DeleteBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
-//
-// - PutBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
-//
-// - GetBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListBucketIntelligentTieringConfigurations for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketIntelligentTieringConfigurations
-func (c *S3) ListBucketIntelligentTieringConfigurations(input *ListBucketIntelligentTieringConfigurationsInput) (*ListBucketIntelligentTieringConfigurationsOutput, error) {
- req, out := c.ListBucketIntelligentTieringConfigurationsRequest(input)
- return out, req.Send()
-}
-
-// ListBucketIntelligentTieringConfigurationsWithContext is the same as ListBucketIntelligentTieringConfigurations with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListBucketIntelligentTieringConfigurations for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListBucketIntelligentTieringConfigurationsWithContext(ctx aws.Context, input *ListBucketIntelligentTieringConfigurationsInput, opts ...request.Option) (*ListBucketIntelligentTieringConfigurationsOutput, error) {
- req, out := c.ListBucketIntelligentTieringConfigurationsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
-
-// ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the
-// client's request for the ListBucketInventoryConfigurations 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 ListBucketInventoryConfigurations for more information on using the ListBucketInventoryConfigurations
-// 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 ListBucketInventoryConfigurationsRequest method.
-// req, resp := client.ListBucketInventoryConfigurationsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
-func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) {
- op := &request.Operation{
- Name: opListBucketInventoryConfigurations,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?inventory",
- }
-
- if input == nil {
- input = &ListBucketInventoryConfigurationsInput{}
- }
-
- output = &ListBucketInventoryConfigurationsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service.
-//
-// Returns a list of inventory configurations for the bucket. You can have up
-// to 1,000 analytics configurations per bucket.
-//
-// This action 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/userguide/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/userguide/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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
-//
-// - DeleteBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
-//
-// - PutBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListBucketInventoryConfigurations for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
-func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) {
- req, out := c.ListBucketInventoryConfigurationsRequest(input)
- return out, req.Send()
-}
-
-// ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListBucketInventoryConfigurations for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) {
- req, out := c.ListBucketInventoryConfigurationsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
-
-// ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the
-// client's request for the ListBucketMetricsConfigurations 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 ListBucketMetricsConfigurations for more information on using the ListBucketMetricsConfigurations
-// 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 ListBucketMetricsConfigurationsRequest method.
-// req, resp := client.ListBucketMetricsConfigurationsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
-func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) {
- op := &request.Operation{
- Name: opListBucketMetricsConfigurations,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?metrics",
- }
-
- if input == nil {
- input = &ListBucketMetricsConfigurationsInput{}
- }
-
- output = &ListBucketMetricsConfigurationsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service.
-//
-// 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 action 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/userguide/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/userguide/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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
-//
-// - GetBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
-//
-// - DeleteBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListBucketMetricsConfigurations for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
-func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) {
- req, out := c.ListBucketMetricsConfigurationsRequest(input)
- return out, req.Send()
-}
-
-// ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListBucketMetricsConfigurations for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) {
- req, out := c.ListBucketMetricsConfigurationsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListBuckets = "ListBuckets"
-
-// ListBucketsRequest generates a "aws/request.Request" representing the
-// client's request for the ListBuckets 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 ListBuckets for more information on using the ListBuckets
-// 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 ListBucketsRequest method.
-// req, resp := client.ListBucketsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
-func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) {
- op := &request.Operation{
- Name: opListBuckets,
- HTTPMethod: "GET",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ListBucketsInput{}
- }
-
- output = &ListBucketsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListBuckets API operation for Amazon Simple Storage Service.
-//
-// Returns a list of all buckets owned by the authenticated sender of the request.
-// To use this operation, you must have the s3:ListAllMyBuckets permission.
-//
-// Returns awserr.Error for 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 ListBuckets for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
-func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
- req, out := c.ListBucketsRequest(input)
- return out, req.Send()
-}
-
-// ListBucketsWithContext is the same as ListBuckets with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListBuckets for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) {
- req, out := c.ListBucketsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListMultipartUploads = "ListMultipartUploads"
-
-// ListMultipartUploadsRequest generates a "aws/request.Request" representing the
-// client's request for the ListMultipartUploads 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 ListMultipartUploads for more information on using the ListMultipartUploads
-// 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 ListMultipartUploadsRequest method.
-// req, resp := client.ListMultipartUploadsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
-func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
- op := &request.Operation{
- Name: opListMultipartUploads,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?uploads",
- Paginator: &request.Paginator{
- InputTokens: []string{"KeyMarker", "UploadIdMarker"},
- OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"},
- LimitToken: "MaxUploads",
- TruncationToken: "IsTruncated",
- },
- }
-
- if input == nil {
- input = &ListMultipartUploadsInput{}
- }
-
- output = &ListMultipartUploadsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListMultipartUploads API operation for Amazon Simple Storage Service.
-//
-// This action 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 action 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 and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
-//
-// The following operations are related to ListMultipartUploads:
-//
-// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListMultipartUploads for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
-func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
- req, out := c.ListMultipartUploadsRequest(input)
- return out, req.Send()
-}
-
-// ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListMultipartUploads for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) {
- req, out := c.ListMultipartUploadsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListMultipartUploads 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 ListMultipartUploads operation.
-// pageNum := 0
-// err := client.ListMultipartUploadsPages(params,
-// func(page *s3.ListMultipartUploadsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error {
- return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages 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 *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListMultipartUploadsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListMultipartUploadsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListObjectVersions = "ListObjectVersions"
-
-// ListObjectVersionsRequest generates a "aws/request.Request" representing the
-// client's request for the ListObjectVersions 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 ListObjectVersions for more information on using the ListObjectVersions
-// 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 ListObjectVersionsRequest method.
-// req, resp := client.ListObjectVersionsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
-func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) {
- op := &request.Operation{
- Name: opListObjectVersions,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?versions",
- Paginator: &request.Paginator{
- InputTokens: []string{"KeyMarker", "VersionIdMarker"},
- OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"},
- LimitToken: "MaxKeys",
- TruncationToken: "IsTruncated",
- },
- }
-
- if input == nil {
- input = &ListObjectVersionsInput{}
- }
-
- output = &ListObjectVersionsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListObjectVersions API operation for Amazon Simple Storage Service.
-//
-// Returns metadata about all versions of the objects in a bucket. You can also
-// use request parameters as selection criteria to return metadata about a subset
-// of all the object versions.
-//
-// To use this operation, you must have permissions to perform the s3:ListBucketVersions
-// action. Be aware of the name difference.
-//
-// 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.
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// The following operations are related to ListObjectVersions:
-//
-// - ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
-//
-// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListObjectVersions for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
-func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
- req, out := c.ListObjectVersionsRequest(input)
- return out, req.Send()
-}
-
-// ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListObjectVersions for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error) {
- req, out := c.ListObjectVersionsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListObjectVersions 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 ListObjectVersions operation.
-// pageNum := 0
-// err := client.ListObjectVersionsPages(params,
-// func(page *s3.ListObjectVersionsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error {
- return c.ListObjectVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListObjectVersionsPagesWithContext same as ListObjectVersionsPages 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 *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListObjectVersionsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListObjectVersionsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListObjects = "ListObjects"
-
-// ListObjectsRequest generates a "aws/request.Request" representing the
-// client's request for the ListObjects 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 ListObjects for more information on using the ListObjects
-// 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 ListObjectsRequest method.
-// req, resp := client.ListObjectsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
-func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) {
- op := &request.Operation{
- Name: opListObjects,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}",
- Paginator: &request.Paginator{
- InputTokens: []string{"Marker"},
- OutputTokens: []string{"NextMarker || Contents[-1].Key"},
- LimitToken: "MaxKeys",
- TruncationToken: "IsTruncated",
- },
- }
-
- if input == nil {
- input = &ListObjectsInput{}
- }
-
- output = &ListObjectsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListObjects API operation for Amazon Simple Storage Service.
-//
-// 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. 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 action has been revised. We recommend that you use the newer version,
-// ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html),
-// when developing applications. For backward compatibility, Amazon S3 continues
-// to support ListObjects.
-//
-// The following operations are related to ListObjects:
-//
-// - ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
-//
-// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// - ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListObjects for usage and error information.
-//
-// Returned Error Codes:
-// - ErrCodeNoSuchBucket "NoSuchBucket"
-// The specified bucket does not exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
-func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
- req, out := c.ListObjectsRequest(input)
- return out, req.Send()
-}
-
-// ListObjectsWithContext is the same as ListObjects with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListObjects for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error) {
- req, out := c.ListObjectsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListObjectsPages iterates over the pages of a ListObjects operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListObjects 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 ListObjects operation.
-// pageNum := 0
-// err := client.ListObjectsPages(params,
-// func(page *s3.ListObjectsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error {
- return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListObjectsPagesWithContext same as ListObjectsPages 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 *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListObjectsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListObjectsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListObjectsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListObjectsV2 = "ListObjectsV2"
-
-// ListObjectsV2Request generates a "aws/request.Request" representing the
-// client's request for the ListObjectsV2 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 ListObjectsV2 for more information on using the ListObjectsV2
-// 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 ListObjectsV2Request method.
-// req, resp := client.ListObjectsV2Request(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
-func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) {
- op := &request.Operation{
- Name: opListObjectsV2,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?list-type=2",
- Paginator: &request.Paginator{
- InputTokens: []string{"ContinuationToken"},
- OutputTokens: []string{"NextContinuationToken"},
- LimitToken: "MaxKeys",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListObjectsV2Input{}
- }
-
- output = &ListObjectsV2Output{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListObjectsV2 API operation for Amazon Simple Storage Service.
-//
-// Returns some or all (up to 1,000) of the objects in a bucket with each request.
-// You can use the request parameters as selection criteria to return a subset
-// of the objects 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. Objects are returned sorted in an ascending
-// order of the respective key names in the list. For more information about
-// listing objects, see Listing object keys programmatically (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html)
-//
-// To use this operation, you must have READ access to the bucket.
-//
-// To use this action in an 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/userguide/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/userguide/s3-access-control.html).
-//
-// This section describes the latest revision of this action. 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
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html).
-//
-// To get a list of your buckets, see ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html).
-//
-// The following operations are related to ListObjectsV2:
-//
-// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListObjectsV2 for usage and error information.
-//
-// Returned Error Codes:
-// - ErrCodeNoSuchBucket "NoSuchBucket"
-// The specified bucket does not exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
-func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
- req, out := c.ListObjectsV2Request(input)
- return out, req.Send()
-}
-
-// ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListObjectsV2 for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error) {
- req, out := c.ListObjectsV2Request(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListObjectsV2 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 ListObjectsV2 operation.
-// pageNum := 0
-// err := client.ListObjectsV2Pages(params,
-// func(page *s3.ListObjectsV2Output, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error {
- return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListObjectsV2PagesWithContext same as ListObjectsV2Pages 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 *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListObjectsV2Input
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListObjectsV2Request(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListParts = "ListParts"
-
-// ListPartsRequest generates a "aws/request.Request" representing the
-// client's request for the ListParts 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 ListParts for more information on using the ListParts
-// 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 ListPartsRequest method.
-// req, resp := client.ListPartsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
-func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) {
- op := &request.Operation{
- Name: opListParts,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}/{Key+}",
- Paginator: &request.Paginator{
- InputTokens: []string{"PartNumberMarker"},
- OutputTokens: []string{"NextPartNumberMarker"},
- LimitToken: "MaxParts",
- TruncationToken: "IsTruncated",
- },
- }
-
- if input == nil {
- input = &ListPartsInput{}
- }
-
- output = &ListPartsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)).
-// 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.
-//
-// If the upload was created using a checksum algorithm, you will need to have
-// permission to the kms:Decrypt action for the request to succeed.
-//
-// 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 and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
-//
-// The following operations are related to ListParts:
-//
-// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
-//
-// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListParts for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
-func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
- req, out := c.ListPartsRequest(input)
- return out, req.Send()
-}
-
-// ListPartsWithContext is the same as ListParts with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListParts for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) {
- req, out := c.ListPartsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListPartsPages iterates over the pages of a ListParts operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListParts 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 ListParts operation.
-// pageNum := 0
-// err := client.ListPartsPages(params,
-// func(page *s3.ListPartsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error {
- return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListPartsPagesWithContext same as ListPartsPages 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 *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListPartsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListPartsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListPartsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
-
-// PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketAccelerateConfiguration 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 PutBucketAccelerateConfiguration for more information on using the PutBucketAccelerateConfiguration
-// 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 PutBucketAccelerateConfigurationRequest method.
-// req, resp := client.PutBucketAccelerateConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
-func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) {
- op := &request.Operation{
- Name: opPutBucketAccelerateConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?accelerate",
- }
-
- if input == nil {
- input = &PutBucketAccelerateConfigurationInput{}
- }
-
- output = &PutBucketAccelerateConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
-//
-// 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/userguide/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/userguide/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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html)
-// action 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html)
-//
-// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketAccelerateConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
-func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
- req, out := c.PutBucketAccelerateConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketAccelerateConfigurationWithContext is the same as PutBucketAccelerateConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketAccelerateConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketAccelerateConfigurationWithContext(ctx aws.Context, input *PutBucketAccelerateConfigurationInput, opts ...request.Option) (*PutBucketAccelerateConfigurationOutput, error) {
- req, out := c.PutBucketAccelerateConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketAcl = "PutBucketAcl"
-
-// PutBucketAclRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketAcl 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 PutBucketAcl for more information on using the PutBucketAcl
-// 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 PutBucketAclRequest method.
-// req, resp := client.PutBucketAclRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
-func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) {
- op := &request.Operation{
- Name: opPutBucketAcl,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?acl",
- }
-
- if input == nil {
- input = &PutBucketAclInput{}
- }
-
- 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 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.
-//
-// If your bucket uses the bucket owner enforced setting for S3 Object Ownership,
-// ACLs are disabled and no longer affect permissions. You must use policies
-// to grant access to your bucket and the objects in it. Requests to set ACLs
-// or update ACLs fail and return the AccessControlListNotSupported error code.
-// Requests to read ACLs are still supported. For more information, see Controlling
-// object ownership (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
-// in the Amazon S3 User 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 (Amazon
-// Web Services 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 Amazon Web Services account uri – if you are granting permissions
-// to a predefined group emailAddress – if the value specified is the email
-// address of an Amazon Web Services account Using email addresses to specify
-// a grantee is only supported in the following Amazon Web Services 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 Amazon Web Services 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 Amazon
-// Web Services 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 Amazon Web Services
-// 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 Amazon Web Services General Reference.
-//
-// Related Resources
-//
-// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
-//
-// - GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketAcl for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
-func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
- req, out := c.PutBucketAclRequest(input)
- return out, req.Send()
-}
-
-// PutBucketAclWithContext is the same as PutBucketAcl with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketAcl for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error) {
- req, out := c.PutBucketAclRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
-
-// PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketAnalyticsConfiguration 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 PutBucketAnalyticsConfiguration for more information on using the PutBucketAnalyticsConfiguration
-// 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 PutBucketAnalyticsConfigurationRequest method.
-// req, resp := client.PutBucketAnalyticsConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
-func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsConfigurationInput) (req *request.Request, output *PutBucketAnalyticsConfigurationOutput) {
- op := &request.Operation{
- Name: opPutBucketAnalyticsConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?analytics",
- }
-
- if input == nil {
- input = &PutBucketAnalyticsConfigurationInput{}
- }
-
- output = &PutBucketAnalyticsConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// PutBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
-//
-// Sets an analytics configuration for the bucket (specified by the analytics
-// 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/userguide/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/userguide/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
-//
-// - GetBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
-//
-// - DeleteBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
-//
-// - ListBucketAnalyticsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketAnalyticsConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
-func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) {
- req, out := c.PutBucketAnalyticsConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketAnalyticsConfigurationWithContext is the same as PutBucketAnalyticsConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketAnalyticsConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *PutBucketAnalyticsConfigurationInput, opts ...request.Option) (*PutBucketAnalyticsConfigurationOutput, error) {
- req, out := c.PutBucketAnalyticsConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketCors = "PutBucketCors"
-
-// PutBucketCorsRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketCors 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 PutBucketCors for more information on using the PutBucketCors
-// 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 PutBucketCorsRequest method.
-// req, resp := client.PutBucketCorsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
-func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) {
- op := &request.Operation{
- Name: opPutBucketCors,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?cors",
- }
-
- if input == nil {
- input = &PutBucketCorsInput{}
- }
-
- 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 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
-// S3 User Guide.
-//
-// Related Resources
-//
-// - GetBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketCors.html)
-//
-// - DeleteBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html)
-//
-// - RESTOPTIONSobject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketCors for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
-func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
- req, out := c.PutBucketCorsRequest(input)
- return out, req.Send()
-}
-
-// PutBucketCorsWithContext is the same as PutBucketCors with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketCors for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error) {
- req, out := c.PutBucketCorsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketEncryption = "PutBucketEncryption"
-
-// PutBucketEncryptionRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketEncryption operation. The "output" return
-// value will be populated with the request's response once the request 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 PutBucketEncryption for more information on using the PutBucketEncryption
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-// // Example sending a request using the PutBucketEncryptionRequest method.
-// req, resp := client.PutBucketEncryptionRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
-func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *request.Request, output *PutBucketEncryptionOutput) {
- op := &request.Operation{
- Name: opPutBucketEncryption,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?encryption",
- }
-
- if input == nil {
- input = &PutBucketEncryptionInput{}
- }
-
- output = &PutBucketEncryptionOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.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.
-//
-// This action uses the encryption subresource to configure default encryption
-// and Amazon S3 Bucket Key for an existing bucket.
-//
-// Default encryption for a bucket can use server-side encryption with Amazon
-// S3-managed keys (SSE-S3) or customer managed keys (SSE-KMS). If you specify
-// default encryption using SSE-KMS, you can also configure Amazon S3 Bucket
-// Key. When the default encryption is SSE-KMS, if you upload an object to the
-// bucket and do not specify the KMS key to use for encryption, Amazon S3 uses
-// the default Amazon Web Services managed KMS key for your account. For information
-// about default encryption, see Amazon S3 default bucket encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html)
-// in the Amazon S3 User Guide. For more information about S3 Bucket Keys, see
-// Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
-// in the Amazon S3 User Guide.
-//
-// This action requires Amazon Web Services Signature Version 4. For more information,
-// see Authenticating Requests (Amazon Web Services Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/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/userguide/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/userguide/s3-access-control.html)
-// in the Amazon S3 User Guide.
-//
-// Related Resources
-//
-// - GetBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)
-//
-// - DeleteBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketEncryption for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
-func (c *S3) PutBucketEncryption(input *PutBucketEncryptionInput) (*PutBucketEncryptionOutput, error) {
- req, out := c.PutBucketEncryptionRequest(input)
- return out, req.Send()
-}
-
-// PutBucketEncryptionWithContext is the same as PutBucketEncryption with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketEncryption for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketEncryptionWithContext(ctx aws.Context, input *PutBucketEncryptionInput, opts ...request.Option) (*PutBucketEncryptionOutput, error) {
- req, out := c.PutBucketEncryptionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketIntelligentTieringConfiguration = "PutBucketIntelligentTieringConfiguration"
-
-// PutBucketIntelligentTieringConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketIntelligentTieringConfiguration 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 PutBucketIntelligentTieringConfiguration for more information on using the PutBucketIntelligentTieringConfiguration
-// 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 PutBucketIntelligentTieringConfigurationRequest method.
-// req, resp := client.PutBucketIntelligentTieringConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketIntelligentTieringConfiguration
-func (c *S3) PutBucketIntelligentTieringConfigurationRequest(input *PutBucketIntelligentTieringConfigurationInput) (req *request.Request, output *PutBucketIntelligentTieringConfigurationOutput) {
- op := &request.Operation{
- Name: opPutBucketIntelligentTieringConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?intelligent-tiering",
- }
-
- if input == nil {
- input = &PutBucketIntelligentTieringConfigurationInput{}
- }
-
- output = &PutBucketIntelligentTieringConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// PutBucketIntelligentTieringConfiguration API operation for Amazon Simple Storage Service.
-//
-// Puts a S3 Intelligent-Tiering configuration to the specified bucket. You
-// can have up to 1,000 S3 Intelligent-Tiering configurations per bucket.
-//
-// The S3 Intelligent-Tiering storage class is designed to optimize storage
-// costs by automatically moving data to the most cost-effective storage access
-// tier, without performance impact or operational overhead. S3 Intelligent-Tiering
-// delivers automatic cost savings in three low latency and high throughput
-// access tiers. To get the lowest storage cost on data that can be accessed
-// in minutes to hours, you can choose to activate additional archiving capabilities.
-//
-// The S3 Intelligent-Tiering storage class is the ideal storage class for data
-// with unknown, changing, or unpredictable access patterns, independent of
-// object size or retention period. If the size of an object is less than 128
-// KB, it is not monitored and not eligible for auto-tiering. Smaller objects
-// can be stored, but they are always charged at the Frequent Access tier rates
-// in the S3 Intelligent-Tiering storage class.
-//
-// For more information, see Storage class for automatically optimizing frequently
-// and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
-//
-// Operations related to PutBucketIntelligentTieringConfiguration include:
-//
-// - DeleteBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
-//
-// - GetBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
-//
-// - ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
-//
-// You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically
-// move objects stored in the S3 Intelligent-Tiering storage class to the Archive
-// Access or Deep Archive Access tier.
-//
-// 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:PutIntelligentTieringConfiguration
-// bucket permission to set the configuration on the bucket.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketIntelligentTieringConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketIntelligentTieringConfiguration
-func (c *S3) PutBucketIntelligentTieringConfiguration(input *PutBucketIntelligentTieringConfigurationInput) (*PutBucketIntelligentTieringConfigurationOutput, error) {
- req, out := c.PutBucketIntelligentTieringConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketIntelligentTieringConfigurationWithContext is the same as PutBucketIntelligentTieringConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketIntelligentTieringConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketIntelligentTieringConfigurationWithContext(ctx aws.Context, input *PutBucketIntelligentTieringConfigurationInput, opts ...request.Option) (*PutBucketIntelligentTieringConfigurationOutput, error) {
- req, out := c.PutBucketIntelligentTieringConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
-
-// PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketInventoryConfiguration 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 PutBucketInventoryConfiguration for more information on using the PutBucketInventoryConfiguration
-// 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 PutBucketInventoryConfigurationRequest method.
-// req, resp := client.PutBucketInventoryConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
-func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryConfigurationInput) (req *request.Request, output *PutBucketInventoryConfigurationOutput) {
- op := &request.Operation{
- Name: opPutBucketInventoryConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?inventory",
- }
-
- if input == nil {
- input = &PutBucketInventoryConfigurationInput{}
- }
-
- output = &PutBucketInventoryConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// PutBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
-//
-// This implementation of the PUT action 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 Amazon Web Services 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 S3 User 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/userguide/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/userguide/s3-access-control.html)
-// in the Amazon S3 User 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
-//
-// - DeleteBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
-//
-// - ListBucketInventoryConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketInventoryConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
-func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) {
- req, out := c.PutBucketInventoryConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketInventoryConfigurationWithContext is the same as PutBucketInventoryConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketInventoryConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketInventoryConfigurationWithContext(ctx aws.Context, input *PutBucketInventoryConfigurationInput, opts ...request.Option) (*PutBucketInventoryConfigurationOutput, error) {
- req, out := c.PutBucketInventoryConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketLifecycle = "PutBucketLifecycle"
-
-// PutBucketLifecycleRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketLifecycle 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 PutBucketLifecycle for more information on using the PutBucketLifecycle
-// 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 PutBucketLifecycleRequest method.
-// req, resp := client.PutBucketLifecycleRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
-//
-// Deprecated: PutBucketLifecycle has been deprecated
-func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
- if c.Client.Config.Logger != nil {
- c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated")
- }
- op := &request.Operation{
- Name: opPutBucketLifecycle,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?lifecycle",
- }
-
- if input == nil {
- input = &PutBucketLifecycleInput{}
- }
-
- 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.
-//
-// For an updated version of this API, see PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html).
-// 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 S3 User 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 Amazon Web Services 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/userguide/s3-access-control.html)
-// in the Amazon S3 User 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html)(Deprecated)
-//
-// - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
-//
-// - RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html)
-//
-// - By default, a resource owner—in this case, a bucket owner, which is
-// the Amazon Web Services 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 S3 User 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/userguide/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.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketLifecycle for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
-//
-// Deprecated: PutBucketLifecycle has been deprecated
-func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
- req, out := c.PutBucketLifecycleRequest(input)
- return out, req.Send()
-}
-
-// PutBucketLifecycleWithContext is the same as PutBucketLifecycle with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketLifecycle 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.
-//
-// Deprecated: PutBucketLifecycleWithContext has been deprecated
-func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) {
- req, out := c.PutBucketLifecycleRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
-
-// PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketLifecycleConfiguration 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 PutBucketLifecycleConfiguration for more information on using the PutBucketLifecycleConfiguration
-// 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 PutBucketLifecycleConfigurationRequest method.
-// req, resp := client.PutBucketLifecycleConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
-func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) {
- op := &request.Operation{
- Name: opPutBucketLifecycleConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?lifecycle",
- }
-
- if input == nil {
- input = &PutBucketLifecycleConfigurationInput{}
- }
-
- 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.
-//
-// Creates a new lifecycle configuration for the bucket or replaces an existing
-// lifecycle configuration. Keep in mind that this will overwrite an existing
-// lifecycle configuration, so if you want to retain any configuration details,
-// they must be included in the new lifecycle configuration. For information
-// about lifecycle configuration, see Managing your storage lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html).
-//
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html).
-//
-// # Rules
-//
-// You specify the lifecycle configuration in your request body. The lifecycle
-// configuration is specified as XML consisting of one or more rules. An Amazon
-// S3 Lifecycle configuration can have up to 1,000 rules. This limit is not
-// adjustable. 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 Amazon Web Services
-// 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/userguide/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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
-//
-// - DeleteBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple 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
-// the ability to pass a context and additional request options.
-//
-// See PutBucketLifecycleConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error) {
- req, out := c.PutBucketLifecycleConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketLogging = "PutBucketLogging"
-
-// PutBucketLoggingRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketLogging 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 PutBucketLogging for more information on using the PutBucketLogging
-// 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 PutBucketLoggingRequest method.
-// req, resp := client.PutBucketLoggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
-func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) {
- op := &request.Operation{
- Name: opPutBucketLogging,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?logging",
- }
-
- if input == nil {
- input = &PutBucketLoggingInput{}
- }
-
- 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. All logs are saved to buckets
-// in the same Amazon Web Services 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.
-//
-// If the target bucket for log delivery uses the bucket owner enforced setting
-// for S3 Object Ownership, you can't use the Grantee request element to grant
-// access to others. Permissions can only be granted using policies. For more
-// information, see Permissions for server access log delivery (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general)
-// in the Amazon S3 User Guide.
-//
-// # 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/userguide/ServerLogs.html) in
-// the Amazon S3 User Guide.
-//
-// For more information about creating a bucket, see CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html).
-// For more information about returning the logging status of a bucket, see
-// GetBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html).
-//
-// The following operations are related to PutBucketLogging:
-//
-// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
-//
-// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// - GetBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketLogging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
-func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
- req, out := c.PutBucketLoggingRequest(input)
- return out, req.Send()
-}
-
-// PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketLogging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error) {
- req, out := c.PutBucketLoggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
-
-// PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketMetricsConfiguration 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 PutBucketMetricsConfiguration for more information on using the PutBucketMetricsConfiguration
-// 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 PutBucketMetricsConfigurationRequest method.
-// req, resp := client.PutBucketMetricsConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
-func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigurationInput) (req *request.Request, output *PutBucketMetricsConfigurationOutput) {
- op := &request.Operation{
- Name: opPutBucketMetricsConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?metrics",
- }
-
- if input == nil {
- input = &PutBucketMetricsConfigurationInput{}
- }
-
- output = &PutBucketMetricsConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// PutBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
-//
-// Sets a metrics configuration (specified by the metrics configuration ID)
-// 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/userguide/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/userguide/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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
-//
-// - GetBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
-//
-// - ListBucketMetricsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
-//
-// 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
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketMetricsConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
-func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) {
- req, out := c.PutBucketMetricsConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketMetricsConfigurationWithContext is the same as PutBucketMetricsConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketMetricsConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketMetricsConfigurationWithContext(ctx aws.Context, input *PutBucketMetricsConfigurationInput, opts ...request.Option) (*PutBucketMetricsConfigurationOutput, error) {
- req, out := c.PutBucketMetricsConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketNotification = "PutBucketNotification"
-
-// PutBucketNotificationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketNotification 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 PutBucketNotification for more information on using the PutBucketNotification
-// 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 PutBucketNotificationRequest method.
-// req, resp := client.PutBucketNotificationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
-//
-// Deprecated: PutBucketNotification has been deprecated
-func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
- if c.Client.Config.Logger != nil {
- c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated")
- }
- op := &request.Operation{
- Name: opPutBucketNotification,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?notification",
- }
-
- if input == nil {
- input = &PutBucketNotificationInput{}
- }
-
- 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
-}
-
-// PutBucketNotification API operation for Amazon Simple Storage Service.
-//
-// No longer used, see the PutBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotificationConfiguration.html)
-// operation.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketNotification for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
-//
-// Deprecated: PutBucketNotification has been deprecated
-func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
- req, out := c.PutBucketNotificationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketNotificationWithContext is the same as PutBucketNotification with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketNotification 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.
-//
-// Deprecated: PutBucketNotificationWithContext has been deprecated
-func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) {
- req, out := c.PutBucketNotificationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration"
-
-// PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketNotificationConfiguration 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 PutBucketNotificationConfiguration for more information on using the PutBucketNotificationConfiguration
-// 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 PutBucketNotificationConfigurationRequest method.
-// req, resp := client.PutBucketNotificationConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
-func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) {
- op := &request.Operation{
- Name: opPutBucketNotificationConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?notification",
- }
-
- if input == nil {
- input = &PutBucketNotificationConfigurationInput{}
- }
-
- output = &PutBucketNotificationConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
-//
-// 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 action 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 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.
-//
-// For more information about the number of event notification configurations
-// that you can create per bucket, see Amazon S3 service quotas (https://docs.aws.amazon.com/general/latest/gr/s3.html#limits_s3)
-// in Amazon Web Services General Reference.
-//
-// 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 action 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 action is related to PutBucketNotificationConfiguration:
-//
-// - GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketNotificationConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
-func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
- req, out := c.PutBucketNotificationConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketNotificationConfigurationWithContext is the same as PutBucketNotificationConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketNotificationConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput, opts ...request.Option) (*PutBucketNotificationConfigurationOutput, error) {
- req, out := c.PutBucketNotificationConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketOwnershipControls = "PutBucketOwnershipControls"
-
-// PutBucketOwnershipControlsRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketOwnershipControls 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 PutBucketOwnershipControls for more information on using the PutBucketOwnershipControls
-// 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 PutBucketOwnershipControlsRequest method.
-// req, resp := client.PutBucketOwnershipControlsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketOwnershipControls
-func (c *S3) PutBucketOwnershipControlsRequest(input *PutBucketOwnershipControlsInput) (req *request.Request, output *PutBucketOwnershipControlsOutput) {
- op := &request.Operation{
- Name: opPutBucketOwnershipControls,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?ownershipControls",
- }
-
- if input == nil {
- input = &PutBucketOwnershipControlsInput{}
- }
-
- output = &PutBucketOwnershipControlsOutput{}
- 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
-}
-
-// PutBucketOwnershipControls API operation for Amazon Simple Storage Service.
-//
-// Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this
-// operation, you must have the s3:PutBucketOwnershipControls permission. For
-// more information about Amazon S3 permissions, see Specifying permissions
-// in a policy (https://docs.aws.amazon.com/AmazonS3/latest/user-guide/using-with-s3-actions.html).
-//
-// For information about Amazon S3 Object Ownership, see Using object ownership
-// (https://docs.aws.amazon.com/AmazonS3/latest/user-guide/about-object-ownership.html).
-//
-// The following operations are related to PutBucketOwnershipControls:
-//
-// - GetBucketOwnershipControls
-//
-// - DeleteBucketOwnershipControls
-//
-// Returns awserr.Error for 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 PutBucketOwnershipControls for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketOwnershipControls
-func (c *S3) PutBucketOwnershipControls(input *PutBucketOwnershipControlsInput) (*PutBucketOwnershipControlsOutput, error) {
- req, out := c.PutBucketOwnershipControlsRequest(input)
- return out, req.Send()
-}
-
-// PutBucketOwnershipControlsWithContext is the same as PutBucketOwnershipControls with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketOwnershipControls for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketOwnershipControlsWithContext(ctx aws.Context, input *PutBucketOwnershipControlsInput, opts ...request.Option) (*PutBucketOwnershipControlsOutput, error) {
- req, out := c.PutBucketOwnershipControlsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketPolicy = "PutBucketPolicy"
-
-// PutBucketPolicyRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketPolicy 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 PutBucketPolicy for more information on using the PutBucketPolicy
-// 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 PutBucketPolicyRequest method.
-// req, resp := client.PutBucketPolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
-func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) {
- op := &request.Operation{
- Name: opPutBucketPolicy,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?policy",
- }
-
- if input == nil {
- input = &PutBucketPolicyInput{}
- }
-
- 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. If you are using
-// an identity other than the root user of the Amazon Web Services 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 Amazon Web Services 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, see Bucket policy examples (https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html).
-//
-// The following operations are related to PutBucketPolicy:
-//
-// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketPolicy for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
-func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
- req, out := c.PutBucketPolicyRequest(input)
- return out, req.Send()
-}
-
-// PutBucketPolicyWithContext is the same as PutBucketPolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketPolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput, opts ...request.Option) (*PutBucketPolicyOutput, error) {
- req, out := c.PutBucketPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketReplication = "PutBucketReplication"
-
-// PutBucketReplicationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketReplication 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 PutBucketReplication for more information on using the PutBucketReplication
-// 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 PutBucketReplicationRequest method.
-// req, resp := client.PutBucketReplicationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
-func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) {
- op := &request.Operation{
- Name: opPutBucketReplication,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?replication",
- }
-
- if input == nil {
- input = &PutBucketReplicationInput{}
- }
-
- 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 Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
-// in the Amazon S3 User Guide.
-//
-// Specify the replication configuration in the request body. In the replication
-// configuration, you provide the name of the destination bucket or buckets
-// 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.
-//
-// 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.
-//
-// If you are using an earlier version of the replication configuration, Amazon
-// S3 handles 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).
-//
-// For information about enabling versioning on a bucket, see Using Versioning
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html).
-//
-// # Handling Replication of Encrypted Objects
-//
-// By default, Amazon S3 doesn't replicate objects that are stored at rest using
-// server-side encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted
-// objects, add the following: SourceSelectionCriteria, SseKmsEncryptedObjects,
-// Status, EncryptionConfiguration, and ReplicaKmsKeyID. For information about
-// replication configuration, see Replicating Objects Created with SSE Using
-// KMS keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-config-for-kms-objects.html).
-//
-// For information on PutBucketReplication errors, see List of replication-related
-// error codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList)
-//
-// # Permissions
-//
-// To create a PutBucketReplication request, you must have s3:PutReplicationConfiguration
-// permissions for the bucket.
-//
-// By default, a resource owner, in this case the Amazon Web Services 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/userguide/s3-access-control.html).
-//
-// To perform this operation, the user or role performing the action must have
-// the iam:PassRole (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html)
-// permission.
-//
-// The following operations are related to PutBucketReplication:
-//
-// - GetBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html)
-//
-// - DeleteBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketReplication for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
-func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
- req, out := c.PutBucketReplicationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketReplication for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error) {
- req, out := c.PutBucketReplicationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketRequestPayment = "PutBucketRequestPayment"
-
-// PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketRequestPayment 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 PutBucketRequestPayment for more information on using the PutBucketRequestPayment
-// 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 PutBucketRequestPaymentRequest method.
-// req, resp := client.PutBucketRequestPaymentRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
-func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) {
- op := &request.Operation{
- Name: opPutBucketRequestPayment,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?requestPayment",
- }
-
- if input == nil {
- 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
-}
-
-// PutBucketRequestPayment API operation for Amazon Simple Storage Service.
-//
-// 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. 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// - GetBucketRequestPayment (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketRequestPayment.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketRequestPayment for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
-func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
- req, out := c.PutBucketRequestPaymentRequest(input)
- return out, req.Send()
-}
-
-// PutBucketRequestPaymentWithContext is the same as PutBucketRequestPayment with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketRequestPayment for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput, opts ...request.Option) (*PutBucketRequestPaymentOutput, error) {
- req, out := c.PutBucketRequestPaymentRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketTagging = "PutBucketTagging"
-
-// PutBucketTaggingRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketTagging 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 PutBucketTagging for more information on using the PutBucketTagging
-// 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 PutBucketTaggingRequest method.
-// req, resp := client.PutBucketTaggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
-func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) {
- op := &request.Operation{
- Name: opPutBucketTagging,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?tagging",
- }
-
- if input == nil {
- input = &PutBucketTaggingInput{}
- }
-
- 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
-}
-
-// PutBucketTagging API operation for Amazon Simple Storage Service.
-//
-// Sets the tags for a bucket.
-//
-// Use tags to organize your Amazon Web Services bill to reflect your own cost
-// structure. To do this, sign up to get your Amazon Web Services 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)
-// and Using Cost Allocation in Amazon S3 Bucket Tags (https://docs.aws.amazon.com/AmazonS3/latest/dev/CostAllocTagging.html).
-//
-// When this operation sets the tags for a bucket, it will overwrite any current
-// tags the bucket already has. You cannot use this operation to add tags to
-// an existing list of tags.
-//
-// 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/userguide/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/userguide/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 Amazon Web Services-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
-// action 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html)
-//
-// - DeleteBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketTagging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
-func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
- req, out := c.PutBucketTaggingRequest(input)
- return out, req.Send()
-}
-
-// PutBucketTaggingWithContext is the same as PutBucketTagging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketTagging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketTaggingWithContext(ctx aws.Context, input *PutBucketTaggingInput, opts ...request.Option) (*PutBucketTaggingOutput, error) {
- req, out := c.PutBucketTaggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketVersioning = "PutBucketVersioning"
-
-// PutBucketVersioningRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketVersioning 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 PutBucketVersioning for more information on using the PutBucketVersioning
-// 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 PutBucketVersioningRequest method.
-// req, resp := client.PutBucketVersioningRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
-func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) {
- op := &request.Operation{
- Name: opPutBucketVersioning,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?versioning",
- }
-
- if input == nil {
- input = &PutBucketVersioningInput{}
- }
-
- 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
-}
-
-// PutBucketVersioning API operation for Amazon Simple Storage Service.
-//
-// Sets the versioning state of an existing bucket.
-//
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html)
-// request does not return a versioning state value.
-//
-// In order to enable MFA Delete, you must be the bucket owner. If you are the
-// bucket owner and want to enable MFA Delete in the bucket versioning configuration,
-// you 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
-//
-// - GetBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketVersioning for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
-func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
- req, out := c.PutBucketVersioningRequest(input)
- return out, req.Send()
-}
-
-// PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketVersioning for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error) {
- req, out := c.PutBucketVersioningRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketWebsite = "PutBucketWebsite"
-
-// PutBucketWebsiteRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketWebsite 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 PutBucketWebsite for more information on using the PutBucketWebsite
-// 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 PutBucketWebsiteRequest method.
-// req, resp := client.PutBucketWebsiteRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
-func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) {
- op := &request.Operation{
- Name: opPutBucketWebsite,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?website",
- }
-
- if input == nil {
- input = &PutBucketWebsiteInput{}
- }
-
- 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.
-//
-// 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 action 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 S3 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 Storage Service's
-// API operation PutBucketWebsite for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
-func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
- req, out := c.PutBucketWebsiteRequest(input)
- return out, req.Send()
-}
-
-// PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketWebsite for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error) {
- req, out := c.PutBucketWebsiteRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutObject = "PutObject"
-
-// PutObjectRequest generates a "aws/request.Request" representing the
-// client's request for the PutObject 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 PutObject for more information on using the PutObject
-// 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 PutObjectRequest method.
-// req, resp := client.PutObjectRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
-func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) {
- op := &request.Operation{
- Name: opPutObject,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &PutObjectInput{}
- }
-
- output = &PutObjectOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// PutObject API operation for Amazon Simple Storage Service.
-//
-// 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.
-//
-// - To successfully complete the PutObject request, you must have the s3:PutObject
-// in your IAM permissions.
-//
-// - To successfully change the objects acl of your PutObject request, you
-// must have the s3:PutObjectAcl in your IAM permissions.
-//
-// - 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 S3 User 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 Amazon Web Services managed encryption keys
-// (SSE-S3 or SSE-KMS). For more information, see Using Server-Side Encryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html).
-//
-// If you request server-side encryption using Amazon Web Services Key Management
-// Service (SSE-KMS), you can enable an S3 Bucket Key at the object-level. For
-// more information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
-// in the Amazon S3 User Guide.
-//
-// # 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 Amazon Web Services 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).
-//
-// If the bucket that you're uploading objects to uses the bucket owner enforced
-// setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions.
-// Buckets that use this setting only accept PUT requests that don't specify
-// an ACL or PUT requests that specify bucket owner full control ACLs, such
-// as the bucket-owner-full-control canned ACL or an equivalent form of this
-// ACL expressed in the XML format. PUT requests that contain other ACLs (for
-// example, custom grants to certain Amazon Web Services accounts) fail and
-// return a 400 error with the error code AccessControlListNotSupported.
-//
-// For more information, see Controlling ownership of objects and disabling
-// ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
-// in the Amazon S3 User Guide.
-//
-// If your bucket uses the bucket owner enforced setting for Object Ownership,
-// all objects written to the bucket by any account will be owned by the bucket
-// owner.
-//
-// # 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.
-// Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information,
-// see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
-// in the Amazon S3 User 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
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html).
-//
-// Related Resources
-//
-// - CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
-//
-// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutObject for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
-func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
- req, out := c.PutObjectRequest(input)
- return out, req.Send()
-}
-
-// PutObjectWithContext is the same as PutObject with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutObject for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) {
- req, out := c.PutObjectRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutObjectAcl = "PutObjectAcl"
-
-// PutObjectAclRequest generates a "aws/request.Request" representing the
-// client's request for the PutObjectAcl 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 PutObjectAcl for more information on using the PutObjectAcl
-// 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 PutObjectAclRequest method.
-// req, resp := client.PutObjectAclRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
-func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) {
- op := &request.Operation{
- Name: opPutObjectAcl,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}?acl",
- }
-
- if input == nil {
- input = &PutObjectAclInput{}
- }
-
- 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 a new or existing object in an S3 bucket. You must have WRITE_ACP permission
-// to set the ACL of an object. For more information, see What permissions can
-// I grant? (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#permissions)
-// in the Amazon S3 User Guide.
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// 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 User Guide.
-//
-// If your bucket uses the bucket owner enforced setting for S3 Object Ownership,
-// ACLs are disabled and no longer affect permissions. You must use policies
-// to grant access to your bucket and the objects in it. Requests to set ACLs
-// or update ACLs fail and return the AccessControlListNotSupported error code.
-// Requests to read ACLs are still supported. For more information, see Controlling
-// object ownership (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
-// in the Amazon S3 User 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 (Amazon
-// Web Services 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 Amazon Web Services account uri – if you are granting permissions
-// to a predefined group emailAddress – if the value specified is the email
-// address of an Amazon Web Services account Using email addresses to specify
-// a grantee is only supported in the following Amazon Web Services 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 Amazon Web Services General Reference. For example, the following
-// x-amz-grant-read header grants list objects permission to the two Amazon
-// Web Services 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 Amazon Web Services
-// 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 Amazon Web Services 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
-//
-// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutObjectAcl for usage and error information.
-//
-// Returned Error Codes:
-// - ErrCodeNoSuchKey "NoSuchKey"
-// The specified key does not exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
-func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
- req, out := c.PutObjectAclRequest(input)
- return out, req.Send()
-}
-
-// PutObjectAclWithContext is the same as PutObjectAcl with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutObjectAcl for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error) {
- req, out := c.PutObjectAclRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutObjectLegalHold = "PutObjectLegalHold"
-
-// PutObjectLegalHoldRequest generates a "aws/request.Request" representing the
-// client's request for the PutObjectLegalHold 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 PutObjectLegalHold for more information on using the PutObjectLegalHold
-// 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 PutObjectLegalHoldRequest method.
-// req, resp := client.PutObjectLegalHoldRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold
-func (c *S3) PutObjectLegalHoldRequest(input *PutObjectLegalHoldInput) (req *request.Request, output *PutObjectLegalHoldOutput) {
- op := &request.Operation{
- Name: opPutObjectLegalHold,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}?legal-hold",
- }
-
- if input == nil {
- input = &PutObjectLegalHoldInput{}
- }
-
- output = &PutObjectLegalHoldOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutObjectLegalHold API operation for Amazon Simple Storage Service.
-//
-// Applies a legal hold configuration to the specified object. For more information,
-// see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// Returns awserr.Error for 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 PutObjectLegalHold for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold
-func (c *S3) PutObjectLegalHold(input *PutObjectLegalHoldInput) (*PutObjectLegalHoldOutput, error) {
- req, out := c.PutObjectLegalHoldRequest(input)
- return out, req.Send()
-}
-
-// PutObjectLegalHoldWithContext is the same as PutObjectLegalHold with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutObjectLegalHold for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutObjectLegalHoldWithContext(ctx aws.Context, input *PutObjectLegalHoldInput, opts ...request.Option) (*PutObjectLegalHoldOutput, error) {
- req, out := c.PutObjectLegalHoldRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutObjectLockConfiguration = "PutObjectLockConfiguration"
-
-// PutObjectLockConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutObjectLockConfiguration 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 PutObjectLockConfiguration for more information on using the PutObjectLockConfiguration
-// 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 PutObjectLockConfigurationRequest method.
-// req, resp := client.PutObjectLockConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration
-func (c *S3) PutObjectLockConfigurationRequest(input *PutObjectLockConfigurationInput) (req *request.Request, output *PutObjectLockConfigurationOutput) {
- op := &request.Operation{
- Name: opPutObjectLockConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?object-lock",
- }
-
- if input == nil {
- input = &PutObjectLockConfigurationInput{}
- }
-
- 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
-// object placed in the specified bucket. For more information, see Locking
-// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
-//
-// - The DefaultRetention settings require both a mode and a period.
-//
-// - The DefaultRetention period can be either Days or Years but you must
-// select one. You cannot specify Days and Years at the same time.
-//
-// - You can only enable Object Lock for new buckets. If you want to turn
-// on Object Lock for an existing bucket, contact Amazon Web Services Support.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutObjectLockConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration
-func (c *S3) PutObjectLockConfiguration(input *PutObjectLockConfigurationInput) (*PutObjectLockConfigurationOutput, error) {
- req, out := c.PutObjectLockConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutObjectLockConfigurationWithContext is the same as PutObjectLockConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutObjectLockConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutObjectLockConfigurationWithContext(ctx aws.Context, input *PutObjectLockConfigurationInput, opts ...request.Option) (*PutObjectLockConfigurationOutput, error) {
- req, out := c.PutObjectLockConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutObjectRetention = "PutObjectRetention"
-
-// PutObjectRetentionRequest generates a "aws/request.Request" representing the
-// client's request for the PutObjectRetention 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 PutObjectRetention for more information on using the PutObjectRetention
-// 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 PutObjectRetentionRequest method.
-// req, resp := client.PutObjectRetentionRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention
-func (c *S3) PutObjectRetentionRequest(input *PutObjectRetentionInput) (req *request.Request, output *PutObjectRetentionOutput) {
- op := &request.Operation{
- Name: opPutObjectRetention,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}?retention",
- }
-
- if input == nil {
- input = &PutObjectRetentionInput{}
- }
-
- output = &PutObjectRetentionOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutObjectRetention API operation for Amazon Simple Storage Service.
-//
-// Places an Object Retention configuration on an object. For more information,
-// see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
-// Users or accounts require the s3:PutObjectRetention permission in order to
-// place an Object Retention configuration on objects. Bypassing a Governance
-// Retention configuration requires the s3:BypassGovernanceRetention permission.
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// Returns awserr.Error for 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 PutObjectRetention for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention
-func (c *S3) PutObjectRetention(input *PutObjectRetentionInput) (*PutObjectRetentionOutput, error) {
- req, out := c.PutObjectRetentionRequest(input)
- return out, req.Send()
-}
-
-// PutObjectRetentionWithContext is the same as PutObjectRetention with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutObjectRetention for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutObjectRetentionWithContext(ctx aws.Context, input *PutObjectRetentionInput, opts ...request.Option) (*PutObjectRetentionOutput, error) {
- req, out := c.PutObjectRetentionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutObjectTagging = "PutObjectTagging"
-
-// PutObjectTaggingRequest generates a "aws/request.Request" representing the
-// client's request for the PutObjectTagging 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 PutObjectTagging for more information on using the PutObjectTagging
-// 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 PutObjectTaggingRequest method.
-// req, resp := client.PutObjectTaggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
-func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) {
- op := &request.Operation{
- Name: opPutObjectTagging,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}?tagging",
- }
-
- if input == nil {
- input = &PutObjectTaggingInput{}
- }
-
- 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.
-//
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html).
-//
-// 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 action
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
-//
-// - DeleteObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutObjectTagging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
-func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
- req, out := c.PutObjectTaggingRequest(input)
- return out, req.Send()
-}
-
-// PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutObjectTagging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) {
- req, out := c.PutObjectTaggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutPublicAccessBlock = "PutPublicAccessBlock"
-
-// PutPublicAccessBlockRequest generates a "aws/request.Request" representing the
-// client's request for the PutPublicAccessBlock 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 PutPublicAccessBlock for more information on using the PutPublicAccessBlock
-// 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 PutPublicAccessBlockRequest method.
-// req, resp := client.PutPublicAccessBlockRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock
-func (c *S3) PutPublicAccessBlockRequest(input *PutPublicAccessBlockInput) (req *request.Request, output *PutPublicAccessBlockOutput) {
- op := &request.Operation{
- Name: opPutPublicAccessBlock,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?publicAccessBlock",
- }
-
- if input == nil {
- input = &PutPublicAccessBlockInput{}
- }
-
- 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. 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
-//
-// - DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
-//
-// - GetBucketPolicyStatus (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html)
-//
-// - 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
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutPublicAccessBlock for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock
-func (c *S3) PutPublicAccessBlock(input *PutPublicAccessBlockInput) (*PutPublicAccessBlockOutput, error) {
- req, out := c.PutPublicAccessBlockRequest(input)
- return out, req.Send()
-}
-
-// PutPublicAccessBlockWithContext is the same as PutPublicAccessBlock with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutPublicAccessBlock for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutPublicAccessBlockWithContext(ctx aws.Context, input *PutPublicAccessBlockInput, opts ...request.Option) (*PutPublicAccessBlockOutput, error) {
- req, out := c.PutPublicAccessBlockRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opRestoreObject = "RestoreObject"
-
-// RestoreObjectRequest generates a "aws/request.Request" representing the
-// client's request for the RestoreObject 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 RestoreObject for more information on using the RestoreObject
-// 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 RestoreObjectRequest method.
-// req, resp := client.RestoreObjectRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
-func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) {
- op := &request.Operation{
- Name: opRestoreObject,
- HTTPMethod: "POST",
- HTTPPath: "/{Bucket}/{Key+}?restore",
- }
-
- if input == nil {
- input = &RestoreObjectInput{}
- }
-
- output = &RestoreObjectOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// RestoreObject API operation for Amazon Simple Storage Service.
-//
-// # Restores an archived copy of an object back into Amazon S3
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// This action 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/userguide/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/userguide/s3-access-control.html)
-// in the Amazon S3 User 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 S3 User 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 Amazon Web Services Region as the bucket
-// that contains the archive object that is being queried. The Amazon Web
-// Services 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 S3 User Guide. For more information about the S3 structure
-// in the request body, see the following: PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-// Managing Access with ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html)
-// in the Amazon S3 User Guide Protecting Data Using Server-Side Encryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html)
-// in the Amazon S3 User 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 S3 User 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 objects
-//
-// Objects that you archive to the S3 Glacier or S3 Glacier Deep Archive storage
-// class, and S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep
-// Archive tiers are not accessible in real time. For objects in Archive Access
-// or Deep Archive Access tiers you must first initiate a restore request, and
-// then wait until the object is moved into the Frequent Access tier. For objects
-// in S3 Glacier or S3 Glacier Deep Archive storage classes you must first initiate
-// a restore request, and then wait until a temporary copy of the object is
-// available. To access an archived object, you must restore the object for
-// the duration (number of days) that you specify.
-//
-// 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.
-//
-// 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 S3 Glacier storage class or S3 Intelligent-Tiering Archive
-// tier 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 is 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 objects stored in the S3 Glacier Deep Archive storage
-// class or S3 Intelligent-Tiering Deep Archive tier.
-//
-// - Standard - Standard retrievals allow you to access any of your archived
-// objects within several hours. This is the default option for retrieval
-// requests that do not specify the retrieval option. Standard retrievals
-// typically finish within 3–5 hours for objects stored in the S3 Glacier
-// storage class or S3 Intelligent-Tiering Archive tier. They typically finish
-// within 12 hours for objects stored in the S3 Glacier Deep Archive storage
-// class or S3 Intelligent-Tiering Deep Archive tier. Standard retrievals
-// are free for objects stored in S3 Intelligent-Tiering.
-//
-// - Bulk - Bulk retrievals are the lowest-cost retrieval option in S3 Glacier,
-// enabling you to retrieve large amounts, even petabytes, of data inexpensively.
-// Bulk retrievals typically finish within 5–12 hours for objects stored
-// in the S3 Glacier storage class or S3 Intelligent-Tiering Archive tier.
-// They typically finish within 48 hours for objects stored in the S3 Glacier
-// Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier.
-// Bulk retrievals are free for objects stored in S3 Intelligent-Tiering.
-//
-// 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 S3 User Guide.
-//
-// You can use Amazon S3 restore speed upgrade to change the restore speed to
-// a faster speed while it is in progress. 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 S3 User 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 S3 User 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
-// and Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
-// in Amazon S3 User Guide.
-//
-// # Responses
-//
-// A successful action returns either the 200 OK or 202 Accepted status code.
-//
-// - If the object is not previously restored, then Amazon S3 returns 202
-// Accepted in the response.
-//
-// - If the object 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: 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
-//
-// - GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html)
-//
-// - 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 S3 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 Storage Service's
-// API operation RestoreObject for usage and error information.
-//
-// Returned Error Codes:
-// - ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError"
-// This action 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) {
- req, out := c.RestoreObjectRequest(input)
- return out, req.Send()
-}
-
-// RestoreObjectWithContext is the same as RestoreObject with the addition of
-// the ability to pass a context and additional request options.
-//
-// See RestoreObject for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error) {
- req, out := c.RestoreObjectRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opSelectObjectContent = "SelectObjectContent"
-
-// SelectObjectContentRequest generates a "aws/request.Request" representing the
-// client's request for the SelectObjectContent 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 SelectObjectContent for more information on using the SelectObjectContent
-// 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 SelectObjectContentRequest method.
-// req, resp := client.SelectObjectContentRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
-func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *request.Request, output *SelectObjectContentOutput) {
- op := &request.Operation{
- Name: opSelectObjectContent,
- HTTPMethod: "POST",
- HTTPPath: "/{Bucket}/{Key+}?select&select-type=2",
- }
-
- if input == nil {
- input = &SelectObjectContentInput{}
- }
-
- 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(es.runOutputStream)
- req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose)
- return
-}
-
-// SelectObjectContent API operation for Amazon Simple Storage Service.
-//
-// This action 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,
-// 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.
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// 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)
-// and SELECT Command (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-glacier-select-sql-reference-select.html)
-// in the Amazon S3 User 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 S3 User 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 S3 User 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html).
-// 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 S3 User Guide. For objects that are encrypted with Amazon
-// S3 managed encryption keys (SSE-S3) and Amazon Web Services KMS keys (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 S3 User 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 Appendix: SelectObjectContent
-// Response (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html).
-//
-// # GetObject Support
-//
-// The SelectObjectContent action does not support the following GetObject functionality.
-// For more information, see GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html).
-//
-// - Range: Although you can specify a scan range for an Amazon S3 Select
-// request (see SelectObjectContentRequest - ScanRange (https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html#AmazonS3-SelectObjectContent-request-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 S3 User Guide.
-//
-// # Special Errors
-//
-// For a list of special errors for this operation, see List of SELECT Object
-// Content Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#SelectObjectContentErrorCodeList)
-//
-// Related Resources
-//
-// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
-//
-// - PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation SelectObjectContent for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
-func (c *S3) SelectObjectContent(input *SelectObjectContentInput) (*SelectObjectContentOutput, error) {
- req, out := c.SelectObjectContentRequest(input)
- return out, req.Send()
-}
-
-// SelectObjectContentWithContext is the same as SelectObjectContent with the addition of
-// the ability to pass a context and additional request options.
-//
-// See SelectObjectContent for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) SelectObjectContentWithContext(ctx aws.Context, input *SelectObjectContentInput, opts ...request.Option) (*SelectObjectContentOutput, error) {
- req, out := c.SelectObjectContentRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-var _ awserr.Error
-
-// SelectObjectContentEventStream provides the event stream handling for the SelectObjectContent.
-//
-// For testing and mocking the event stream this type should be initialized via
-// the NewSelectObjectContentEventStream constructor function. Using the functional options
-// to pass in nested mock behavior.
-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
-
- 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
-}
-
-// NewSelectObjectContentEventStream initializes an SelectObjectContentEventStream.
-// This function should only be used for testing and mocking the SelectObjectContentEventStream
-// stream within your application.
-//
-// The Reader member must be set before reading events from the stream.
-//
-// The StreamCloser member should be set to the underlying io.Closer,
-// (e.g. http.Response.Body), that will be closed when the stream Close method
-// is called.
-//
-// es := NewSelectObjectContentEventStream(func(o *SelectObjectContentEventStream){
-// es.Reader = myMockStreamReader
-// es.StreamCloser = myMockStreamCloser
-// })
-func NewSelectObjectContentEventStream(opts ...func(*SelectObjectContentEventStream)) *SelectObjectContentEventStream {
- es := &SelectObjectContentEventStream{
- done: make(chan struct{}),
- err: eventstreamapi.NewOnceError(),
- }
-
- for _, fn := range opts {
- fn(es)
- }
-
- return es
-}
-
-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
-// - SelectObjectContentEventStreamUnknownEvent
-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.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UploadPart for more information on using the UploadPart
-// 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 UploadPartRequest method.
-// req, resp := client.UploadPartRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
-func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) {
- op := &request.Operation{
- Name: opUploadPart,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &UploadPartInput{}
- }
-
- output = &UploadPartOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// UploadPart API operation for Amazon Simple Storage Service.
-//
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
-// operation.
-//
-// You must initiate a multipart upload (see CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html))
-// 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.
-//
-// For information about maximum and minimum part sizes and other multipart
-// upload specifications, see Multipart upload limits (https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html)
-// in the Amazon S3 User Guide.
-//
-// 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.
-//
-// If the upload request is signed with Signature Version 4, then Amazon Web
-// Services S3 uses the x-amz-content-sha256 header as a checksum instead of
-// Content-MD5. For more information see Authenticating Requests: Using the
-// Authorization Header (Amazon Web Services Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html).
-//
-// 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 S3 User Guide .
-//
-// For information on the permissions required to use the multipart upload API,
-// go to Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
-// in the Amazon S3 User 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 Amazon Web Services 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html).
-// For more information, go to Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html)
-// in the Amazon S3 User 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html).
-//
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation UploadPart for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
-func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
- req, out := c.UploadPartRequest(input)
- return out, req.Send()
-}
-
-// UploadPartWithContext is the same as UploadPart with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UploadPart for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error) {
- req, out := c.UploadPartRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUploadPartCopy = "UploadPartCopy"
-
-// UploadPartCopyRequest generates a "aws/request.Request" representing the
-// client's request for the UploadPartCopy 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 UploadPartCopy for more information on using the UploadPartCopy
-// 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 UploadPartCopyRequest method.
-// req, resp := client.UploadPartCopyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
-func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) {
- op := &request.Operation{
- Name: opUploadPartCopy,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &UploadPartCopyInput{}
- }
-
- output = &UploadPartCopyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// UploadPartCopy API operation for Amazon Simple Storage Service.
-//
-// 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.
-//
-// For information about maximum and minimum part sizes and other multipart
-// upload specifications, see Multipart upload limits (https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html)
-// in the Amazon S3 User Guide.
-//
-// Instead of using an existing object as part data, you might use the UploadPart
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) action
-// 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 S3 User Guide.
-//
-// - For information about permissions required to use the multipart upload
-// API, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
-// in the Amazon S3 User Guide.
-//
-// - For information about copying objects using a single atomic action vs.
-// a multipart upload, see Operations on Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html)
-// in the Amazon S3 User Guide.
-//
-// - For information about using server-side encryption with customer-provided
-// encryption keys with the UploadPartCopy operation, see CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
-// and UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html).
-//
-// 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation UploadPartCopy for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
-func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
- req, out := c.UploadPartCopyRequest(input)
- return out, req.Send()
-}
-
-// UploadPartCopyWithContext is the same as UploadPartCopy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UploadPartCopy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error) {
- req, out := c.UploadPartCopyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opWriteGetObjectResponse = "WriteGetObjectResponse"
-
-// WriteGetObjectResponseRequest generates a "aws/request.Request" representing the
-// client's request for the WriteGetObjectResponse 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 WriteGetObjectResponse for more information on using the WriteGetObjectResponse
-// 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 WriteGetObjectResponseRequest method.
-// req, resp := client.WriteGetObjectResponseRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WriteGetObjectResponse
-func (c *S3) WriteGetObjectResponseRequest(input *WriteGetObjectResponseInput) (req *request.Request, output *WriteGetObjectResponseOutput) {
- op := &request.Operation{
- Name: opWriteGetObjectResponse,
- HTTPMethod: "POST",
- HTTPPath: "/WriteGetObjectResponse",
- }
-
- if input == nil {
- input = &WriteGetObjectResponseInput{}
- }
-
- output = &WriteGetObjectResponseOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Sign.Remove(v4.SignRequestHandler)
- handler := v4.BuildNamedHandler("v4.CustomSignerHandler", v4.WithUnsignedPayload)
- req.Handlers.Sign.PushFrontNamed(handler)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{RequestRoute}.", input.hostLabels))
- req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
- return
-}
-
-// WriteGetObjectResponse API operation for Amazon Simple Storage Service.
-//
-// Passes transformed objects to a GetObject operation when using Object Lambda
-// access points. For information about Object Lambda access points, see Transforming
-// objects with Object Lambda access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html)
-// in the Amazon S3 User Guide.
-//
-// This operation supports metadata that can be returned by GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html),
-// in addition to RequestRoute, RequestToken, StatusCode, ErrorCode, and ErrorMessage.
-// The GetObject response metadata is supported so that the WriteGetObjectResponse
-// caller, typically an Lambda function, can provide the same metadata when
-// it internally invokes GetObject. When WriteGetObjectResponse is called by
-// a customer-owned Lambda function, the metadata returned to the end user GetObject
-// call might differ from what Amazon S3 would normally return.
-//
-// You can include any number of metadata headers. When including a metadata
-// header, it should be prefaced with x-amz-meta. For example, x-amz-meta-my-custom-header:
-// MyCustomValue. The primary use case for this is to forward GetObject metadata.
-//
-// Amazon Web Services provides some prebuilt Lambda functions that you can
-// use with S3 Object Lambda to detect and redact personally identifiable information
-// (PII) and decompress S3 objects. These Lambda functions are available in
-// the Amazon Web Services Serverless Application Repository, and can be selected
-// through the Amazon Web Services Management Console when you create your Object
-// Lambda access point.
-//
-// Example 1: PII Access Control - This Lambda function uses Amazon Comprehend,
-// a natural language processing (NLP) service using machine learning to find
-// insights and relationships in text. It automatically detects personally identifiable
-// information (PII) such as names, addresses, dates, credit card numbers, and
-// social security numbers from documents in your Amazon S3 bucket.
-//
-// Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a
-// natural language processing (NLP) service using machine learning to find
-// insights and relationships in text. It automatically redacts personally identifiable
-// information (PII) such as names, addresses, dates, credit card numbers, and
-// social security numbers from documents in your Amazon S3 bucket.
-//
-// Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression,
-// is equipped to decompress objects stored in S3 in one of six compressed file
-// formats including bzip2, gzip, snappy, zlib, zstandard and ZIP.
-//
-// For information on how to view and use these functions, see Using Amazon
-// Web Services built Lambda functions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/olap-examples.html)
-// in the Amazon S3 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 Storage Service's
-// API operation WriteGetObjectResponse for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WriteGetObjectResponse
-func (c *S3) WriteGetObjectResponse(input *WriteGetObjectResponseInput) (*WriteGetObjectResponseOutput, error) {
- req, out := c.WriteGetObjectResponseRequest(input)
- return out, req.Send()
-}
-
-// WriteGetObjectResponseWithContext is the same as WriteGetObjectResponse with the addition of
-// the ability to pass a context and additional request options.
-//
-// See WriteGetObjectResponse for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) WriteGetObjectResponseWithContext(ctx aws.Context, input *WriteGetObjectResponseInput, opts ...request.Option) (*WriteGetObjectResponseOutput, error) {
- req, out := c.WriteGetObjectResponseRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// Specifies the days since the initiation of an incomplete multipart upload
-// that Amazon S3 will wait before permanently removing all parts of the 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)
-// in the Amazon S3 User Guide.
-type AbortIncompleteMultipartUpload struct {
- _ struct{} `type:"structure"`
-
- // Specifies the number of days after which Amazon S3 aborts an incomplete multipart
- // upload.
- DaysAfterInitiation *int64 `type:"integer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AbortIncompleteMultipartUpload) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AbortIncompleteMultipartUpload) GoString() string {
- return s.String()
-}
-
-// SetDaysAfterInitiation sets the DaysAfterInitiation field's value.
-func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload {
- s.DaysAfterInitiation = &v
- return s
-}
-
-type AbortMultipartUploadInput struct {
- _ struct{} `locationName:"AbortMultipartUploadRequest" type:"structure"`
-
- // The bucket name to which the upload was taking place.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Key of the object for which the multipart upload 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 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // Upload ID that identifies the multipart upload.
- //
- // UploadId is a required field
- UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AbortMultipartUploadInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AbortMultipartUploadInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AbortMultipartUploadInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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.UploadId == nil {
- invalidParams.Add(request.NewErrParamRequired("UploadId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInput {
- s.Bucket = &v
- return s
-}
-
-func (s *AbortMultipartUploadInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *AbortMultipartUploadInput) SetExpectedBucketOwner(v string) *AbortMultipartUploadInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *AbortMultipartUploadInput) SetRequestPayer(v string) *AbortMultipartUploadInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadInput {
- s.UploadId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s AbortMultipartUploadInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type AbortMultipartUploadOutput struct {
- _ struct{} `type:"structure"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AbortMultipartUploadOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AbortMultipartUploadOutput) GoString() string {
- return s.String()
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipartUploadOutput {
- s.RequestCharged = &v
- return s
-}
-
-// Configures the transfer acceleration state for an Amazon S3 bucket. For more
-// information, see Amazon S3 Transfer Acceleration (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
-// in the Amazon S3 User Guide.
-type AccelerateConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Specifies the transfer acceleration status of the bucket.
- Status *string `type:"string" enum:"BucketAccelerateStatus"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AccelerateConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AccelerateConfiguration) GoString() string {
- return s.String()
-}
-
-// SetStatus sets the Status field's value.
-func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration {
- s.Status = &v
- return s
-}
-
-// Contains the elements that set the ACL permissions for an object per grantee.
-type AccessControlPolicy 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AccessControlPolicy) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AccessControlPolicy) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AccessControlPolicy) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"}
- if s.Grants != nil {
- for i, v := range s.Grants {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetGrants sets the Grants field's value.
-func (s *AccessControlPolicy) SetGrants(v []*Grant) *AccessControlPolicy {
- s.Grants = v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy {
- s.Owner = v
- return s
-}
-
-// A container for information about access control for replicas.
-type AccessControlTranslation struct {
- _ struct{} `type:"structure"`
-
- // Specifies the replica ownership. For default and valid values, see PUT bucket
- // replication (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html)
- // in the Amazon S3 API Reference.
- //
- // Owner is a required field
- Owner *string `type:"string" required:"true" enum:"OwnerOverride"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AccessControlTranslation) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AccessControlTranslation) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AccessControlTranslation) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AccessControlTranslation"}
- if s.Owner == nil {
- invalidParams.Add(request.NewErrParamRequired("Owner"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetOwner sets the Owner field's value.
-func (s *AccessControlTranslation) SetOwner(v string) *AccessControlTranslation {
- s.Owner = &v
- return s
-}
-
-// A conjunction (logical AND) of predicates, which is used in evaluating a
-// metrics filter. The operator must have at least two predicates in any combination,
-// and an object must match all of the predicates for the filter to apply.
-type AnalyticsAndOperator struct {
- _ struct{} `type:"structure"`
-
- // The prefix to use when evaluating an AND predicate: The prefix that an object
- // must have to be included in the metrics results.
- Prefix *string `type:"string"`
-
- // The list of tags to use when evaluating an AND predicate.
- Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AnalyticsAndOperator) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AnalyticsAndOperator) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AnalyticsAndOperator) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AnalyticsAndOperator"}
- 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
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *AnalyticsAndOperator) SetPrefix(v string) *AnalyticsAndOperator {
- s.Prefix = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator {
- s.Tags = v
- return s
-}
-
-// Specifies the configuration and any analyses for the analytics filter of
-// an Amazon S3 bucket.
-type AnalyticsConfiguration struct {
- _ struct{} `type:"structure"`
-
- // 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.
- Filter *AnalyticsFilter `type:"structure"`
-
- // The ID that identifies the analytics configuration.
- //
- // Id is a required field
- Id *string `type:"string" required:"true"`
-
- // Contains data related to access patterns to be collected and made available
- // to analyze the tradeoffs between different storage classes.
- //
- // StorageClassAnalysis is a required field
- StorageClassAnalysis *StorageClassAnalysis `type:"structure" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AnalyticsConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AnalyticsConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AnalyticsConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AnalyticsConfiguration"}
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.StorageClassAnalysis == nil {
- invalidParams.Add(request.NewErrParamRequired("StorageClassAnalysis"))
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
- if s.StorageClassAnalysis != nil {
- if err := s.StorageClassAnalysis.Validate(); err != nil {
- invalidParams.AddNested("StorageClassAnalysis", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetFilter sets the Filter field's value.
-func (s *AnalyticsConfiguration) SetFilter(v *AnalyticsFilter) *AnalyticsConfiguration {
- s.Filter = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *AnalyticsConfiguration) SetId(v string) *AnalyticsConfiguration {
- s.Id = &v
- return s
-}
-
-// SetStorageClassAnalysis sets the StorageClassAnalysis field's value.
-func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis) *AnalyticsConfiguration {
- s.StorageClassAnalysis = v
- return s
-}
-
-// Where to publish the analytics results.
-type AnalyticsExportDestination struct {
- _ struct{} `type:"structure"`
-
- // A destination signifying output to an S3 bucket.
- //
- // S3BucketDestination is a required field
- S3BucketDestination *AnalyticsS3BucketDestination `type:"structure" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AnalyticsExportDestination) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AnalyticsExportDestination) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AnalyticsExportDestination) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AnalyticsExportDestination"}
- if s.S3BucketDestination == nil {
- invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
- }
- if s.S3BucketDestination != nil {
- if err := s.S3BucketDestination.Validate(); err != nil {
- invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetS3BucketDestination sets the S3BucketDestination field's value.
-func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3BucketDestination) *AnalyticsExportDestination {
- s.S3BucketDestination = v
- 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"`
-
- // A conjunction (logical AND) of predicates, which is used in evaluating an
- // analytics filter. The operator must have at least two predicates.
- And *AnalyticsAndOperator `type:"structure"`
-
- // The prefix to use when evaluating an analytics filter.
- Prefix *string `type:"string"`
-
- // The tag to use when evaluating an analytics filter.
- Tag *Tag `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AnalyticsFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AnalyticsFilter) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AnalyticsFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AnalyticsFilter"}
- if s.And != nil {
- if err := s.And.Validate(); err != nil {
- invalidParams.AddNested("And", err.(request.ErrInvalidParams))
- }
- }
- if s.Tag != nil {
- if err := s.Tag.Validate(); err != nil {
- invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAnd sets the And field's value.
-func (s *AnalyticsFilter) SetAnd(v *AnalyticsAndOperator) *AnalyticsFilter {
- s.And = v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *AnalyticsFilter) SetPrefix(v string) *AnalyticsFilter {
- s.Prefix = &v
- return s
-}
-
-// SetTag sets the Tag field's value.
-func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter {
- s.Tag = v
- return s
-}
-
-// Contains information about where to publish the analytics results.
-type AnalyticsS3BucketDestination struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of the bucket to which data is exported.
- //
- // Bucket is a required field
- Bucket *string `type:"string" required:"true"`
-
- // 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.
- //
- // Format is a required field
- Format *string `type:"string" required:"true" enum:"AnalyticsS3ExportFileFormat"`
-
- // The prefix to use when exporting data. The prefix is prepended to all results.
- Prefix *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AnalyticsS3BucketDestination) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AnalyticsS3BucketDestination) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AnalyticsS3BucketDestination) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AnalyticsS3BucketDestination"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Format == nil {
- invalidParams.Add(request.NewErrParamRequired("Format"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *AnalyticsS3BucketDestination) SetBucket(v string) *AnalyticsS3BucketDestination {
- s.Bucket = &v
- return s
-}
-
-func (s *AnalyticsS3BucketDestination) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBucketAccountId sets the BucketAccountId field's value.
-func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination {
- s.BucketAccountId = &v
- return s
-}
-
-// SetFormat sets the Format field's value.
-func (s *AnalyticsS3BucketDestination) SetFormat(v string) *AnalyticsS3BucketDestination {
- s.Format = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDestination {
- s.Prefix = &v
- 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 Amazon Web Services
-// accounts.
-type Bucket struct {
- _ struct{} `type:"structure"`
-
- // Date the bucket was created. This date can change when making changes to
- // your bucket, such as editing its bucket policy.
- CreationDate *time.Time `type:"timestamp"`
-
- // The name of the bucket.
- Name *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Bucket) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Bucket) GoString() string {
- return s.String()
-}
-
-// SetCreationDate sets the CreationDate field's value.
-func (s *Bucket) SetCreationDate(v time.Time) *Bucket {
- s.CreationDate = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *Bucket) SetName(v string) *Bucket {
- s.Name = &v
- return s
-}
-
-// 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 S3 User Guide.
-type BucketLifecycleConfiguration struct {
- _ struct{} `type:"structure"`
-
- // A lifecycle rule for individual objects in an Amazon S3 bucket.
- //
- // Rules is a required field
- Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s BucketLifecycleConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s BucketLifecycleConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *BucketLifecycleConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"}
- if s.Rules == nil {
- invalidParams.Add(request.NewErrParamRequired("Rules"))
- }
- if s.Rules != nil {
- for i, v := range s.Rules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetRules sets the Rules field's value.
-func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifecycleConfiguration {
- s.Rules = v
- return s
-}
-
-// Container for logging status information.
-type BucketLoggingStatus struct {
- _ struct{} `type:"structure"`
-
- // Describes where logs are stored and the prefix that Amazon S3 assigns to
- // all log object keys for a bucket. For more information, see PUT Bucket logging
- // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html)
- // in the Amazon S3 API Reference.
- LoggingEnabled *LoggingEnabled `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s BucketLoggingStatus) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s BucketLoggingStatus) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *BucketLoggingStatus) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"}
- if s.LoggingEnabled != nil {
- if err := s.LoggingEnabled.Validate(); err != nil {
- invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetLoggingEnabled sets the LoggingEnabled field's value.
-func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggingStatus {
- s.LoggingEnabled = v
- return s
-}
-
-// Describes the cross-origin access configuration for objects in an Amazon
-// S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon
-// S3 User Guide.
-type CORSConfiguration 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 is a required field
- CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CORSConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CORSConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CORSConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"}
- if s.CORSRules == nil {
- invalidParams.Add(request.NewErrParamRequired("CORSRules"))
- }
- if s.CORSRules != nil {
- for i, v := range s.CORSRules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCORSRules sets the CORSRules field's value.
-func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration {
- s.CORSRules = v
- return s
-}
-
-// Specifies a cross-origin access rule for an Amazon S3 bucket.
-type CORSRule struct {
- _ struct{} `type:"structure"`
-
- // Headers that are specified in the Access-Control-Request-Headers header.
- // These headers are allowed in a preflight OPTIONS request. In response to
- // any preflight OPTIONS request, Amazon S3 returns any requested headers that
- // are allowed.
- AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"`
-
- // An HTTP method that you allow the origin to execute. Valid values are GET,
- // PUT, HEAD, POST, and DELETE.
- //
- // AllowedMethods is a required field
- AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"`
-
- // One or more origins you want customers to be able to access the bucket from.
- //
- // AllowedOrigins is a required field
- AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"`
-
- // One or more headers in the response that you want customers to be able to
- // access from their applications (for example, from a JavaScript XMLHttpRequest
- // object).
- ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"`
-
- // Unique identifier for the rule. The value cannot be longer than 255 characters.
- ID *string `type:"string"`
-
- // The time in seconds that your browser is to cache the preflight response
- // for the specified resource.
- MaxAgeSeconds *int64 `type:"integer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CORSRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CORSRule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CORSRule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CORSRule"}
- if s.AllowedMethods == nil {
- invalidParams.Add(request.NewErrParamRequired("AllowedMethods"))
- }
- if s.AllowedOrigins == nil {
- invalidParams.Add(request.NewErrParamRequired("AllowedOrigins"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAllowedHeaders sets the AllowedHeaders field's value.
-func (s *CORSRule) SetAllowedHeaders(v []*string) *CORSRule {
- s.AllowedHeaders = v
- return s
-}
-
-// SetAllowedMethods sets the AllowedMethods field's value.
-func (s *CORSRule) SetAllowedMethods(v []*string) *CORSRule {
- s.AllowedMethods = v
- return s
-}
-
-// SetAllowedOrigins sets the AllowedOrigins field's value.
-func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule {
- s.AllowedOrigins = v
- return s
-}
-
-// SetExposeHeaders sets the ExposeHeaders field's value.
-func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule {
- s.ExposeHeaders = v
- return s
-}
-
-// SetID sets the ID field's value.
-func (s *CORSRule) SetID(v string) *CORSRule {
- s.ID = &v
- return s
-}
-
-// SetMaxAgeSeconds sets the MaxAgeSeconds field's value.
-func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule {
- s.MaxAgeSeconds = &v
- return s
-}
-
-// Describes how an uncompressed comma-separated values (CSV)-formatted input
-// object is formatted.
-type CSVInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies that CSV field values may contain quoted record delimiters and
- // such records should be allowed. Default value is FALSE. Setting this value
- // to TRUE may lower performance.
- AllowQuotedRecordDelimiter *bool `type:"boolean"`
-
- // 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"`
-
- // 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 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"`
-
- // 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"`
-
- // 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"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CSVInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CSVInput) GoString() string {
- return s.String()
-}
-
-// SetAllowQuotedRecordDelimiter sets the AllowQuotedRecordDelimiter field's value.
-func (s *CSVInput) SetAllowQuotedRecordDelimiter(v bool) *CSVInput {
- s.AllowQuotedRecordDelimiter = &v
- return s
-}
-
-// SetComments sets the Comments field's value.
-func (s *CSVInput) SetComments(v string) *CSVInput {
- s.Comments = &v
- return s
-}
-
-// SetFieldDelimiter sets the FieldDelimiter field's value.
-func (s *CSVInput) SetFieldDelimiter(v string) *CSVInput {
- s.FieldDelimiter = &v
- return s
-}
-
-// SetFileHeaderInfo sets the FileHeaderInfo field's value.
-func (s *CSVInput) SetFileHeaderInfo(v string) *CSVInput {
- s.FileHeaderInfo = &v
- return s
-}
-
-// SetQuoteCharacter sets the QuoteCharacter field's value.
-func (s *CSVInput) SetQuoteCharacter(v string) *CSVInput {
- s.QuoteCharacter = &v
- return s
-}
-
-// SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
-func (s *CSVInput) SetQuoteEscapeCharacter(v string) *CSVInput {
- s.QuoteEscapeCharacter = &v
- return s
-}
-
-// SetRecordDelimiter sets the RecordDelimiter field's value.
-func (s *CSVInput) SetRecordDelimiter(v string) *CSVInput {
- s.RecordDelimiter = &v
- return s
-}
-
-// 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. You can specify
- // an arbitrary delimiter.
- FieldDelimiter *string `type:"string"`
-
- // 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"`
-
- // The single character used for escaping the quote character inside an already
- // escaped value.
- QuoteEscapeCharacter *string `type:"string"`
-
- // 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"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CSVOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CSVOutput) GoString() string {
- return s.String()
-}
-
-// SetFieldDelimiter sets the FieldDelimiter field's value.
-func (s *CSVOutput) SetFieldDelimiter(v string) *CSVOutput {
- s.FieldDelimiter = &v
- return s
-}
-
-// SetQuoteCharacter sets the QuoteCharacter field's value.
-func (s *CSVOutput) SetQuoteCharacter(v string) *CSVOutput {
- s.QuoteCharacter = &v
- return s
-}
-
-// SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
-func (s *CSVOutput) SetQuoteEscapeCharacter(v string) *CSVOutput {
- s.QuoteEscapeCharacter = &v
- return s
-}
-
-// SetQuoteFields sets the QuoteFields field's value.
-func (s *CSVOutput) SetQuoteFields(v string) *CSVOutput {
- s.QuoteFields = &v
- return s
-}
-
-// SetRecordDelimiter sets the RecordDelimiter field's value.
-func (s *CSVOutput) SetRecordDelimiter(v string) *CSVOutput {
- s.RecordDelimiter = &v
- return s
-}
-
-// Contains all the possible checksum or digest values for an object.
-type Checksum struct {
- _ struct{} `type:"structure"`
-
- // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32 *string `type:"string"`
-
- // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32C *string `type:"string"`
-
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA1 *string `type:"string"`
-
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA256 *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Checksum) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Checksum) GoString() string {
- return s.String()
-}
-
-// SetChecksumCRC32 sets the ChecksumCRC32 field's value.
-func (s *Checksum) SetChecksumCRC32(v string) *Checksum {
- s.ChecksumCRC32 = &v
- return s
-}
-
-// SetChecksumCRC32C sets the ChecksumCRC32C field's value.
-func (s *Checksum) SetChecksumCRC32C(v string) *Checksum {
- s.ChecksumCRC32C = &v
- return s
-}
-
-// SetChecksumSHA1 sets the ChecksumSHA1 field's value.
-func (s *Checksum) SetChecksumSHA1(v string) *Checksum {
- s.ChecksumSHA1 = &v
- return s
-}
-
-// SetChecksumSHA256 sets the ChecksumSHA256 field's value.
-func (s *Checksum) SetChecksumSHA256(v string) *Checksum {
- s.ChecksumSHA256 = &v
- return s
-}
-
-// Container for specifying the 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.
- //
- // 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" enum:"Event"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CloudFunctionConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CloudFunctionConfiguration) GoString() string {
- return s.String()
-}
-
-// SetCloudFunction sets the CloudFunction field's value.
-func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration {
- s.CloudFunction = &v
- return s
-}
-
-// SetEvent sets the Event field's value.
-func (s *CloudFunctionConfiguration) SetEvent(v string) *CloudFunctionConfiguration {
- s.Event = &v
- return s
-}
-
-// SetEvents sets the Events field's value.
-func (s *CloudFunctionConfiguration) SetEvents(v []*string) *CloudFunctionConfiguration {
- s.Events = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *CloudFunctionConfiguration) SetId(v string) *CloudFunctionConfiguration {
- s.Id = &v
- return s
-}
-
-// SetInvocationRole sets the InvocationRole field's value.
-func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionConfiguration {
- s.InvocationRole = &v
- 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CommonPrefix) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CommonPrefix) GoString() string {
- return s.String()
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix {
- s.Prefix = &v
- return s
-}
-
-type CompleteMultipartUploadInput struct {
- _ struct{} `locationName:"CompleteMultipartUploadRequest" type:"structure" payload:"MultipartUpload"`
-
- // Name of the bucket to which the multipart upload was initiated.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 32-bit CRC32 checksum of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 32-bit CRC32C checksum of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 160-bit SHA-1 digest of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 256-bit SHA-256 digest of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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"`
-
- // 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 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // The server-side encryption (SSE) algorithm used to encrypt the object. This
- // parameter is needed only when the object was created using a checksum algorithm.
- // For more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
- // in the Amazon S3 User Guide.
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // The server-side encryption (SSE) customer managed key. This parameter is
- // needed only when the object was created using a checksum algorithm. For more
- // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
- // in the Amazon S3 User Guide.
- //
- // SSECustomerKey is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by CompleteMultipartUploadInput's
- // String and GoString methods.
- SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
-
- // The MD5 server-side encryption (SSE) customer managed key. This parameter
- // is needed only when the object was created using a checksum algorithm. For
- // more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
- // in the Amazon S3 User Guide.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // ID for the initiated multipart upload.
- //
- // UploadId is a required field
- UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CompleteMultipartUploadInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CompleteMultipartUploadInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CompleteMultipartUploadInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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.UploadId == nil {
- invalidParams.Add(request.NewErrParamRequired("UploadId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUploadInput {
- s.Bucket = &v
- return s
-}
-
-func (s *CompleteMultipartUploadInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumCRC32 sets the ChecksumCRC32 field's value.
-func (s *CompleteMultipartUploadInput) SetChecksumCRC32(v string) *CompleteMultipartUploadInput {
- s.ChecksumCRC32 = &v
- return s
-}
-
-// SetChecksumCRC32C sets the ChecksumCRC32C field's value.
-func (s *CompleteMultipartUploadInput) SetChecksumCRC32C(v string) *CompleteMultipartUploadInput {
- s.ChecksumCRC32C = &v
- return s
-}
-
-// SetChecksumSHA1 sets the ChecksumSHA1 field's value.
-func (s *CompleteMultipartUploadInput) SetChecksumSHA1(v string) *CompleteMultipartUploadInput {
- s.ChecksumSHA1 = &v
- return s
-}
-
-// SetChecksumSHA256 sets the ChecksumSHA256 field's value.
-func (s *CompleteMultipartUploadInput) SetChecksumSHA256(v string) *CompleteMultipartUploadInput {
- s.ChecksumSHA256 = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *CompleteMultipartUploadInput) SetExpectedBucketOwner(v string) *CompleteMultipartUploadInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput {
- s.Key = &v
- return s
-}
-
-// SetMultipartUpload sets the MultipartUpload field's value.
-func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput {
- s.MultipartUpload = v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *CompleteMultipartUploadInput) SetRequestPayer(v string) *CompleteMultipartUploadInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *CompleteMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CompleteMultipartUploadInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *CompleteMultipartUploadInput) SetSSECustomerKey(v string) *CompleteMultipartUploadInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *CompleteMultipartUploadInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *CompleteMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CompleteMultipartUploadInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartUploadInput {
- s.UploadId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s CompleteMultipartUploadInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type CompleteMultipartUploadOutput struct {
- _ struct{} `type:"structure"`
-
- // The name of the bucket that contains the newly created object. Does not return
- // the access point ARN or access point alias if used.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- Bucket *string `type:"string"`
-
- // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
- // encryption with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32 *string `type:"string"`
-
- // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32C *string `type:"string"`
-
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA1 *string `type:"string"`
-
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA256 *string `type:"string"`
-
- // 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. For more information about how
- // the entity tag is calculated, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- 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 Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for
- // the object.
- //
- // SSEKMSKeyId is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by CompleteMultipartUploadOutput's
- // String and GoString methods.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // If you specified server-side encryption either with an Amazon S3-managed
- // encryption key or an Amazon Web Services KMS key 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 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CompleteMultipartUploadOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CompleteMultipartUploadOutput) GoString() string {
- return s.String()
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUploadOutput {
- s.Bucket = &v
- return s
-}
-
-func (s *CompleteMultipartUploadOutput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *CompleteMultipartUploadOutput) SetBucketKeyEnabled(v bool) *CompleteMultipartUploadOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetChecksumCRC32 sets the ChecksumCRC32 field's value.
-func (s *CompleteMultipartUploadOutput) SetChecksumCRC32(v string) *CompleteMultipartUploadOutput {
- s.ChecksumCRC32 = &v
- return s
-}
-
-// SetChecksumCRC32C sets the ChecksumCRC32C field's value.
-func (s *CompleteMultipartUploadOutput) SetChecksumCRC32C(v string) *CompleteMultipartUploadOutput {
- s.ChecksumCRC32C = &v
- return s
-}
-
-// SetChecksumSHA1 sets the ChecksumSHA1 field's value.
-func (s *CompleteMultipartUploadOutput) SetChecksumSHA1(v string) *CompleteMultipartUploadOutput {
- s.ChecksumSHA1 = &v
- return s
-}
-
-// SetChecksumSHA256 sets the ChecksumSHA256 field's value.
-func (s *CompleteMultipartUploadOutput) SetChecksumSHA256(v string) *CompleteMultipartUploadOutput {
- s.ChecksumSHA256 = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput {
- s.ETag = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *CompleteMultipartUploadOutput) SetExpiration(v string) *CompleteMultipartUploadOutput {
- s.Expiration = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *CompleteMultipartUploadOutput) SetKey(v string) *CompleteMultipartUploadOutput {
- s.Key = &v
- return s
-}
-
-// SetLocation sets the Location field's value.
-func (s *CompleteMultipartUploadOutput) SetLocation(v string) *CompleteMultipartUploadOutput {
- s.Location = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *CompleteMultipartUploadOutput) SetRequestCharged(v string) *CompleteMultipartUploadOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *CompleteMultipartUploadOutput) SetSSEKMSKeyId(v string) *CompleteMultipartUploadOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *CompleteMultipartUploadOutput) SetServerSideEncryption(v string) *CompleteMultipartUploadOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipartUploadOutput {
- s.VersionId = &v
- return s
-}
-
-// The container for the completed multipart upload details.
-type CompletedMultipartUpload struct {
- _ struct{} `type:"structure"`
-
- // Array of CompletedPart data types.
- //
- // If you do not supply a valid Part with your request, the service sends back
- // an HTTP 400 response.
- Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CompletedMultipartUpload) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CompletedMultipartUpload) GoString() string {
- return s.String()
-}
-
-// SetParts sets the Parts field's value.
-func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultipartUpload {
- s.Parts = v
- return s
-}
-
-// Details of the parts that were uploaded.
-type CompletedPart struct {
- _ struct{} `type:"structure"`
-
- // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32 *string `type:"string"`
-
- // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32C *string `type:"string"`
-
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA1 *string `type:"string"`
-
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA256 *string `type:"string"`
-
- // Entity tag returned when the part was uploaded.
- ETag *string `type:"string"`
-
- // Part number that identifies the part. This is a positive integer between
- // 1 and 10,000.
- PartNumber *int64 `type:"integer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CompletedPart) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CompletedPart) GoString() string {
- return s.String()
-}
-
-// SetChecksumCRC32 sets the ChecksumCRC32 field's value.
-func (s *CompletedPart) SetChecksumCRC32(v string) *CompletedPart {
- s.ChecksumCRC32 = &v
- return s
-}
-
-// SetChecksumCRC32C sets the ChecksumCRC32C field's value.
-func (s *CompletedPart) SetChecksumCRC32C(v string) *CompletedPart {
- s.ChecksumCRC32C = &v
- return s
-}
-
-// SetChecksumSHA1 sets the ChecksumSHA1 field's value.
-func (s *CompletedPart) SetChecksumSHA1(v string) *CompletedPart {
- s.ChecksumSHA1 = &v
- return s
-}
-
-// SetChecksumSHA256 sets the ChecksumSHA256 field's value.
-func (s *CompletedPart) SetChecksumSHA256(v string) *CompletedPart {
- s.ChecksumSHA256 = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *CompletedPart) SetETag(v string) *CompletedPart {
- s.ETag = &v
- return s
-}
-
-// SetPartNumber sets the PartNumber field's value.
-func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart {
- s.PartNumber = &v
- return s
-}
-
-// 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"`
-
- // The HTTP error code when the redirect is applied. In the event of an error,
- // if the error code equals this value, then the specified redirect is applied.
- // Required when parent element Condition is specified and sibling KeyPrefixEquals
- // is not specified. If both are specified, then both must be true for the redirect
- // to be applied.
- HttpErrorCodeReturnedEquals *string `type:"string"`
-
- // The object key name prefix when the redirect is applied. For example, to
- // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
- // To redirect request for all pages with the prefix docs/, the key prefix will
- // be /docs, which identifies all objects in the docs/ folder. Required when
- // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals
- // is not specified. If both conditions are specified, both must be true for
- // the redirect to be applied.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- KeyPrefixEquals *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Condition) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Condition) GoString() string {
- return s.String()
-}
-
-// SetHttpErrorCodeReturnedEquals sets the HttpErrorCodeReturnedEquals field's value.
-func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition {
- s.HttpErrorCodeReturnedEquals = &v
- return s
-}
-
-// SetKeyPrefixEquals sets the KeyPrefixEquals field's value.
-func (s *Condition) SetKeyPrefixEquals(v string) *Condition {
- s.KeyPrefixEquals = &v
- return s
-}
-
-type ContinuationEvent struct {
- _ struct{} `locationName:"ContinuationEvent" type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ContinuationEvent) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ContinuationEvent) GoString() string {
- return s.String()
-}
-
-// The ContinuationEvent is and event in the SelectObjectContentEventStream group of events.
-func (s *ContinuationEvent) eventSelectObjectContentEventStream() {}
-
-// UnmarshalEvent unmarshals the EventStream Message into the ContinuationEvent value.
-// This method is only used internally within the SDK's EventStream handling.
-func (s *ContinuationEvent) UnmarshalEvent(
- payloadUnmarshaler protocol.PayloadUnmarshaler,
- msg eventstream.Message,
-) error {
- return nil
-}
-
-// MarshalEvent marshals the type into an stream event value. This method
-// should only used internally within the SDK's EventStream handling.
-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.
- //
- // This action is not supported by Amazon S3 on Outposts.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
-
- // The name of the destination bucket.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
- // with server-side encryption using AWS KMS (SSE-KMS). Setting this header
- // to true causes Amazon S3 to use an S3 Bucket Key for object encryption with
- // SSE-KMS.
- //
- // Specifying this header with a COPY action doesn’t affect bucket-level settings
- // for S3 Bucket Key.
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Specifies caching behavior along the request/reply chain.
- CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
-
- // Indicates the algorithm you want Amazon S3 to use to create the checksum
- // for the object. For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // Specifies presentational information for the object.
- 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.
- ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
-
- // The language the content is in.
- ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
-
- // A standard MIME type describing the format of the object data.
- ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
-
- // Specifies the source object for the copy operation. You specify the value
- // in one of two formats, depending on whether you want to access the source
- // object through an access point (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html):
- //
- // * For objects not accessed through an access point, specify the name of
- // the source bucket and the key of the source object, separated by a slash
- // (/). For example, to copy the object reports/january.pdf from the bucket
- // awsexamplebucket, use awsexamplebucket/reports/january.pdf. The value
- // must be URL-encoded.
- //
- // * For objects accessed through access points, specify the Amazon Resource
- // Name (ARN) of the object as accessed through the access point, in the
- // format arn:aws:s3:::accesspoint//object/.
- // For example, to copy the object reports/january.pdf through access point
- // my-access-point owned by account 123456789012 in Region us-west-2, use
- // the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf.
- // The value must be URL encoded. Amazon S3 supports copy operations using
- // access points only when the source and destination buckets are in the
- // same Amazon Web Services Region. Alternatively, for objects accessed through
- // Amazon S3 on Outposts, specify the ARN of the object as accessed in the
- // format arn:aws:s3-outposts:::outpost//object/.
- // For example, to copy the object reports/january.pdf through outpost my-outpost
- // owned by account 123456789012 in Region us-west-2, use the URL encoding
- // of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf.
- // The value must be URL-encoded.
- //
- // To copy a specific version of an object, append ?versionId= to
- // the value (for example, awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).
- // If you don't specify a version ID, Amazon S3 copies the latest version of
- // the source object.
- //
- // CopySource is a required field
- CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
-
- // Copies the object if its entity tag (ETag) matches the specified tag.
- CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
-
- // Copies the object if it has been modified since the specified time.
- CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`
-
- // Copies the object if its entity tag (ETag) is different than the specified
- // ETag.
- CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
-
- // 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 (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
- // the source object. The encryption key provided in this header must be one
- // that was used when the source object was created.
- //
- // CopySourceSSECustomerKey is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by CopyObjectInput's
- // String and GoString methods.
- 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 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 account ID of the expected destination bucket owner. If the destination
- // bucket is owned by a different account, the request fails with the HTTP status
- // code 403 Forbidden (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The account ID of the expected source bucket owner. If the source bucket
- // is owned by a different account, the request fails with the HTTP status code
- // 403 Forbidden (access denied).
- ExpectedSourceBucketOwner *string `location:"header" locationName:"x-amz-source-expected-bucket-owner" type:"string"`
-
- // The date and time at which the object is no longer cacheable.
- Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
-
- // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
-
- // Allows grantee to read the object data and its metadata.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
-
- // Allows grantee to read the object ACL.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
-
- // Allows grantee to write the ACL for the applicable object.
- //
- // This action is not supported by Amazon S3 on Outposts.
- 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"`
-
- // A map of metadata to store with the object in S3.
- Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
-
- // Specifies whether the metadata is copied from the source object or replaced
- // with metadata provided in the request.
- MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"`
-
- // 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.
- 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.
- ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // 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
- // 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 is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by CopyObjectInput's
- // String and GoString methods.
- 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 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 Amazon Web Services KMS Encryption Context to use for object
- // encryption. The value of this header is a base64-encoded UTF-8 string holding
- // JSON with the encryption context key-value pairs.
- //
- // SSEKMSEncryptionContext is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by CopyObjectInput's
- // String and GoString methods.
- SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
-
- // Specifies the Amazon Web Services KMS key ID to use for object encryption.
- // All GET and PUT requests for an object protected by Amazon Web Services KMS
- // will fail if not made via SSL or using SigV4. For information about configuring
- // using any of the officially supported Amazon Web Services SDKs and Amazon
- // Web Services 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 User Guide.
- //
- // SSEKMSKeyId is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by CopyObjectInput's
- // String and GoString methods.
- 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 Amazon
- // S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-
- // 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.
- // Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information,
- // see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
- // in the Amazon S3 User Guide.
- StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
-
- // 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.
- Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
-
- // Specifies whether the object tag-set are copied from the source object or
- // replaced with tag-set provided in the request.
- TaggingDirective *string `location:"header" locationName:"x-amz-tagging-directive" type:"string" enum:"TaggingDirective"`
-
- // 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.
- WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CopyObjectInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CopyObjectInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CopyObjectInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.CopySource == nil {
- invalidParams.Add(request.NewErrParamRequired("CopySource"))
- }
- 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
-}
-
-// SetACL sets the ACL field's value.
-func (s *CopyObjectInput) SetACL(v string) *CopyObjectInput {
- s.ACL = &v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput {
- s.Bucket = &v
- return s
-}
-
-func (s *CopyObjectInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *CopyObjectInput) SetBucketKeyEnabled(v bool) *CopyObjectInput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCacheControl sets the CacheControl field's value.
-func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput {
- s.CacheControl = &v
- return s
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *CopyObjectInput) SetChecksumAlgorithm(v string) *CopyObjectInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetContentDisposition sets the ContentDisposition field's value.
-func (s *CopyObjectInput) SetContentDisposition(v string) *CopyObjectInput {
- s.ContentDisposition = &v
- return s
-}
-
-// SetContentEncoding sets the ContentEncoding field's value.
-func (s *CopyObjectInput) SetContentEncoding(v string) *CopyObjectInput {
- s.ContentEncoding = &v
- return s
-}
-
-// SetContentLanguage sets the ContentLanguage field's value.
-func (s *CopyObjectInput) SetContentLanguage(v string) *CopyObjectInput {
- s.ContentLanguage = &v
- return s
-}
-
-// SetContentType sets the ContentType field's value.
-func (s *CopyObjectInput) SetContentType(v string) *CopyObjectInput {
- s.ContentType = &v
- return s
-}
-
-// SetCopySource sets the CopySource field's value.
-func (s *CopyObjectInput) SetCopySource(v string) *CopyObjectInput {
- s.CopySource = &v
- return s
-}
-
-// SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
-func (s *CopyObjectInput) SetCopySourceIfMatch(v string) *CopyObjectInput {
- s.CopySourceIfMatch = &v
- return s
-}
-
-// SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
-func (s *CopyObjectInput) SetCopySourceIfModifiedSince(v time.Time) *CopyObjectInput {
- s.CopySourceIfModifiedSince = &v
- return s
-}
-
-// SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
-func (s *CopyObjectInput) SetCopySourceIfNoneMatch(v string) *CopyObjectInput {
- s.CopySourceIfNoneMatch = &v
- return s
-}
-
-// SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
-func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput {
- s.CopySourceIfUnmodifiedSince = &v
- return s
-}
-
-// SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
-func (s *CopyObjectInput) SetCopySourceSSECustomerAlgorithm(v string) *CopyObjectInput {
- s.CopySourceSSECustomerAlgorithm = &v
- return s
-}
-
-// SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
-func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput {
- s.CopySourceSSECustomerKey = &v
- return s
-}
-
-func (s *CopyObjectInput) getCopySourceSSECustomerKey() (v string) {
- if s.CopySourceSSECustomerKey == nil {
- return v
- }
- return *s.CopySourceSSECustomerKey
-}
-
-// SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
-func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput {
- s.CopySourceSSECustomerKeyMD5 = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *CopyObjectInput) SetExpectedBucketOwner(v string) *CopyObjectInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetExpectedSourceBucketOwner sets the ExpectedSourceBucketOwner field's value.
-func (s *CopyObjectInput) SetExpectedSourceBucketOwner(v string) *CopyObjectInput {
- s.ExpectedSourceBucketOwner = &v
- return s
-}
-
-// SetExpires sets the Expires field's value.
-func (s *CopyObjectInput) SetExpires(v time.Time) *CopyObjectInput {
- s.Expires = &v
- return s
-}
-
-// SetGrantFullControl sets the GrantFullControl field's value.
-func (s *CopyObjectInput) SetGrantFullControl(v string) *CopyObjectInput {
- s.GrantFullControl = &v
- return s
-}
-
-// SetGrantRead sets the GrantRead field's value.
-func (s *CopyObjectInput) SetGrantRead(v string) *CopyObjectInput {
- s.GrantRead = &v
- return s
-}
-
-// SetGrantReadACP sets the GrantReadACP field's value.
-func (s *CopyObjectInput) SetGrantReadACP(v string) *CopyObjectInput {
- s.GrantReadACP = &v
- return s
-}
-
-// SetGrantWriteACP sets the GrantWriteACP field's value.
-func (s *CopyObjectInput) SetGrantWriteACP(v string) *CopyObjectInput {
- s.GrantWriteACP = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *CopyObjectInput) SetKey(v string) *CopyObjectInput {
- s.Key = &v
- return s
-}
-
-// SetMetadata sets the Metadata field's value.
-func (s *CopyObjectInput) SetMetadata(v map[string]*string) *CopyObjectInput {
- s.Metadata = v
- return s
-}
-
-// SetMetadataDirective sets the MetadataDirective field's value.
-func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput {
- s.MetadataDirective = &v
- return s
-}
-
-// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
-func (s *CopyObjectInput) SetObjectLockLegalHoldStatus(v string) *CopyObjectInput {
- s.ObjectLockLegalHoldStatus = &v
- return s
-}
-
-// SetObjectLockMode sets the ObjectLockMode field's value.
-func (s *CopyObjectInput) SetObjectLockMode(v string) *CopyObjectInput {
- s.ObjectLockMode = &v
- return s
-}
-
-// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
-func (s *CopyObjectInput) SetObjectLockRetainUntilDate(v time.Time) *CopyObjectInput {
- s.ObjectLockRetainUntilDate = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *CopyObjectInput) SetSSECustomerAlgorithm(v string) *CopyObjectInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *CopyObjectInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
-func (s *CopyObjectInput) SetSSEKMSEncryptionContext(v string) *CopyObjectInput {
- s.SSEKMSEncryptionContext = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *CopyObjectInput) SetSSEKMSKeyId(v string) *CopyObjectInput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *CopyObjectInput) SetServerSideEncryption(v string) *CopyObjectInput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *CopyObjectInput) SetStorageClass(v string) *CopyObjectInput {
- s.StorageClass = &v
- return s
-}
-
-// SetTagging sets the Tagging field's value.
-func (s *CopyObjectInput) SetTagging(v string) *CopyObjectInput {
- s.Tagging = &v
- return s
-}
-
-// SetTaggingDirective sets the TaggingDirective field's value.
-func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput {
- s.TaggingDirective = &v
- return s
-}
-
-// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
-func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput {
- s.WebsiteRedirectLocation = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s CopyObjectInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type CopyObjectOutput struct {
- _ struct{} `type:"structure" payload:"CopyObjectResult"`
-
- // Indicates whether the copied object uses an S3 Bucket Key for server-side
- // encryption with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // 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.
- Expiration *string `location:"header" locationName:"x-amz-expiration" 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 server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm
- // used.
- 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
- // 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 Amazon Web Services KMS Encryption Context to use
- // for object encryption. The value of this header is a base64-encoded UTF-8
- // string holding JSON with the encryption context key-value pairs.
- //
- // SSEKMSEncryptionContext is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by CopyObjectOutput's
- // String and GoString methods.
- SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
-
- // If present, specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for
- // the object.
- //
- // SSEKMSKeyId is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by CopyObjectOutput's
- // String and GoString methods.
- 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 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.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CopyObjectOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CopyObjectOutput) GoString() string {
- return s.String()
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *CopyObjectOutput) SetBucketKeyEnabled(v bool) *CopyObjectOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCopyObjectResult sets the CopyObjectResult field's value.
-func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput {
- s.CopyObjectResult = v
- return s
-}
-
-// SetCopySourceVersionId sets the CopySourceVersionId field's value.
-func (s *CopyObjectOutput) SetCopySourceVersionId(v string) *CopyObjectOutput {
- s.CopySourceVersionId = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *CopyObjectOutput) SetExpiration(v string) *CopyObjectOutput {
- s.Expiration = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *CopyObjectOutput) SetRequestCharged(v string) *CopyObjectOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *CopyObjectOutput) SetSSECustomerAlgorithm(v string) *CopyObjectOutput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *CopyObjectOutput) SetSSECustomerKeyMD5(v string) *CopyObjectOutput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
-func (s *CopyObjectOutput) SetSSEKMSEncryptionContext(v string) *CopyObjectOutput {
- s.SSEKMSEncryptionContext = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *CopyObjectOutput) SetSSEKMSKeyId(v string) *CopyObjectOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *CopyObjectOutput) SetServerSideEncryption(v string) *CopyObjectOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput {
- s.VersionId = &v
- return s
-}
-
-// Container for all response elements.
-type CopyObjectResult struct {
- _ struct{} `type:"structure"`
-
- // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32 *string `type:"string"`
-
- // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32C *string `type:"string"`
-
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA1 *string `type:"string"`
-
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA256 *string `type:"string"`
-
- // Returns the ETag of the new object. The ETag reflects only changes to the
- // contents of an object, not its metadata.
- ETag *string `type:"string"`
-
- // Creation date of the object.
- LastModified *time.Time `type:"timestamp"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CopyObjectResult) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CopyObjectResult) GoString() string {
- return s.String()
-}
-
-// SetChecksumCRC32 sets the ChecksumCRC32 field's value.
-func (s *CopyObjectResult) SetChecksumCRC32(v string) *CopyObjectResult {
- s.ChecksumCRC32 = &v
- return s
-}
-
-// SetChecksumCRC32C sets the ChecksumCRC32C field's value.
-func (s *CopyObjectResult) SetChecksumCRC32C(v string) *CopyObjectResult {
- s.ChecksumCRC32C = &v
- return s
-}
-
-// SetChecksumSHA1 sets the ChecksumSHA1 field's value.
-func (s *CopyObjectResult) SetChecksumSHA1(v string) *CopyObjectResult {
- s.ChecksumSHA1 = &v
- return s
-}
-
-// SetChecksumSHA256 sets the ChecksumSHA256 field's value.
-func (s *CopyObjectResult) SetChecksumSHA256(v string) *CopyObjectResult {
- s.ChecksumSHA256 = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *CopyObjectResult) SetETag(v string) *CopyObjectResult {
- s.ETag = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult {
- s.LastModified = &v
- return s
-}
-
-// Container for all response elements.
-type CopyPartResult struct {
- _ struct{} `type:"structure"`
-
- // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32 *string `type:"string"`
-
- // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32C *string `type:"string"`
-
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA1 *string `type:"string"`
-
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA256 *string `type:"string"`
-
- // Entity tag of the object.
- ETag *string `type:"string"`
-
- // Date and time at which the object was uploaded.
- LastModified *time.Time `type:"timestamp"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CopyPartResult) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CopyPartResult) GoString() string {
- return s.String()
-}
-
-// SetChecksumCRC32 sets the ChecksumCRC32 field's value.
-func (s *CopyPartResult) SetChecksumCRC32(v string) *CopyPartResult {
- s.ChecksumCRC32 = &v
- return s
-}
-
-// SetChecksumCRC32C sets the ChecksumCRC32C field's value.
-func (s *CopyPartResult) SetChecksumCRC32C(v string) *CopyPartResult {
- s.ChecksumCRC32C = &v
- return s
-}
-
-// SetChecksumSHA1 sets the ChecksumSHA1 field's value.
-func (s *CopyPartResult) SetChecksumSHA1(v string) *CopyPartResult {
- s.ChecksumSHA1 = &v
- return s
-}
-
-// SetChecksumSHA256 sets the ChecksumSHA256 field's value.
-func (s *CopyPartResult) SetChecksumSHA256(v string) *CopyPartResult {
- s.ChecksumSHA256 = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *CopyPartResult) SetETag(v string) *CopyPartResult {
- s.ETag = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult {
- s.LastModified = &v
- 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 the US East (N. Virginia) Region (us-east-1).
- LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateBucketConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateBucketConfiguration) GoString() string {
- return s.String()
-}
-
-// SetLocationConstraint sets the LocationConstraint field's value.
-func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucketConfiguration {
- s.LocationConstraint = &v
- return s
-}
-
-type CreateBucketInput struct {
- _ struct{} `locationName:"CreateBucketRequest" type:"structure" payload:"CreateBucketConfiguration"`
-
- // 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
- // bucket.
- GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
-
- // Allows grantee to list the objects in the bucket.
- GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
-
- // Allows grantee to read the bucket ACL.
- GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
-
- // Allows grantee to create new objects in the bucket.
- //
- // For the bucket and object owners of existing objects, also allows deletions
- // and overwrites of those objects.
- GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
-
- // 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 S3 Object Lock to be enabled for the new bucket.
- ObjectLockEnabledForBucket *bool `location:"header" locationName:"x-amz-bucket-object-lock-enabled" type:"boolean"`
-
- // The container element for object ownership for a bucket's ownership controls.
- //
- // BucketOwnerPreferred - Objects uploaded to the bucket change ownership to
- // the bucket owner if the objects are uploaded with the bucket-owner-full-control
- // canned ACL.
- //
- // ObjectWriter - The uploading account will own the object if the object is
- // uploaded with the bucket-owner-full-control canned ACL.
- //
- // BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer
- // affect permissions. The bucket owner automatically owns and has full control
- // over every object in the bucket. The bucket only accepts PUT requests that
- // don't specify an ACL or bucket owner full control ACLs, such as the bucket-owner-full-control
- // canned ACL or an equivalent form of this ACL expressed in the XML format.
- ObjectOwnership *string `location:"header" locationName:"x-amz-object-ownership" type:"string" enum:"ObjectOwnership"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateBucketInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateBucketInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateBucketInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetACL sets the ACL field's value.
-func (s *CreateBucketInput) SetACL(v string) *CreateBucketInput {
- s.ACL = &v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput {
- s.Bucket = &v
- return s
-}
-
-func (s *CreateBucketInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.
-func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
- s.CreateBucketConfiguration = v
- return s
-}
-
-// SetGrantFullControl sets the GrantFullControl field's value.
-func (s *CreateBucketInput) SetGrantFullControl(v string) *CreateBucketInput {
- s.GrantFullControl = &v
- return s
-}
-
-// SetGrantRead sets the GrantRead field's value.
-func (s *CreateBucketInput) SetGrantRead(v string) *CreateBucketInput {
- s.GrantRead = &v
- return s
-}
-
-// SetGrantReadACP sets the GrantReadACP field's value.
-func (s *CreateBucketInput) SetGrantReadACP(v string) *CreateBucketInput {
- s.GrantReadACP = &v
- return s
-}
-
-// SetGrantWrite sets the GrantWrite field's value.
-func (s *CreateBucketInput) SetGrantWrite(v string) *CreateBucketInput {
- s.GrantWrite = &v
- return s
-}
-
-// SetGrantWriteACP sets the GrantWriteACP field's value.
-func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput {
- s.GrantWriteACP = &v
- return s
-}
-
-// SetObjectLockEnabledForBucket sets the ObjectLockEnabledForBucket field's value.
-func (s *CreateBucketInput) SetObjectLockEnabledForBucket(v bool) *CreateBucketInput {
- s.ObjectLockEnabledForBucket = &v
- return s
-}
-
-// SetObjectOwnership sets the ObjectOwnership field's value.
-func (s *CreateBucketInput) SetObjectOwnership(v string) *CreateBucketInput {
- s.ObjectOwnership = &v
- return s
-}
-
-type CreateBucketOutput struct {
- _ struct{} `type:"structure"`
-
- // A forward slash followed by the name of the bucket.
- Location *string `location:"header" locationName:"Location" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateBucketOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateBucketOutput) GoString() string {
- return s.String()
-}
-
-// SetLocation sets the Location field's value.
-func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput {
- s.Location = &v
- return s
-}
-
-type CreateMultipartUploadInput struct {
- _ struct{} `locationName:"CreateMultipartUploadRequest" type:"structure"`
-
- // The canned ACL to apply to the object.
- //
- // This action is not supported by Amazon S3 on Outposts.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
-
- // The name of the bucket to which to initiate the upload
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
- // with server-side encryption using AWS KMS (SSE-KMS). Setting this header
- // to true causes Amazon S3 to use an S3 Bucket Key for object encryption with
- // SSE-KMS.
- //
- // Specifying this header with an object action doesn’t affect bucket-level
- // settings for S3 Bucket Key.
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Specifies caching behavior along the request/reply chain.
- CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
-
- // Indicates the algorithm you want Amazon S3 to use to create the checksum
- // for the object. For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // Specifies presentational information for the object.
- 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.
- ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
-
- // The language the content is in.
- ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
-
- // A standard MIME type describing the format of the object data.
- ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The date and time at which the object is no longer cacheable.
- Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
-
- // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
-
- // Allows grantee to read the object data and its metadata.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
-
- // Allows grantee to read the object ACL.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
-
- // Allows grantee to write the ACL for the applicable object.
- //
- // This action is not supported by Amazon S3 on Outposts.
- 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"`
-
- // A map of metadata to store with the object in S3.
- Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
-
- // 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.
- 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.
- ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // 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
- // 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 is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by CreateMultipartUploadInput's
- // String and GoString methods.
- 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 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 Amazon Web Services KMS Encryption Context to use for object
- // encryption. The value of this header is a base64-encoded UTF-8 string holding
- // JSON with the encryption context key-value pairs.
- //
- // SSEKMSEncryptionContext is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by CreateMultipartUploadInput's
- // String and GoString methods.
- SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
-
- // Specifies the ID of the symmetric customer managed key to use for object
- // encryption. All GET and PUT requests for an object protected by Amazon Web
- // Services KMS will fail if not made via SSL or using SigV4. For information
- // about configuring using any of the officially supported Amazon Web Services
- // SDKs and Amazon Web Services 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 User Guide.
- //
- // SSEKMSKeyId is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by CreateMultipartUploadInput's
- // String and GoString methods.
- 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 Amazon
- // S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-
- // 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.
- // Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information,
- // see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
- // in the Amazon S3 User Guide.
- 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.
- Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
-
- // 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.
- WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateMultipartUploadInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateMultipartUploadInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateMultipartUploadInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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
-}
-
-// SetACL sets the ACL field's value.
-func (s *CreateMultipartUploadInput) SetACL(v string) *CreateMultipartUploadInput {
- s.ACL = &v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadInput {
- s.Bucket = &v
- return s
-}
-
-func (s *CreateMultipartUploadInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *CreateMultipartUploadInput) SetBucketKeyEnabled(v bool) *CreateMultipartUploadInput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCacheControl sets the CacheControl field's value.
-func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput {
- s.CacheControl = &v
- return s
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *CreateMultipartUploadInput) SetChecksumAlgorithm(v string) *CreateMultipartUploadInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetContentDisposition sets the ContentDisposition field's value.
-func (s *CreateMultipartUploadInput) SetContentDisposition(v string) *CreateMultipartUploadInput {
- s.ContentDisposition = &v
- return s
-}
-
-// SetContentEncoding sets the ContentEncoding field's value.
-func (s *CreateMultipartUploadInput) SetContentEncoding(v string) *CreateMultipartUploadInput {
- s.ContentEncoding = &v
- return s
-}
-
-// SetContentLanguage sets the ContentLanguage field's value.
-func (s *CreateMultipartUploadInput) SetContentLanguage(v string) *CreateMultipartUploadInput {
- s.ContentLanguage = &v
- return s
-}
-
-// SetContentType sets the ContentType field's value.
-func (s *CreateMultipartUploadInput) SetContentType(v string) *CreateMultipartUploadInput {
- s.ContentType = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *CreateMultipartUploadInput) SetExpectedBucketOwner(v string) *CreateMultipartUploadInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetExpires sets the Expires field's value.
-func (s *CreateMultipartUploadInput) SetExpires(v time.Time) *CreateMultipartUploadInput {
- s.Expires = &v
- return s
-}
-
-// SetGrantFullControl sets the GrantFullControl field's value.
-func (s *CreateMultipartUploadInput) SetGrantFullControl(v string) *CreateMultipartUploadInput {
- s.GrantFullControl = &v
- return s
-}
-
-// SetGrantRead sets the GrantRead field's value.
-func (s *CreateMultipartUploadInput) SetGrantRead(v string) *CreateMultipartUploadInput {
- s.GrantRead = &v
- return s
-}
-
-// SetGrantReadACP sets the GrantReadACP field's value.
-func (s *CreateMultipartUploadInput) SetGrantReadACP(v string) *CreateMultipartUploadInput {
- s.GrantReadACP = &v
- return s
-}
-
-// SetGrantWriteACP sets the GrantWriteACP field's value.
-func (s *CreateMultipartUploadInput) SetGrantWriteACP(v string) *CreateMultipartUploadInput {
- s.GrantWriteACP = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *CreateMultipartUploadInput) SetKey(v string) *CreateMultipartUploadInput {
- s.Key = &v
- return s
-}
-
-// SetMetadata sets the Metadata field's value.
-func (s *CreateMultipartUploadInput) SetMetadata(v map[string]*string) *CreateMultipartUploadInput {
- s.Metadata = v
- return s
-}
-
-// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
-func (s *CreateMultipartUploadInput) SetObjectLockLegalHoldStatus(v string) *CreateMultipartUploadInput {
- s.ObjectLockLegalHoldStatus = &v
- return s
-}
-
-// SetObjectLockMode sets the ObjectLockMode field's value.
-func (s *CreateMultipartUploadInput) SetObjectLockMode(v string) *CreateMultipartUploadInput {
- s.ObjectLockMode = &v
- return s
-}
-
-// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
-func (s *CreateMultipartUploadInput) SetObjectLockRetainUntilDate(v time.Time) *CreateMultipartUploadInput {
- s.ObjectLockRetainUntilDate = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *CreateMultipartUploadInput) SetRequestPayer(v string) *CreateMultipartUploadInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *CreateMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipartUploadInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *CreateMultipartUploadInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
-func (s *CreateMultipartUploadInput) SetSSEKMSEncryptionContext(v string) *CreateMultipartUploadInput {
- s.SSEKMSEncryptionContext = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *CreateMultipartUploadInput) SetSSEKMSKeyId(v string) *CreateMultipartUploadInput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *CreateMultipartUploadInput) SetServerSideEncryption(v string) *CreateMultipartUploadInput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartUploadInput {
- s.StorageClass = &v
- return s
-}
-
-// SetTagging sets the Tagging field's value.
-func (s *CreateMultipartUploadInput) SetTagging(v string) *CreateMultipartUploadInput {
- s.Tagging = &v
- return s
-}
-
-// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
-func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput {
- s.WebsiteRedirectLocation = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s CreateMultipartUploadInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type CreateMultipartUploadOutput struct {
- _ struct{} `type:"structure"`
-
- // 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"`
-
- // 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"`
-
- // The name of the bucket to which the multipart upload was initiated. Does
- // not return the access point ARN or access point alias if used.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- Bucket *string `locationName:"Bucket" type:"string"`
-
- // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
- // encryption with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // The algorithm that was used to create a checksum of the object.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // Object key for which the multipart upload was initiated.
- Key *string `min:"1" 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 server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm
- // used.
- 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
- // 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 Amazon Web Services KMS Encryption Context to use
- // for object encryption. The value of this header is a base64-encoded UTF-8
- // string holding JSON with the encryption context key-value pairs.
- //
- // SSEKMSEncryptionContext is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by CreateMultipartUploadOutput's
- // String and GoString methods.
- SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
-
- // If present, specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for
- // the object.
- //
- // SSEKMSKeyId is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by CreateMultipartUploadOutput's
- // String and GoString methods.
- 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 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.
- UploadId *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateMultipartUploadOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateMultipartUploadOutput) GoString() string {
- return s.String()
-}
-
-// SetAbortDate sets the AbortDate field's value.
-func (s *CreateMultipartUploadOutput) SetAbortDate(v time.Time) *CreateMultipartUploadOutput {
- s.AbortDate = &v
- return s
-}
-
-// SetAbortRuleId sets the AbortRuleId field's value.
-func (s *CreateMultipartUploadOutput) SetAbortRuleId(v string) *CreateMultipartUploadOutput {
- s.AbortRuleId = &v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUploadOutput {
- s.Bucket = &v
- return s
-}
-
-func (s *CreateMultipartUploadOutput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *CreateMultipartUploadOutput) SetBucketKeyEnabled(v bool) *CreateMultipartUploadOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *CreateMultipartUploadOutput) SetChecksumAlgorithm(v string) *CreateMultipartUploadOutput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput {
- s.Key = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *CreateMultipartUploadOutput) SetRequestCharged(v string) *CreateMultipartUploadOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *CreateMultipartUploadOutput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadOutput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *CreateMultipartUploadOutput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadOutput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
-func (s *CreateMultipartUploadOutput) SetSSEKMSEncryptionContext(v string) *CreateMultipartUploadOutput {
- s.SSEKMSEncryptionContext = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *CreateMultipartUploadOutput) SetSSEKMSKeyId(v string) *CreateMultipartUploadOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *CreateMultipartUploadOutput) SetServerSideEncryption(v string) *CreateMultipartUploadOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUploadOutput {
- s.UploadId = &v
- return s
-}
-
-// The container element for specifying the default Object Lock retention settings
-// for new objects placed in the specified bucket.
-//
-// - The DefaultRetention settings require both a mode and a period.
-//
-// - The DefaultRetention period can be either Days or Years but you must
-// select one. You cannot specify Days and Years at the same time.
-type DefaultRetention struct {
- _ struct{} `type:"structure"`
-
- // The number of days that you want to specify for the default retention period.
- // Must be used with Mode.
- Days *int64 `type:"integer"`
-
- // The default Object Lock retention mode you want to apply to new objects placed
- // in the specified bucket. Must be used with either Days or Years.
- Mode *string `type:"string" enum:"ObjectLockRetentionMode"`
-
- // The number of years that you want to specify for the default retention period.
- // Must be used with Mode.
- Years *int64 `type:"integer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DefaultRetention) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DefaultRetention) GoString() string {
- return s.String()
-}
-
-// SetDays sets the Days field's value.
-func (s *DefaultRetention) SetDays(v int64) *DefaultRetention {
- s.Days = &v
- return s
-}
-
-// SetMode sets the Mode field's value.
-func (s *DefaultRetention) SetMode(v string) *DefaultRetention {
- s.Mode = &v
- return s
-}
-
-// SetYears sets the Years field's value.
-func (s *DefaultRetention) SetYears(v int64) *DefaultRetention {
- s.Years = &v
- 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"`
-
- // Element to enable quiet mode for the request. When you add this element,
- // you must set its value to true.
- Quiet *bool `type:"boolean"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Delete) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Delete) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Delete) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Delete"}
- if s.Objects == nil {
- invalidParams.Add(request.NewErrParamRequired("Objects"))
- }
- if s.Objects != nil {
- for i, v := range s.Objects {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetObjects sets the Objects field's value.
-func (s *Delete) SetObjects(v []*ObjectIdentifier) *Delete {
- s.Objects = v
- return s
-}
-
-// SetQuiet sets the Quiet field's value.
-func (s *Delete) SetQuiet(v bool) *Delete {
- s.Quiet = &v
- return s
-}
-
-type DeleteBucketAnalyticsConfigurationInput struct {
- _ struct{} `locationName:"DeleteBucketAnalyticsConfigurationRequest" type:"structure"`
-
- // The name of the bucket from which an analytics configuration is deleted.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID that identifies the analytics configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketAnalyticsConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketAnalyticsConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketAnalyticsConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketAnalyticsConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBucketAnalyticsConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketAnalyticsConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketAnalyticsConfigurationInput) SetExpectedBucketOwner(v string) *DeleteBucketAnalyticsConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketAnalyticsConfigurationInput {
- s.Id = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketAnalyticsConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketAnalyticsConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketAnalyticsConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string {
- return s.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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketCorsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketCorsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketCorsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketCorsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketCorsInput) SetExpectedBucketOwner(v string) *DeleteBucketCorsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketCorsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketCorsOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketCorsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketCorsOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketEncryptionInput struct {
- _ struct{} `locationName:"DeleteBucketEncryptionRequest" type:"structure"`
-
- // The name of the bucket containing the server-side encryption configuration
- // to delete.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketEncryptionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketEncryptionInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketEncryptionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketEncryptionInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketEncryptionInput) SetBucket(v string) *DeleteBucketEncryptionInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketEncryptionInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketEncryptionInput) SetExpectedBucketOwner(v string) *DeleteBucketEncryptionInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketEncryptionInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketEncryptionOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketEncryptionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketEncryptionOutput) GoString() string {
- return s.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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketInput) SetExpectedBucketOwner(v string) *DeleteBucketInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *DeleteBucketInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketIntelligentTieringConfigurationInput struct {
- _ struct{} `locationName:"DeleteBucketIntelligentTieringConfigurationRequest" type:"structure"`
-
- // The name of the Amazon S3 bucket whose configuration you want to modify or
- // retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The ID used to identify the S3 Intelligent-Tiering configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketIntelligentTieringConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketIntelligentTieringConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketIntelligentTieringConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketIntelligentTieringConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketIntelligentTieringConfigurationInput) SetBucket(v string) *DeleteBucketIntelligentTieringConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketIntelligentTieringConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetId sets the Id field's value.
-func (s *DeleteBucketIntelligentTieringConfigurationInput) SetId(v string) *DeleteBucketIntelligentTieringConfigurationInput {
- s.Id = &v
- return s
-}
-
-func (s *DeleteBucketIntelligentTieringConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketIntelligentTieringConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketIntelligentTieringConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketIntelligentTieringConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketIntelligentTieringConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketIntelligentTieringConfigurationOutput) GoString() string {
- return s.String()
-}
-
-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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID used to identify the inventory configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketInventoryConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketInventoryConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketInventoryConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInventoryConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBucketInventoryConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketInventoryConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketInventoryConfigurationInput) SetExpectedBucketOwner(v string) *DeleteBucketInventoryConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketInventoryConfigurationInput {
- s.Id = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketInventoryConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketInventoryConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketInventoryConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketInventoryConfigurationOutput) GoString() string {
- return s.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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketLifecycleInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketLifecycleInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketLifecycleInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketLifecycleInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketLifecycleInput) SetExpectedBucketOwner(v string) *DeleteBucketLifecycleInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketLifecycleInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketLifecycleOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketLifecycleOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketLifecycleOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketMetricsConfigurationInput struct {
- _ struct{} `locationName:"DeleteBucketMetricsConfigurationRequest" type:"structure"`
-
- // The name of the bucket containing the metrics configuration to delete.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID used to identify the metrics configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketMetricsConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketMetricsConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketMetricsConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketMetricsConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketMetricsConfigurationInput) SetBucket(v string) *DeleteBucketMetricsConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketMetricsConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketMetricsConfigurationInput) SetExpectedBucketOwner(v string) *DeleteBucketMetricsConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMetricsConfigurationInput {
- s.Id = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketMetricsConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketMetricsConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketMetricsConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketMetricsConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketOwnershipControlsInput struct {
- _ struct{} `locationName:"DeleteBucketOwnershipControlsRequest" type:"structure"`
-
- // The Amazon S3 bucket whose OwnershipControls you want to delete.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketOwnershipControlsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketOwnershipControlsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketOwnershipControlsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketOwnershipControlsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketOwnershipControlsInput) SetBucket(v string) *DeleteBucketOwnershipControlsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketOwnershipControlsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketOwnershipControlsInput) SetExpectedBucketOwner(v string) *DeleteBucketOwnershipControlsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *DeleteBucketOwnershipControlsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketOwnershipControlsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketOwnershipControlsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketOwnershipControlsOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketOwnershipControlsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketOwnershipControlsOutput) GoString() string {
- return s.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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketPolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketPolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketPolicyInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketPolicyInput) SetExpectedBucketOwner(v string) *DeleteBucketPolicyInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketPolicyInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketPolicyOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketPolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketPolicyOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketReplicationInput struct {
- _ struct{} `locationName:"DeleteBucketReplicationRequest" type:"structure"`
-
- // The bucket name.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketReplicationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketReplicationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketReplicationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketReplicationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketReplicationInput) SetExpectedBucketOwner(v string) *DeleteBucketReplicationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketReplicationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketReplicationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketReplicationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketReplicationOutput) GoString() string {
- return s.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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketTaggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketTaggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketTaggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketTaggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketTaggingInput) SetExpectedBucketOwner(v string) *DeleteBucketTaggingInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketTaggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketTaggingOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketTaggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketTaggingOutput) GoString() string {
- return s.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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketWebsiteInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketWebsiteInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketWebsiteInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketWebsiteInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketWebsiteInput) SetExpectedBucketOwner(v string) *DeleteBucketWebsiteInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketWebsiteInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketWebsiteOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketWebsiteOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteBucketWebsiteOutput) GoString() string {
- return s.String()
-}
-
-// Information about the delete marker.
-type DeleteMarkerEntry struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether the object is (true) or is not (false) the latest version
- // of an object.
- IsLatest *bool `type:"boolean"`
-
- // The object key.
- Key *string `min:"1" type:"string"`
-
- // 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.
- VersionId *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteMarkerEntry) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteMarkerEntry) GoString() string {
- return s.String()
-}
-
-// SetIsLatest sets the IsLatest field's value.
-func (s *DeleteMarkerEntry) SetIsLatest(v bool) *DeleteMarkerEntry {
- s.IsLatest = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *DeleteMarkerEntry) SetKey(v string) *DeleteMarkerEntry {
- s.Key = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *DeleteMarkerEntry) SetLastModified(v time.Time) *DeleteMarkerEntry {
- s.LastModified = &v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *DeleteMarkerEntry) SetOwner(v *Owner) *DeleteMarkerEntry {
- s.Owner = v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry {
- s.VersionId = &v
- return s
-}
-
-// Specifies whether Amazon S3 replicates delete markers. If you specify a Filter
-// in your replication configuration, you must also include a DeleteMarkerReplication
-// element. If your Filter includes a Tag element, the DeleteMarkerReplication
-// Status must be set to Disabled, because Amazon S3 does not support replicating
-// delete markers for tag-based rules. 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).
-//
-// For more information about delete marker replication, see Basic Rule Configuration
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html).
-//
-// If you are using an earlier version of the replication configuration, Amazon
-// S3 handles 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"`
-
- // Indicates whether to replicate delete markers.
- //
- // Indicates whether to replicate delete markers.
- Status *string `type:"string" enum:"DeleteMarkerReplicationStatus"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteMarkerReplication) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteMarkerReplication) GoString() string {
- return s.String()
-}
-
-// SetStatus sets the Status field's value.
-func (s *DeleteMarkerReplication) SetStatus(v string) *DeleteMarkerReplication {
- s.Status = &v
- return s
-}
-
-type DeleteObjectInput struct {
- _ struct{} `locationName:"DeleteObjectRequest" type:"structure"`
-
- // The bucket name of the bucket containing the object.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Indicates whether S3 Object Lock should bypass Governance-mode restrictions
- // to process this operation. To use this header, you must have the s3:BypassGovernanceRetention
- // permission.
- BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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. 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 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // VersionId used to reference a specific version of the object.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteObjectInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteObjectInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteObjectInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteObjectInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
-func (s *DeleteObjectInput) SetBypassGovernanceRetention(v bool) *DeleteObjectInput {
- s.BypassGovernanceRetention = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteObjectInput) SetExpectedBucketOwner(v string) *DeleteObjectInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput {
- s.Key = &v
- return s
-}
-
-// SetMFA sets the MFA field's value.
-func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput {
- s.MFA = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *DeleteObjectInput) SetRequestPayer(v string) *DeleteObjectInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput {
- s.VersionId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteObjectInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteObjectOutput struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether the versioned object that was permanently deleted was (true)
- // or was not (false) a delete marker.
- DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
-
- // 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"`
-
- // Returns the version ID of the delete marker created as a result of the DELETE
- // operation.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteObjectOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteObjectOutput) GoString() string {
- return s.String()
-}
-
-// SetDeleteMarker sets the DeleteMarker field's value.
-func (s *DeleteObjectOutput) SetDeleteMarker(v bool) *DeleteObjectOutput {
- s.DeleteMarker = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *DeleteObjectOutput) SetRequestCharged(v string) *DeleteObjectOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput {
- s.VersionId = &v
- return s
-}
-
-type DeleteObjectTaggingInput struct {
- _ struct{} `locationName:"DeleteObjectTaggingRequest" type:"structure"`
-
- // The bucket name containing the objects from which to remove the tags.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The key that identifies the object in the bucket from which to remove all
- // tags.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // The versionId of the object that the tag-set will be removed from.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteObjectTaggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteObjectTaggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteObjectTaggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteObjectTaggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteObjectTaggingInput) SetBucket(v string) *DeleteObjectTaggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteObjectTaggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteObjectTaggingInput) SetExpectedBucketOwner(v string) *DeleteObjectTaggingInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *DeleteObjectTaggingInput) SetKey(v string) *DeleteObjectTaggingInput {
- s.Key = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingInput {
- s.VersionId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteObjectTaggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteObjectTaggingOutput struct {
- _ struct{} `type:"structure"`
-
- // The versionId of the object the tag-set was removed from.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteObjectTaggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteObjectTaggingOutput) GoString() string {
- return s.String()
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingOutput {
- s.VersionId = &v
- return s
-}
-
-type DeleteObjectsInput struct {
- _ struct{} `locationName:"DeleteObjectsRequest" type:"structure" payload:"Delete"`
-
- // The bucket name containing the objects to delete.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User 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. To use this header, you must have the s3:BypassGovernanceRetention
- // permission.
- BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // This checksum algorithm must be the same for all parts and it match the checksum
- // value supplied in the CreateMultipartUpload request.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // 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 account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The concatenation of the authentication device's serial number, a space,
- // 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 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteObjectsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteObjectsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteObjectsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Delete == nil {
- invalidParams.Add(request.NewErrParamRequired("Delete"))
- }
- 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
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteObjectsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
-func (s *DeleteObjectsInput) SetBypassGovernanceRetention(v bool) *DeleteObjectsInput {
- s.BypassGovernanceRetention = &v
- return s
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *DeleteObjectsInput) SetChecksumAlgorithm(v string) *DeleteObjectsInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetDelete sets the Delete field's value.
-func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput {
- s.Delete = v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteObjectsInput) SetExpectedBucketOwner(v string) *DeleteObjectsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetMFA sets the MFA field's value.
-func (s *DeleteObjectsInput) SetMFA(v string) *DeleteObjectsInput {
- s.MFA = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput {
- s.RequestPayer = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteObjectsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-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 action 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
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteObjectsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteObjectsOutput) GoString() string {
- return s.String()
-}
-
-// SetDeleted sets the Deleted field's value.
-func (s *DeleteObjectsOutput) SetDeleted(v []*DeletedObject) *DeleteObjectsOutput {
- s.Deleted = v
- return s
-}
-
-// SetErrors sets the Errors field's value.
-func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput {
- s.Errors = v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput {
- s.RequestCharged = &v
- return s
-}
-
-type DeletePublicAccessBlockInput struct {
- _ struct{} `locationName:"DeletePublicAccessBlockRequest" type:"structure"`
-
- // The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeletePublicAccessBlockInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeletePublicAccessBlockInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeletePublicAccessBlockInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeletePublicAccessBlockInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeletePublicAccessBlockInput) SetBucket(v string) *DeletePublicAccessBlockInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeletePublicAccessBlockInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeletePublicAccessBlockInput) SetExpectedBucketOwner(v string) *DeletePublicAccessBlockInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeletePublicAccessBlockInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeletePublicAccessBlockOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeletePublicAccessBlockOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeletedObject) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeletedObject) GoString() string {
- return s.String()
-}
-
-// SetDeleteMarker sets the DeleteMarker field's value.
-func (s *DeletedObject) SetDeleteMarker(v bool) *DeletedObject {
- s.DeleteMarker = &v
- return s
-}
-
-// SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value.
-func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject {
- s.DeleteMarkerVersionId = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *DeletedObject) SetKey(v string) *DeletedObject {
- s.Key = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *DeletedObject) SetVersionId(v string) *DeletedObject {
- s.VersionId = &v
- return s
-}
-
-// Specifies information about where to publish analysis or configuration results
-// for an Amazon S3 bucket and S3 Replication Time Control (S3 RTC).
-type Destination struct {
- _ struct{} `type:"structure"`
-
- // Specify this only in a cross-account scenario (where source and destination
- // bucket owners are not the same), and you want to change replica ownership
- // to the Amazon Web Services account that owns the destination bucket. If this
- // is not specified in the replication configuration, the replicas are owned
- // by same Amazon Web Services account that owns the source object.
- AccessControlTranslation *AccessControlTranslation `type:"structure"`
-
- // Destination bucket owner account ID. In a cross-account scenario, if you
- // direct Amazon S3 to change replica ownership to the Amazon Web Services 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 Replication Additional Configuration: Changing the Replica
- // Owner (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-change-owner.html)
- // in the Amazon S3 User Guide.
- Account *string `type:"string"`
-
- // The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to
- // store the results.
- //
- // Bucket is a required field
- Bucket *string `type:"string" required:"true"`
-
- // A container that provides information about encryption. If SourceSelectionCriteria
- // is specified, you must specify this element.
- EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
-
- // A container specifying replication metrics-related settings enabling replication
- // metrics and events.
- 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)
- // action in the Amazon S3 API Reference.
- StorageClass *string `type:"string" enum:"StorageClass"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Destination) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Destination) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Destination) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Destination"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.AccessControlTranslation != nil {
- if err := s.AccessControlTranslation.Validate(); err != nil {
- invalidParams.AddNested("AccessControlTranslation", err.(request.ErrInvalidParams))
- }
- }
- if 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
- }
- return nil
-}
-
-// SetAccessControlTranslation sets the AccessControlTranslation field's value.
-func (s *Destination) SetAccessControlTranslation(v *AccessControlTranslation) *Destination {
- s.AccessControlTranslation = v
- return s
-}
-
-// SetAccount sets the Account field's value.
-func (s *Destination) SetAccount(v string) *Destination {
- s.Account = &v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *Destination) SetBucket(v string) *Destination {
- s.Bucket = &v
- return s
-}
-
-func (s *Destination) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetEncryptionConfiguration sets the EncryptionConfiguration field's value.
-func (s *Destination) SetEncryptionConfiguration(v *EncryptionConfiguration) *Destination {
- s.EncryptionConfiguration = v
- 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
-}
-
-// 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 (for example, AES256, aws:kms).
- //
- // EncryptionType is a required field
- EncryptionType *string `type:"string" required:"true" enum:"ServerSideEncryption"`
-
- // If the encryption type is aws:kms, this optional value can be used to specify
- // the encryption context for the restore results.
- KMSContext *string `type:"string"`
-
- // If the encryption type is aws:kms, this optional value specifies the ID of
- // the symmetric customer managed key to use for encryption of job results.
- // Amazon S3 only supports symmetric keys. For more information, see Using symmetric
- // and asymmetric keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
- // in the Amazon Web Services Key Management Service Developer Guide.
- //
- // KMSKeyId is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by Encryption's
- // String and GoString methods.
- KMSKeyId *string `type:"string" sensitive:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Encryption) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Encryption) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Encryption) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Encryption"}
- if s.EncryptionType == nil {
- invalidParams.Add(request.NewErrParamRequired("EncryptionType"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEncryptionType sets the EncryptionType field's value.
-func (s *Encryption) SetEncryptionType(v string) *Encryption {
- s.EncryptionType = &v
- return s
-}
-
-// SetKMSContext sets the KMSContext field's value.
-func (s *Encryption) SetKMSContext(v string) *Encryption {
- s.KMSContext = &v
- return s
-}
-
-// SetKMSKeyId sets the KMSKeyId field's value.
-func (s *Encryption) SetKMSKeyId(v string) *Encryption {
- s.KMSKeyId = &v
- return s
-}
-
-// Specifies encryption-related information for an Amazon S3 bucket that is
-// a destination for replicated objects.
-type EncryptionConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web
- // Services KMS key stored in Amazon Web Services Key Management Service (KMS)
- // for the destination bucket. Amazon S3 uses this key to encrypt replica objects.
- // Amazon S3 only supports symmetric, customer managed KMS keys. For more information,
- // see Using symmetric and asymmetric keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
- // in the Amazon Web Services Key Management Service Developer Guide.
- ReplicaKmsKeyID *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EncryptionConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EncryptionConfiguration) GoString() string {
- return s.String()
-}
-
-// SetReplicaKmsKeyID sets the ReplicaKmsKeyID field's value.
-func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfiguration {
- s.ReplicaKmsKeyID = &v
- return s
-}
-
-// 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EndEvent) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EndEvent) GoString() string {
- return s.String()
-}
-
-// The EndEvent is and event in the SelectObjectContentEventStream group of events.
-func (s *EndEvent) eventSelectObjectContentEventStream() {}
-
-// UnmarshalEvent unmarshals the EventStream Message into the EndEvent value.
-// This method is only used internally within the SDK's EventStream handling.
-func (s *EndEvent) UnmarshalEvent(
- payloadUnmarshaler protocol.PayloadUnmarshaler,
- msg eventstream.Message,
-) error {
- return nil
-}
-
-// MarshalEvent marshals the type into an stream event value. This method
-// should only used internally within the SDK's EventStream handling.
-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 Amazon
- // Web Services account that prevents the action from completing successfully.
- // Contact Amazon Web Services 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 Amazon Web Services 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 Amazon
- // Web Services 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 Amazon Web Services 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 action 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 Amazon Web Services 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 Amazon Web Services 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 Amazon Web Services 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: Amazon S3 (http://aws.amazon.com/s3)
- // HTTP Status Code: 403 Forbidden SOAP Fault Code Prefix: Client
- //
- // * Code: OperationAborted Description: A conflicting conditional action
- // 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 Amazon Web Services
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Error) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Error) GoString() string {
- return s.String()
-}
-
-// SetCode sets the Code field's value.
-func (s *Error) SetCode(v string) *Error {
- s.Code = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *Error) SetKey(v string) *Error {
- s.Key = &v
- return s
-}
-
-// SetMessage sets the Message field's value.
-func (s *Error) SetMessage(v string) *Error {
- s.Message = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *Error) SetVersionId(v string) *Error {
- s.VersionId = &v
- return s
-}
-
-// The error information.
-type ErrorDocument struct {
- _ struct{} `type:"structure"`
-
- // The object key name to use when a 4XX class error occurs.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- //
- // Key is a required field
- Key *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ErrorDocument) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-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
-}
-
-// A container for specifying the configuration for Amazon EventBridge.
-type EventBridgeConfiguration struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EventBridgeConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EventBridgeConfiguration) GoString() string {
- return s.String()
-}
-
-// 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 User Guide.
-type ExistingObjectReplication struct {
- _ struct{} `type:"structure"`
-
- // Status is a required field
- Status *string `type:"string" required:"true" enum:"ExistingObjectReplicationStatus"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ExistingObjectReplication) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ExistingObjectReplication) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ExistingObjectReplication) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ExistingObjectReplication"}
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetStatus sets the Status field's value.
-func (s *ExistingObjectReplication) SetStatus(v string) *ExistingObjectReplication {
- s.Status = &v
- return s
-}
-
-// Specifies the Amazon S3 object key name to filter on and whether to filter
-// on the suffix or prefix of the key name.
-type FilterRule struct {
- _ struct{} `type:"structure"`
-
- // The object key name prefix or suffix identifying one or more objects to which
- // the filtering rule applies. The maximum length is 1,024 characters. Overlapping
- // prefixes and suffixes are not supported. For more information, see Configuring
- // Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
- // in the Amazon S3 User Guide.
- Name *string `type:"string" enum:"FilterRuleName"`
-
- // The value that the filter searches for in object key names.
- Value *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s FilterRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s FilterRule) GoString() string {
- return s.String()
-}
-
-// SetName sets the Name field's value.
-func (s *FilterRule) SetName(v string) *FilterRule {
- s.Name = &v
- return s
-}
-
-// SetValue sets the Value field's value.
-func (s *FilterRule) SetValue(v string) *FilterRule {
- s.Value = &v
- return s
-}
-
-type GetBucketAccelerateConfigurationInput struct {
- _ struct{} `locationName:"GetBucketAccelerateConfigurationRequest" type:"structure"`
-
- // The name of the bucket for which the accelerate configuration is retrieved.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketAccelerateConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketAccelerateConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketAccelerateConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAccelerateConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketAccelerateConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketAccelerateConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketAccelerateConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketAccelerateConfigurationOutput struct {
- _ struct{} `type:"structure"`
-
- // The accelerate configuration of the bucket.
- Status *string `type:"string" enum:"BucketAccelerateStatus"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketAccelerateConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketAccelerateConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetStatus sets the Status field's value.
-func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketAccelerateConfigurationOutput {
- s.Status = &v
- return s
-}
-
-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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketAclInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketAclInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketAclInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketAclInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketAclInput) SetExpectedBucketOwner(v string) *GetBucketAclInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketAclInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketAclOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketAclOutput) GoString() string {
- return s.String()
-}
-
-// SetGrants sets the Grants field's value.
-func (s *GetBucketAclOutput) SetGrants(v []*Grant) *GetBucketAclOutput {
- s.Grants = v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput {
- s.Owner = v
- return s
-}
-
-type GetBucketAnalyticsConfigurationInput struct {
- _ struct{} `locationName:"GetBucketAnalyticsConfigurationRequest" type:"structure"`
-
- // The name of the bucket from which an analytics configuration is retrieved.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID that identifies the analytics configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketAnalyticsConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketAnalyticsConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketAnalyticsConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketAnalyticsConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketAnalyticsConfigurationInput) SetBucket(v string) *GetBucketAnalyticsConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketAnalyticsConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketAnalyticsConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketAnalyticsConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyticsConfigurationInput {
- s.Id = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketAnalyticsConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketAnalyticsConfigurationOutput struct {
- _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
-
- // The configuration and any analyses for the analytics filter.
- AnalyticsConfiguration *AnalyticsConfiguration `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketAnalyticsConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketAnalyticsConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
-func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *GetBucketAnalyticsConfigurationOutput {
- s.AnalyticsConfiguration = v
- return s
-}
-
-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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketCorsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketCorsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketCorsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketCorsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketCorsInput) SetExpectedBucketOwner(v string) *GetBucketCorsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketCorsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketCorsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketCorsOutput) GoString() string {
- return s.String()
-}
-
-// SetCORSRules sets the CORSRules field's value.
-func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput {
- s.CORSRules = v
- return s
-}
-
-type GetBucketEncryptionInput struct {
- _ struct{} `locationName:"GetBucketEncryptionRequest" type:"structure"`
-
- // The name of the bucket from which the server-side encryption configuration
- // is retrieved.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketEncryptionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketEncryptionInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketEncryptionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketEncryptionInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketEncryptionInput) SetBucket(v string) *GetBucketEncryptionInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketEncryptionInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketEncryptionInput) SetExpectedBucketOwner(v string) *GetBucketEncryptionInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketEncryptionInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketEncryptionOutput struct {
- _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
-
- // Specifies the default server-side-encryption configuration.
- ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketEncryptionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketEncryptionOutput) GoString() string {
- return s.String()
-}
-
-// SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
-func (s *GetBucketEncryptionOutput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *GetBucketEncryptionOutput {
- s.ServerSideEncryptionConfiguration = v
- return s
-}
-
-type GetBucketIntelligentTieringConfigurationInput struct {
- _ struct{} `locationName:"GetBucketIntelligentTieringConfigurationRequest" type:"structure"`
-
- // The name of the Amazon S3 bucket whose configuration you want to modify or
- // retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The ID used to identify the S3 Intelligent-Tiering configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketIntelligentTieringConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketIntelligentTieringConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketIntelligentTieringConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketIntelligentTieringConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketIntelligentTieringConfigurationInput) SetBucket(v string) *GetBucketIntelligentTieringConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketIntelligentTieringConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetId sets the Id field's value.
-func (s *GetBucketIntelligentTieringConfigurationInput) SetId(v string) *GetBucketIntelligentTieringConfigurationInput {
- s.Id = &v
- return s
-}
-
-func (s *GetBucketIntelligentTieringConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketIntelligentTieringConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketIntelligentTieringConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketIntelligentTieringConfigurationOutput struct {
- _ struct{} `type:"structure" payload:"IntelligentTieringConfiguration"`
-
- // Container for S3 Intelligent-Tiering configuration.
- IntelligentTieringConfiguration *IntelligentTieringConfiguration `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketIntelligentTieringConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketIntelligentTieringConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetIntelligentTieringConfiguration sets the IntelligentTieringConfiguration field's value.
-func (s *GetBucketIntelligentTieringConfigurationOutput) SetIntelligentTieringConfiguration(v *IntelligentTieringConfiguration) *GetBucketIntelligentTieringConfigurationOutput {
- s.IntelligentTieringConfiguration = v
- return s
-}
-
-type GetBucketInventoryConfigurationInput struct {
- _ struct{} `locationName:"GetBucketInventoryConfigurationRequest" type:"structure"`
-
- // The name of the bucket containing the inventory configuration to retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID used to identify the inventory configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketInventoryConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketInventoryConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketInventoryConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketInventoryConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketInventoryConfigurationInput) SetBucket(v string) *GetBucketInventoryConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketInventoryConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketInventoryConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketInventoryConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInventoryConfigurationInput {
- s.Id = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketInventoryConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketInventoryConfigurationOutput struct {
- _ struct{} `type:"structure" payload:"InventoryConfiguration"`
-
- // Specifies the inventory configuration.
- InventoryConfiguration *InventoryConfiguration `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketInventoryConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketInventoryConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetInventoryConfiguration sets the InventoryConfiguration field's value.
-func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *InventoryConfiguration) *GetBucketInventoryConfigurationOutput {
- s.InventoryConfiguration = v
- return s
-}
-
-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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLifecycleConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLifecycleConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketLifecycleConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLifecycleConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketLifecycleConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketLifecycleConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketLifecycleConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketLifecycleConfigurationOutput struct {
- _ struct{} `type:"structure"`
-
- // Container for a lifecycle rule.
- Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLifecycleConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLifecycleConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetRules sets the Rules field's value.
-func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *GetBucketLifecycleConfigurationOutput {
- s.Rules = v
- return s
-}
-
-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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLifecycleInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLifecycleInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketLifecycleInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketLifecycleInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketLifecycleInput) SetExpectedBucketOwner(v string) *GetBucketLifecycleInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketLifecycleInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketLifecycleOutput struct {
- _ struct{} `type:"structure"`
-
- // Container for a lifecycle rule.
- Rules []*Rule `locationName:"Rule" type:"list" flattened:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLifecycleOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLifecycleOutput) GoString() string {
- return s.String()
-}
-
-// SetRules sets the Rules field's value.
-func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput {
- s.Rules = v
- return s
-}
-
-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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLocationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLocationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketLocationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketLocationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketLocationInput) SetExpectedBucketOwner(v string) *GetBucketLocationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketLocationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLocationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLocationOutput) GoString() string {
- return s.String()
-}
-
-// SetLocationConstraint sets the LocationConstraint field's value.
-func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLocationOutput {
- s.LocationConstraint = &v
- return s
-}
-
-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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLoggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLoggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketLoggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketLoggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketLoggingInput) SetExpectedBucketOwner(v string) *GetBucketLoggingInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketLoggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketLoggingOutput struct {
- _ struct{} `type:"structure"`
-
- // Describes where logs are stored and the prefix that Amazon S3 assigns to
- // all log object keys for a bucket. For more information, see PUT Bucket logging
- // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html)
- // in the Amazon S3 API Reference.
- LoggingEnabled *LoggingEnabled `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLoggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketLoggingOutput) GoString() string {
- return s.String()
-}
-
-// SetLoggingEnabled sets the LoggingEnabled field's value.
-func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucketLoggingOutput {
- s.LoggingEnabled = v
- return s
-}
-
-type GetBucketMetricsConfigurationInput struct {
- _ struct{} `locationName:"GetBucketMetricsConfigurationRequest" type:"structure"`
-
- // The name of the bucket containing the metrics configuration to retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID used to identify the metrics configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketMetricsConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketMetricsConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketMetricsConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketMetricsConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketMetricsConfigurationInput) SetBucket(v string) *GetBucketMetricsConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketMetricsConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketMetricsConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketMetricsConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsConfigurationInput {
- s.Id = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketMetricsConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketMetricsConfigurationOutput struct {
- _ struct{} `type:"structure" payload:"MetricsConfiguration"`
-
- // Specifies the metrics configuration.
- MetricsConfiguration *MetricsConfiguration `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketMetricsConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketMetricsConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetMetricsConfiguration sets the MetricsConfiguration field's value.
-func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *MetricsConfiguration) *GetBucketMetricsConfigurationOutput {
- s.MetricsConfiguration = v
- return s
-}
-
-type GetBucketNotificationConfigurationRequest struct {
- _ struct{} `locationName:"GetBucketNotificationConfigurationRequest" type:"structure"`
-
- // The 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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketNotificationConfigurationRequest) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketNotificationConfigurationRequest) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketNotificationConfigurationRequest) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBucketNotificationConfigurationRequest {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketNotificationConfigurationRequest) SetExpectedBucketOwner(v string) *GetBucketNotificationConfigurationRequest {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketNotificationConfigurationRequest) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketOwnershipControlsInput struct {
- _ struct{} `locationName:"GetBucketOwnershipControlsRequest" type:"structure"`
-
- // The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketOwnershipControlsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketOwnershipControlsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketOwnershipControlsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketOwnershipControlsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketOwnershipControlsInput) SetBucket(v string) *GetBucketOwnershipControlsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketOwnershipControlsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketOwnershipControlsInput) SetExpectedBucketOwner(v string) *GetBucketOwnershipControlsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketOwnershipControlsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketOwnershipControlsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketOwnershipControlsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketOwnershipControlsOutput struct {
- _ struct{} `type:"structure" payload:"OwnershipControls"`
-
- // The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or ObjectWriter)
- // currently in effect for this Amazon S3 bucket.
- OwnershipControls *OwnershipControls `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketOwnershipControlsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketOwnershipControlsOutput) GoString() string {
- return s.String()
-}
-
-// SetOwnershipControls sets the OwnershipControls field's value.
-func (s *GetBucketOwnershipControlsOutput) SetOwnershipControls(v *OwnershipControls) *GetBucketOwnershipControlsOutput {
- s.OwnershipControls = v
- return s
-}
-
-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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketPolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketPolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketPolicyInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketPolicyInput) SetExpectedBucketOwner(v string) *GetBucketPolicyInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketPolicyInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketPolicyOutput struct {
- _ struct{} `type:"structure" payload:"Policy"`
-
- // The bucket policy as a JSON document.
- Policy *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketPolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketPolicyOutput) GoString() string {
- return s.String()
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput {
- s.Policy = &v
- return s
-}
-
-type GetBucketPolicyStatusInput struct {
- _ struct{} `locationName:"GetBucketPolicyStatusRequest" type:"structure"`
-
- // The name of the Amazon S3 bucket whose policy status you want to retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketPolicyStatusInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketPolicyStatusInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketPolicyStatusInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyStatusInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketPolicyStatusInput) SetBucket(v string) *GetBucketPolicyStatusInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketPolicyStatusInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketPolicyStatusInput) SetExpectedBucketOwner(v string) *GetBucketPolicyStatusInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketPolicyStatusInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketPolicyStatusOutput struct {
- _ struct{} `type:"structure" payload:"PolicyStatus"`
-
- // The policy status for the specified bucket.
- PolicyStatus *PolicyStatus `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketPolicyStatusOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketPolicyStatusOutput) GoString() string {
- return s.String()
-}
-
-// SetPolicyStatus sets the PolicyStatus field's value.
-func (s *GetBucketPolicyStatusOutput) SetPolicyStatus(v *PolicyStatus) *GetBucketPolicyStatusOutput {
- s.PolicyStatus = v
- return s
-}
-
-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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketReplicationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketReplicationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketReplicationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketReplicationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketReplicationInput) SetExpectedBucketOwner(v string) *GetBucketReplicationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketReplicationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketReplicationOutput struct {
- _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
-
- // A container for replication rules. You can add up to 1,000 rules. The maximum
- // size of a replication configuration is 2 MB.
- ReplicationConfiguration *ReplicationConfiguration `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketReplicationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketReplicationOutput) GoString() string {
- return s.String()
-}
-
-// SetReplicationConfiguration sets the ReplicationConfiguration field's value.
-func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationConfiguration) *GetBucketReplicationOutput {
- s.ReplicationConfiguration = v
- return s
-}
-
-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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketRequestPaymentInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketRequestPaymentInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketRequestPaymentInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaymentInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketRequestPaymentInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketRequestPaymentInput) SetExpectedBucketOwner(v string) *GetBucketRequestPaymentInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketRequestPaymentInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketRequestPaymentOutput struct {
- _ struct{} `type:"structure"`
-
- // Specifies who pays for the download and request fees.
- Payer *string `type:"string" enum:"Payer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketRequestPaymentOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketRequestPaymentOutput) GoString() string {
- return s.String()
-}
-
-// SetPayer sets the Payer field's value.
-func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaymentOutput {
- s.Payer = &v
- return s
-}
-
-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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketTaggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketTaggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketTaggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketTaggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketTaggingInput) SetExpectedBucketOwner(v string) *GetBucketTaggingInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketTaggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketTaggingOutput struct {
- _ struct{} `type:"structure"`
-
- // Contains the tag set.
- //
- // TagSet is a required field
- TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketTaggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketTaggingOutput) GoString() string {
- return s.String()
-}
-
-// SetTagSet sets the TagSet field's value.
-func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput {
- s.TagSet = v
- return s
-}
-
-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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketVersioningInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketVersioningInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketVersioningInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketVersioningInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketVersioningInput) SetExpectedBucketOwner(v string) *GetBucketVersioningInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketVersioningInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketVersioningOutput struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether MFA delete is enabled in the bucket versioning configuration.
- // This element is only returned if the bucket has been configured with MFA
- // delete. If the bucket has never been so configured, this element is not returned.
- MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"`
-
- // The versioning state of the bucket.
- Status *string `type:"string" enum:"BucketVersioningStatus"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketVersioningOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketVersioningOutput) GoString() string {
- return s.String()
-}
-
-// SetMFADelete sets the MFADelete field's value.
-func (s *GetBucketVersioningOutput) SetMFADelete(v string) *GetBucketVersioningOutput {
- s.MFADelete = &v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutput {
- s.Status = &v
- return s
-}
-
-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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketWebsiteInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketWebsiteInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketWebsiteInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketWebsiteInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketWebsiteInput) SetExpectedBucketOwner(v string) *GetBucketWebsiteInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketWebsiteInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketWebsiteOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetBucketWebsiteOutput) GoString() string {
- return s.String()
-}
-
-// SetErrorDocument sets the ErrorDocument field's value.
-func (s *GetBucketWebsiteOutput) SetErrorDocument(v *ErrorDocument) *GetBucketWebsiteOutput {
- s.ErrorDocument = v
- return s
-}
-
-// SetIndexDocument sets the IndexDocument field's value.
-func (s *GetBucketWebsiteOutput) SetIndexDocument(v *IndexDocument) *GetBucketWebsiteOutput {
- s.IndexDocument = v
- return s
-}
-
-// SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
-func (s *GetBucketWebsiteOutput) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *GetBucketWebsiteOutput {
- s.RedirectAllRequestsTo = v
- return s
-}
-
-// SetRoutingRules sets the RoutingRules field's value.
-func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWebsiteOutput {
- s.RoutingRules = v
- return s
-}
-
-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 action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // VersionId used to reference a specific version of the object.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectAclInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectAclInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetObjectAclInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetObjectAclInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetObjectAclInput) SetExpectedBucketOwner(v string) *GetObjectAclInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *GetObjectAclInput) SetRequestPayer(v string) *GetObjectAclInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput {
- s.VersionId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetObjectAclInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-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
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectAclOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectAclOutput) GoString() string {
- return s.String()
-}
-
-// SetGrants sets the Grants field's value.
-func (s *GetObjectAclOutput) SetGrants(v []*Grant) *GetObjectAclOutput {
- s.Grants = v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *GetObjectAclOutput) SetOwner(v *Owner) *GetObjectAclOutput {
- s.Owner = v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput {
- s.RequestCharged = &v
- return s
-}
-
-type GetObjectAttributesInput struct {
- _ struct{} `locationName:"GetObjectAttributesRequest" type:"structure"`
-
- // The name of the bucket that contains the object.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The object key.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Sets the maximum number of parts to return.
- MaxParts *int64 `location:"header" locationName:"x-amz-max-parts" type:"integer"`
-
- // An XML header that specifies the fields at the root level that you want returned
- // in the response. Fields that you do not specify are not returned.
- //
- // ObjectAttributes is a required field
- ObjectAttributes []*string `location:"header" locationName:"x-amz-object-attributes" type:"list" required:"true" enum:"ObjectAttributes"`
-
- // Specifies the part after which listing should begin. Only parts with higher
- // part numbers will be listed.
- PartNumberMarker *int64 `location:"header" locationName:"x-amz-part-number-marker" type:"integer"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // Specifies the algorithm to use 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
- // 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 is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by GetObjectAttributesInput's
- // String and GoString methods.
- 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 that the
- // encryption key was transmitted without error.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // The version ID used to reference a specific version of the object.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectAttributesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectAttributesInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetObjectAttributesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetObjectAttributesInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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.ObjectAttributes == nil {
- invalidParams.Add(request.NewErrParamRequired("ObjectAttributes"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetObjectAttributesInput) SetBucket(v string) *GetObjectAttributesInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetObjectAttributesInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetObjectAttributesInput) SetExpectedBucketOwner(v string) *GetObjectAttributesInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *GetObjectAttributesInput) SetKey(v string) *GetObjectAttributesInput {
- s.Key = &v
- return s
-}
-
-// SetMaxParts sets the MaxParts field's value.
-func (s *GetObjectAttributesInput) SetMaxParts(v int64) *GetObjectAttributesInput {
- s.MaxParts = &v
- return s
-}
-
-// SetObjectAttributes sets the ObjectAttributes field's value.
-func (s *GetObjectAttributesInput) SetObjectAttributes(v []*string) *GetObjectAttributesInput {
- s.ObjectAttributes = v
- return s
-}
-
-// SetPartNumberMarker sets the PartNumberMarker field's value.
-func (s *GetObjectAttributesInput) SetPartNumberMarker(v int64) *GetObjectAttributesInput {
- s.PartNumberMarker = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *GetObjectAttributesInput) SetRequestPayer(v string) *GetObjectAttributesInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *GetObjectAttributesInput) SetSSECustomerAlgorithm(v string) *GetObjectAttributesInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *GetObjectAttributesInput) SetSSECustomerKey(v string) *GetObjectAttributesInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *GetObjectAttributesInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *GetObjectAttributesInput) SetSSECustomerKeyMD5(v string) *GetObjectAttributesInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectAttributesInput) SetVersionId(v string) *GetObjectAttributesInput {
- s.VersionId = &v
- return s
-}
-
-func (s *GetObjectAttributesInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetObjectAttributesInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetObjectAttributesInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetObjectAttributesOutput struct {
- _ struct{} `type:"structure"`
-
- // The checksum or digest of the object.
- Checksum *Checksum `type:"structure"`
-
- // Specifies whether the object retrieved was (true) or was not (false) a delete
- // marker. If false, this response header does not appear in the response.
- 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.
- ETag *string `type:"string"`
-
- // The creation date of the object.
- LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
-
- // A collection of parts associated with a multipart upload.
- ObjectParts *GetObjectAttributesParts `type:"structure"`
-
- // The size of the object in bytes.
- ObjectSize *int64 `type:"long"`
-
- // 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 the 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 `type:"string" enum:"StorageClass"`
-
- // The version ID of the object.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectAttributesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectAttributesOutput) GoString() string {
- return s.String()
-}
-
-// SetChecksum sets the Checksum field's value.
-func (s *GetObjectAttributesOutput) SetChecksum(v *Checksum) *GetObjectAttributesOutput {
- s.Checksum = v
- return s
-}
-
-// SetDeleteMarker sets the DeleteMarker field's value.
-func (s *GetObjectAttributesOutput) SetDeleteMarker(v bool) *GetObjectAttributesOutput {
- s.DeleteMarker = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *GetObjectAttributesOutput) SetETag(v string) *GetObjectAttributesOutput {
- s.ETag = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *GetObjectAttributesOutput) SetLastModified(v time.Time) *GetObjectAttributesOutput {
- s.LastModified = &v
- return s
-}
-
-// SetObjectParts sets the ObjectParts field's value.
-func (s *GetObjectAttributesOutput) SetObjectParts(v *GetObjectAttributesParts) *GetObjectAttributesOutput {
- s.ObjectParts = v
- return s
-}
-
-// SetObjectSize sets the ObjectSize field's value.
-func (s *GetObjectAttributesOutput) SetObjectSize(v int64) *GetObjectAttributesOutput {
- s.ObjectSize = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *GetObjectAttributesOutput) SetRequestCharged(v string) *GetObjectAttributesOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *GetObjectAttributesOutput) SetStorageClass(v string) *GetObjectAttributesOutput {
- s.StorageClass = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectAttributesOutput) SetVersionId(v string) *GetObjectAttributesOutput {
- s.VersionId = &v
- return s
-}
-
-// A collection of parts associated with a multipart upload.
-type GetObjectAttributesParts struct {
- _ struct{} `type:"structure"`
-
- // Indicates whether the returned list of parts is truncated. A value of true
- // 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"`
-
- // The maximum number of parts allowed in the response.
- MaxParts *int64 `type:"integer"`
-
- // When a list is truncated, this element specifies the last part in the list,
- // as well as the value to use for the PartNumberMarker request parameter in
- // a subsequent request.
- NextPartNumberMarker *int64 `type:"integer"`
-
- // The marker for the current part.
- PartNumberMarker *int64 `type:"integer"`
-
- // A container for elements related to a particular part. A response can contain
- // zero or more Parts elements.
- Parts []*ObjectPart `locationName:"Part" type:"list" flattened:"true"`
-
- // The total number of parts.
- TotalPartsCount *int64 `locationName:"PartsCount" type:"integer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectAttributesParts) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectAttributesParts) GoString() string {
- return s.String()
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *GetObjectAttributesParts) SetIsTruncated(v bool) *GetObjectAttributesParts {
- s.IsTruncated = &v
- return s
-}
-
-// SetMaxParts sets the MaxParts field's value.
-func (s *GetObjectAttributesParts) SetMaxParts(v int64) *GetObjectAttributesParts {
- s.MaxParts = &v
- return s
-}
-
-// SetNextPartNumberMarker sets the NextPartNumberMarker field's value.
-func (s *GetObjectAttributesParts) SetNextPartNumberMarker(v int64) *GetObjectAttributesParts {
- s.NextPartNumberMarker = &v
- return s
-}
-
-// SetPartNumberMarker sets the PartNumberMarker field's value.
-func (s *GetObjectAttributesParts) SetPartNumberMarker(v int64) *GetObjectAttributesParts {
- s.PartNumberMarker = &v
- return s
-}
-
-// SetParts sets the Parts field's value.
-func (s *GetObjectAttributesParts) SetParts(v []*ObjectPart) *GetObjectAttributesParts {
- s.Parts = v
- return s
-}
-
-// SetTotalPartsCount sets the TotalPartsCount field's value.
-func (s *GetObjectAttributesParts) SetTotalPartsCount(v int64) *GetObjectAttributesParts {
- s.TotalPartsCount = &v
- return s
-}
-
-type GetObjectInput struct {
- _ struct{} `locationName:"GetObjectRequest" type:"structure"`
-
- // The bucket name containing the object.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using an Object Lambda access point the hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // To retrieve the checksum, this mode must be enabled.
- //
- // The AWS SDK for Go v1 does not support automatic response payload checksum
- // validation. This feature is available in the AWS SDK for Go v2.
- ChecksumMode *string `location:"header" locationName:"x-amz-checksum-mode" type:"string" enum:"ChecksumMode"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Return the object only if its entity tag (ETag) is the same as the one specified;
- // otherwise, return a 412 (precondition failed) error.
- IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
-
- // Return the object only if it has been modified since the specified time;
- // otherwise, return a 304 (not modified) error.
- IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`
-
- // Return the object only if its entity tag (ETag) is different from the one
- // specified; otherwise, return a 304 (not modified) error.
- IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
-
- // Return the object only if it has not been modified since the specified time;
- // otherwise, return a 412 (precondition failed) error.
- 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"`
-
- // Part number of the object being read. This is a positive integer between
- // 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified.
- // Useful for downloading just a part of an object.
- PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
-
- // Downloads the specified range bytes of an object. For more information about
- // 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 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // Sets the Cache-Control header of the response.
- ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
-
- // Sets the Content-Disposition header of the response
- ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`
-
- // Sets the Content-Encoding header of the response.
- ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`
-
- // Sets the Content-Language header of the response.
- ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`
-
- // Sets the Content-Type header of the response.
- ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`
-
- // Sets the Expires header of the response.
- ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"rfc822"`
-
- // Specifies the algorithm to use to when decrypting 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 used to encrypt
- // the data. This value is used to decrypt the object when recovering it and
- // must match the one used when storing the data. The key must be appropriate
- // for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
- // header.
- //
- // SSECustomerKey is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by GetObjectInput's
- // String and GoString methods.
- 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 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.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetObjectInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetObjectInput) SetBucket(v string) *GetObjectInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetObjectInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumMode sets the ChecksumMode field's value.
-func (s *GetObjectInput) SetChecksumMode(v string) *GetObjectInput {
- s.ChecksumMode = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetObjectInput) SetExpectedBucketOwner(v string) *GetObjectInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetIfMatch sets the IfMatch field's value.
-func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput {
- s.IfMatch = &v
- return s
-}
-
-// SetIfModifiedSince sets the IfModifiedSince field's value.
-func (s *GetObjectInput) SetIfModifiedSince(v time.Time) *GetObjectInput {
- s.IfModifiedSince = &v
- return s
-}
-
-// SetIfNoneMatch sets the IfNoneMatch field's value.
-func (s *GetObjectInput) SetIfNoneMatch(v string) *GetObjectInput {
- s.IfNoneMatch = &v
- return s
-}
-
-// SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
-func (s *GetObjectInput) SetIfUnmodifiedSince(v time.Time) *GetObjectInput {
- s.IfUnmodifiedSince = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *GetObjectInput) SetKey(v string) *GetObjectInput {
- s.Key = &v
- return s
-}
-
-// SetPartNumber sets the PartNumber field's value.
-func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput {
- s.PartNumber = &v
- return s
-}
-
-// SetRange sets the Range field's value.
-func (s *GetObjectInput) SetRange(v string) *GetObjectInput {
- s.Range = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *GetObjectInput) SetRequestPayer(v string) *GetObjectInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetResponseCacheControl sets the ResponseCacheControl field's value.
-func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput {
- s.ResponseCacheControl = &v
- return s
-}
-
-// SetResponseContentDisposition sets the ResponseContentDisposition field's value.
-func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput {
- s.ResponseContentDisposition = &v
- return s
-}
-
-// SetResponseContentEncoding sets the ResponseContentEncoding field's value.
-func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput {
- s.ResponseContentEncoding = &v
- return s
-}
-
-// SetResponseContentLanguage sets the ResponseContentLanguage field's value.
-func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput {
- s.ResponseContentLanguage = &v
- return s
-}
-
-// SetResponseContentType sets the ResponseContentType field's value.
-func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput {
- s.ResponseContentType = &v
- return s
-}
-
-// SetResponseExpires sets the ResponseExpires field's value.
-func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput {
- s.ResponseExpires = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *GetObjectInput) SetSSECustomerAlgorithm(v string) *GetObjectInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *GetObjectInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput {
- s.VersionId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetObjectInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetObjectLegalHoldInput struct {
- _ struct{} `locationName:"GetObjectLegalHoldRequest" type:"structure"`
-
- // The bucket name containing the object whose legal hold status you want to
- // retrieve.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The key name for the object whose legal hold status you want to retrieve.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User 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.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectLegalHoldInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectLegalHoldInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetObjectLegalHoldInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetObjectLegalHoldInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetObjectLegalHoldInput) SetBucket(v string) *GetObjectLegalHoldInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetObjectLegalHoldInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetObjectLegalHoldInput) SetExpectedBucketOwner(v string) *GetObjectLegalHoldInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *GetObjectLegalHoldInput) SetKey(v string) *GetObjectLegalHoldInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *GetObjectLegalHoldInput) SetRequestPayer(v string) *GetObjectLegalHoldInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectLegalHoldInput) SetVersionId(v string) *GetObjectLegalHoldInput {
- s.VersionId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetObjectLegalHoldInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetObjectLegalHoldOutput struct {
- _ struct{} `type:"structure" payload:"LegalHold"`
-
- // The current legal hold status for the specified object.
- LegalHold *ObjectLockLegalHold `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectLegalHoldOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectLegalHoldOutput) GoString() string {
- return s.String()
-}
-
-// SetLegalHold sets the LegalHold field's value.
-func (s *GetObjectLegalHoldOutput) SetLegalHold(v *ObjectLockLegalHold) *GetObjectLegalHoldOutput {
- s.LegalHold = v
- return s
-}
-
-type GetObjectLockConfigurationInput struct {
- _ struct{} `locationName:"GetObjectLockConfigurationRequest" type:"structure"`
-
- // The bucket whose Object Lock configuration you want to retrieve.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectLockConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectLockConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetObjectLockConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetObjectLockConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetObjectLockConfigurationInput) SetBucket(v string) *GetObjectLockConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetObjectLockConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetObjectLockConfigurationInput) SetExpectedBucketOwner(v string) *GetObjectLockConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetObjectLockConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetObjectLockConfigurationOutput struct {
- _ struct{} `type:"structure" payload:"ObjectLockConfiguration"`
-
- // The specified bucket's Object Lock configuration.
- ObjectLockConfiguration *ObjectLockConfiguration `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectLockConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectLockConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetObjectLockConfiguration sets the ObjectLockConfiguration field's value.
-func (s *GetObjectLockConfigurationOutput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *GetObjectLockConfigurationOutput {
- s.ObjectLockConfiguration = v
- return s
-}
-
-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.
- Body io.ReadCloser `type:"blob"`
-
- // Indicates whether the object uses an S3 Bucket Key for server-side encryption
- // with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Specifies caching behavior along the request/reply chain.
- CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
-
- // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
-
- // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
-
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
-
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
-
- // Specifies presentational information for the object.
- 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.
- 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.
- ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
-
- // The portion of the object returned in the response.
- ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`
-
- // A standard MIME type describing the format of the object data.
- ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
-
- // Specifies whether the object retrieved was (true) or was not (false) a Delete
- // Marker. If false, this response header does not appear in the response.
- DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
-
- // An entity tag (ETag) is an opaque identifier assigned by a web server to
- // a specific version 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
- // providing object expiration information. The value of the rule-id is URL-encoded.
- Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
-
- // The date and time at which the object is no longer cacheable.
- Expires *string `location:"header" locationName:"Expires" type:"string"`
-
- // Creation date of the object.
- 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
- // headers. This can happen if you create metadata using an API like SOAP that
- // supports more flexible metadata than the REST API. For example, using SOAP,
- // you can create metadata whose values are not legal HTTP headers.
- MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
-
- // Indicates whether this object has an active legal hold. This field is only
- // 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.
- 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.
- ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
-
- // The count of parts this object has. This value is only returned if you specify
- // partNumber in your request and the object was uploaded as a multipart upload.
- 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
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-
- // Provides information about object restoration action and expiration time
- // of the restored object copy.
- Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm
- // used.
- 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
- // 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 Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for
- // the object.
- //
- // SSEKMSKeyId is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by GetObjectOutput's
- // String and GoString methods.
- 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 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.
- TagCount *int64 `location:"header" locationName:"x-amz-tagging-count" type:"integer"`
-
- // Version of the object.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-
- // 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.
- WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectOutput) GoString() string {
- return s.String()
-}
-
-// SetAcceptRanges sets the AcceptRanges field's value.
-func (s *GetObjectOutput) SetAcceptRanges(v string) *GetObjectOutput {
- s.AcceptRanges = &v
- return s
-}
-
-// SetBody sets the Body field's value.
-func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput {
- s.Body = v
- return s
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *GetObjectOutput) SetBucketKeyEnabled(v bool) *GetObjectOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCacheControl sets the CacheControl field's value.
-func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput {
- s.CacheControl = &v
- return s
-}
-
-// SetChecksumCRC32 sets the ChecksumCRC32 field's value.
-func (s *GetObjectOutput) SetChecksumCRC32(v string) *GetObjectOutput {
- s.ChecksumCRC32 = &v
- return s
-}
-
-// SetChecksumCRC32C sets the ChecksumCRC32C field's value.
-func (s *GetObjectOutput) SetChecksumCRC32C(v string) *GetObjectOutput {
- s.ChecksumCRC32C = &v
- return s
-}
-
-// SetChecksumSHA1 sets the ChecksumSHA1 field's value.
-func (s *GetObjectOutput) SetChecksumSHA1(v string) *GetObjectOutput {
- s.ChecksumSHA1 = &v
- return s
-}
-
-// SetChecksumSHA256 sets the ChecksumSHA256 field's value.
-func (s *GetObjectOutput) SetChecksumSHA256(v string) *GetObjectOutput {
- s.ChecksumSHA256 = &v
- return s
-}
-
-// SetContentDisposition sets the ContentDisposition field's value.
-func (s *GetObjectOutput) SetContentDisposition(v string) *GetObjectOutput {
- s.ContentDisposition = &v
- return s
-}
-
-// SetContentEncoding sets the ContentEncoding field's value.
-func (s *GetObjectOutput) SetContentEncoding(v string) *GetObjectOutput {
- s.ContentEncoding = &v
- return s
-}
-
-// SetContentLanguage sets the ContentLanguage field's value.
-func (s *GetObjectOutput) SetContentLanguage(v string) *GetObjectOutput {
- s.ContentLanguage = &v
- return s
-}
-
-// SetContentLength sets the ContentLength field's value.
-func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput {
- s.ContentLength = &v
- return s
-}
-
-// SetContentRange sets the ContentRange field's value.
-func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput {
- s.ContentRange = &v
- return s
-}
-
-// SetContentType sets the ContentType field's value.
-func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput {
- s.ContentType = &v
- return s
-}
-
-// SetDeleteMarker sets the DeleteMarker field's value.
-func (s *GetObjectOutput) SetDeleteMarker(v bool) *GetObjectOutput {
- s.DeleteMarker = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput {
- s.ETag = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *GetObjectOutput) SetExpiration(v string) *GetObjectOutput {
- s.Expiration = &v
- return s
-}
-
-// SetExpires sets the Expires field's value.
-func (s *GetObjectOutput) SetExpires(v string) *GetObjectOutput {
- s.Expires = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput {
- s.LastModified = &v
- return s
-}
-
-// SetMetadata sets the Metadata field's value.
-func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput {
- s.Metadata = v
- return s
-}
-
-// SetMissingMeta sets the MissingMeta field's value.
-func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput {
- s.MissingMeta = &v
- return s
-}
-
-// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
-func (s *GetObjectOutput) SetObjectLockLegalHoldStatus(v string) *GetObjectOutput {
- s.ObjectLockLegalHoldStatus = &v
- return s
-}
-
-// SetObjectLockMode sets the ObjectLockMode field's value.
-func (s *GetObjectOutput) SetObjectLockMode(v string) *GetObjectOutput {
- s.ObjectLockMode = &v
- return s
-}
-
-// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
-func (s *GetObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *GetObjectOutput {
- s.ObjectLockRetainUntilDate = &v
- return s
-}
-
-// SetPartsCount sets the PartsCount field's value.
-func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput {
- s.PartsCount = &v
- return s
-}
-
-// SetReplicationStatus sets the ReplicationStatus field's value.
-func (s *GetObjectOutput) SetReplicationStatus(v string) *GetObjectOutput {
- s.ReplicationStatus = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetRestore sets the Restore field's value.
-func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput {
- s.Restore = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput {
- s.StorageClass = &v
- return s
-}
-
-// SetTagCount sets the TagCount field's value.
-func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput {
- s.TagCount = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput {
- s.VersionId = &v
- return s
-}
-
-// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
-func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput {
- s.WebsiteRedirectLocation = &v
- return s
-}
-
-type GetObjectRetentionInput struct {
- _ struct{} `locationName:"GetObjectRetentionRequest" type:"structure"`
-
- // The bucket name containing the object whose retention settings you want to
- // retrieve.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The key name for the object whose retention settings you want to retrieve.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User 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.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectRetentionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectRetentionInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetObjectRetentionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetObjectRetentionInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetObjectRetentionInput) SetBucket(v string) *GetObjectRetentionInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetObjectRetentionInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetObjectRetentionInput) SetExpectedBucketOwner(v string) *GetObjectRetentionInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *GetObjectRetentionInput) SetKey(v string) *GetObjectRetentionInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *GetObjectRetentionInput) SetRequestPayer(v string) *GetObjectRetentionInput {
- s.RequestPayer = &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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetObjectRetentionInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetObjectRetentionOutput struct {
- _ struct{} `type:"structure" payload:"Retention"`
-
- // The container element for an object's retention settings.
- Retention *ObjectLockRetention `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectRetentionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectRetentionOutput) GoString() string {
- return s.String()
-}
-
-// SetRetention sets the Retention field's value.
-func (s *GetObjectRetentionOutput) SetRetention(v *ObjectLockRetention) *GetObjectRetentionOutput {
- s.Retention = v
- return s
-}
-
-type GetObjectTaggingInput struct {
- _ struct{} `locationName:"GetObjectTaggingRequest" type:"structure"`
-
- // The bucket name containing the object for which to get the tagging information.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // The versionId of the object for which to get the tagging information.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectTaggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectTaggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetObjectTaggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetObjectTaggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetObjectTaggingInput) SetBucket(v string) *GetObjectTaggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetObjectTaggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetObjectTaggingInput) SetExpectedBucketOwner(v string) *GetObjectTaggingInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *GetObjectTaggingInput) SetRequestPayer(v string) *GetObjectTaggingInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput {
- s.VersionId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetObjectTaggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectTaggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectTaggingOutput) GoString() string {
- return s.String()
-}
-
-// SetTagSet sets the TagSet field's value.
-func (s *GetObjectTaggingOutput) SetTagSet(v []*Tag) *GetObjectTaggingOutput {
- s.TagSet = v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput {
- s.VersionId = &v
- return s
-}
-
-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 account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectTorrentInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectTorrentInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetObjectTorrentInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetObjectTorrentInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetObjectTorrentInput) SetExpectedBucketOwner(v string) *GetObjectTorrentInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput {
- s.RequestPayer = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetObjectTorrentInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-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
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectTorrentOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetObjectTorrentOutput) GoString() string {
- return s.String()
-}
-
-// SetBody sets the Body field's value.
-func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput {
- s.Body = v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOutput {
- s.RequestCharged = &v
- return s
-}
-
-type GetPublicAccessBlockInput struct {
- _ struct{} `locationName:"GetPublicAccessBlockRequest" type:"structure"`
-
- // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you
- // want to retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetPublicAccessBlockInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetPublicAccessBlockInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetPublicAccessBlockInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetPublicAccessBlockInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetPublicAccessBlockInput) SetBucket(v string) *GetPublicAccessBlockInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetPublicAccessBlockInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetPublicAccessBlockInput) SetExpectedBucketOwner(v string) *GetPublicAccessBlockInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetPublicAccessBlockInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetPublicAccessBlockOutput struct {
- _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"`
-
- // The PublicAccessBlock configuration currently in effect for this Amazon S3
- // bucket.
- PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetPublicAccessBlockOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetPublicAccessBlockOutput) GoString() string {
- return s.String()
-}
-
-// SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value.
-func (s *GetPublicAccessBlockOutput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *GetPublicAccessBlockOutput {
- s.PublicAccessBlockConfiguration = v
- return s
-}
-
-// Container for S3 Glacier job parameters.
-type GlacierJobParameters struct {
- _ struct{} `type:"structure"`
-
- // Retrieval tier at which the restore will be processed.
- //
- // Tier is a required field
- Tier *string `type:"string" required:"true" enum:"Tier"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GlacierJobParameters) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GlacierJobParameters) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GlacierJobParameters) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GlacierJobParameters"}
- if s.Tier == nil {
- invalidParams.Add(request.NewErrParamRequired("Tier"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetTier sets the Tier field's value.
-func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters {
- s.Tier = &v
- 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.
- Permission *string `type:"string" enum:"Permission"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Grant) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Grant) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Grant) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Grant"}
- if s.Grantee != nil {
- if err := s.Grantee.Validate(); err != nil {
- invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetGrantee sets the Grantee field's value.
-func (s *Grant) SetGrantee(v *Grantee) *Grant {
- s.Grantee = v
- return s
-}
-
-// SetPermission sets the Permission field's value.
-func (s *Grant) SetPermission(v string) *Grant {
- s.Permission = &v
- 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"`
-
- // Screen name of the grantee.
- DisplayName *string `type:"string"`
-
- // Email address of the grantee.
- //
- // Using email addresses to specify a grantee is only supported in the following
- // Amazon Web Services 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 Amazon Web Services General Reference.
- EmailAddress *string `type:"string"`
-
- // The canonical user ID of the grantee.
- ID *string `type:"string"`
-
- // Type of grantee
- //
- // Type is a required field
- Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"`
-
- // URI of the grantee group.
- URI *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Grantee) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Grantee) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Grantee) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Grantee"}
- if s.Type == nil {
- invalidParams.Add(request.NewErrParamRequired("Type"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDisplayName sets the DisplayName field's value.
-func (s *Grantee) SetDisplayName(v string) *Grantee {
- s.DisplayName = &v
- return s
-}
-
-// SetEmailAddress sets the EmailAddress field's value.
-func (s *Grantee) SetEmailAddress(v string) *Grantee {
- s.EmailAddress = &v
- return s
-}
-
-// SetID sets the ID field's value.
-func (s *Grantee) SetID(v string) *Grantee {
- s.ID = &v
- return s
-}
-
-// SetType sets the Type field's value.
-func (s *Grantee) SetType(v string) *Grantee {
- s.Type = &v
- return s
-}
-
-// SetURI sets the URI field's value.
-func (s *Grantee) SetURI(v string) *Grantee {
- s.URI = &v
- return s
-}
-
-type HeadBucketInput struct {
- _ struct{} `locationName:"HeadBucketRequest" type:"structure"`
-
- // The bucket name.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s HeadBucketInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s HeadBucketInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *HeadBucketInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput {
- s.Bucket = &v
- return s
-}
-
-func (s *HeadBucketInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *HeadBucketInput) SetExpectedBucketOwner(v string) *HeadBucketInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s HeadBucketInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type HeadBucketOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s HeadBucketOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s HeadBucketOutput) GoString() string {
- return s.String()
-}
-
-type HeadObjectInput struct {
- _ struct{} `locationName:"HeadObjectRequest" type:"structure"`
-
- // The name of the bucket containing the object.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // To retrieve the checksum, this parameter must be enabled.
- //
- // In addition, if you enable ChecksumMode and the object is encrypted with
- // Amazon Web Services Key Management Service (Amazon Web Services KMS), you
- // must have permission to use the kms:Decrypt action for the request to succeed.
- ChecksumMode *string `location:"header" locationName:"x-amz-checksum-mode" type:"string" enum:"ChecksumMode"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Return the object only if its entity tag (ETag) is the same as the one specified;
- // otherwise, return a 412 (precondition failed) error.
- IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
-
- // Return the object only if it has been modified since the specified time;
- // otherwise, return a 304 (not modified) error.
- IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`
-
- // Return the object only if its entity tag (ETag) is different from the one
- // specified; otherwise, return a 304 (not modified) error.
- IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
-
- // Return the object only if it has not been modified since the specified time;
- // otherwise, return a 412 (precondition failed) error.
- 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"`
-
- // Part number of the object being read. This is a positive integer between
- // 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
- // Useful querying about the size of the part and the number of parts in this
- // object.
- PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
-
- // Because HeadObject returns only the metadata for an object, this parameter
- // has no effect.
- Range *string `location:"header" locationName:"Range" type:"string"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // 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
- // 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 is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by HeadObjectInput's
- // String and GoString methods.
- 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 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.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s HeadObjectInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s HeadObjectInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *HeadObjectInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput {
- s.Bucket = &v
- return s
-}
-
-func (s *HeadObjectInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumMode sets the ChecksumMode field's value.
-func (s *HeadObjectInput) SetChecksumMode(v string) *HeadObjectInput {
- s.ChecksumMode = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *HeadObjectInput) SetExpectedBucketOwner(v string) *HeadObjectInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetIfMatch sets the IfMatch field's value.
-func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput {
- s.IfMatch = &v
- return s
-}
-
-// SetIfModifiedSince sets the IfModifiedSince field's value.
-func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput {
- s.IfModifiedSince = &v
- return s
-}
-
-// SetIfNoneMatch sets the IfNoneMatch field's value.
-func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput {
- s.IfNoneMatch = &v
- return s
-}
-
-// SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
-func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput {
- s.IfUnmodifiedSince = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput {
- s.Key = &v
- return s
-}
-
-// SetPartNumber sets the PartNumber field's value.
-func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput {
- s.PartNumber = &v
- return s
-}
-
-// SetRange sets the Range field's value.
-func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput {
- s.Range = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *HeadObjectInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput {
- s.VersionId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s HeadObjectInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type HeadObjectOutput struct {
- _ struct{} `type:"structure"`
-
- // Indicates that a range of bytes was specified.
- AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
-
- // The archive state of the head object.
- ArchiveStatus *string `location:"header" locationName:"x-amz-archive-status" type:"string" enum:"ArchiveStatus"`
-
- // Indicates whether the object uses an S3 Bucket Key for server-side encryption
- // with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Specifies caching behavior along the request/reply chain.
- CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
-
- // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
-
- // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
-
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
-
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
-
- // Specifies presentational information for the object.
- 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.
- 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.
- ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
-
- // A standard MIME type describing the format of the object data.
- ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
-
- // Specifies whether the object retrieved was (true) or was not (false) a Delete
- // Marker. If false, this response header does not appear in the response.
- DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
-
- // An entity tag (ETag) is an opaque identifier assigned by a web server to
- // a specific version 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
- // providing object expiration information. The value of the rule-id is URL-encoded.
- Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
-
- // The date and time at which the object is no longer cacheable.
- Expires *string `location:"header" locationName:"Expires" type:"string"`
-
- // Creation date of the object.
- 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
- // headers. This can happen if you create metadata using an API like SOAP that
- // supports more flexible metadata than the REST API. For example, using SOAP,
- // you can create metadata whose values are not legal HTTP headers.
- MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
-
- // 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, 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 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. This value is only returned if you specify
- // partNumber in your request and the object was uploaded as a multipart upload.
- 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 a destination in a replication rule.
- //
- // In replication, you have a source bucket on which you configure replication
- // and destination bucket or buckets 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 a 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 and there is no replica
- // modification replication in progress.
- //
- // * When replicating objects to multiple destination buckets, the x-amz-replication-status
- // header acts differently. The header of the source object will only return
- // a value of COMPLETED when replication is successful to all destinations.
- // The header will remain at value PENDING until replication has completed
- // for all destinations. If one or more destinations fails replication the
- // header will return FAILED.
- //
- // 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"`
-
- // 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 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html)
- // 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, 21 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,
- // the response will include this header confirming the encryption algorithm
- // used.
- 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
- // 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 Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for
- // the object.
- //
- // SSEKMSKeyId is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by HeadObjectOutput's
- // String and GoString methods.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // If the object is stored using server-side encryption either with an Amazon
- // Web Services KMS key 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.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-
- // 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.
- WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s HeadObjectOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s HeadObjectOutput) GoString() string {
- return s.String()
-}
-
-// SetAcceptRanges sets the AcceptRanges field's value.
-func (s *HeadObjectOutput) SetAcceptRanges(v string) *HeadObjectOutput {
- s.AcceptRanges = &v
- return s
-}
-
-// SetArchiveStatus sets the ArchiveStatus field's value.
-func (s *HeadObjectOutput) SetArchiveStatus(v string) *HeadObjectOutput {
- s.ArchiveStatus = &v
- return s
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *HeadObjectOutput) SetBucketKeyEnabled(v bool) *HeadObjectOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCacheControl sets the CacheControl field's value.
-func (s *HeadObjectOutput) SetCacheControl(v string) *HeadObjectOutput {
- s.CacheControl = &v
- return s
-}
-
-// SetChecksumCRC32 sets the ChecksumCRC32 field's value.
-func (s *HeadObjectOutput) SetChecksumCRC32(v string) *HeadObjectOutput {
- s.ChecksumCRC32 = &v
- return s
-}
-
-// SetChecksumCRC32C sets the ChecksumCRC32C field's value.
-func (s *HeadObjectOutput) SetChecksumCRC32C(v string) *HeadObjectOutput {
- s.ChecksumCRC32C = &v
- return s
-}
-
-// SetChecksumSHA1 sets the ChecksumSHA1 field's value.
-func (s *HeadObjectOutput) SetChecksumSHA1(v string) *HeadObjectOutput {
- s.ChecksumSHA1 = &v
- return s
-}
-
-// SetChecksumSHA256 sets the ChecksumSHA256 field's value.
-func (s *HeadObjectOutput) SetChecksumSHA256(v string) *HeadObjectOutput {
- s.ChecksumSHA256 = &v
- return s
-}
-
-// SetContentDisposition sets the ContentDisposition field's value.
-func (s *HeadObjectOutput) SetContentDisposition(v string) *HeadObjectOutput {
- s.ContentDisposition = &v
- return s
-}
-
-// SetContentEncoding sets the ContentEncoding field's value.
-func (s *HeadObjectOutput) SetContentEncoding(v string) *HeadObjectOutput {
- s.ContentEncoding = &v
- return s
-}
-
-// SetContentLanguage sets the ContentLanguage field's value.
-func (s *HeadObjectOutput) SetContentLanguage(v string) *HeadObjectOutput {
- s.ContentLanguage = &v
- return s
-}
-
-// SetContentLength sets the ContentLength field's value.
-func (s *HeadObjectOutput) SetContentLength(v int64) *HeadObjectOutput {
- s.ContentLength = &v
- return s
-}
-
-// SetContentType sets the ContentType field's value.
-func (s *HeadObjectOutput) SetContentType(v string) *HeadObjectOutput {
- s.ContentType = &v
- return s
-}
-
-// SetDeleteMarker sets the DeleteMarker field's value.
-func (s *HeadObjectOutput) SetDeleteMarker(v bool) *HeadObjectOutput {
- s.DeleteMarker = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *HeadObjectOutput) SetETag(v string) *HeadObjectOutput {
- s.ETag = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *HeadObjectOutput) SetExpiration(v string) *HeadObjectOutput {
- s.Expiration = &v
- return s
-}
-
-// SetExpires sets the Expires field's value.
-func (s *HeadObjectOutput) SetExpires(v string) *HeadObjectOutput {
- s.Expires = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *HeadObjectOutput) SetLastModified(v time.Time) *HeadObjectOutput {
- s.LastModified = &v
- return s
-}
-
-// SetMetadata sets the Metadata field's value.
-func (s *HeadObjectOutput) SetMetadata(v map[string]*string) *HeadObjectOutput {
- s.Metadata = v
- return s
-}
-
-// SetMissingMeta sets the MissingMeta field's value.
-func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput {
- s.MissingMeta = &v
- return s
-}
-
-// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
-func (s *HeadObjectOutput) SetObjectLockLegalHoldStatus(v string) *HeadObjectOutput {
- s.ObjectLockLegalHoldStatus = &v
- return s
-}
-
-// SetObjectLockMode sets the ObjectLockMode field's value.
-func (s *HeadObjectOutput) SetObjectLockMode(v string) *HeadObjectOutput {
- s.ObjectLockMode = &v
- return s
-}
-
-// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
-func (s *HeadObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *HeadObjectOutput {
- s.ObjectLockRetainUntilDate = &v
- return s
-}
-
-// SetPartsCount sets the PartsCount field's value.
-func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput {
- s.PartsCount = &v
- return s
-}
-
-// SetReplicationStatus sets the ReplicationStatus field's value.
-func (s *HeadObjectOutput) SetReplicationStatus(v string) *HeadObjectOutput {
- s.ReplicationStatus = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *HeadObjectOutput) SetRequestCharged(v string) *HeadObjectOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetRestore sets the Restore field's value.
-func (s *HeadObjectOutput) SetRestore(v string) *HeadObjectOutput {
- s.Restore = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *HeadObjectOutput) SetSSECustomerAlgorithm(v string) *HeadObjectOutput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *HeadObjectOutput) SetSSECustomerKeyMD5(v string) *HeadObjectOutput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *HeadObjectOutput) SetSSEKMSKeyId(v string) *HeadObjectOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *HeadObjectOutput) SetServerSideEncryption(v string) *HeadObjectOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *HeadObjectOutput) SetStorageClass(v string) *HeadObjectOutput {
- s.StorageClass = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *HeadObjectOutput) SetVersionId(v string) *HeadObjectOutput {
- s.VersionId = &v
- return s
-}
-
-// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
-func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutput {
- s.WebsiteRedirectLocation = &v
- 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 (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.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- //
- // Suffix is a required field
- Suffix *string `type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s IndexDocument) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s IndexDocument) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *IndexDocument) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "IndexDocument"}
- if s.Suffix == nil {
- invalidParams.Add(request.NewErrParamRequired("Suffix"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetSuffix sets the Suffix field's value.
-func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
- s.Suffix = &v
- return s
-}
-
-// Container element that identifies who initiated the multipart upload.
-type Initiator struct {
- _ struct{} `type:"structure"`
-
- // Name of the Principal.
- DisplayName *string `type:"string"`
-
- // If the principal is an Amazon Web Services account, it provides the Canonical
- // User ID. If the principal is an IAM User, it provides a user ARN value.
- ID *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Initiator) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Initiator) GoString() string {
- return s.String()
-}
-
-// SetDisplayName sets the DisplayName field's value.
-func (s *Initiator) SetDisplayName(v string) *Initiator {
- s.DisplayName = &v
- return s
-}
-
-// SetID sets the ID field's value.
-func (s *Initiator) SetID(v string) *Initiator {
- s.ID = &v
- return s
-}
-
-// Describes the serialization format of the object.
-type InputSerialization struct {
- _ struct{} `type:"structure"`
-
- // Describes the serialization of a CSV-encoded object.
- CSV *CSVInput `type:"structure"`
-
- // Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default
- // Value: NONE.
- CompressionType *string `type:"string" enum:"CompressionType"`
-
- // Specifies JSON as object's input serialization format.
- JSON *JSONInput `type:"structure"`
-
- // Specifies Parquet as object's input serialization format.
- Parquet *ParquetInput `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InputSerialization) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InputSerialization) GoString() string {
- return s.String()
-}
-
-// SetCSV sets the CSV field's value.
-func (s *InputSerialization) SetCSV(v *CSVInput) *InputSerialization {
- s.CSV = v
- return s
-}
-
-// SetCompressionType sets the CompressionType field's value.
-func (s *InputSerialization) SetCompressionType(v string) *InputSerialization {
- s.CompressionType = &v
- return s
-}
-
-// SetJSON sets the JSON field's value.
-func (s *InputSerialization) SetJSON(v *JSONInput) *InputSerialization {
- s.JSON = v
- return s
-}
-
-// SetParquet sets the Parquet field's value.
-func (s *InputSerialization) SetParquet(v *ParquetInput) *InputSerialization {
- s.Parquet = v
- return s
-}
-
-// A container for specifying S3 Intelligent-Tiering filters. The filters determine
-// the subset of objects to which the rule applies.
-type IntelligentTieringAndOperator struct {
- _ struct{} `type:"structure"`
-
- // An object key name prefix that identifies the subset of objects to which
- // the configuration applies.
- Prefix *string `type:"string"`
-
- // All of these tags must exist in the object's tag set in order for the configuration
- // to apply.
- Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s IntelligentTieringAndOperator) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s IntelligentTieringAndOperator) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *IntelligentTieringAndOperator) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "IntelligentTieringAndOperator"}
- 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
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *IntelligentTieringAndOperator) SetPrefix(v string) *IntelligentTieringAndOperator {
- s.Prefix = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *IntelligentTieringAndOperator) SetTags(v []*Tag) *IntelligentTieringAndOperator {
- s.Tags = v
- return s
-}
-
-// Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.
-//
-// For information about the S3 Intelligent-Tiering storage class, see Storage
-// class for automatically optimizing frequently and infrequently accessed objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
-type IntelligentTieringConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Specifies a bucket filter. The configuration only includes objects that meet
- // the filter's criteria.
- Filter *IntelligentTieringFilter `type:"structure"`
-
- // The ID used to identify the S3 Intelligent-Tiering configuration.
- //
- // Id is a required field
- Id *string `type:"string" required:"true"`
-
- // Specifies the status of the configuration.
- //
- // Status is a required field
- Status *string `type:"string" required:"true" enum:"IntelligentTieringStatus"`
-
- // Specifies the S3 Intelligent-Tiering storage class tier of the configuration.
- //
- // Tierings is a required field
- Tierings []*Tiering `locationName:"Tiering" type:"list" flattened:"true" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s IntelligentTieringConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s IntelligentTieringConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *IntelligentTieringConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "IntelligentTieringConfiguration"}
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
- if s.Tierings == nil {
- invalidParams.Add(request.NewErrParamRequired("Tierings"))
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
- if s.Tierings != nil {
- for i, v := range s.Tierings {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tierings", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetFilter sets the Filter field's value.
-func (s *IntelligentTieringConfiguration) SetFilter(v *IntelligentTieringFilter) *IntelligentTieringConfiguration {
- s.Filter = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *IntelligentTieringConfiguration) SetId(v string) *IntelligentTieringConfiguration {
- s.Id = &v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *IntelligentTieringConfiguration) SetStatus(v string) *IntelligentTieringConfiguration {
- s.Status = &v
- return s
-}
-
-// SetTierings sets the Tierings field's value.
-func (s *IntelligentTieringConfiguration) SetTierings(v []*Tiering) *IntelligentTieringConfiguration {
- s.Tierings = v
- return s
-}
-
-// The Filter is used to identify objects that the S3 Intelligent-Tiering configuration
-// applies to.
-type IntelligentTieringFilter struct {
- _ struct{} `type:"structure"`
-
- // 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.
- And *IntelligentTieringAndOperator `type:"structure"`
-
- // An object key name prefix that identifies the subset of objects to which
- // the rule applies.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- Prefix *string `type:"string"`
-
- // A container of a key value name pair.
- Tag *Tag `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s IntelligentTieringFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s IntelligentTieringFilter) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *IntelligentTieringFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "IntelligentTieringFilter"}
- if s.And != nil {
- if err := s.And.Validate(); err != nil {
- invalidParams.AddNested("And", err.(request.ErrInvalidParams))
- }
- }
- if s.Tag != nil {
- if err := s.Tag.Validate(); err != nil {
- invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAnd sets the And field's value.
-func (s *IntelligentTieringFilter) SetAnd(v *IntelligentTieringAndOperator) *IntelligentTieringFilter {
- s.And = v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *IntelligentTieringFilter) SetPrefix(v string) *IntelligentTieringFilter {
- s.Prefix = &v
- return s
-}
-
-// SetTag sets the Tag field's value.
-func (s *IntelligentTieringFilter) SetTag(v *Tag) *IntelligentTieringFilter {
- s.Tag = v
- return s
-}
-
-// Specifies the inventory configuration for an Amazon S3 bucket. For more information,
-// see GET Bucket inventory (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETInventoryConfig.html)
-// in the Amazon S3 API Reference.
-type InventoryConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Contains information about where to publish the inventory results.
- //
- // Destination is a required field
- Destination *InventoryDestination `type:"structure" required:"true"`
-
- // Specifies an inventory filter. The inventory only includes objects that meet
- // the filter's criteria.
- Filter *InventoryFilter `type:"structure"`
-
- // The ID used to identify the inventory configuration.
- //
- // Id is a required field
- Id *string `type:"string" required:"true"`
-
- // Object versions to include in the inventory list. If set to All, the list
- // includes all the object versions, which adds the version-related fields VersionId,
- // IsLatest, and DeleteMarker to the list. If set to Current, the list does
- // not contain these version-related fields.
- //
- // IncludedObjectVersions is a required field
- IncludedObjectVersions *string `type:"string" required:"true" enum:"InventoryIncludedObjectVersions"`
-
- // Specifies whether the inventory is enabled or disabled. If set to True, an
- // inventory list is generated. If set to False, no inventory list is generated.
- //
- // IsEnabled is a required field
- IsEnabled *bool `type:"boolean" required:"true"`
-
- // Contains the optional fields that are included in the inventory results.
- OptionalFields []*string `locationNameList:"Field" type:"list" enum:"InventoryOptionalField"`
-
- // Specifies the schedule for generating inventory results.
- //
- // Schedule is a required field
- Schedule *InventorySchedule `type:"structure" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InventoryConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InventoryConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *InventoryConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InventoryConfiguration"}
- if s.Destination == nil {
- invalidParams.Add(request.NewErrParamRequired("Destination"))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.IncludedObjectVersions == nil {
- invalidParams.Add(request.NewErrParamRequired("IncludedObjectVersions"))
- }
- if s.IsEnabled == nil {
- invalidParams.Add(request.NewErrParamRequired("IsEnabled"))
- }
- if s.Schedule == nil {
- invalidParams.Add(request.NewErrParamRequired("Schedule"))
- }
- if s.Destination != nil {
- if err := s.Destination.Validate(); err != nil {
- invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
- }
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
- if s.Schedule != nil {
- if err := s.Schedule.Validate(); err != nil {
- invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDestination sets the Destination field's value.
-func (s *InventoryConfiguration) SetDestination(v *InventoryDestination) *InventoryConfiguration {
- s.Destination = v
- return s
-}
-
-// SetFilter sets the Filter field's value.
-func (s *InventoryConfiguration) SetFilter(v *InventoryFilter) *InventoryConfiguration {
- s.Filter = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *InventoryConfiguration) SetId(v string) *InventoryConfiguration {
- s.Id = &v
- return s
-}
-
-// SetIncludedObjectVersions sets the IncludedObjectVersions field's value.
-func (s *InventoryConfiguration) SetIncludedObjectVersions(v string) *InventoryConfiguration {
- s.IncludedObjectVersions = &v
- return s
-}
-
-// SetIsEnabled sets the IsEnabled field's value.
-func (s *InventoryConfiguration) SetIsEnabled(v bool) *InventoryConfiguration {
- s.IsEnabled = &v
- return s
-}
-
-// SetOptionalFields sets the OptionalFields field's value.
-func (s *InventoryConfiguration) SetOptionalFields(v []*string) *InventoryConfiguration {
- s.OptionalFields = v
- return s
-}
-
-// SetSchedule sets the Schedule field's value.
-func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryConfiguration {
- s.Schedule = v
- return s
-}
-
-// Specifies the inventory configuration for an Amazon S3 bucket.
-type InventoryDestination struct {
- _ struct{} `type:"structure"`
-
- // Contains the bucket name, file format, bucket owner (optional), and prefix
- // (optional) where inventory results are published.
- //
- // S3BucketDestination is a required field
- S3BucketDestination *InventoryS3BucketDestination `type:"structure" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InventoryDestination) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InventoryDestination) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *InventoryDestination) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InventoryDestination"}
- if s.S3BucketDestination == nil {
- invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
- }
- if s.S3BucketDestination != nil {
- if err := s.S3BucketDestination.Validate(); err != nil {
- invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetS3BucketDestination sets the S3BucketDestination field's value.
-func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestination) *InventoryDestination {
- s.S3BucketDestination = v
- return s
-}
-
-// Contains the type of server-side encryption used to encrypt the inventory
-// results.
-type InventoryEncryption struct {
- _ struct{} `type:"structure"`
-
- // 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.
- SSES3 *SSES3 `locationName:"SSE-S3" type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InventoryEncryption) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InventoryEncryption) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *InventoryEncryption) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InventoryEncryption"}
- if s.SSEKMS != nil {
- if err := s.SSEKMS.Validate(); err != nil {
- invalidParams.AddNested("SSEKMS", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetSSEKMS sets the SSEKMS field's value.
-func (s *InventoryEncryption) SetSSEKMS(v *SSEKMS) *InventoryEncryption {
- s.SSEKMS = v
- return s
-}
-
-// SetSSES3 sets the SSES3 field's value.
-func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption {
- s.SSES3 = v
- return s
-}
-
-// Specifies an inventory filter. The inventory only includes objects that meet
-// the filter's criteria.
-type InventoryFilter struct {
- _ struct{} `type:"structure"`
-
- // The prefix that an object must have to be included in the inventory results.
- //
- // Prefix is a required field
- Prefix *string `type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InventoryFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-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.Prefix == nil {
- invalidParams.Add(request.NewErrParamRequired("Prefix"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter {
- s.Prefix = &v
- 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 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
- // be published.
- //
- // Bucket is a required field
- Bucket *string `type:"string" required:"true"`
-
- // Contains the type of server-side encryption used to encrypt the inventory
- // results.
- Encryption *InventoryEncryption `type:"structure"`
-
- // Specifies the output format of the inventory results.
- //
- // Format is a required field
- Format *string `type:"string" required:"true" enum:"InventoryFormat"`
-
- // The prefix that is prepended to all inventory results.
- Prefix *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InventoryS3BucketDestination) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InventoryS3BucketDestination) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *InventoryS3BucketDestination) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InventoryS3BucketDestination"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Format == nil {
- invalidParams.Add(request.NewErrParamRequired("Format"))
- }
- if s.Encryption != nil {
- if err := s.Encryption.Validate(); err != nil {
- invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *InventoryS3BucketDestination) SetAccountId(v string) *InventoryS3BucketDestination {
- s.AccountId = &v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *InventoryS3BucketDestination) SetBucket(v string) *InventoryS3BucketDestination {
- s.Bucket = &v
- return s
-}
-
-func (s *InventoryS3BucketDestination) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetEncryption sets the Encryption field's value.
-func (s *InventoryS3BucketDestination) SetEncryption(v *InventoryEncryption) *InventoryS3BucketDestination {
- s.Encryption = v
- return s
-}
-
-// SetFormat sets the Format field's value.
-func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination {
- s.Format = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDestination {
- s.Prefix = &v
- return s
-}
-
-// Specifies the schedule for generating inventory results.
-type InventorySchedule struct {
- _ struct{} `type:"structure"`
-
- // Specifies how frequently inventory results are produced.
- //
- // Frequency is a required field
- Frequency *string `type:"string" required:"true" enum:"InventoryFrequency"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InventorySchedule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InventorySchedule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *InventorySchedule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InventorySchedule"}
- if s.Frequency == nil {
- invalidParams.Add(request.NewErrParamRequired("Frequency"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetFrequency sets the Frequency field's value.
-func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule {
- s.Frequency = &v
- return s
-}
-
-// Specifies JSON as object's input serialization format.
-type JSONInput struct {
- _ struct{} `type:"structure"`
-
- // The type of JSON. Valid values: Document, Lines.
- Type *string `type:"string" enum:"JSONType"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s JSONInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s JSONInput) GoString() string {
- return s.String()
-}
-
-// SetType sets the Type field's value.
-func (s *JSONInput) SetType(v string) *JSONInput {
- s.Type = &v
- 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. If no value
- // is specified, Amazon S3 uses a newline character ('\n').
- RecordDelimiter *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s JSONOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s JSONOutput) GoString() string {
- return s.String()
-}
-
-// SetRecordDelimiter sets the RecordDelimiter field's value.
-func (s *JSONOutput) SetRecordDelimiter(v string) *JSONOutput {
- s.RecordDelimiter = &v
- return s
-}
-
-// A container for object key name prefix and suffix filtering rules.
-type KeyFilter struct {
- _ struct{} `type:"structure"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s KeyFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s KeyFilter) GoString() string {
- return s.String()
-}
-
-// SetFilterRules sets the FilterRules field's value.
-func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
- s.FilterRules = v
- return s
-}
-
-// A container for specifying the configuration for Lambda notifications.
-type LambdaFunctionConfiguration struct {
- _ struct{} `type:"structure"`
-
- // The Amazon S3 bucket event for which to invoke the Lambda function. For more
- // information, see Supported Event Types (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
- // in the Amazon S3 User Guide.
- //
- // Events is a required field
- Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true" enum:"Event"`
-
- // Specifies object key name filtering rules. For information about key name
- // filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
- // in the Amazon S3 User Guide.
- Filter *NotificationConfigurationFilter `type:"structure"`
-
- // 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 Lambda function that Amazon S3 invokes
- // when the specified event type occurs.
- //
- // LambdaFunctionArn is a required field
- LambdaFunctionArn *string `locationName:"CloudFunction" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LambdaFunctionConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LambdaFunctionConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LambdaFunctionConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"}
- if s.Events == nil {
- invalidParams.Add(request.NewErrParamRequired("Events"))
- }
- if s.LambdaFunctionArn == nil {
- invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEvents sets the Events field's value.
-func (s *LambdaFunctionConfiguration) SetEvents(v []*string) *LambdaFunctionConfiguration {
- s.Events = v
- return s
-}
-
-// SetFilter sets the Filter field's value.
-func (s *LambdaFunctionConfiguration) SetFilter(v *NotificationConfigurationFilter) *LambdaFunctionConfiguration {
- s.Filter = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *LambdaFunctionConfiguration) SetId(v string) *LambdaFunctionConfiguration {
- s.Id = &v
- return s
-}
-
-// SetLambdaFunctionArn sets the LambdaFunctionArn field's value.
-func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunctionConfiguration {
- s.LambdaFunctionArn = &v
- 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LifecycleConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LifecycleConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LifecycleConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"}
- if s.Rules == nil {
- invalidParams.Add(request.NewErrParamRequired("Rules"))
- }
- if s.Rules != nil {
- for i, v := range s.Rules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetRules sets the Rules field's value.
-func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration {
- s.Rules = v
- return s
-}
-
-// Container for the expiration for the lifecycle of the object.
-type LifecycleExpiration struct {
- _ struct{} `type:"structure"`
-
- // Indicates at what date the object is to be moved or deleted. Should be in
- // GMT ISO 8601 Format.
- Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- // Indicates the lifetime, in days, of the objects that are subject to the rule.
- // The value must be a non-zero positive integer.
- Days *int64 `type:"integer"`
-
- // Indicates whether Amazon S3 will remove a delete marker with no noncurrent
- // versions. If set to true, the delete marker will be expired; if set to false
- // the policy takes no action. This cannot be specified with Days or Date in
- // a Lifecycle Expiration Policy.
- ExpiredObjectDeleteMarker *bool `type:"boolean"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LifecycleExpiration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LifecycleExpiration) GoString() string {
- return s.String()
-}
-
-// SetDate sets the Date field's value.
-func (s *LifecycleExpiration) SetDate(v time.Time) *LifecycleExpiration {
- s.Date = &v
- return s
-}
-
-// SetDays sets the Days field's value.
-func (s *LifecycleExpiration) SetDays(v int64) *LifecycleExpiration {
- s.Days = &v
- return s
-}
-
-// SetExpiredObjectDeleteMarker sets the ExpiredObjectDeleteMarker field's value.
-func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration {
- s.ExpiredObjectDeleteMarker = &v
- return s
-}
-
-// A lifecycle rule for individual objects in an Amazon S3 bucket.
-type LifecycleRule struct {
- _ struct{} `type:"structure"`
-
- // Specifies the days since the initiation of an incomplete multipart upload
- // that Amazon S3 will wait before permanently removing all parts of the 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)
- // in the Amazon S3 User 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.
- // A Filter must have exactly one of Prefix, Tag, or And specified. Filter is
- // required if the LifecycleRule does not contain a Prefix element.
- Filter *LifecycleRuleFilter `type:"structure"`
-
- // Unique identifier for the rule. The value cannot be longer than 255 characters.
- ID *string `type:"string"`
-
- // Specifies when noncurrent object versions expire. Upon expiration, Amazon
- // S3 permanently deletes the noncurrent object versions. You set this lifecycle
- // configuration action on a bucket that has versioning enabled (or suspended)
- // to request that Amazon S3 delete noncurrent object versions at a specific
- // 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
- // no longer used; use Filter instead.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- //
- // Deprecated: Prefix has been deprecated
- Prefix *string `deprecated:"true" type:"string"`
-
- // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
- // is not currently being applied.
- //
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LifecycleRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LifecycleRule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LifecycleRule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"}
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
-func (s *LifecycleRule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *LifecycleRule {
- s.AbortIncompleteMultipartUpload = v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule {
- s.Expiration = v
- return s
-}
-
-// SetFilter sets the Filter field's value.
-func (s *LifecycleRule) SetFilter(v *LifecycleRuleFilter) *LifecycleRule {
- s.Filter = v
- return s
-}
-
-// SetID sets the ID field's value.
-func (s *LifecycleRule) SetID(v string) *LifecycleRule {
- s.ID = &v
- return s
-}
-
-// SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
-func (s *LifecycleRule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *LifecycleRule {
- s.NoncurrentVersionExpiration = v
- return s
-}
-
-// SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value.
-func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule {
- s.NoncurrentVersionTransitions = v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *LifecycleRule) SetPrefix(v string) *LifecycleRule {
- s.Prefix = &v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *LifecycleRule) SetStatus(v string) *LifecycleRule {
- s.Status = &v
- return s
-}
-
-// SetTransitions sets the Transitions field's value.
-func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
- s.Transitions = v
- return s
-}
-
-// This is used in a Lifecycle Rule Filter to apply a logical AND to two or
-// more predicates. The Lifecycle Rule will apply to any object matching all
-// of the predicates configured inside the And operator.
-type LifecycleRuleAndOperator struct {
- _ struct{} `type:"structure"`
-
- // Minimum object size to which the rule applies.
- ObjectSizeGreaterThan *int64 `type:"long"`
-
- // Maximum object size to which the rule applies.
- ObjectSizeLessThan *int64 `type:"long"`
-
- // 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
- // to apply.
- Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LifecycleRuleAndOperator) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LifecycleRuleAndOperator) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LifecycleRuleAndOperator) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleAndOperator"}
- 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
-}
-
-// SetObjectSizeGreaterThan sets the ObjectSizeGreaterThan field's value.
-func (s *LifecycleRuleAndOperator) SetObjectSizeGreaterThan(v int64) *LifecycleRuleAndOperator {
- s.ObjectSizeGreaterThan = &v
- return s
-}
-
-// SetObjectSizeLessThan sets the ObjectSizeLessThan field's value.
-func (s *LifecycleRuleAndOperator) SetObjectSizeLessThan(v int64) *LifecycleRuleAndOperator {
- s.ObjectSizeLessThan = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *LifecycleRuleAndOperator) SetPrefix(v string) *LifecycleRuleAndOperator {
- s.Prefix = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *LifecycleRuleAndOperator) SetTags(v []*Tag) *LifecycleRuleAndOperator {
- s.Tags = v
- return s
-}
-
-// The Filter is used to identify objects that a Lifecycle Rule applies to.
-// A Filter must have exactly one of Prefix, Tag, or And specified.
-type LifecycleRuleFilter struct {
- _ struct{} `type:"structure"`
-
- // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
- // more predicates. The Lifecycle Rule will apply to any object matching all
- // of the predicates configured inside the And operator.
- And *LifecycleRuleAndOperator `type:"structure"`
-
- // Minimum object size to which the rule applies.
- ObjectSizeGreaterThan *int64 `type:"long"`
-
- // Maximum object size to which the rule applies.
- ObjectSizeLessThan *int64 `type:"long"`
-
- // Prefix identifying one or more objects to which the rule applies.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- Prefix *string `type:"string"`
-
- // This tag must exist in the object's tag set in order for the rule to apply.
- Tag *Tag `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LifecycleRuleFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LifecycleRuleFilter) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LifecycleRuleFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleFilter"}
- if s.And != nil {
- if err := s.And.Validate(); err != nil {
- invalidParams.AddNested("And", err.(request.ErrInvalidParams))
- }
- }
- if s.Tag != nil {
- if err := s.Tag.Validate(); err != nil {
- invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAnd sets the And field's value.
-func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRuleFilter {
- s.And = v
- return s
-}
-
-// SetObjectSizeGreaterThan sets the ObjectSizeGreaterThan field's value.
-func (s *LifecycleRuleFilter) SetObjectSizeGreaterThan(v int64) *LifecycleRuleFilter {
- s.ObjectSizeGreaterThan = &v
- return s
-}
-
-// SetObjectSizeLessThan sets the ObjectSizeLessThan field's value.
-func (s *LifecycleRuleFilter) SetObjectSizeLessThan(v int64) *LifecycleRuleFilter {
- s.ObjectSizeLessThan = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter {
- s.Prefix = &v
- return s
-}
-
-// SetTag sets the Tag field's value.
-func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter {
- s.Tag = v
- return s
-}
-
-type ListBucketAnalyticsConfigurationsInput struct {
- _ struct{} `locationName:"ListBucketAnalyticsConfigurationsRequest" type:"structure"`
-
- // The name of the bucket from which analytics configurations are retrieved.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The ContinuationToken that represents a placeholder from where this request
- // should begin.
- ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketAnalyticsConfigurationsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketAnalyticsConfigurationsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListBucketAnalyticsConfigurationsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBucketAnalyticsConfigurationsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucketAnalyticsConfigurationsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListBucketAnalyticsConfigurationsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsInput {
- s.ContinuationToken = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListBucketAnalyticsConfigurationsInput) SetExpectedBucketOwner(v string) *ListBucketAnalyticsConfigurationsInput {
- s.ExpectedBucketOwner = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListBucketAnalyticsConfigurationsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListBucketAnalyticsConfigurationsOutput struct {
- _ struct{} `type:"structure"`
-
- // The list of analytics configurations for a bucket.
- AnalyticsConfigurationList []*AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"list" flattened:"true"`
-
- // 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.
- // A value of true indicates that the list is not complete and the NextContinuationToken
- // will be provided for a subsequent request.
- IsTruncated *bool `type:"boolean"`
-
- // NextContinuationToken is sent when isTruncated is true, which indicates that
- // there are more analytics configurations to list. The next request must include
- // this NextContinuationToken. The token is obfuscated and is not a usable value.
- NextContinuationToken *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketAnalyticsConfigurationsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketAnalyticsConfigurationsOutput) GoString() string {
- return s.String()
-}
-
-// SetAnalyticsConfigurationList sets the AnalyticsConfigurationList field's value.
-func (s *ListBucketAnalyticsConfigurationsOutput) SetAnalyticsConfigurationList(v []*AnalyticsConfiguration) *ListBucketAnalyticsConfigurationsOutput {
- s.AnalyticsConfigurationList = v
- return s
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketAnalyticsConfigurationsOutput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
- s.ContinuationToken = &v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListBucketAnalyticsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketAnalyticsConfigurationsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetNextContinuationToken sets the NextContinuationToken field's value.
-func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
- s.NextContinuationToken = &v
- return s
-}
-
-type ListBucketIntelligentTieringConfigurationsInput struct {
- _ struct{} `locationName:"ListBucketIntelligentTieringConfigurationsRequest" type:"structure"`
-
- // The name of the Amazon S3 bucket whose configuration you want to modify or
- // retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The ContinuationToken that represents a placeholder from where this request
- // should begin.
- ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketIntelligentTieringConfigurationsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketIntelligentTieringConfigurationsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListBucketIntelligentTieringConfigurationsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBucketIntelligentTieringConfigurationsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListBucketIntelligentTieringConfigurationsInput) SetBucket(v string) *ListBucketIntelligentTieringConfigurationsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListBucketIntelligentTieringConfigurationsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketIntelligentTieringConfigurationsInput) SetContinuationToken(v string) *ListBucketIntelligentTieringConfigurationsInput {
- s.ContinuationToken = &v
- return s
-}
-
-func (s *ListBucketIntelligentTieringConfigurationsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *ListBucketIntelligentTieringConfigurationsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListBucketIntelligentTieringConfigurationsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListBucketIntelligentTieringConfigurationsOutput struct {
- _ struct{} `type:"structure"`
-
- // The ContinuationToken that represents a placeholder from where this request
- // should begin.
- ContinuationToken *string `type:"string"`
-
- // The list of S3 Intelligent-Tiering configurations for a bucket.
- IntelligentTieringConfigurationList []*IntelligentTieringConfiguration `locationName:"IntelligentTieringConfiguration" type:"list" flattened:"true"`
-
- // Indicates whether the returned list of analytics configurations is complete.
- // A value of true indicates that the list is not complete and the NextContinuationToken
- // will be provided for a subsequent request.
- IsTruncated *bool `type:"boolean"`
-
- // The marker used to continue this inventory configuration listing. Use the
- // NextContinuationToken from this response to continue the listing in a subsequent
- // request. The continuation token is an opaque value that Amazon S3 understands.
- NextContinuationToken *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketIntelligentTieringConfigurationsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketIntelligentTieringConfigurationsOutput) GoString() string {
- return s.String()
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketIntelligentTieringConfigurationsOutput) SetContinuationToken(v string) *ListBucketIntelligentTieringConfigurationsOutput {
- s.ContinuationToken = &v
- return s
-}
-
-// SetIntelligentTieringConfigurationList sets the IntelligentTieringConfigurationList field's value.
-func (s *ListBucketIntelligentTieringConfigurationsOutput) SetIntelligentTieringConfigurationList(v []*IntelligentTieringConfiguration) *ListBucketIntelligentTieringConfigurationsOutput {
- s.IntelligentTieringConfigurationList = v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListBucketIntelligentTieringConfigurationsOutput) SetIsTruncated(v bool) *ListBucketIntelligentTieringConfigurationsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetNextContinuationToken sets the NextContinuationToken field's value.
-func (s *ListBucketIntelligentTieringConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketIntelligentTieringConfigurationsOutput {
- s.NextContinuationToken = &v
- return s
-}
-
-type ListBucketInventoryConfigurationsInput struct {
- _ struct{} `locationName:"ListBucketInventoryConfigurationsRequest" type:"structure"`
-
- // The name of the bucket containing the inventory configurations to retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The marker used to continue an inventory configuration listing that has been
- // truncated. Use the NextContinuationToken from a previously truncated list
- // response to continue the listing. The continuation token is an opaque value
- // that Amazon S3 understands.
- ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketInventoryConfigurationsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketInventoryConfigurationsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListBucketInventoryConfigurationsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBucketInventoryConfigurationsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListBucketInventoryConfigurationsInput) SetBucket(v string) *ListBucketInventoryConfigurationsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListBucketInventoryConfigurationsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsInput {
- s.ContinuationToken = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListBucketInventoryConfigurationsInput) SetExpectedBucketOwner(v string) *ListBucketInventoryConfigurationsInput {
- s.ExpectedBucketOwner = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListBucketInventoryConfigurationsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListBucketInventoryConfigurationsOutput struct {
- _ struct{} `type:"structure"`
-
- // If sent in the request, the marker that is used as a starting point for this
- // inventory configuration list response.
- ContinuationToken *string `type:"string"`
-
- // The list of inventory configurations for a bucket.
- InventoryConfigurationList []*InventoryConfiguration `locationName:"InventoryConfiguration" type:"list" flattened:"true"`
-
- // 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
- // NextContinuationToken from this response to continue the listing in a subsequent
- // request. The continuation token is an opaque value that Amazon S3 understands.
- NextContinuationToken *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketInventoryConfigurationsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketInventoryConfigurationsOutput) GoString() string {
- return s.String()
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketInventoryConfigurationsOutput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
- s.ContinuationToken = &v
- return s
-}
-
-// SetInventoryConfigurationList sets the InventoryConfigurationList field's value.
-func (s *ListBucketInventoryConfigurationsOutput) SetInventoryConfigurationList(v []*InventoryConfiguration) *ListBucketInventoryConfigurationsOutput {
- s.InventoryConfigurationList = v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListBucketInventoryConfigurationsOutput) SetIsTruncated(v bool) *ListBucketInventoryConfigurationsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetNextContinuationToken sets the NextContinuationToken field's value.
-func (s *ListBucketInventoryConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
- s.NextContinuationToken = &v
- return s
-}
-
-type ListBucketMetricsConfigurationsInput struct {
- _ struct{} `locationName:"ListBucketMetricsConfigurationsRequest" type:"structure"`
-
- // The name of the bucket containing the metrics configurations to retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The marker that is used to continue a metrics configuration listing that
- // has been truncated. Use the NextContinuationToken from a previously truncated
- // list response to continue the listing. The continuation token is an opaque
- // value that Amazon S3 understands.
- ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketMetricsConfigurationsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketMetricsConfigurationsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListBucketMetricsConfigurationsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBucketMetricsConfigurationsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListBucketMetricsConfigurationsInput) SetBucket(v string) *ListBucketMetricsConfigurationsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListBucketMetricsConfigurationsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsInput {
- s.ContinuationToken = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListBucketMetricsConfigurationsInput) SetExpectedBucketOwner(v string) *ListBucketMetricsConfigurationsInput {
- s.ExpectedBucketOwner = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListBucketMetricsConfigurationsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListBucketMetricsConfigurationsOutput struct {
- _ struct{} `type:"structure"`
-
- // The marker that is used as a starting point for this metrics configuration
- // list response. This value is present if it was sent in the request.
- ContinuationToken *string `type:"string"`
-
- // Indicates whether the returned list of metrics configurations is complete.
- // A value of true indicates that the list is not complete and the NextContinuationToken
- // will be provided for a subsequent request.
- IsTruncated *bool `type:"boolean"`
-
- // The list of metrics configurations for a bucket.
- MetricsConfigurationList []*MetricsConfiguration `locationName:"MetricsConfiguration" type:"list" flattened:"true"`
-
- // The marker used to continue a metrics configuration listing that has been
- // truncated. Use the NextContinuationToken from a previously truncated list
- // response to continue the listing. The continuation token is an opaque value
- // that Amazon S3 understands.
- NextContinuationToken *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketMetricsConfigurationsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketMetricsConfigurationsOutput) GoString() string {
- return s.String()
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketMetricsConfigurationsOutput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
- s.ContinuationToken = &v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListBucketMetricsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketMetricsConfigurationsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetMetricsConfigurationList sets the MetricsConfigurationList field's value.
-func (s *ListBucketMetricsConfigurationsOutput) SetMetricsConfigurationList(v []*MetricsConfiguration) *ListBucketMetricsConfigurationsOutput {
- s.MetricsConfigurationList = v
- return s
-}
-
-// SetNextContinuationToken sets the NextContinuationToken field's value.
-func (s *ListBucketMetricsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
- s.NextContinuationToken = &v
- return s
-}
-
-type ListBucketsInput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketsInput) GoString() string {
- return s.String()
-}
-
-type ListBucketsOutput struct {
- _ struct{} `type:"structure"`
-
- // The list of buckets owned by the requester.
- Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
-
- // The owner of the buckets listed.
- Owner *Owner `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListBucketsOutput) GoString() string {
- return s.String()
-}
-
-// SetBuckets sets the Buckets field's value.
-func (s *ListBucketsOutput) SetBuckets(v []*Bucket) *ListBucketsOutput {
- s.Buckets = v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput {
- s.Owner = v
- return s
-}
-
-type ListMultipartUploadsInput struct {
- _ struct{} `locationName:"ListMultipartUploadsRequest" type:"structure"`
-
- // The name of the bucket to which the multipart upload was initiated.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User 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
- // the encoding method to use. An object key may contain any Unicode character;
- // however, XML 1.0 parser cannot parse some characters, such as characters
- // with an ASCII value from 0 to 10. For characters that are not supported in
- // XML 1.0, you can add this parameter to request that Amazon S3 encode the
- // keys in the response.
- EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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
- // in the response body. 1,000 is the maximum number of uploads that can be
- // returned in a response.
- MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`
-
- // Lists in-progress uploads only for those keys that begin with the specified
- // 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. 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListMultipartUploadsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListMultipartUploadsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListMultipartUploadsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListMultipartUploadsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListMultipartUploadsInput) SetEncodingType(v string) *ListMultipartUploadsInput {
- s.EncodingType = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListMultipartUploadsInput) SetExpectedBucketOwner(v string) *ListMultipartUploadsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKeyMarker sets the KeyMarker field's value.
-func (s *ListMultipartUploadsInput) SetKeyMarker(v string) *ListMultipartUploadsInput {
- s.KeyMarker = &v
- return s
-}
-
-// SetMaxUploads sets the MaxUploads field's value.
-func (s *ListMultipartUploadsInput) SetMaxUploads(v int64) *ListMultipartUploadsInput {
- s.MaxUploads = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListMultipartUploadsInput) SetPrefix(v string) *ListMultipartUploadsInput {
- s.Prefix = &v
- return s
-}
-
-// SetUploadIdMarker sets the UploadIdMarker field's value.
-func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUploadsInput {
- s.UploadIdMarker = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListMultipartUploadsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListMultipartUploadsOutput struct {
- _ struct{} `type:"structure"`
-
- // The name of the bucket to which the multipart upload was initiated. Does
- // not return the access point ARN or access point alias if used.
- 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
- // value of true indicates that the list was truncated. The list can be truncated
- // if the number of multipart uploads exceeds the limit allowed or specified
- // by max uploads.
- IsTruncated *bool `type:"boolean"`
-
- // The key at or after which the listing began.
- KeyMarker *string `type:"string"`
-
- // Maximum number of multipart uploads that could have been included in the
- // response.
- MaxUploads *int64 `type:"integer"`
-
- // When a list is truncated, this element specifies the value that should be
- // used for the key-marker request parameter in a subsequent request.
- NextKeyMarker *string `type:"string"`
-
- // When a list is truncated, this element specifies the value that should be
- // used for the upload-id-marker request parameter in a subsequent request.
- NextUploadIdMarker *string `type:"string"`
-
- // When a prefix is provided in the request, this field contains the specified
- // prefix. The result contains only keys starting with the specified prefix.
- Prefix *string `type:"string"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListMultipartUploadsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListMultipartUploadsOutput) GoString() string {
- return s.String()
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOutput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListMultipartUploadsOutput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetCommonPrefixes sets the CommonPrefixes field's value.
-func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput {
- s.CommonPrefixes = v
- return s
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListMultipartUploadsOutput) SetDelimiter(v string) *ListMultipartUploadsOutput {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListMultipartUploadsOutput) SetEncodingType(v string) *ListMultipartUploadsOutput {
- s.EncodingType = &v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListMultipartUploadsOutput) SetIsTruncated(v bool) *ListMultipartUploadsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetKeyMarker sets the KeyMarker field's value.
-func (s *ListMultipartUploadsOutput) SetKeyMarker(v string) *ListMultipartUploadsOutput {
- s.KeyMarker = &v
- return s
-}
-
-// SetMaxUploads sets the MaxUploads field's value.
-func (s *ListMultipartUploadsOutput) SetMaxUploads(v int64) *ListMultipartUploadsOutput {
- s.MaxUploads = &v
- return s
-}
-
-// SetNextKeyMarker sets the NextKeyMarker field's value.
-func (s *ListMultipartUploadsOutput) SetNextKeyMarker(v string) *ListMultipartUploadsOutput {
- s.NextKeyMarker = &v
- return s
-}
-
-// SetNextUploadIdMarker sets the NextUploadIdMarker field's value.
-func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput {
- s.NextUploadIdMarker = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListMultipartUploadsOutput) SetPrefix(v string) *ListMultipartUploadsOutput {
- s.Prefix = &v
- return s
-}
-
-// SetUploadIdMarker sets the UploadIdMarker field's value.
-func (s *ListMultipartUploadsOutput) SetUploadIdMarker(v string) *ListMultipartUploadsOutput {
- s.UploadIdMarker = &v
- return s
-}
-
-// SetUploads sets the Uploads field's value.
-func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMultipartUploadsOutput {
- s.Uploads = v
- return s
-}
-
-type ListObjectVersionsInput struct {
- _ struct{} `locationName:"ListObjectVersionsRequest" type:"structure"`
-
- // The bucket name that contains the objects.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // 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
- // the encoding method to use. An object key may contain any Unicode character;
- // however, XML 1.0 parser cannot parse some characters, such as characters
- // with an ASCII value from 0 to 10. For characters that are not supported in
- // XML 1.0, you can add this parameter to request that Amazon S3 encode the
- // keys in the response.
- EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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. By default the
- // action 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"`
-
- // 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.
- VersionIdMarker *string `location:"querystring" locationName:"version-id-marker" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListObjectVersionsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListObjectVersionsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListObjectVersionsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListObjectVersionsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListObjectVersionsInput) SetEncodingType(v string) *ListObjectVersionsInput {
- s.EncodingType = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListObjectVersionsInput) SetExpectedBucketOwner(v string) *ListObjectVersionsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKeyMarker sets the KeyMarker field's value.
-func (s *ListObjectVersionsInput) SetKeyMarker(v string) *ListObjectVersionsInput {
- s.KeyMarker = &v
- return s
-}
-
-// SetMaxKeys sets the MaxKeys field's value.
-func (s *ListObjectVersionsInput) SetMaxKeys(v int64) *ListObjectVersionsInput {
- s.MaxKeys = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput {
- s.Prefix = &v
- return s
-}
-
-// SetVersionIdMarker sets the VersionIdMarker field's value.
-func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersionsInput {
- s.VersionIdMarker = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListObjectVersionsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-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 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 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.
- KeyMarker *string `type:"string"`
-
- // Specifies the maximum number of objects to return.
- MaxKeys *int64 `type:"integer"`
-
- // The bucket name.
- Name *string `type:"string"`
-
- // 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"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListObjectVersionsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListObjectVersionsOutput) GoString() string {
- return s.String()
-}
-
-// SetCommonPrefixes sets the CommonPrefixes field's value.
-func (s *ListObjectVersionsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectVersionsOutput {
- s.CommonPrefixes = v
- return s
-}
-
-// SetDeleteMarkers sets the DeleteMarkers field's value.
-func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput {
- s.DeleteMarkers = v
- return s
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListObjectVersionsOutput) SetDelimiter(v string) *ListObjectVersionsOutput {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListObjectVersionsOutput) SetEncodingType(v string) *ListObjectVersionsOutput {
- s.EncodingType = &v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListObjectVersionsOutput) SetIsTruncated(v bool) *ListObjectVersionsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetKeyMarker sets the KeyMarker field's value.
-func (s *ListObjectVersionsOutput) SetKeyMarker(v string) *ListObjectVersionsOutput {
- s.KeyMarker = &v
- return s
-}
-
-// SetMaxKeys sets the MaxKeys field's value.
-func (s *ListObjectVersionsOutput) SetMaxKeys(v int64) *ListObjectVersionsOutput {
- s.MaxKeys = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *ListObjectVersionsOutput) SetName(v string) *ListObjectVersionsOutput {
- s.Name = &v
- return s
-}
-
-// SetNextKeyMarker sets the NextKeyMarker field's value.
-func (s *ListObjectVersionsOutput) SetNextKeyMarker(v string) *ListObjectVersionsOutput {
- s.NextKeyMarker = &v
- return s
-}
-
-// SetNextVersionIdMarker sets the NextVersionIdMarker field's value.
-func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput {
- s.NextVersionIdMarker = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListObjectVersionsOutput) SetPrefix(v string) *ListObjectVersionsOutput {
- s.Prefix = &v
- return s
-}
-
-// SetVersionIdMarker sets the VersionIdMarker field's value.
-func (s *ListObjectVersionsOutput) SetVersionIdMarker(v string) *ListObjectVersionsOutput {
- s.VersionIdMarker = &v
- return s
-}
-
-// SetVersions sets the Versions field's value.
-func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVersionsOutput {
- s.Versions = v
- return s
-}
-
-type ListObjectsInput struct {
- _ struct{} `locationName:"ListObjectsRequest" type:"structure"`
-
- // The name of the bucket containing the objects.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User 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.
- Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
-
- // Requests Amazon S3 to encode the object keys in the response and specifies
- // the encoding method to use. An object key may contain any Unicode character;
- // however, XML 1.0 parser cannot parse some characters, such as characters
- // with an ASCII value from 0 to 10. For characters that are not supported in
- // XML 1.0, you can add this parameter to request that Amazon S3 encode the
- // keys in the response.
- EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Marker is where you want Amazon S3 to start listing from. Amazon S3 starts
- // listing after this specified key. Marker can be any key in the bucket.
- Marker *string `location:"querystring" locationName:"marker" type:"string"`
-
- // Sets the maximum number of keys returned in the response. By default the
- // action 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.
- Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
-
- // Confirms that the requester knows that she or he will be charged for the
- // list objects request. Bucket owners need not specify this parameter in their
- // requests.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListObjectsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListObjectsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListObjectsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListObjectsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListObjectsInput) SetEncodingType(v string) *ListObjectsInput {
- s.EncodingType = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListObjectsInput) SetExpectedBucketOwner(v string) *ListObjectsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetMarker sets the Marker field's value.
-func (s *ListObjectsInput) SetMarker(v string) *ListObjectsInput {
- s.Marker = &v
- return s
-}
-
-// SetMaxKeys sets the MaxKeys field's value.
-func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput {
- s.MaxKeys = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput {
- s.Prefix = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput {
- s.RequestPayer = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListObjectsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListObjectsOutput struct {
- _ struct{} `type:"structure"`
-
- // All of the keys (up to 1,000) 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 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"`
-
- // The bucket name.
- Name *string `type:"string"`
-
- // When response is truncated (the IsTruncated element value in the response
- // is true), you can use the key name in this field as marker in the subsequent
- // request to get next set of objects. Amazon S3 lists objects in alphabetical
- // order Note: This element is returned only if you have delimiter request parameter
- // specified. If response does not include the NextMarker and it is truncated,
- // you can use the value of the last Key in the response as the marker in the
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListObjectsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListObjectsOutput) GoString() string {
- return s.String()
-}
-
-// SetCommonPrefixes sets the CommonPrefixes field's value.
-func (s *ListObjectsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsOutput {
- s.CommonPrefixes = v
- return s
-}
-
-// SetContents sets the Contents field's value.
-func (s *ListObjectsOutput) SetContents(v []*Object) *ListObjectsOutput {
- s.Contents = v
- return s
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListObjectsOutput) SetEncodingType(v string) *ListObjectsOutput {
- s.EncodingType = &v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListObjectsOutput) SetIsTruncated(v bool) *ListObjectsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetMarker sets the Marker field's value.
-func (s *ListObjectsOutput) SetMarker(v string) *ListObjectsOutput {
- s.Marker = &v
- return s
-}
-
-// SetMaxKeys sets the MaxKeys field's value.
-func (s *ListObjectsOutput) SetMaxKeys(v int64) *ListObjectsOutput {
- s.MaxKeys = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *ListObjectsOutput) SetName(v string) *ListObjectsOutput {
- s.Name = &v
- return s
-}
-
-// SetNextMarker sets the NextMarker field's value.
-func (s *ListObjectsOutput) SetNextMarker(v string) *ListObjectsOutput {
- s.NextMarker = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput {
- s.Prefix = &v
- return s
-}
-
-type ListObjectsV2Input struct {
- _ struct{} `locationName:"ListObjectsV2Request" type:"structure"`
-
- // Bucket name to list.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User 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.
- ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
-
- // A delimiter is a character you use to group keys.
- Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
-
- // Encoding type used by Amazon S3 to encode object keys in the response.
- EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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.
- FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"`
-
- // Sets the maximum number of keys returned in the response. By default the
- // action 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.
- Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
-
- // Confirms that the requester knows that she or he will be charged for the
- // list objects request in V2 style. Bucket owners need not specify this parameter
- // in their requests.
- 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.
- StartAfter *string `location:"querystring" locationName:"start-after" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListObjectsV2Input) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListObjectsV2Input) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListObjectsV2Input) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListObjectsV2Input"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input {
- s.Bucket = &v
- return s
-}
-
-func (s *ListObjectsV2Input) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input {
- s.ContinuationToken = &v
- return s
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListObjectsV2Input) SetDelimiter(v string) *ListObjectsV2Input {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListObjectsV2Input) SetEncodingType(v string) *ListObjectsV2Input {
- s.EncodingType = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListObjectsV2Input) SetExpectedBucketOwner(v string) *ListObjectsV2Input {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetFetchOwner sets the FetchOwner field's value.
-func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input {
- s.FetchOwner = &v
- return s
-}
-
-// SetMaxKeys sets the MaxKeys field's value.
-func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input {
- s.MaxKeys = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input {
- s.Prefix = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *ListObjectsV2Input) SetRequestPayer(v string) *ListObjectsV2Input {
- s.RequestPayer = &v
- return s
-}
-
-// SetStartAfter sets the StartAfter field's value.
-func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input {
- s.StartAfter = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListObjectsV2Input) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListObjectsV2Output struct {
- _ struct{} `type:"structure"`
-
- // All of the keys (up to 1,000) 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 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"`
-
- // If ContinuationToken was sent with the request, it is included in the response.
- ContinuationToken *string `type:"string"`
-
- // 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 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"`
-
- // 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
- // always be less than or equals to MaxKeys field. Say you ask for 50 keys,
- // your result will include less than equals 50 keys
- KeyCount *int64 `type:"integer"`
-
- // Sets the maximum number of keys returned in the response. By default the
- // action returns up to 1,000 key names. The response might contain fewer keys
- // but will never contain more.
- MaxKeys *int64 `type:"integer"`
-
- // The bucket name.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- Name *string `type:"string"`
-
- // 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"`
-
- // Keys that begin with the indicated prefix.
- Prefix *string `type:"string"`
-
- // If StartAfter was sent with the request, it is included in the response.
- StartAfter *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListObjectsV2Output) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListObjectsV2Output) GoString() string {
- return s.String()
-}
-
-// SetCommonPrefixes sets the CommonPrefixes field's value.
-func (s *ListObjectsV2Output) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsV2Output {
- s.CommonPrefixes = v
- return s
-}
-
-// SetContents sets the Contents field's value.
-func (s *ListObjectsV2Output) SetContents(v []*Object) *ListObjectsV2Output {
- s.Contents = v
- return s
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListObjectsV2Output) SetContinuationToken(v string) *ListObjectsV2Output {
- s.ContinuationToken = &v
- return s
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListObjectsV2Output) SetDelimiter(v string) *ListObjectsV2Output {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListObjectsV2Output) SetEncodingType(v string) *ListObjectsV2Output {
- s.EncodingType = &v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListObjectsV2Output) SetIsTruncated(v bool) *ListObjectsV2Output {
- s.IsTruncated = &v
- return s
-}
-
-// SetKeyCount sets the KeyCount field's value.
-func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output {
- s.KeyCount = &v
- return s
-}
-
-// SetMaxKeys sets the MaxKeys field's value.
-func (s *ListObjectsV2Output) SetMaxKeys(v int64) *ListObjectsV2Output {
- s.MaxKeys = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *ListObjectsV2Output) SetName(v string) *ListObjectsV2Output {
- s.Name = &v
- return s
-}
-
-// SetNextContinuationToken sets the NextContinuationToken field's value.
-func (s *ListObjectsV2Output) SetNextContinuationToken(v string) *ListObjectsV2Output {
- s.NextContinuationToken = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListObjectsV2Output) SetPrefix(v string) *ListObjectsV2Output {
- s.Prefix = &v
- return s
-}
-
-// SetStartAfter sets the StartAfter field's value.
-func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output {
- s.StartAfter = &v
- return s
-}
-
-type ListPartsInput struct {
- _ struct{} `locationName:"ListPartsRequest" type:"structure"`
-
- // The name of the bucket to which the parts are being uploaded.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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"`
-
- // Sets the maximum number of parts to return.
- MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"`
-
- // Specifies the part after which listing should begin. Only parts with higher
- // part numbers will be listed.
- PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // The server-side encryption (SSE) algorithm used to encrypt the object. This
- // parameter is needed only when the object was created using a checksum algorithm.
- // For more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
- // in the Amazon S3 User Guide.
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // The server-side encryption (SSE) customer managed key. This parameter is
- // needed only when the object was created using a checksum algorithm. For more
- // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
- // in the Amazon S3 User Guide.
- //
- // SSECustomerKey is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by ListPartsInput's
- // String and GoString methods.
- SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
-
- // The MD5 server-side encryption (SSE) customer managed key. This parameter
- // is needed only when the object was created using a checksum algorithm. For
- // more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
- // in the Amazon S3 User Guide.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // Upload ID identifying the multipart upload whose parts are being listed.
- //
- // UploadId is a required field
- UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListPartsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListPartsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListPartsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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.UploadId == nil {
- invalidParams.Add(request.NewErrParamRequired("UploadId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListPartsInput) SetBucket(v string) *ListPartsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListPartsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListPartsInput) SetExpectedBucketOwner(v string) *ListPartsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *ListPartsInput) SetKey(v string) *ListPartsInput {
- s.Key = &v
- return s
-}
-
-// SetMaxParts sets the MaxParts field's value.
-func (s *ListPartsInput) SetMaxParts(v int64) *ListPartsInput {
- s.MaxParts = &v
- return s
-}
-
-// SetPartNumberMarker sets the PartNumberMarker field's value.
-func (s *ListPartsInput) SetPartNumberMarker(v int64) *ListPartsInput {
- s.PartNumberMarker = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *ListPartsInput) SetRequestPayer(v string) *ListPartsInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *ListPartsInput) SetSSECustomerAlgorithm(v string) *ListPartsInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *ListPartsInput) SetSSECustomerKey(v string) *ListPartsInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *ListPartsInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *ListPartsInput) SetSSECustomerKeyMD5(v string) *ListPartsInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput {
- s.UploadId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListPartsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListPartsOutput struct {
- _ struct{} `type:"structure"`
-
- // 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"`
-
- // 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"`
-
- // The name of the bucket to which the multipart upload was initiated. Does
- // not return the access point ARN or access point alias if used.
- Bucket *string `type:"string"`
-
- // The algorithm that was used to create a checksum of the object.
- ChecksumAlgorithm *string `type:"string" enum:"ChecksumAlgorithm"`
-
- // Container element that identifies who initiated the multipart upload. If
- // the initiator is an Amazon Web Services 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. 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.
- Key *string `min:"1" type:"string"`
-
- // Maximum number of parts that were allowed in the response.
- MaxParts *int64 `type:"integer"`
-
- // 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.
- 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"`
-
- // 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"`
-
- // 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.
- UploadId *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListPartsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListPartsOutput) GoString() string {
- return s.String()
-}
-
-// SetAbortDate sets the AbortDate field's value.
-func (s *ListPartsOutput) SetAbortDate(v time.Time) *ListPartsOutput {
- s.AbortDate = &v
- return s
-}
-
-// SetAbortRuleId sets the AbortRuleId field's value.
-func (s *ListPartsOutput) SetAbortRuleId(v string) *ListPartsOutput {
- s.AbortRuleId = &v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListPartsOutput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *ListPartsOutput) SetChecksumAlgorithm(v string) *ListPartsOutput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetInitiator sets the Initiator field's value.
-func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput {
- s.Initiator = v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListPartsOutput) SetIsTruncated(v bool) *ListPartsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *ListPartsOutput) SetKey(v string) *ListPartsOutput {
- s.Key = &v
- return s
-}
-
-// SetMaxParts sets the MaxParts field's value.
-func (s *ListPartsOutput) SetMaxParts(v int64) *ListPartsOutput {
- s.MaxParts = &v
- return s
-}
-
-// SetNextPartNumberMarker sets the NextPartNumberMarker field's value.
-func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput {
- s.NextPartNumberMarker = &v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *ListPartsOutput) SetOwner(v *Owner) *ListPartsOutput {
- s.Owner = v
- return s
-}
-
-// SetPartNumberMarker sets the PartNumberMarker field's value.
-func (s *ListPartsOutput) SetPartNumberMarker(v int64) *ListPartsOutput {
- s.PartNumberMarker = &v
- return s
-}
-
-// SetParts sets the Parts field's value.
-func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput {
- s.Parts = v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *ListPartsOutput) SetRequestCharged(v string) *ListPartsOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput {
- s.StorageClass = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput {
- s.UploadId = &v
- return s
-}
-
-// Describes an Amazon S3 location that will receive the results of the restore
-// request.
-type Location struct {
- _ struct{} `type:"structure"`
-
- // A list of grants that control access to the staged results.
- AccessControlList []*Grant `locationNameList:"Grant" type:"list"`
-
- // The name of the bucket where the restore results will be placed.
- //
- // BucketName is a required field
- BucketName *string `type:"string" required:"true"`
-
- // The canned ACL to apply to the restore results.
- CannedACL *string `type:"string" enum:"ObjectCannedACL"`
-
- // Contains the type of server-side encryption used.
- Encryption *Encryption `type:"structure"`
-
- // The prefix that is prepended to the restore results for this request.
- //
- // Prefix is a required field
- Prefix *string `type:"string" required:"true"`
-
- // The class of storage used to store the restore results.
- StorageClass *string `type:"string" enum:"StorageClass"`
-
- // The tag-set that is applied to the restore results.
- Tagging *Tagging `type:"structure"`
-
- // A list of metadata to store with the restore results in S3.
- UserMetadata []*MetadataEntry `locationNameList:"MetadataEntry" type:"list"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Location) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Location) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Location) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Location"}
- if s.BucketName == nil {
- invalidParams.Add(request.NewErrParamRequired("BucketName"))
- }
- if s.Prefix == nil {
- invalidParams.Add(request.NewErrParamRequired("Prefix"))
- }
- if s.AccessControlList != nil {
- for i, v := range s.AccessControlList {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccessControlList", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.Encryption != nil {
- if err := s.Encryption.Validate(); err != nil {
- invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
- }
- }
- if s.Tagging != nil {
- if err := s.Tagging.Validate(); err != nil {
- invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessControlList sets the AccessControlList field's value.
-func (s *Location) SetAccessControlList(v []*Grant) *Location {
- s.AccessControlList = v
- return s
-}
-
-// SetBucketName sets the BucketName field's value.
-func (s *Location) SetBucketName(v string) *Location {
- s.BucketName = &v
- return s
-}
-
-// SetCannedACL sets the CannedACL field's value.
-func (s *Location) SetCannedACL(v string) *Location {
- s.CannedACL = &v
- return s
-}
-
-// SetEncryption sets the Encryption field's value.
-func (s *Location) SetEncryption(v *Encryption) *Location {
- s.Encryption = v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *Location) SetPrefix(v string) *Location {
- s.Prefix = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *Location) SetStorageClass(v string) *Location {
- s.StorageClass = &v
- return s
-}
-
-// SetTagging sets the Tagging field's value.
-func (s *Location) SetTagging(v *Tagging) *Location {
- s.Tagging = v
- return s
-}
-
-// SetUserMetadata sets the UserMetadata field's value.
-func (s *Location) SetUserMetadata(v []*MetadataEntry) *Location {
- s.UserMetadata = v
- return s
-}
-
-// Describes where logs are stored and the prefix that Amazon S3 assigns to
-// all log object keys for a bucket. For more information, see PUT Bucket logging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html)
-// in the Amazon S3 API Reference.
-type LoggingEnabled struct {
- _ struct{} `type:"structure"`
-
- // 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
- // 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.
- //
- // Buckets that use the bucket owner enforced setting for Object Ownership don't
- // support target grants. For more information, see Permissions for server access
- // log delivery (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general)
- // in the Amazon S3 User Guide.
- TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
-
- // A prefix for all log object keys. If you store log files from multiple Amazon
- // S3 buckets in a single bucket, you can use a prefix to distinguish which
- // log files came from which bucket.
- //
- // TargetPrefix is a required field
- TargetPrefix *string `type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LoggingEnabled) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LoggingEnabled) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LoggingEnabled) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"}
- if s.TargetBucket == nil {
- invalidParams.Add(request.NewErrParamRequired("TargetBucket"))
- }
- if s.TargetPrefix == nil {
- invalidParams.Add(request.NewErrParamRequired("TargetPrefix"))
- }
- if s.TargetGrants != nil {
- for i, v := range s.TargetGrants {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetTargetBucket sets the TargetBucket field's value.
-func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled {
- s.TargetBucket = &v
- return s
-}
-
-// SetTargetGrants sets the TargetGrants field's value.
-func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled {
- s.TargetGrants = v
- return s
-}
-
-// SetTargetPrefix sets the TargetPrefix field's value.
-func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
- s.TargetPrefix = &v
- return s
-}
-
-// A metadata key-value pair to store with an object.
-type MetadataEntry struct {
- _ struct{} `type:"structure"`
-
- // Name of the Object.
- Name *string `type:"string"`
-
- // Value of the Object.
- Value *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MetadataEntry) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MetadataEntry) GoString() string {
- return s.String()
-}
-
-// SetName sets the Name field's value.
-func (s *MetadataEntry) SetName(v string) *MetadataEntry {
- s.Name = &v
- return s
-}
-
-// SetValue sets the Value field's value.
-func (s *MetadataEntry) SetValue(v string) *MetadataEntry {
- s.Value = &v
- return s
-}
-
-// A container specifying replication metrics-related settings enabling replication
-// metrics and events.
-type Metrics struct {
- _ struct{} `type:"structure"`
-
- // A container specifying the time threshold for emitting the s3:Replication:OperationMissedThreshold
- // event.
- EventThreshold *ReplicationTimeValue `type:"structure"`
-
- // 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.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Metrics) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-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.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"`
-
- // The access point ARN used when evaluating an AND predicate.
- AccessPointArn *string `type:"string"`
-
- // The prefix used when evaluating an AND predicate.
- Prefix *string `type:"string"`
-
- // The list of tags used when evaluating an AND predicate.
- Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MetricsAndOperator) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MetricsAndOperator) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *MetricsAndOperator) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "MetricsAndOperator"}
- 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
-}
-
-// SetAccessPointArn sets the AccessPointArn field's value.
-func (s *MetricsAndOperator) SetAccessPointArn(v string) *MetricsAndOperator {
- s.AccessPointArn = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *MetricsAndOperator) SetPrefix(v string) *MetricsAndOperator {
- s.Prefix = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *MetricsAndOperator) SetTags(v []*Tag) *MetricsAndOperator {
- s.Tags = v
- return s
-}
-
-// Specifies a metrics configuration for the CloudWatch request metrics (specified
-// by the metrics configuration ID) from an Amazon S3 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. For more information, see PutBucketMetricsConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTMetricConfiguration.html).
-type MetricsConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Specifies a metrics configuration filter. The metrics configuration will
- // only include objects that meet the filter's criteria. A filter must be a
- // prefix, an object tag, an access point ARN, or a conjunction (MetricsAndOperator).
- Filter *MetricsFilter `type:"structure"`
-
- // The ID used to identify the metrics configuration.
- //
- // Id is a required field
- Id *string `type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MetricsConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MetricsConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *MetricsConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "MetricsConfiguration"}
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetFilter sets the Filter field's value.
-func (s *MetricsConfiguration) SetFilter(v *MetricsFilter) *MetricsConfiguration {
- s.Filter = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration {
- s.Id = &v
- 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,
-// an object tag, an access point ARN, or a conjunction (MetricsAndOperator).
-// For more information, see PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html).
-type MetricsFilter struct {
- _ struct{} `type:"structure"`
-
- // The access point ARN used when evaluating a metrics filter.
- AccessPointArn *string `type:"string"`
-
- // 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.
- And *MetricsAndOperator `type:"structure"`
-
- // The prefix used when evaluating a metrics filter.
- Prefix *string `type:"string"`
-
- // The tag used when evaluating a metrics filter.
- Tag *Tag `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MetricsFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MetricsFilter) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *MetricsFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "MetricsFilter"}
- if s.And != nil {
- if err := s.And.Validate(); err != nil {
- invalidParams.AddNested("And", err.(request.ErrInvalidParams))
- }
- }
- if s.Tag != nil {
- if err := s.Tag.Validate(); err != nil {
- invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessPointArn sets the AccessPointArn field's value.
-func (s *MetricsFilter) SetAccessPointArn(v string) *MetricsFilter {
- s.AccessPointArn = &v
- return s
-}
-
-// SetAnd sets the And field's value.
-func (s *MetricsFilter) SetAnd(v *MetricsAndOperator) *MetricsFilter {
- s.And = v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *MetricsFilter) SetPrefix(v string) *MetricsFilter {
- s.Prefix = &v
- return s
-}
-
-// SetTag sets the Tag field's value.
-func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter {
- s.Tag = v
- return s
-}
-
-// Container for the MultipartUpload for the Amazon S3 object.
-type MultipartUpload struct {
- _ struct{} `type:"structure"`
-
- // The algorithm that was used to create a checksum of the object.
- ChecksumAlgorithm *string `type:"string" enum:"ChecksumAlgorithm"`
-
- // Date and time at which the multipart upload was initiated.
- Initiated *time.Time `type:"timestamp"`
-
- // Identifies who initiated the multipart upload.
- Initiator *Initiator `type:"structure"`
-
- // 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.
- StorageClass *string `type:"string" enum:"StorageClass"`
-
- // Upload ID that identifies the multipart upload.
- UploadId *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MultipartUpload) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MultipartUpload) GoString() string {
- return s.String()
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *MultipartUpload) SetChecksumAlgorithm(v string) *MultipartUpload {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetInitiated sets the Initiated field's value.
-func (s *MultipartUpload) SetInitiated(v time.Time) *MultipartUpload {
- s.Initiated = &v
- return s
-}
-
-// SetInitiator sets the Initiator field's value.
-func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload {
- s.Initiator = v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *MultipartUpload) SetKey(v string) *MultipartUpload {
- s.Key = &v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *MultipartUpload) SetOwner(v *Owner) *MultipartUpload {
- s.Owner = v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *MultipartUpload) SetStorageClass(v string) *MultipartUpload {
- s.StorageClass = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload {
- s.UploadId = &v
- return s
-}
-
-// Specifies when noncurrent object versions expire. Upon expiration, Amazon
-// S3 permanently deletes the noncurrent object versions. You set this lifecycle
-// configuration action on a bucket that has versioning enabled (or suspended)
-// to request that Amazon S3 delete noncurrent object versions at a specific
-// period in the object's lifetime.
-type NoncurrentVersionExpiration struct {
- _ struct{} `type:"structure"`
-
- // Specifies how many noncurrent versions Amazon S3 will retain. If there are
- // this many more recent noncurrent versions, Amazon S3 will take the associated
- // action. For more information about noncurrent versions, see Lifecycle configuration
- // elements (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html)
- // in the Amazon S3 User Guide.
- NewerNoncurrentVersions *int64 `type:"integer"`
-
- // Specifies the number of days an object is noncurrent before Amazon S3 can
- // perform the associated action. The value must be a non-zero positive integer.
- // 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/intro-lifecycle-rules.html#non-current-days-calculations)
- // in the Amazon S3 User Guide.
- NoncurrentDays *int64 `type:"integer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s NoncurrentVersionExpiration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s NoncurrentVersionExpiration) GoString() string {
- return s.String()
-}
-
-// SetNewerNoncurrentVersions sets the NewerNoncurrentVersions field's value.
-func (s *NoncurrentVersionExpiration) SetNewerNoncurrentVersions(v int64) *NoncurrentVersionExpiration {
- s.NewerNoncurrentVersions = &v
- return s
-}
-
-// SetNoncurrentDays sets the NoncurrentDays field's value.
-func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVersionExpiration {
- s.NoncurrentDays = &v
- return s
-}
-
-// Container for the transition rule that describes when noncurrent objects
-// transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER_IR,
-// GLACIER, or DEEP_ARCHIVE 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 the STANDARD_IA, ONEZONE_IA,
-// INTELLIGENT_TIERING, GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage class at
-// a specific period in the object's lifetime.
-type NoncurrentVersionTransition struct {
- _ struct{} `type:"structure"`
-
- // Specifies how many noncurrent versions Amazon S3 will retain. If there are
- // this many more recent noncurrent versions, Amazon S3 will take the associated
- // action. For more information about noncurrent versions, see Lifecycle configuration
- // elements (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html)
- // in the Amazon S3 User Guide.
- NewerNoncurrentVersions *int64 `type:"integer"`
-
- // 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 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 S3 User Guide.
- NoncurrentDays *int64 `type:"integer"`
-
- // The class of storage used to store the object.
- StorageClass *string `type:"string" enum:"TransitionStorageClass"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s NoncurrentVersionTransition) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s NoncurrentVersionTransition) GoString() string {
- return s.String()
-}
-
-// SetNewerNoncurrentVersions sets the NewerNoncurrentVersions field's value.
-func (s *NoncurrentVersionTransition) SetNewerNoncurrentVersions(v int64) *NoncurrentVersionTransition {
- s.NewerNoncurrentVersions = &v
- return s
-}
-
-// SetNoncurrentDays sets the NoncurrentDays field's value.
-func (s *NoncurrentVersionTransition) SetNoncurrentDays(v int64) *NoncurrentVersionTransition {
- s.NoncurrentDays = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersionTransition {
- s.StorageClass = &v
- return s
-}
-
-// A container for specifying the notification configuration of the bucket.
-// If this element is empty, notifications are turned off for the bucket.
-type NotificationConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Enables delivery of events to Amazon EventBridge.
- EventBridgeConfiguration *EventBridgeConfiguration `type:"structure"`
-
- // Describes the Lambda functions to invoke and the events for which to invoke
- // them.
- LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"`
-
- // The Amazon Simple Queue Service queues to publish messages to and the events
- // for which to publish messages.
- QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"`
-
- // The topic to which notifications are sent and the events for which notifications
- // are generated.
- TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s NotificationConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s NotificationConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *NotificationConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"}
- if s.LambdaFunctionConfigurations != nil {
- for i, v := range s.LambdaFunctionConfigurations {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.QueueConfigurations != nil {
- for i, v := range s.QueueConfigurations {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.TopicConfigurations != nil {
- for i, v := range s.TopicConfigurations {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEventBridgeConfiguration sets the EventBridgeConfiguration field's value.
-func (s *NotificationConfiguration) SetEventBridgeConfiguration(v *EventBridgeConfiguration) *NotificationConfiguration {
- s.EventBridgeConfiguration = v
- return s
-}
-
-// SetLambdaFunctionConfigurations sets the LambdaFunctionConfigurations field's value.
-func (s *NotificationConfiguration) SetLambdaFunctionConfigurations(v []*LambdaFunctionConfiguration) *NotificationConfiguration {
- s.LambdaFunctionConfigurations = v
- return s
-}
-
-// SetQueueConfigurations sets the QueueConfigurations field's value.
-func (s *NotificationConfiguration) SetQueueConfigurations(v []*QueueConfiguration) *NotificationConfiguration {
- s.QueueConfigurations = v
- return s
-}
-
-// SetTopicConfigurations sets the TopicConfigurations field's value.
-func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfiguration) *NotificationConfiguration {
- s.TopicConfigurations = v
- return s
-}
-
-type NotificationConfigurationDeprecated struct {
- _ struct{} `type:"structure"`
-
- // Container for specifying the 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s NotificationConfigurationDeprecated) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s NotificationConfigurationDeprecated) GoString() string {
- return s.String()
-}
-
-// SetCloudFunctionConfiguration sets the CloudFunctionConfiguration field's value.
-func (s *NotificationConfigurationDeprecated) SetCloudFunctionConfiguration(v *CloudFunctionConfiguration) *NotificationConfigurationDeprecated {
- s.CloudFunctionConfiguration = v
- return s
-}
-
-// SetQueueConfiguration sets the QueueConfiguration field's value.
-func (s *NotificationConfigurationDeprecated) SetQueueConfiguration(v *QueueConfigurationDeprecated) *NotificationConfigurationDeprecated {
- s.QueueConfiguration = v
- return s
-}
-
-// SetTopicConfiguration sets the TopicConfiguration field's value.
-func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConfigurationDeprecated) *NotificationConfigurationDeprecated {
- s.TopicConfiguration = v
- return s
-}
-
-// Specifies object key name filtering rules. For information about key name
-// filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
-// in the Amazon S3 User Guide.
-type NotificationConfigurationFilter struct {
- _ struct{} `type:"structure"`
-
- // A container for object key name prefix and suffix filtering rules.
- Key *KeyFilter `locationName:"S3Key" type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s NotificationConfigurationFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s NotificationConfigurationFilter) GoString() string {
- return s.String()
-}
-
-// SetKey sets the Key field's value.
-func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConfigurationFilter {
- s.Key = v
- return s
-}
-
-// An object consists of data and its descriptive metadata.
-type Object struct {
- _ struct{} `type:"structure"`
-
- // The algorithm that was used to create a checksum of the object.
- ChecksumAlgorithm []*string `type:"list" flattened:"true" enum:"ChecksumAlgorithm"`
-
- // The entity tag is a hash of the object. The ETag reflects changes only to
- // the contents of an object, not its metadata. The ETag may or may not be an
- // MD5 digest of the object data. Whether or not it is depends on how the object
- // was created and how it is encrypted as described below:
- //
- // * Objects created by the PUT Object, POST Object, or Copy operation, or
- // through the Amazon Web Services Management Console, and are encrypted
- // by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object
- // data.
- //
- // * Objects created by the PUT Object, POST Object, or Copy operation, or
- // through the Amazon Web Services Management Console, and are encrypted
- // by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object
- // data.
- //
- // * If an object is created by either the Multipart Upload or Part Copy
- // operation, the ETag is not an MD5 digest, regardless of the method of
- // encryption. If an object is larger than 16 MB, the Amazon Web Services
- // Management Console will upload or copy that object as a Multipart Upload,
- // and therefore the ETag will not be an MD5 digest.
- 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"`
-
- // Creation date of the object.
- 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.
- StorageClass *string `type:"string" enum:"ObjectStorageClass"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Object) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Object) GoString() string {
- return s.String()
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *Object) SetChecksumAlgorithm(v []*string) *Object {
- s.ChecksumAlgorithm = v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *Object) SetETag(v string) *Object {
- s.ETag = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *Object) SetKey(v string) *Object {
- s.Key = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *Object) SetLastModified(v time.Time) *Object {
- s.LastModified = &v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *Object) SetOwner(v *Owner) *Object {
- s.Owner = v
- return s
-}
-
-// SetSize sets the Size field's value.
-func (s *Object) SetSize(v int64) *Object {
- s.Size = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *Object) SetStorageClass(v string) *Object {
- s.StorageClass = &v
- return s
-}
-
-// Object Identifier is unique value to identify objects.
-type ObjectIdentifier struct {
- _ struct{} `type:"structure"`
-
- // Key name of the object.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- //
- // Key is a required field
- Key *string `min:"1" type:"string" required:"true"`
-
- // VersionId for the specific version of the object to delete.
- VersionId *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ObjectIdentifier) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ObjectIdentifier) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ObjectIdentifier) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"}
- 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 *ObjectIdentifier) SetKey(v string) *ObjectIdentifier {
- s.Key = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier {
- s.VersionId = &v
- return s
-}
-
-// The container element for Object Lock configuration parameters.
-type ObjectLockConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Indicates whether this bucket has an Object Lock configuration enabled. Enable
- // ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket.
- ObjectLockEnabled *string `type:"string" enum:"ObjectLockEnabled"`
-
- // Specifies the Object Lock rule for the specified object. Enable the this
- // rule when you apply ObjectLockConfiguration to a bucket. Bucket settings
- // require both a mode and a period. The period can be either Days or Years
- // but you must select one. You cannot specify Days and Years at the same time.
- Rule *ObjectLockRule `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ObjectLockConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ObjectLockConfiguration) GoString() string {
- return s.String()
-}
-
-// SetObjectLockEnabled sets the ObjectLockEnabled field's value.
-func (s *ObjectLockConfiguration) SetObjectLockEnabled(v string) *ObjectLockConfiguration {
- s.ObjectLockEnabled = &v
- return s
-}
-
-// SetRule sets the Rule field's value.
-func (s *ObjectLockConfiguration) SetRule(v *ObjectLockRule) *ObjectLockConfiguration {
- s.Rule = v
- return s
-}
-
-// A legal hold configuration for an object.
-type ObjectLockLegalHold struct {
- _ struct{} `type:"structure"`
-
- // Indicates whether the specified object has a legal hold in place.
- Status *string `type:"string" enum:"ObjectLockLegalHoldStatus"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ObjectLockLegalHold) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ObjectLockLegalHold) GoString() string {
- return s.String()
-}
-
-// SetStatus sets the Status field's value.
-func (s *ObjectLockLegalHold) SetStatus(v string) *ObjectLockLegalHold {
- s.Status = &v
- return s
-}
-
-// A Retention configuration for an object.
-type ObjectLockRetention struct {
- _ struct{} `type:"structure"`
-
- // Indicates the Retention mode for the specified object.
- Mode *string `type:"string" enum:"ObjectLockRetentionMode"`
-
- // The date on which this Object Lock Retention will expire.
- RetainUntilDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ObjectLockRetention) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ObjectLockRetention) GoString() string {
- return s.String()
-}
-
-// SetMode sets the Mode field's value.
-func (s *ObjectLockRetention) SetMode(v string) *ObjectLockRetention {
- s.Mode = &v
- return s
-}
-
-// SetRetainUntilDate sets the RetainUntilDate field's value.
-func (s *ObjectLockRetention) SetRetainUntilDate(v time.Time) *ObjectLockRetention {
- s.RetainUntilDate = &v
- return s
-}
-
-// The container element for an Object Lock rule.
-type ObjectLockRule struct {
- _ struct{} `type:"structure"`
-
- // The default Object Lock retention mode and period that you want to apply
- // to new objects placed in the specified bucket. Bucket settings require both
- // a mode and a period. The period can be either Days or Years but you must
- // select one. You cannot specify Days and Years at the same time.
- DefaultRetention *DefaultRetention `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ObjectLockRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ObjectLockRule) GoString() string {
- return s.String()
-}
-
-// SetDefaultRetention sets the DefaultRetention field's value.
-func (s *ObjectLockRule) SetDefaultRetention(v *DefaultRetention) *ObjectLockRule {
- s.DefaultRetention = v
- return s
-}
-
-// A container for elements related to an individual part.
-type ObjectPart struct {
- _ struct{} `type:"structure"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 32-bit CRC32 checksum of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumCRC32 *string `type:"string"`
-
- // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32C *string `type:"string"`
-
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA1 *string `type:"string"`
-
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA256 *string `type:"string"`
-
- // The part number identifying the part. This value is a positive integer between
- // 1 and 10,000.
- PartNumber *int64 `type:"integer"`
-
- // The size of the uploaded part in bytes.
- Size *int64 `type:"integer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ObjectPart) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ObjectPart) GoString() string {
- return s.String()
-}
-
-// SetChecksumCRC32 sets the ChecksumCRC32 field's value.
-func (s *ObjectPart) SetChecksumCRC32(v string) *ObjectPart {
- s.ChecksumCRC32 = &v
- return s
-}
-
-// SetChecksumCRC32C sets the ChecksumCRC32C field's value.
-func (s *ObjectPart) SetChecksumCRC32C(v string) *ObjectPart {
- s.ChecksumCRC32C = &v
- return s
-}
-
-// SetChecksumSHA1 sets the ChecksumSHA1 field's value.
-func (s *ObjectPart) SetChecksumSHA1(v string) *ObjectPart {
- s.ChecksumSHA1 = &v
- return s
-}
-
-// SetChecksumSHA256 sets the ChecksumSHA256 field's value.
-func (s *ObjectPart) SetChecksumSHA256(v string) *ObjectPart {
- s.ChecksumSHA256 = &v
- return s
-}
-
-// SetPartNumber sets the PartNumber field's value.
-func (s *ObjectPart) SetPartNumber(v int64) *ObjectPart {
- s.PartNumber = &v
- return s
-}
-
-// SetSize sets the Size field's value.
-func (s *ObjectPart) SetSize(v int64) *ObjectPart {
- s.Size = &v
- return s
-}
-
-// The version of an object.
-type ObjectVersion struct {
- _ struct{} `type:"structure"`
-
- // The algorithm that was used to create a checksum of the object.
- ChecksumAlgorithm []*string `type:"list" flattened:"true" enum:"ChecksumAlgorithm"`
-
- // 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
- // of an object.
- IsLatest *bool `type:"boolean"`
-
- // The object key.
- Key *string `min:"1" type:"string"`
-
- // 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.
- Size *int64 `type:"integer"`
-
- // The class of storage used to store the object.
- StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"`
-
- // Version ID of an object.
- VersionId *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ObjectVersion) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ObjectVersion) GoString() string {
- return s.String()
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *ObjectVersion) SetChecksumAlgorithm(v []*string) *ObjectVersion {
- s.ChecksumAlgorithm = v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *ObjectVersion) SetETag(v string) *ObjectVersion {
- s.ETag = &v
- return s
-}
-
-// SetIsLatest sets the IsLatest field's value.
-func (s *ObjectVersion) SetIsLatest(v bool) *ObjectVersion {
- s.IsLatest = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *ObjectVersion) SetKey(v string) *ObjectVersion {
- s.Key = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *ObjectVersion) SetLastModified(v time.Time) *ObjectVersion {
- s.LastModified = &v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *ObjectVersion) SetOwner(v *Owner) *ObjectVersion {
- s.Owner = v
- return s
-}
-
-// SetSize sets the Size field's value.
-func (s *ObjectVersion) SetSize(v int64) *ObjectVersion {
- s.Size = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *ObjectVersion) SetStorageClass(v string) *ObjectVersion {
- s.StorageClass = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion {
- s.VersionId = &v
- return s
-}
-
-// Describes the location where the restore job's output is stored.
-type OutputLocation struct {
- _ struct{} `type:"structure"`
-
- // Describes an S3 location that will receive the results of the restore request.
- S3 *Location `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s OutputLocation) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s OutputLocation) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *OutputLocation) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "OutputLocation"}
- if s.S3 != nil {
- if err := s.S3.Validate(); err != nil {
- invalidParams.AddNested("S3", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetS3 sets the S3 field's value.
-func (s *OutputLocation) SetS3(v *Location) *OutputLocation {
- s.S3 = v
- return s
-}
-
-// Describes how results of the Select job are serialized.
-type OutputSerialization struct {
- _ struct{} `type:"structure"`
-
- // Describes the serialization of CSV-encoded Select results.
- CSV *CSVOutput `type:"structure"`
-
- // Specifies JSON as request's output serialization format.
- JSON *JSONOutput `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s OutputSerialization) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s OutputSerialization) GoString() string {
- return s.String()
-}
-
-// SetCSV sets the CSV field's value.
-func (s *OutputSerialization) SetCSV(v *CSVOutput) *OutputSerialization {
- s.CSV = v
- return s
-}
-
-// SetJSON sets the JSON field's value.
-func (s *OutputSerialization) SetJSON(v *JSONOutput) *OutputSerialization {
- s.JSON = v
- 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Owner) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Owner) GoString() string {
- return s.String()
-}
-
-// SetDisplayName sets the DisplayName field's value.
-func (s *Owner) SetDisplayName(v string) *Owner {
- s.DisplayName = &v
- return s
-}
-
-// SetID sets the ID field's value.
-func (s *Owner) SetID(v string) *Owner {
- s.ID = &v
- return s
-}
-
-// The container element for a bucket's ownership controls.
-type OwnershipControls struct {
- _ struct{} `type:"structure"`
-
- // The container element for an ownership control rule.
- //
- // Rules is a required field
- Rules []*OwnershipControlsRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s OwnershipControls) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s OwnershipControls) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *OwnershipControls) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "OwnershipControls"}
- if s.Rules == nil {
- invalidParams.Add(request.NewErrParamRequired("Rules"))
- }
- if s.Rules != nil {
- for i, v := range s.Rules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetRules sets the Rules field's value.
-func (s *OwnershipControls) SetRules(v []*OwnershipControlsRule) *OwnershipControls {
- s.Rules = v
- return s
-}
-
-// The container element for an ownership control rule.
-type OwnershipControlsRule struct {
- _ struct{} `type:"structure"`
-
- // The container element for object ownership for a bucket's ownership controls.
- //
- // BucketOwnerPreferred - Objects uploaded to the bucket change ownership to
- // the bucket owner if the objects are uploaded with the bucket-owner-full-control
- // canned ACL.
- //
- // ObjectWriter - The uploading account will own the object if the object is
- // uploaded with the bucket-owner-full-control canned ACL.
- //
- // BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer
- // affect permissions. The bucket owner automatically owns and has full control
- // over every object in the bucket. The bucket only accepts PUT requests that
- // don't specify an ACL or bucket owner full control ACLs, such as the bucket-owner-full-control
- // canned ACL or an equivalent form of this ACL expressed in the XML format.
- //
- // ObjectOwnership is a required field
- ObjectOwnership *string `type:"string" required:"true" enum:"ObjectOwnership"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s OwnershipControlsRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s OwnershipControlsRule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *OwnershipControlsRule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "OwnershipControlsRule"}
- if s.ObjectOwnership == nil {
- invalidParams.Add(request.NewErrParamRequired("ObjectOwnership"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetObjectOwnership sets the ObjectOwnership field's value.
-func (s *OwnershipControlsRule) SetObjectOwnership(v string) *OwnershipControlsRule {
- s.ObjectOwnership = &v
- return s
-}
-
-// Container for Parquet.
-type ParquetInput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ParquetInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ParquetInput) GoString() string {
- return s.String()
-}
-
-// Container for elements related to a part.
-type Part struct {
- _ struct{} `type:"structure"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 32-bit CRC32 checksum of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumCRC32 *string `type:"string"`
-
- // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32C *string `type:"string"`
-
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA1 *string `type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 256-bit SHA-256 digest of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumSHA256 *string `type:"string"`
-
- // Entity tag returned when the part was uploaded.
- ETag *string `type:"string"`
-
- // Date and time at which the part was uploaded.
- LastModified *time.Time `type:"timestamp"`
-
- // Part number identifying the part. This is a positive integer between 1 and
- // 10,000.
- PartNumber *int64 `type:"integer"`
-
- // Size in bytes of the uploaded part data.
- Size *int64 `type:"integer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Part) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Part) GoString() string {
- return s.String()
-}
-
-// SetChecksumCRC32 sets the ChecksumCRC32 field's value.
-func (s *Part) SetChecksumCRC32(v string) *Part {
- s.ChecksumCRC32 = &v
- return s
-}
-
-// SetChecksumCRC32C sets the ChecksumCRC32C field's value.
-func (s *Part) SetChecksumCRC32C(v string) *Part {
- s.ChecksumCRC32C = &v
- return s
-}
-
-// SetChecksumSHA1 sets the ChecksumSHA1 field's value.
-func (s *Part) SetChecksumSHA1(v string) *Part {
- s.ChecksumSHA1 = &v
- return s
-}
-
-// SetChecksumSHA256 sets the ChecksumSHA256 field's value.
-func (s *Part) SetChecksumSHA256(v string) *Part {
- s.ChecksumSHA256 = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *Part) SetETag(v string) *Part {
- s.ETag = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *Part) SetLastModified(v time.Time) *Part {
- s.LastModified = &v
- return s
-}
-
-// SetPartNumber sets the PartNumber field's value.
-func (s *Part) SetPartNumber(v int64) *Part {
- s.PartNumber = &v
- return s
-}
-
-// SetSize sets the Size field's value.
-func (s *Part) SetSize(v int64) *Part {
- s.Size = &v
- return s
-}
-
-// The container element for a bucket's policy status.
-type PolicyStatus struct {
- _ struct{} `type:"structure"`
-
- // The policy status for this bucket. TRUE indicates that this bucket is public.
- // FALSE indicates that the bucket is not public.
- IsPublic *bool `locationName:"IsPublic" type:"boolean"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PolicyStatus) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PolicyStatus) GoString() string {
- return s.String()
-}
-
-// SetIsPublic sets the IsPublic field's value.
-func (s *PolicyStatus) SetIsPublic(v bool) *PolicyStatus {
- s.IsPublic = &v
- return s
-}
-
-// This data type contains information about progress of an operation.
-type Progress struct {
- _ struct{} `type:"structure"`
-
- // The current number of uncompressed object bytes processed.
- BytesProcessed *int64 `type:"long"`
-
- // The current number of bytes of records payload data returned.
- BytesReturned *int64 `type:"long"`
-
- // The current number of object bytes scanned.
- BytesScanned *int64 `type:"long"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Progress) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Progress) GoString() string {
- return s.String()
-}
-
-// SetBytesProcessed sets the BytesProcessed field's value.
-func (s *Progress) SetBytesProcessed(v int64) *Progress {
- s.BytesProcessed = &v
- return s
-}
-
-// SetBytesReturned sets the BytesReturned field's value.
-func (s *Progress) SetBytesReturned(v int64) *Progress {
- s.BytesReturned = &v
- return s
-}
-
-// SetBytesScanned sets the BytesScanned field's value.
-func (s *Progress) SetBytesScanned(v int64) *Progress {
- s.BytesScanned = &v
- return s
-}
-
-// This data type contains information about the progress event of an operation.
-type ProgressEvent struct {
- _ struct{} `locationName:"ProgressEvent" type:"structure" payload:"Details"`
-
- // The Progress event details.
- Details *Progress `locationName:"Details" type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ProgressEvent) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ProgressEvent) GoString() string {
- return s.String()
-}
-
-// SetDetails sets the Details field's value.
-func (s *ProgressEvent) SetDetails(v *Progress) *ProgressEvent {
- s.Details = v
- return s
-}
-
-// The ProgressEvent is and event in the SelectObjectContentEventStream group of events.
-func (s *ProgressEvent) eventSelectObjectContentEventStream() {}
-
-// UnmarshalEvent unmarshals the EventStream Message into the ProgressEvent value.
-// This method is only used internally within the SDK's EventStream handling.
-func (s *ProgressEvent) UnmarshalEvent(
- payloadUnmarshaler protocol.PayloadUnmarshaler,
- msg eventstream.Message,
-) error {
- if err := payloadUnmarshaler.UnmarshalPayload(
- bytes.NewReader(msg.Payload), s,
- ); err != nil {
- return err
- }
- return nil
-}
-
-// MarshalEvent marshals the type into an stream event value. This method
-// should only used internally within the SDK's EventStream handling.
-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 S3 User Guide.
-type PublicAccessBlockConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether Amazon S3 should block public access control lists (ACLs)
- // for this bucket and objects in this bucket. Setting this element to TRUE
- // causes the following behavior:
- //
- // * PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is
- // public.
- //
- // * 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"`
-
- // Specifies whether Amazon S3 should block public bucket policies for this
- // bucket. Setting this element to TRUE causes Amazon S3 to reject calls to
- // PUT Bucket policy if the specified bucket policy allows public access.
- //
- // Enabling this setting doesn't affect existing bucket policies.
- BlockPublicPolicy *bool `locationName:"BlockPublicPolicy" type:"boolean"`
-
- // Specifies whether Amazon S3 should ignore public ACLs for this bucket and
- // objects in this bucket. Setting this element to TRUE causes Amazon S3 to
- // ignore all public ACLs on this bucket and objects in this bucket.
- //
- // Enabling this setting doesn't affect the persistence of any existing ACLs
- // and doesn't prevent new public ACLs from being set.
- IgnorePublicAcls *bool `locationName:"IgnorePublicAcls" type:"boolean"`
-
- // Specifies whether Amazon S3 should restrict public bucket policies for this
- // bucket. Setting this element to TRUE restricts access to this bucket to only
- // Amazon Web Service principals and authorized users within this account if
- // the bucket has a public policy.
- //
- // Enabling this setting doesn't affect previously stored bucket policies, except
- // that public and cross-account access within any public bucket policy, including
- // non-public delegation to specific accounts, is blocked.
- RestrictPublicBuckets *bool `locationName:"RestrictPublicBuckets" type:"boolean"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PublicAccessBlockConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PublicAccessBlockConfiguration) GoString() string {
- return s.String()
-}
-
-// SetBlockPublicAcls sets the BlockPublicAcls field's value.
-func (s *PublicAccessBlockConfiguration) SetBlockPublicAcls(v bool) *PublicAccessBlockConfiguration {
- s.BlockPublicAcls = &v
- return s
-}
-
-// SetBlockPublicPolicy sets the BlockPublicPolicy field's value.
-func (s *PublicAccessBlockConfiguration) SetBlockPublicPolicy(v bool) *PublicAccessBlockConfiguration {
- s.BlockPublicPolicy = &v
- return s
-}
-
-// SetIgnorePublicAcls sets the IgnorePublicAcls field's value.
-func (s *PublicAccessBlockConfiguration) SetIgnorePublicAcls(v bool) *PublicAccessBlockConfiguration {
- s.IgnorePublicAcls = &v
- return s
-}
-
-// SetRestrictPublicBuckets sets the RestrictPublicBuckets field's value.
-func (s *PublicAccessBlockConfiguration) SetRestrictPublicBuckets(v bool) *PublicAccessBlockConfiguration {
- s.RestrictPublicBuckets = &v
- return s
-}
-
-type PutBucketAccelerateConfigurationInput struct {
- _ struct{} `locationName:"PutBucketAccelerateConfigurationRequest" type:"structure" payload:"AccelerateConfiguration"`
-
- // 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/"`
-
- // The name of the bucket for which the accelerate configuration is set.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketAccelerateConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketAccelerateConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketAccelerateConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"}
- if s.AccelerateConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration"))
- }
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccelerateConfiguration sets the AccelerateConfiguration field's value.
-func (s *PutBucketAccelerateConfigurationInput) SetAccelerateConfiguration(v *AccelerateConfiguration) *PutBucketAccelerateConfigurationInput {
- s.AccelerateConfiguration = v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAccelerateConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutBucketAccelerateConfigurationInput) SetChecksumAlgorithm(v string) *PutBucketAccelerateConfigurationInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketAccelerateConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketAccelerateConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketAccelerateConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketAccelerateConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketAccelerateConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketAccelerateConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketAclInput struct {
- _ struct{} `locationName:"PutBucketAclRequest" type:"structure" payload:"AccessControlPolicy"`
-
- // The canned ACL to apply to the bucket.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
-
- // 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"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Allows grantee the read, write, read ACP, and write ACP permissions on the
- // bucket.
- GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
-
- // Allows grantee to list the objects in the bucket.
- GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
-
- // Allows grantee to read the bucket ACL.
- GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
-
- // Allows grantee to create new objects in the bucket.
- //
- // For the bucket and object owners of existing objects, also allows deletions
- // and overwrites of those objects.
- GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
-
- // Allows grantee to write the ACL for the applicable bucket.
- GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketAclInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketAclInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketAclInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.AccessControlPolicy != nil {
- if err := s.AccessControlPolicy.Validate(); err != nil {
- invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetACL sets the ACL field's value.
-func (s *PutBucketAclInput) SetACL(v string) *PutBucketAclInput {
- s.ACL = &v
- return s
-}
-
-// SetAccessControlPolicy sets the AccessControlPolicy field's value.
-func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput {
- s.AccessControlPolicy = v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketAclInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutBucketAclInput) SetChecksumAlgorithm(v string) *PutBucketAclInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketAclInput) SetExpectedBucketOwner(v string) *PutBucketAclInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetGrantFullControl sets the GrantFullControl field's value.
-func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput {
- s.GrantFullControl = &v
- return s
-}
-
-// SetGrantRead sets the GrantRead field's value.
-func (s *PutBucketAclInput) SetGrantRead(v string) *PutBucketAclInput {
- s.GrantRead = &v
- return s
-}
-
-// SetGrantReadACP sets the GrantReadACP field's value.
-func (s *PutBucketAclInput) SetGrantReadACP(v string) *PutBucketAclInput {
- s.GrantReadACP = &v
- return s
-}
-
-// SetGrantWrite sets the GrantWrite field's value.
-func (s *PutBucketAclInput) SetGrantWrite(v string) *PutBucketAclInput {
- s.GrantWrite = &v
- return s
-}
-
-// SetGrantWriteACP sets the GrantWriteACP field's value.
-func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput {
- s.GrantWriteACP = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketAclInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketAclOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketAclOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketAclOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketAnalyticsConfigurationInput struct {
- _ struct{} `locationName:"PutBucketAnalyticsConfigurationRequest" type:"structure" payload:"AnalyticsConfiguration"`
-
- // The configuration and any analyses for the analytics filter.
- //
- // AnalyticsConfiguration is a required field
- AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // The name of the bucket to which an analytics configuration is stored.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID that identifies the analytics configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketAnalyticsConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketAnalyticsConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketAnalyticsConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketAnalyticsConfigurationInput"}
- if s.AnalyticsConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("AnalyticsConfiguration"))
- }
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.AnalyticsConfiguration != nil {
- if err := s.AnalyticsConfiguration.Validate(); err != nil {
- invalidParams.AddNested("AnalyticsConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
-func (s *PutBucketAnalyticsConfigurationInput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *PutBucketAnalyticsConfigurationInput {
- s.AnalyticsConfiguration = v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketAnalyticsConfigurationInput) SetBucket(v string) *PutBucketAnalyticsConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketAnalyticsConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketAnalyticsConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketAnalyticsConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyticsConfigurationInput {
- s.Id = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketAnalyticsConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketAnalyticsConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketAnalyticsConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketAnalyticsConfigurationOutput) GoString() string {
- return s.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"`
-
- // Describes the cross-origin access configuration for objects in an Amazon
- // S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon
- // S3 User Guide.
- //
- // CORSConfiguration is a required field
- CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketCorsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketCorsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketCorsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.CORSConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("CORSConfiguration"))
- }
- if s.CORSConfiguration != nil {
- if err := s.CORSConfiguration.Validate(); err != nil {
- invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketCorsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetCORSConfiguration sets the CORSConfiguration field's value.
-func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput {
- s.CORSConfiguration = v
- return s
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutBucketCorsInput) SetChecksumAlgorithm(v string) *PutBucketCorsInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketCorsInput) SetExpectedBucketOwner(v string) *PutBucketCorsInput {
- s.ExpectedBucketOwner = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketCorsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketCorsOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketCorsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketCorsOutput) GoString() string {
- return s.String()
-}
-
-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 customer 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)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Specifies the default server-side-encryption configuration.
- //
- // ServerSideEncryptionConfiguration is a required field
- ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `locationName:"ServerSideEncryptionConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketEncryptionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketEncryptionInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketEncryptionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketEncryptionInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.ServerSideEncryptionConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("ServerSideEncryptionConfiguration"))
- }
- if s.ServerSideEncryptionConfiguration != nil {
- if err := s.ServerSideEncryptionConfiguration.Validate(); err != nil {
- invalidParams.AddNested("ServerSideEncryptionConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketEncryptionInput) SetBucket(v string) *PutBucketEncryptionInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketEncryptionInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutBucketEncryptionInput) SetChecksumAlgorithm(v string) *PutBucketEncryptionInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketEncryptionInput) SetExpectedBucketOwner(v string) *PutBucketEncryptionInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
-func (s *PutBucketEncryptionInput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *PutBucketEncryptionInput {
- s.ServerSideEncryptionConfiguration = v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketEncryptionInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketEncryptionOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketEncryptionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketEncryptionOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketIntelligentTieringConfigurationInput struct {
- _ struct{} `locationName:"PutBucketIntelligentTieringConfigurationRequest" type:"structure" payload:"IntelligentTieringConfiguration"`
-
- // The name of the Amazon S3 bucket whose configuration you want to modify or
- // retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The ID used to identify the S3 Intelligent-Tiering configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-
- // Container for S3 Intelligent-Tiering configuration.
- //
- // IntelligentTieringConfiguration is a required field
- IntelligentTieringConfiguration *IntelligentTieringConfiguration `locationName:"IntelligentTieringConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketIntelligentTieringConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketIntelligentTieringConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketIntelligentTieringConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketIntelligentTieringConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.IntelligentTieringConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("IntelligentTieringConfiguration"))
- }
- if s.IntelligentTieringConfiguration != nil {
- if err := s.IntelligentTieringConfiguration.Validate(); err != nil {
- invalidParams.AddNested("IntelligentTieringConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketIntelligentTieringConfigurationInput) SetBucket(v string) *PutBucketIntelligentTieringConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketIntelligentTieringConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetId sets the Id field's value.
-func (s *PutBucketIntelligentTieringConfigurationInput) SetId(v string) *PutBucketIntelligentTieringConfigurationInput {
- s.Id = &v
- return s
-}
-
-// SetIntelligentTieringConfiguration sets the IntelligentTieringConfiguration field's value.
-func (s *PutBucketIntelligentTieringConfigurationInput) SetIntelligentTieringConfiguration(v *IntelligentTieringConfiguration) *PutBucketIntelligentTieringConfigurationInput {
- s.IntelligentTieringConfiguration = v
- return s
-}
-
-func (s *PutBucketIntelligentTieringConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketIntelligentTieringConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketIntelligentTieringConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketIntelligentTieringConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketIntelligentTieringConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketIntelligentTieringConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketInventoryConfigurationInput struct {
- _ struct{} `locationName:"PutBucketInventoryConfigurationRequest" type:"structure" payload:"InventoryConfiguration"`
-
- // The name of the bucket where the inventory configuration will be stored.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID used to identify the inventory configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-
- // Specifies the inventory configuration.
- //
- // InventoryConfiguration is a required field
- InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketInventoryConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketInventoryConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketInventoryConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketInventoryConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.InventoryConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("InventoryConfiguration"))
- }
- if s.InventoryConfiguration != nil {
- if err := s.InventoryConfiguration.Validate(); err != nil {
- invalidParams.AddNested("InventoryConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketInventoryConfigurationInput) SetBucket(v string) *PutBucketInventoryConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketInventoryConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketInventoryConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketInventoryConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *PutBucketInventoryConfigurationInput) SetId(v string) *PutBucketInventoryConfigurationInput {
- s.Id = &v
- return s
-}
-
-// SetInventoryConfiguration sets the InventoryConfiguration field's value.
-func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *InventoryConfiguration) *PutBucketInventoryConfigurationInput {
- s.InventoryConfiguration = v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketInventoryConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketInventoryConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketInventoryConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketInventoryConfigurationOutput) GoString() string {
- return s.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"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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/"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketLifecycleConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketLifecycleConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketLifecycleConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.LifecycleConfiguration != nil {
- if err := s.LifecycleConfiguration.Validate(); err != nil {
- invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLifecycleConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketLifecycleConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutBucketLifecycleConfigurationInput) SetChecksumAlgorithm(v string) *PutBucketLifecycleConfigurationInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketLifecycleConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketLifecycleConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
-func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput {
- s.LifecycleConfiguration = v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketLifecycleConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketLifecycleConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketLifecycleConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketLifecycleConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketLifecycleInput struct {
- _ struct{} `locationName:"PutBucketLifecycleRequest" type:"structure" payload:"LifecycleConfiguration"`
-
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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/"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketLifecycleInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketLifecycleInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketLifecycleInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.LifecycleConfiguration != nil {
- if err := s.LifecycleConfiguration.Validate(); err != nil {
- invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketLifecycleInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutBucketLifecycleInput) SetChecksumAlgorithm(v string) *PutBucketLifecycleInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketLifecycleInput) SetExpectedBucketOwner(v string) *PutBucketLifecycleInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
-func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput {
- s.LifecycleConfiguration = v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketLifecycleInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketLifecycleOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketLifecycleOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketLifecycleOutput) GoString() string {
- return s.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/"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketLoggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketLoggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketLoggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.BucketLoggingStatus == nil {
- invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus"))
- }
- if s.BucketLoggingStatus != nil {
- if err := s.BucketLoggingStatus.Validate(); err != nil {
- invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketLoggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBucketLoggingStatus sets the BucketLoggingStatus field's value.
-func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput {
- s.BucketLoggingStatus = v
- return s
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutBucketLoggingInput) SetChecksumAlgorithm(v string) *PutBucketLoggingInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketLoggingInput) SetExpectedBucketOwner(v string) *PutBucketLoggingInput {
- s.ExpectedBucketOwner = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketLoggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketLoggingOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketLoggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketLoggingOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketMetricsConfigurationInput struct {
- _ struct{} `locationName:"PutBucketMetricsConfigurationRequest" type:"structure" payload:"MetricsConfiguration"`
-
- // The name of the bucket for which the metrics configuration is set.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID used to identify the metrics configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-
- // Specifies the metrics configuration.
- //
- // MetricsConfiguration is a required field
- MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketMetricsConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketMetricsConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketMetricsConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketMetricsConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.MetricsConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("MetricsConfiguration"))
- }
- if s.MetricsConfiguration != nil {
- if err := s.MetricsConfiguration.Validate(); err != nil {
- invalidParams.AddNested("MetricsConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketMetricsConfigurationInput) SetBucket(v string) *PutBucketMetricsConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketMetricsConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketMetricsConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketMetricsConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *PutBucketMetricsConfigurationInput) SetId(v string) *PutBucketMetricsConfigurationInput {
- s.Id = &v
- return s
-}
-
-// SetMetricsConfiguration sets the MetricsConfiguration field's value.
-func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsConfiguration) *PutBucketMetricsConfigurationInput {
- s.MetricsConfiguration = v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketMetricsConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketMetricsConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketMetricsConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketMetricsConfigurationOutput) GoString() string {
- return s.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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // A container for specifying the notification configuration of the bucket.
- // If this element is empty, notifications are turned off for the bucket.
- //
- // NotificationConfiguration is a required field
- NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // Skips validation of Amazon SQS, Amazon SNS, and Lambda destinations. True
- // or false value.
- SkipDestinationValidation *bool `location:"header" locationName:"x-amz-skip-destination-validation" type:"boolean"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketNotificationConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketNotificationConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketNotificationConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.NotificationConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
- }
- if s.NotificationConfiguration != nil {
- if err := s.NotificationConfiguration.Validate(); err != nil {
- invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucketNotificationConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketNotificationConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketNotificationConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketNotificationConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetNotificationConfiguration sets the NotificationConfiguration field's value.
-func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput {
- s.NotificationConfiguration = v
- return s
-}
-
-// SetSkipDestinationValidation sets the SkipDestinationValidation field's value.
-func (s *PutBucketNotificationConfigurationInput) SetSkipDestinationValidation(v bool) *PutBucketNotificationConfigurationInput {
- s.SkipDestinationValidation = &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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketNotificationConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketNotificationConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketNotificationConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketNotificationConfigurationOutput) GoString() string {
- return s.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"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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/"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketNotificationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketNotificationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketNotificationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.NotificationConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketNotificationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutBucketNotificationInput) SetChecksumAlgorithm(v string) *PutBucketNotificationInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketNotificationInput) SetExpectedBucketOwner(v string) *PutBucketNotificationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetNotificationConfiguration sets the NotificationConfiguration field's value.
-func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput {
- s.NotificationConfiguration = v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketNotificationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketNotificationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketNotificationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketNotificationOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketOwnershipControlsInput struct {
- _ struct{} `locationName:"PutBucketOwnershipControlsRequest" type:"structure" payload:"OwnershipControls"`
-
- // The name of the Amazon S3 bucket whose OwnershipControls you want to set.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or ObjectWriter)
- // that you want to apply to this Amazon S3 bucket.
- //
- // OwnershipControls is a required field
- OwnershipControls *OwnershipControls `locationName:"OwnershipControls" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketOwnershipControlsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketOwnershipControlsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketOwnershipControlsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketOwnershipControlsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.OwnershipControls == nil {
- invalidParams.Add(request.NewErrParamRequired("OwnershipControls"))
- }
- if s.OwnershipControls != nil {
- if err := s.OwnershipControls.Validate(); err != nil {
- invalidParams.AddNested("OwnershipControls", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketOwnershipControlsInput) SetBucket(v string) *PutBucketOwnershipControlsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketOwnershipControlsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketOwnershipControlsInput) SetExpectedBucketOwner(v string) *PutBucketOwnershipControlsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetOwnershipControls sets the OwnershipControls field's value.
-func (s *PutBucketOwnershipControlsInput) SetOwnershipControls(v *OwnershipControls) *PutBucketOwnershipControlsInput {
- s.OwnershipControls = v
- return s
-}
-
-func (s *PutBucketOwnershipControlsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketOwnershipControlsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketOwnershipControlsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketOwnershipControlsOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketOwnershipControlsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketOwnershipControlsOutput) GoString() string {
- return s.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"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // Set this parameter to true to confirm that you want to remove your permissions
- // to change this bucket policy in the future.
- ConfirmRemoveSelfBucketAccess *bool `location:"header" locationName:"x-amz-confirm-remove-self-bucket-access" type:"boolean"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The bucket policy as a JSON document.
- //
- // Policy is a required field
- Policy *string `type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketPolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketPolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Policy == nil {
- invalidParams.Add(request.NewErrParamRequired("Policy"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketPolicyInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutBucketPolicyInput) SetChecksumAlgorithm(v string) *PutBucketPolicyInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetConfirmRemoveSelfBucketAccess sets the ConfirmRemoveSelfBucketAccess field's value.
-func (s *PutBucketPolicyInput) SetConfirmRemoveSelfBucketAccess(v bool) *PutBucketPolicyInput {
- s.ConfirmRemoveSelfBucketAccess = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketPolicyInput) SetExpectedBucketOwner(v string) *PutBucketPolicyInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
- s.Policy = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketPolicyInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketPolicyOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketPolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketPolicyOutput) GoString() string {
- return s.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"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // A container for replication rules. You can add up to 1,000 rules. The maximum
- // size of a replication configuration is 2 MB.
- //
- // ReplicationConfiguration is a required field
- ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketReplicationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketReplicationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketReplicationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.ReplicationConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration"))
- }
- if s.ReplicationConfiguration != nil {
- if err := s.ReplicationConfiguration.Validate(); err != nil {
- invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketReplicationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutBucketReplicationInput) SetChecksumAlgorithm(v string) *PutBucketReplicationInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketReplicationInput) SetExpectedBucketOwner(v string) *PutBucketReplicationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetReplicationConfiguration sets the ReplicationConfiguration field's value.
-func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput {
- s.ReplicationConfiguration = v
- return s
-}
-
-// SetToken sets the Token field's value.
-func (s *PutBucketReplicationInput) SetToken(v string) *PutBucketReplicationInput {
- s.Token = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketReplicationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketReplicationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketReplicationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketReplicationOutput) GoString() string {
- return s.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"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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/"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketRequestPaymentInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketRequestPaymentInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketRequestPaymentInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.RequestPaymentConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration"))
- }
- if s.RequestPaymentConfiguration != nil {
- if err := s.RequestPaymentConfiguration.Validate(); err != nil {
- invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaymentInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketRequestPaymentInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutBucketRequestPaymentInput) SetChecksumAlgorithm(v string) *PutBucketRequestPaymentInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketRequestPaymentInput) SetExpectedBucketOwner(v string) *PutBucketRequestPaymentInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value.
-func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput {
- s.RequestPaymentConfiguration = v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketRequestPaymentInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketRequestPaymentOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketRequestPaymentOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketRequestPaymentOutput) GoString() string {
- return s.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"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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/"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketTaggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketTaggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketTaggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Tagging == nil {
- invalidParams.Add(request.NewErrParamRequired("Tagging"))
- }
- if s.Tagging != nil {
- if err := s.Tagging.Validate(); err != nil {
- invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketTaggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutBucketTaggingInput) SetChecksumAlgorithm(v string) *PutBucketTaggingInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketTaggingInput) SetExpectedBucketOwner(v string) *PutBucketTaggingInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetTagging sets the Tagging field's value.
-func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
- s.Tagging = v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketTaggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketTaggingOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketTaggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketTaggingOutput) GoString() string {
- return s.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"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The concatenation of the authentication device's serial number, a space,
- // and the value that is displayed on your authentication device.
- MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
-
- // 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/"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketVersioningInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketVersioningInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketVersioningInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.VersioningConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketVersioningInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutBucketVersioningInput) SetChecksumAlgorithm(v string) *PutBucketVersioningInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketVersioningInput) SetExpectedBucketOwner(v string) *PutBucketVersioningInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetMFA sets the MFA field's value.
-func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput {
- s.MFA = &v
- return s
-}
-
-// SetVersioningConfiguration sets the VersioningConfiguration field's value.
-func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfiguration) *PutBucketVersioningInput {
- s.VersioningConfiguration = v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketVersioningInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketVersioningOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketVersioningOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketVersioningOutput) GoString() string {
- return s.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"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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/"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketWebsiteInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketWebsiteInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketWebsiteInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.WebsiteConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration"))
- }
- if s.WebsiteConfiguration != nil {
- if err := s.WebsiteConfiguration.Validate(); err != nil {
- invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketWebsiteInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutBucketWebsiteInput) SetChecksumAlgorithm(v string) *PutBucketWebsiteInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketWebsiteInput) SetExpectedBucketOwner(v string) *PutBucketWebsiteInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetWebsiteConfiguration sets the WebsiteConfiguration field's value.
-func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput {
- s.WebsiteConfiguration = v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketWebsiteInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketWebsiteOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketWebsiteOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutBucketWebsiteOutput) GoString() string {
- return s.String()
-}
-
-type PutObjectAclInput struct {
- _ struct{} `locationName:"PutObjectAclRequest" type:"structure" payload:"AccessControlPolicy"`
-
- // 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 action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Allows grantee the read, write, read ACP, and write ACP permissions on the
- // bucket.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
-
- // Allows grantee to list the objects in the bucket.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
-
- // Allows grantee to read the bucket ACL.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
-
- // Allows grantee to create new objects in the bucket.
- //
- // For the bucket and object owners of existing objects, also allows deletions
- // and overwrites of those objects.
- GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
-
- // Allows grantee to write the ACL for the applicable bucket.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
-
- // Key for which the PUT action was initiated.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // VersionId used to reference a specific version of the object.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectAclInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectAclInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutObjectAclInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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.AccessControlPolicy != nil {
- if err := s.AccessControlPolicy.Validate(); err != nil {
- invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetACL sets the ACL field's value.
-func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput {
- s.ACL = &v
- return s
-}
-
-// SetAccessControlPolicy sets the AccessControlPolicy field's value.
-func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput {
- s.AccessControlPolicy = v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutObjectAclInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutObjectAclInput) SetChecksumAlgorithm(v string) *PutObjectAclInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutObjectAclInput) SetExpectedBucketOwner(v string) *PutObjectAclInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetGrantFullControl sets the GrantFullControl field's value.
-func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput {
- s.GrantFullControl = &v
- return s
-}
-
-// SetGrantRead sets the GrantRead field's value.
-func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput {
- s.GrantRead = &v
- return s
-}
-
-// SetGrantReadACP sets the GrantReadACP field's value.
-func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput {
- s.GrantReadACP = &v
- return s
-}
-
-// SetGrantWrite sets the GrantWrite field's value.
-func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput {
- s.GrantWrite = &v
- return s
-}
-
-// SetGrantWriteACP sets the GrantWriteACP field's value.
-func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput {
- s.GrantWriteACP = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *PutObjectAclInput) SetKey(v string) *PutObjectAclInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *PutObjectAclInput) SetRequestPayer(v string) *PutObjectAclInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput {
- s.VersionId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutObjectAclInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutObjectAclOutput struct {
- _ struct{} `type:"structure"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectAclOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectAclOutput) GoString() string {
- return s.String()
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput {
- s.RequestCharged = &v
- return s
-}
-
-type PutObjectInput struct {
- _ struct{} `locationName:"PutObjectRequest" type:"structure" payload:"Body"`
-
- // 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).
- //
- // This action is not supported by Amazon S3 on Outposts.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
-
- // Object data.
- Body io.ReadSeeker `type:"blob"`
-
- // The bucket name to which the PUT action was initiated.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
- // with server-side encryption using AWS KMS (SSE-KMS). Setting this header
- // to true causes Amazon S3 to use an S3 Bucket Key for object encryption with
- // SSE-KMS.
- //
- // Specifying this header with a PUT action doesn’t affect bucket-level settings
- // for S3 Bucket Key.
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // 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"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 32-bit CRC32 checksum of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 32-bit CRC32C checksum of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 160-bit SHA-1 digest of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 256-bit SHA-256 digest of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
-
- // 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. 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. 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 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 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 account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
-
- // Allows grantee to read the object data and its metadata.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
-
- // Allows grantee to read the object ACL.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
-
- // Allows grantee to write the ACL for the applicable object.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
-
- // Object key for which the PUT action was initiated.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // A map of metadata to store with the object in S3.
- Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
-
- // 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.
- 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. Must
- // be formatted as a timestamp parameter.
- ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // 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
- // 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 is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by PutObjectInput's
- // String and GoString methods.
- 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 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 Amazon Web Services KMS Encryption Context to use for object
- // encryption. The value of this header is a base64-encoded UTF-8 string holding
- // JSON with the encryption context key-value pairs.
- //
- // SSEKMSEncryptionContext is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by PutObjectInput's
- // String and GoString methods.
- SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
-
- // If x-amz-server-side-encryption is present and has the value of aws:kms,
- // this header specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetrical customer managed key that was 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 Amazon Web Services managed key to protect the data. If the KMS key does
- // not exist in the same account issuing the command, you must use the full
- // ARN and not just the ID.
- //
- // SSEKMSKeyId is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by PutObjectInput's
- // String and GoString methods.
- 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 Amazon
- // S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-
- // 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.
- // Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information,
- // see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
- // in the Amazon S3 User Guide.
- 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.
- // (For example, "Key1=Value1")
- Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
-
- // 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. 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutObjectInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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
-}
-
-// SetACL sets the ACL field's value.
-func (s *PutObjectInput) SetACL(v string) *PutObjectInput {
- s.ACL = &v
- return s
-}
-
-// SetBody sets the Body field's value.
-func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput {
- s.Body = v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutObjectInput) SetBucket(v string) *PutObjectInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutObjectInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *PutObjectInput) SetBucketKeyEnabled(v bool) *PutObjectInput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCacheControl sets the CacheControl field's value.
-func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput {
- s.CacheControl = &v
- return s
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutObjectInput) SetChecksumAlgorithm(v string) *PutObjectInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetChecksumCRC32 sets the ChecksumCRC32 field's value.
-func (s *PutObjectInput) SetChecksumCRC32(v string) *PutObjectInput {
- s.ChecksumCRC32 = &v
- return s
-}
-
-// SetChecksumCRC32C sets the ChecksumCRC32C field's value.
-func (s *PutObjectInput) SetChecksumCRC32C(v string) *PutObjectInput {
- s.ChecksumCRC32C = &v
- return s
-}
-
-// SetChecksumSHA1 sets the ChecksumSHA1 field's value.
-func (s *PutObjectInput) SetChecksumSHA1(v string) *PutObjectInput {
- s.ChecksumSHA1 = &v
- return s
-}
-
-// SetChecksumSHA256 sets the ChecksumSHA256 field's value.
-func (s *PutObjectInput) SetChecksumSHA256(v string) *PutObjectInput {
- s.ChecksumSHA256 = &v
- return s
-}
-
-// SetContentDisposition sets the ContentDisposition field's value.
-func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput {
- s.ContentDisposition = &v
- return s
-}
-
-// SetContentEncoding sets the ContentEncoding field's value.
-func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput {
- s.ContentEncoding = &v
- return s
-}
-
-// SetContentLanguage sets the ContentLanguage field's value.
-func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput {
- s.ContentLanguage = &v
- return s
-}
-
-// SetContentLength sets the ContentLength field's value.
-func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput {
- s.ContentLength = &v
- return s
-}
-
-// SetContentMD5 sets the ContentMD5 field's value.
-func (s *PutObjectInput) SetContentMD5(v string) *PutObjectInput {
- s.ContentMD5 = &v
- return s
-}
-
-// SetContentType sets the ContentType field's value.
-func (s *PutObjectInput) SetContentType(v string) *PutObjectInput {
- s.ContentType = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutObjectInput) SetExpectedBucketOwner(v string) *PutObjectInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetExpires sets the Expires field's value.
-func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput {
- s.Expires = &v
- return s
-}
-
-// SetGrantFullControl sets the GrantFullControl field's value.
-func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput {
- s.GrantFullControl = &v
- return s
-}
-
-// SetGrantRead sets the GrantRead field's value.
-func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput {
- s.GrantRead = &v
- return s
-}
-
-// SetGrantReadACP sets the GrantReadACP field's value.
-func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput {
- s.GrantReadACP = &v
- return s
-}
-
-// SetGrantWriteACP sets the GrantWriteACP field's value.
-func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput {
- s.GrantWriteACP = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *PutObjectInput) SetKey(v string) *PutObjectInput {
- s.Key = &v
- return s
-}
-
-// SetMetadata sets the Metadata field's value.
-func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput {
- s.Metadata = v
- return s
-}
-
-// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
-func (s *PutObjectInput) SetObjectLockLegalHoldStatus(v string) *PutObjectInput {
- s.ObjectLockLegalHoldStatus = &v
- return s
-}
-
-// SetObjectLockMode sets the ObjectLockMode field's value.
-func (s *PutObjectInput) SetObjectLockMode(v string) *PutObjectInput {
- s.ObjectLockMode = &v
- return s
-}
-
-// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
-func (s *PutObjectInput) SetObjectLockRetainUntilDate(v time.Time) *PutObjectInput {
- s.ObjectLockRetainUntilDate = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *PutObjectInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
-func (s *PutObjectInput) SetSSEKMSEncryptionContext(v string) *PutObjectInput {
- s.SSEKMSEncryptionContext = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput {
- s.StorageClass = &v
- return s
-}
-
-// SetTagging sets the Tagging field's value.
-func (s *PutObjectInput) SetTagging(v string) *PutObjectInput {
- s.Tagging = &v
- return s
-}
-
-// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
-func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput {
- s.WebsiteRedirectLocation = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutObjectInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutObjectLegalHoldInput struct {
- _ struct{} `locationName:"PutObjectLegalHoldRequest" type:"structure" payload:"LegalHold"`
-
- // The bucket name containing the object that you want to place a legal hold
- // on.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The key name for the object that you want to place a legal hold on.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Container element for the legal hold configuration you want to apply to the
- // specified object.
- LegalHold *ObjectLockLegalHold `locationName:"LegalHold" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User 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.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectLegalHoldInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectLegalHoldInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutObjectLegalHoldInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutObjectLegalHoldInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutObjectLegalHoldInput) SetBucket(v string) *PutObjectLegalHoldInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutObjectLegalHoldInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutObjectLegalHoldInput) SetChecksumAlgorithm(v string) *PutObjectLegalHoldInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutObjectLegalHoldInput) SetExpectedBucketOwner(v string) *PutObjectLegalHoldInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *PutObjectLegalHoldInput) SetKey(v string) *PutObjectLegalHoldInput {
- s.Key = &v
- return s
-}
-
-// SetLegalHold sets the LegalHold field's value.
-func (s *PutObjectLegalHoldInput) SetLegalHold(v *ObjectLockLegalHold) *PutObjectLegalHoldInput {
- s.LegalHold = v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *PutObjectLegalHoldInput) SetRequestPayer(v string) *PutObjectLegalHoldInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *PutObjectLegalHoldInput) SetVersionId(v string) *PutObjectLegalHoldInput {
- s.VersionId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutObjectLegalHoldInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutObjectLegalHoldOutput struct {
- _ struct{} `type:"structure"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectLegalHoldOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectLegalHoldOutput) GoString() string {
- return s.String()
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *PutObjectLegalHoldOutput) SetRequestCharged(v string) *PutObjectLegalHoldOutput {
- s.RequestCharged = &v
- return s
-}
-
-type PutObjectLockConfigurationInput struct {
- _ struct{} `locationName:"PutObjectLockConfigurationRequest" type:"structure" payload:"ObjectLockConfiguration"`
-
- // 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"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectLockConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectLockConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutObjectLockConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutObjectLockConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutObjectLockConfigurationInput) SetBucket(v string) *PutObjectLockConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutObjectLockConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutObjectLockConfigurationInput) SetChecksumAlgorithm(v string) *PutObjectLockConfigurationInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutObjectLockConfigurationInput) SetExpectedBucketOwner(v string) *PutObjectLockConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetObjectLockConfiguration sets the ObjectLockConfiguration field's value.
-func (s *PutObjectLockConfigurationInput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *PutObjectLockConfigurationInput {
- s.ObjectLockConfiguration = v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *PutObjectLockConfigurationInput) SetRequestPayer(v string) *PutObjectLockConfigurationInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetToken sets the Token field's value.
-func (s *PutObjectLockConfigurationInput) SetToken(v string) *PutObjectLockConfigurationInput {
- s.Token = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutObjectLockConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutObjectLockConfigurationOutput struct {
- _ struct{} `type:"structure"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectLockConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectLockConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *PutObjectLockConfigurationOutput) SetRequestCharged(v string) *PutObjectLockConfigurationOutput {
- s.RequestCharged = &v
- return s
-}
-
-type PutObjectOutput struct {
- _ struct{} `type:"structure"`
-
- // Indicates whether the uploaded object uses an S3 Bucket Key for server-side
- // encryption with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
-
- // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
-
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
-
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
-
- // Entity tag for the uploaded object.
- ETag *string `location:"header" locationName:"ETag" type:"string"`
-
- // If the expiration is configured for the object (see PutBucketLifecycleConfiguration
- // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)),
- // 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
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm
- // used.
- 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
- // 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 Amazon Web Services KMS Encryption Context to use
- // for object encryption. The value of this header is a base64-encoded UTF-8
- // string holding JSON with the encryption context key-value pairs.
- //
- // SSEKMSEncryptionContext is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by PutObjectOutput's
- // String and GoString methods.
- SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
-
- // If x-amz-server-side-encryption is present and has the value of aws:kms,
- // this header specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for
- // the object.
- //
- // SSEKMSKeyId is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by PutObjectOutput's
- // String and GoString methods.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // If you specified server-side encryption either with an Amazon Web Services
- // KMS key 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.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectOutput) GoString() string {
- return s.String()
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *PutObjectOutput) SetBucketKeyEnabled(v bool) *PutObjectOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetChecksumCRC32 sets the ChecksumCRC32 field's value.
-func (s *PutObjectOutput) SetChecksumCRC32(v string) *PutObjectOutput {
- s.ChecksumCRC32 = &v
- return s
-}
-
-// SetChecksumCRC32C sets the ChecksumCRC32C field's value.
-func (s *PutObjectOutput) SetChecksumCRC32C(v string) *PutObjectOutput {
- s.ChecksumCRC32C = &v
- return s
-}
-
-// SetChecksumSHA1 sets the ChecksumSHA1 field's value.
-func (s *PutObjectOutput) SetChecksumSHA1(v string) *PutObjectOutput {
- s.ChecksumSHA1 = &v
- return s
-}
-
-// SetChecksumSHA256 sets the ChecksumSHA256 field's value.
-func (s *PutObjectOutput) SetChecksumSHA256(v string) *PutObjectOutput {
- s.ChecksumSHA256 = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput {
- s.ETag = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *PutObjectOutput) SetExpiration(v string) *PutObjectOutput {
- s.Expiration = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
-func (s *PutObjectOutput) SetSSEKMSEncryptionContext(v string) *PutObjectOutput {
- s.SSEKMSEncryptionContext = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput {
- s.VersionId = &v
- return s
-}
-
-type PutObjectRetentionInput struct {
- _ struct{} `locationName:"PutObjectRetentionRequest" type:"structure" payload:"Retention"`
-
- // The bucket name that contains the object you want to apply this Object Retention
- // configuration to.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Indicates whether this action should bypass Governance-mode restrictions.
- BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The key name for the object that you want to apply this Object Retention
- // configuration to.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // The container element for the Object Retention configuration.
- Retention *ObjectLockRetention `locationName:"Retention" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // The version ID for the object that you want to apply this Object Retention
- // configuration to.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectRetentionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectRetentionInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutObjectRetentionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutObjectRetentionInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutObjectRetentionInput) SetBucket(v string) *PutObjectRetentionInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutObjectRetentionInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
-func (s *PutObjectRetentionInput) SetBypassGovernanceRetention(v bool) *PutObjectRetentionInput {
- s.BypassGovernanceRetention = &v
- return s
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutObjectRetentionInput) SetChecksumAlgorithm(v string) *PutObjectRetentionInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutObjectRetentionInput) SetExpectedBucketOwner(v string) *PutObjectRetentionInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *PutObjectRetentionInput) SetKey(v string) *PutObjectRetentionInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *PutObjectRetentionInput) SetRequestPayer(v string) *PutObjectRetentionInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetRetention sets the Retention field's value.
-func (s *PutObjectRetentionInput) SetRetention(v *ObjectLockRetention) *PutObjectRetentionInput {
- s.Retention = v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *PutObjectRetentionInput) SetVersionId(v string) *PutObjectRetentionInput {
- s.VersionId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutObjectRetentionInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutObjectRetentionOutput struct {
- _ struct{} `type:"structure"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectRetentionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectRetentionOutput) GoString() string {
- return s.String()
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *PutObjectRetentionOutput) SetRequestCharged(v string) *PutObjectRetentionOutput {
- s.RequestCharged = &v
- return s
-}
-
-type PutObjectTaggingInput struct {
- _ struct{} `locationName:"PutObjectTaggingRequest" type:"structure" payload:"Tagging"`
-
- // The bucket name containing the object.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Name of the object key.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectTaggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectTaggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutObjectTaggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutObjectTaggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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.Tagging == nil {
- invalidParams.Add(request.NewErrParamRequired("Tagging"))
- }
- if s.Tagging != nil {
- if err := s.Tagging.Validate(); err != nil {
- invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutObjectTaggingInput) SetBucket(v string) *PutObjectTaggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutObjectTaggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutObjectTaggingInput) SetChecksumAlgorithm(v string) *PutObjectTaggingInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutObjectTaggingInput) SetExpectedBucketOwner(v string) *PutObjectTaggingInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *PutObjectTaggingInput) SetRequestPayer(v string) *PutObjectTaggingInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetTagging sets the Tagging field's value.
-func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput {
- s.Tagging = v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput {
- s.VersionId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutObjectTaggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectTaggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutObjectTaggingOutput) GoString() string {
- return s.String()
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput {
- s.VersionId = &v
- return s
-}
-
-type PutPublicAccessBlockInput struct {
- _ struct{} `locationName:"PutPublicAccessBlockRequest" type:"structure" payload:"PublicAccessBlockConfiguration"`
-
- // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you
- // want to set.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- //
- // The SDK will automatically compute the Content-MD5 checksum for this operation.
- // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
- // to be used.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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 S3 User Guide.
- //
- // PublicAccessBlockConfiguration is a required field
- PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `locationName:"PublicAccessBlockConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutPublicAccessBlockInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutPublicAccessBlockInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutPublicAccessBlockInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutPublicAccessBlockInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.PublicAccessBlockConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("PublicAccessBlockConfiguration"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutPublicAccessBlockInput) SetBucket(v string) *PutPublicAccessBlockInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutPublicAccessBlockInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *PutPublicAccessBlockInput) SetChecksumAlgorithm(v string) *PutPublicAccessBlockInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutPublicAccessBlockInput) SetExpectedBucketOwner(v string) *PutPublicAccessBlockInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value.
-func (s *PutPublicAccessBlockInput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *PutPublicAccessBlockInput {
- s.PublicAccessBlockConfiguration = v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutPublicAccessBlockInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutPublicAccessBlockOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutPublicAccessBlockOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutPublicAccessBlockOutput) GoString() string {
- return s.String()
-}
-
-// Specifies the configuration for publishing messages to an Amazon Simple Queue
-// Service (Amazon SQS) queue when Amazon S3 detects specified events.
-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" enum:"Event"`
-
- // Specifies object key name filtering rules. For information about key name
- // filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
- // in the Amazon S3 User Guide.
- Filter *NotificationConfigurationFilter `type:"structure"`
-
- // 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.
- //
- // QueueArn is a required field
- QueueArn *string `locationName:"Queue" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s QueueConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s QueueConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *QueueConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"}
- if s.Events == nil {
- invalidParams.Add(request.NewErrParamRequired("Events"))
- }
- if s.QueueArn == nil {
- invalidParams.Add(request.NewErrParamRequired("QueueArn"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEvents sets the Events field's value.
-func (s *QueueConfiguration) SetEvents(v []*string) *QueueConfiguration {
- s.Events = v
- return s
-}
-
-// SetFilter sets the Filter field's value.
-func (s *QueueConfiguration) SetFilter(v *NotificationConfigurationFilter) *QueueConfiguration {
- s.Filter = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *QueueConfiguration) SetId(v string) *QueueConfiguration {
- s.Id = &v
- return s
-}
-
-// SetQueueArn sets the QueueArn field's value.
-func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration {
- s.QueueArn = &v
- return s
-}
-
-// This data type is deprecated. Use QueueConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_QueueConfiguration.html)
-// 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"`
-
- // The bucket event for which to send notifications.
- //
- // 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" enum:"Event"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s QueueConfigurationDeprecated) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s QueueConfigurationDeprecated) GoString() string {
- return s.String()
-}
-
-// SetEvent sets the Event field's value.
-func (s *QueueConfigurationDeprecated) SetEvent(v string) *QueueConfigurationDeprecated {
- s.Event = &v
- return s
-}
-
-// SetEvents sets the Events field's value.
-func (s *QueueConfigurationDeprecated) SetEvents(v []*string) *QueueConfigurationDeprecated {
- s.Events = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *QueueConfigurationDeprecated) SetId(v string) *QueueConfigurationDeprecated {
- s.Id = &v
- return s
-}
-
-// SetQueue sets the Queue field's value.
-func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDeprecated {
- s.Queue = &v
- return s
-}
-
-// The container for the records event.
-type RecordsEvent struct {
- _ struct{} `locationName:"RecordsEvent" type:"structure" payload:"Payload"`
-
- // The byte array of partial, one or more result records.
- // Payload is automatically base64 encoded/decoded by the SDK.
- Payload []byte `type:"blob"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RecordsEvent) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RecordsEvent) GoString() string {
- return s.String()
-}
-
-// SetPayload sets the Payload field's value.
-func (s *RecordsEvent) SetPayload(v []byte) *RecordsEvent {
- s.Payload = v
- return s
-}
-
-// The RecordsEvent is and event in the SelectObjectContentEventStream group of events.
-func (s *RecordsEvent) eventSelectObjectContentEventStream() {}
-
-// UnmarshalEvent unmarshals the EventStream Message into the RecordsEvent value.
-// This method is only used internally within the SDK's EventStream handling.
-func (s *RecordsEvent) UnmarshalEvent(
- payloadUnmarshaler protocol.PayloadUnmarshaler,
- msg eventstream.Message,
-) error {
- s.Payload = make([]byte, len(msg.Payload))
- copy(s.Payload, msg.Payload)
- return nil
-}
-
-// MarshalEvent marshals the type into an stream event value. This method
-// should only used internally within the SDK's EventStream handling.
-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 {
- _ struct{} `type:"structure"`
-
- // The host name to use in the redirect request.
- HostName *string `type:"string"`
-
- // The HTTP redirect code to use on the response. Not required if one of the
- // siblings is present.
- HttpRedirectCode *string `type:"string"`
-
- // Protocol to use when redirecting requests. The default is the protocol that
- // is used in the original request.
- Protocol *string `type:"string" enum:"Protocol"`
-
- // The object key prefix to use in the redirect request. For example, to redirect
- // requests for all pages with prefix docs/ (objects in the docs/ folder) to
- // documents/, you can set a condition block with KeyPrefixEquals set to docs/
- // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required
- // if one of the siblings is present. Can be present only if ReplaceKeyWith
- // is not provided.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- ReplaceKeyPrefixWith *string `type:"string"`
-
- // The specific object key to use in the redirect request. For example, redirect
- // request to error.html. Not required if one of the siblings is present. Can
- // be present only if ReplaceKeyPrefixWith is not provided.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- ReplaceKeyWith *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Redirect) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Redirect) GoString() string {
- return s.String()
-}
-
-// SetHostName sets the HostName field's value.
-func (s *Redirect) SetHostName(v string) *Redirect {
- s.HostName = &v
- return s
-}
-
-// SetHttpRedirectCode sets the HttpRedirectCode field's value.
-func (s *Redirect) SetHttpRedirectCode(v string) *Redirect {
- s.HttpRedirectCode = &v
- return s
-}
-
-// SetProtocol sets the Protocol field's value.
-func (s *Redirect) SetProtocol(v string) *Redirect {
- s.Protocol = &v
- return s
-}
-
-// SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field's value.
-func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect {
- s.ReplaceKeyPrefixWith = &v
- return s
-}
-
-// SetReplaceKeyWith sets the ReplaceKeyWith field's value.
-func (s *Redirect) SetReplaceKeyWith(v string) *Redirect {
- s.ReplaceKeyWith = &v
- return s
-}
-
-// Specifies the redirect behavior of all requests to a website endpoint of
-// an Amazon S3 bucket.
-type RedirectAllRequestsTo struct {
- _ struct{} `type:"structure"`
-
- // Name of the host where requests are redirected.
- //
- // HostName is a required field
- HostName *string `type:"string" required:"true"`
-
- // Protocol to use when redirecting requests. The default is the protocol that
- // is used in the original request.
- Protocol *string `type:"string" enum:"Protocol"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RedirectAllRequestsTo) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RedirectAllRequestsTo) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *RedirectAllRequestsTo) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"}
- if s.HostName == nil {
- invalidParams.Add(request.NewErrParamRequired("HostName"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetHostName sets the HostName field's value.
-func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo {
- s.HostName = &v
- return s
-}
-
-// SetProtocol sets the Protocol field's value.
-func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo {
- s.Protocol = &v
- return s
-}
-
-// A filter that you can specify for selection for modifications on replicas.
-// Amazon S3 doesn't replicate replica modifications by default. In the latest
-// version of replication configuration (when Filter is specified), you can
-// specify this element and set the status to Enabled to replicate modifications
-// on replicas.
-//
-// If you don't specify the Filter element, Amazon S3 assumes that the replication
-// configuration is the earlier version, V1. In the earlier version, this element
-// is not allowed.
-type ReplicaModifications struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether Amazon S3 replicates modifications on replicas.
- //
- // Status is a required field
- Status *string `type:"string" required:"true" enum:"ReplicaModificationsStatus"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicaModifications) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicaModifications) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ReplicaModifications) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ReplicaModifications"}
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetStatus sets the Status field's value.
-func (s *ReplicaModifications) SetStatus(v string) *ReplicaModifications {
- s.Status = &v
- return s
-}
-
-// A container for replication rules. You can add up to 1,000 rules. The maximum
-// size of a replication configuration is 2 MB.
-type ReplicationConfiguration struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of the Identity and Access Management (IAM)
- // role that Amazon S3 assumes when replicating objects. For more information,
- // see How to Set Up Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html)
- // in the Amazon S3 User Guide.
- //
- // Role is a required field
- Role *string `type:"string" required:"true"`
-
- // A container for one or more replication rules. A replication configuration
- // must have at least one rule and can contain a maximum of 1,000 rules.
- //
- // Rules is a required field
- Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicationConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicationConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ReplicationConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"}
- if s.Role == nil {
- invalidParams.Add(request.NewErrParamRequired("Role"))
- }
- if s.Rules == nil {
- invalidParams.Add(request.NewErrParamRequired("Rules"))
- }
- if s.Rules != nil {
- for i, v := range s.Rules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetRole sets the Role field's value.
-func (s *ReplicationConfiguration) SetRole(v string) *ReplicationConfiguration {
- s.Role = &v
- return s
-}
-
-// SetRules sets the Rules field's value.
-func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationConfiguration {
- s.Rules = v
- return s
-}
-
-// Specifies which Amazon S3 objects to replicate and where to store the replicas.
-type ReplicationRule struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether Amazon S3 replicates delete markers. If you specify a Filter
- // in your replication configuration, you must also include a DeleteMarkerReplication
- // element. If your Filter includes a Tag element, the DeleteMarkerReplication
- // Status must be set to Disabled, because Amazon S3 does not support replicating
- // delete markers for tag-based rules. 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).
- //
- // For more information about delete marker replication, see Basic Rule Configuration
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html).
- //
- // If you are using an earlier version of the replication configuration, Amazon
- // S3 handles 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 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 User 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"`
-
- // A unique identifier for the rule. The maximum value is 255 characters.
- ID *string `type:"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.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- //
- // Deprecated: Prefix has been deprecated
- Prefix *string `deprecated:"true" type:"string"`
-
- // The priority indicates which rule has precedence whenever two or more replication
- // rules conflict. Amazon S3 will attempt to replicate objects according to
- // all replication rules. However, if there are two or more rules with the same
- // destination bucket, then objects will be replicated according to the rule
- // with the highest priority. The higher the number, the higher the priority.
- //
- // For more information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
- // in the Amazon S3 User 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
- // a customer managed key stored in Amazon Web Services Key Management Service
- // (SSE-KMS).
- SourceSelectionCriteria *SourceSelectionCriteria `type:"structure"`
-
- // Specifies whether the rule is enabled.
- //
- // Status is a required field
- Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicationRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicationRule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ReplicationRule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"}
- if s.Destination == nil {
- invalidParams.Add(request.NewErrParamRequired("Destination"))
- }
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
- if s.Destination != nil {
- if err := s.Destination.Validate(); err != nil {
- 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))
- }
- }
- if s.SourceSelectionCriteria != nil {
- if err := s.SourceSelectionCriteria.Validate(); err != nil {
- invalidParams.AddNested("SourceSelectionCriteria", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDeleteMarkerReplication sets the DeleteMarkerReplication field's value.
-func (s *ReplicationRule) SetDeleteMarkerReplication(v *DeleteMarkerReplication) *ReplicationRule {
- s.DeleteMarkerReplication = v
- return s
-}
-
-// SetDestination sets the Destination field's value.
-func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule {
- s.Destination = v
- 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
- return s
-}
-
-// SetID sets the ID field's value.
-func (s *ReplicationRule) SetID(v string) *ReplicationRule {
- s.ID = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule {
- s.Prefix = &v
- return s
-}
-
-// SetPriority sets the Priority field's value.
-func (s *ReplicationRule) SetPriority(v int64) *ReplicationRule {
- s.Priority = &v
- return s
-}
-
-// SetSourceSelectionCriteria sets the SourceSelectionCriteria field's value.
-func (s *ReplicationRule) SetSourceSelectionCriteria(v *SourceSelectionCriteria) *ReplicationRule {
- s.SourceSelectionCriteria = v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *ReplicationRule) SetStatus(v string) *ReplicationRule {
- s.Status = &v
- 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicationRuleAndOperator) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicationRuleAndOperator) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ReplicationRuleAndOperator) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleAndOperator"}
- 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
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ReplicationRuleAndOperator) SetPrefix(v string) *ReplicationRuleAndOperator {
- s.Prefix = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *ReplicationRuleAndOperator) SetTags(v []*Tag) *ReplicationRuleAndOperator {
- s.Tags = v
- return s
-}
-
-// 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.
-type ReplicationRuleFilter struct {
- _ struct{} `type:"structure"`
-
- // 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.
- And *ReplicationRuleAndOperator `type:"structure"`
-
- // An object key name prefix that identifies the subset of objects to which
- // the rule applies.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- Prefix *string `type:"string"`
-
- // A container for specifying a tag key and value.
- //
- // The rule applies only to objects that have the tag in their tag set.
- Tag *Tag `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicationRuleFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicationRuleFilter) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ReplicationRuleFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleFilter"}
- if s.And != nil {
- if err := s.And.Validate(); err != nil {
- invalidParams.AddNested("And", err.(request.ErrInvalidParams))
- }
- }
- if s.Tag != nil {
- if err := s.Tag.Validate(); err != nil {
- invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAnd sets the And field's value.
-func (s *ReplicationRuleFilter) SetAnd(v *ReplicationRuleAndOperator) *ReplicationRuleFilter {
- s.And = v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ReplicationRuleFilter) SetPrefix(v string) *ReplicationRuleFilter {
- s.Prefix = &v
- return s
-}
-
-// SetTag sets the Tag field's value.
-func (s *ReplicationRuleFilter) SetTag(v *Tag) *ReplicationRuleFilter {
- s.Tag = v
- 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.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicationTime) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-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 value: 15
- Minutes *int64 `type:"integer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicationTimeValue) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-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"`
-
- // Specifies who pays for the download and request fees.
- //
- // Payer is a required field
- Payer *string `type:"string" required:"true" enum:"Payer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RequestPaymentConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RequestPaymentConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *RequestPaymentConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"}
- if s.Payer == nil {
- invalidParams.Add(request.NewErrParamRequired("Payer"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPayer sets the Payer field's value.
-func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfiguration {
- s.Payer = &v
- return s
-}
-
-// Container for specifying if periodic QueryProgress messages should be sent.
-type RequestProgress struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether periodic QueryProgress frames should be sent. Valid values:
- // TRUE, FALSE. Default value: FALSE.
- Enabled *bool `type:"boolean"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RequestProgress) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RequestProgress) GoString() string {
- return s.String()
-}
-
-// SetEnabled sets the Enabled field's value.
-func (s *RequestProgress) SetEnabled(v bool) *RequestProgress {
- s.Enabled = &v
- return s
-}
-
-type RestoreObjectInput struct {
- _ struct{} `locationName:"RestoreObjectRequest" type:"structure" payload:"RestoreRequest"`
-
- // The bucket name containing the object to restore.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Object key for which the action 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 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RestoreObjectInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RestoreObjectInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *RestoreObjectInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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.RestoreRequest != nil {
- if err := s.RestoreRequest.Validate(); err != nil {
- invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput {
- s.Bucket = &v
- return s
-}
-
-func (s *RestoreObjectInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *RestoreObjectInput) SetChecksumAlgorithm(v string) *RestoreObjectInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *RestoreObjectInput) SetExpectedBucketOwner(v string) *RestoreObjectInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *RestoreObjectInput) SetRequestPayer(v string) *RestoreObjectInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetRestoreRequest sets the RestoreRequest field's value.
-func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput {
- s.RestoreRequest = v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput {
- s.VersionId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s RestoreObjectInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type RestoreObjectOutput struct {
- _ struct{} `type:"structure"`
-
- // 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"`
-
- // Indicates the path in the provided S3 output location where Select results
- // will be restored to.
- RestoreOutputPath *string `location:"header" locationName:"x-amz-restore-output-path" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RestoreObjectOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RestoreObjectOutput) GoString() string {
- return s.String()
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetRestoreOutputPath sets the RestoreOutputPath field's value.
-func (s *RestoreObjectOutput) SetRestoreOutputPath(v string) *RestoreObjectOutput {
- s.RestoreOutputPath = &v
- return s
-}
-
-// Container for restore job parameters.
-type RestoreRequest struct {
- _ struct{} `type:"structure"`
-
- // Lifetime of the active copy in days. Do not use with restores that specify
- // OutputLocation.
- //
- // The Days element is required for regular restores, and must not be provided
- // for select requests.
- Days *int64 `type:"integer"`
-
- // The optional description for the job.
- Description *string `type:"string"`
-
- // S3 Glacier related parameters pertaining to this job. Do not use with restores
- // that specify OutputLocation.
- GlacierJobParameters *GlacierJobParameters `type:"structure"`
-
- // Describes the location where the restore job's output is stored.
- OutputLocation *OutputLocation `type:"structure"`
-
- // Describes the parameters for Select job types.
- SelectParameters *SelectParameters `type:"structure"`
-
- // Retrieval tier at which the restore will be processed.
- Tier *string `type:"string" enum:"Tier"`
-
- // Type of restore request.
- Type *string `type:"string" enum:"RestoreRequestType"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RestoreRequest) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RestoreRequest) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *RestoreRequest) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"}
- if s.GlacierJobParameters != nil {
- if err := s.GlacierJobParameters.Validate(); err != nil {
- invalidParams.AddNested("GlacierJobParameters", err.(request.ErrInvalidParams))
- }
- }
- if s.OutputLocation != nil {
- if err := s.OutputLocation.Validate(); err != nil {
- invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams))
- }
- }
- if s.SelectParameters != nil {
- if err := s.SelectParameters.Validate(); err != nil {
- invalidParams.AddNested("SelectParameters", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDays sets the Days field's value.
-func (s *RestoreRequest) SetDays(v int64) *RestoreRequest {
- s.Days = &v
- return s
-}
-
-// SetDescription sets the Description field's value.
-func (s *RestoreRequest) SetDescription(v string) *RestoreRequest {
- s.Description = &v
- return s
-}
-
-// SetGlacierJobParameters sets the GlacierJobParameters field's value.
-func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *RestoreRequest {
- s.GlacierJobParameters = v
- return s
-}
-
-// SetOutputLocation sets the OutputLocation field's value.
-func (s *RestoreRequest) SetOutputLocation(v *OutputLocation) *RestoreRequest {
- s.OutputLocation = v
- return s
-}
-
-// SetSelectParameters sets the SelectParameters field's value.
-func (s *RestoreRequest) SetSelectParameters(v *SelectParameters) *RestoreRequest {
- s.SelectParameters = v
- return s
-}
-
-// SetTier sets the Tier field's value.
-func (s *RestoreRequest) SetTier(v string) *RestoreRequest {
- s.Tier = &v
- return s
-}
-
-// SetType sets the Type field's value.
-func (s *RestoreRequest) SetType(v string) *RestoreRequest {
- s.Type = &v
- return s
-}
-
-// Specifies the redirect behavior and when a redirect is applied. For more
-// information about routing rules, see Configuring advanced conditional redirects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html#advanced-conditional-redirects)
-// in the Amazon S3 User Guide.
-type RoutingRule struct {
- _ struct{} `type:"structure"`
-
- // 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.
- Condition *Condition `type:"structure"`
-
- // Container for redirect information. You can redirect requests to another
- // host, to another page, or with another protocol. In the event of an error,
- // you can specify a different error code to return.
- //
- // Redirect is a required field
- Redirect *Redirect `type:"structure" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RoutingRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RoutingRule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *RoutingRule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RoutingRule"}
- if s.Redirect == nil {
- invalidParams.Add(request.NewErrParamRequired("Redirect"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCondition sets the Condition field's value.
-func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule {
- s.Condition = v
- return s
-}
-
-// SetRedirect sets the Redirect field's value.
-func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule {
- s.Redirect = v
- return s
-}
-
-// Specifies lifecycle rules for an Amazon S3 bucket. For more information,
-// see Put Bucket Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html)
-// in the Amazon S3 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"`
-
- // Specifies the days since the initiation of an incomplete multipart upload
- // that Amazon S3 will wait before permanently removing all parts of the 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)
- // in the Amazon S3 User 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.
- ID *string `type:"string"`
-
- // Specifies when noncurrent object versions expire. Upon expiration, Amazon
- // S3 permanently deletes the noncurrent object versions. You set this lifecycle
- // configuration action on a bucket that has versioning enabled (or suspended)
- // to request that Amazon S3 delete noncurrent object versions at a specific
- // period in the object's lifetime.
- NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
-
- // Container for the transition rule that describes when noncurrent objects
- // transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER_IR,
- // GLACIER, or DEEP_ARCHIVE 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 the STANDARD_IA, ONEZONE_IA,
- // INTELLIGENT_TIERING, GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage class at
- // a specific period in the object's lifetime.
- NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"`
-
- // Object key prefix that identifies one or more objects to which this rule
- // applies.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- //
- // Prefix is a required field
- Prefix *string `type:"string" required:"true"`
-
- // If Enabled, the rule is currently being applied. If Disabled, the rule is
- // not currently being applied.
- //
- // Status is a required field
- Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
-
- // 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 S3 User Guide.
- Transition *Transition `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Rule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Rule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Rule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Rule"}
- if s.Prefix == nil {
- invalidParams.Add(request.NewErrParamRequired("Prefix"))
- }
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
-func (s *Rule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *Rule {
- s.AbortIncompleteMultipartUpload = v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *Rule) SetExpiration(v *LifecycleExpiration) *Rule {
- s.Expiration = v
- return s
-}
-
-// SetID sets the ID field's value.
-func (s *Rule) SetID(v string) *Rule {
- s.ID = &v
- return s
-}
-
-// SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
-func (s *Rule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *Rule {
- s.NoncurrentVersionExpiration = v
- return s
-}
-
-// SetNoncurrentVersionTransition sets the NoncurrentVersionTransition field's value.
-func (s *Rule) SetNoncurrentVersionTransition(v *NoncurrentVersionTransition) *Rule {
- s.NoncurrentVersionTransition = v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *Rule) SetPrefix(v string) *Rule {
- s.Prefix = &v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *Rule) SetStatus(v string) *Rule {
- s.Status = &v
- return s
-}
-
-// SetTransition sets the Transition field's value.
-func (s *Rule) SetTransition(v *Transition) *Rule {
- s.Transition = v
- return s
-}
-
-// 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 Amazon Web Services Key Management Service (Amazon
- // Web Services KMS) symmetric customer managed key to use for encrypting inventory
- // reports.
- //
- // KeyId is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by SSEKMS's
- // String and GoString methods.
- //
- // KeyId is a required field
- KeyId *string `type:"string" required:"true" sensitive:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SSEKMS) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SSEKMS) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *SSEKMS) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SSEKMS"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *SSEKMS) SetKeyId(v string) *SSEKMS {
- s.KeyId = &v
- return s
-}
-
-// Specifies the use of SSE-S3 to encrypt delivered inventory reports.
-type SSES3 struct {
- _ struct{} `locationName:"SSE-S3" type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SSES3) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SSES3) GoString() string {
- return s.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.
-type ScanRange struct {
- _ struct{} `type:"structure"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ScanRange) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ScanRange) GoString() string {
- return s.String()
-}
-
-// SetEnd sets the End field's value.
-func (s *ScanRange) SetEnd(v int64) *ScanRange {
- s.End = &v
- return s
-}
-
-// 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 writes for SelectObjectContentEventStream.
-//
-// These events are:
-//
-// - ContinuationEvent
-// - EndEvent
-// - ProgressEvent
-// - RecordsEvent
-// - StatsEvent
-type SelectObjectContentEventStreamEvent interface {
- eventSelectObjectContentEventStream()
- eventstreamapi.Marshaler
- eventstreamapi.Unmarshaler
-}
-
-// 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.
-//
-// These events are:
-//
-// - ContinuationEvent
-// - EndEvent
-// - ProgressEvent
-// - RecordsEvent
-// - StatsEvent
-// - SelectObjectContentEventStreamUnknownEvent
-type SelectObjectContentEventStreamReader interface {
- // Returns a channel of events as they are read from the event stream.
- Events() <-chan SelectObjectContentEventStreamEvent
-
- // Close will stop the reader reading events from the stream.
- Close() error
-
- // Returns any error that has occurred while reading from the event stream.
- Err() error
-}
-
-type readSelectObjectContentEventStream struct {
- eventReader *eventstreamapi.EventReader
- stream chan SelectObjectContentEventStreamEvent
- err *eventstreamapi.OnceError
-
- done chan struct{}
- closeOnce sync.Once
-}
-
-func newReadSelectObjectContentEventStream(eventReader *eventstreamapi.EventReader) *readSelectObjectContentEventStream {
- r := &readSelectObjectContentEventStream{
- eventReader: eventReader,
- stream: make(chan SelectObjectContentEventStreamEvent),
- done: make(chan struct{}),
- err: eventstreamapi.NewOnceError(),
- }
- go r.readEventStream()
-
- return r
-}
-
-// 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)
-}
-
-func (r *readSelectObjectContentEventStream) Err() error {
- return r.err.Err()
-}
-
-func (r *readSelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
- return r.stream
-}
-
-func (r *readSelectObjectContentEventStream) readEventStream() {
- defer r.Close()
- defer close(r.stream)
-
- for {
- event, err := r.eventReader.ReadEvent()
- if err != nil {
- if err == io.EOF {
- return
- }
- select {
- case <-r.done:
- // If closed already ignore the error
- return
- default:
- }
- if _, ok := err.(*eventstreamapi.UnknownMessageTypeError); ok {
- continue
- }
- r.err.SetError(err)
- return
- }
-
- select {
- case r.stream <- event.(SelectObjectContentEventStreamEvent):
- case <-r.done:
- return
- }
- }
-}
-
-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:
- return &SelectObjectContentEventStreamUnknownEvent{Type: eventType}, nil
- }
-}
-
-// SelectObjectContentEventStreamUnknownEvent provides a failsafe event for the
-// SelectObjectContentEventStream group of events when an unknown event is received.
-type SelectObjectContentEventStreamUnknownEvent struct {
- Type string
- Message eventstream.Message
-}
-
-// The SelectObjectContentEventStreamUnknownEvent is and event in the SelectObjectContentEventStream
-// group of events.
-func (s *SelectObjectContentEventStreamUnknownEvent) eventSelectObjectContentEventStream() {}
-
-// MarshalEvent marshals the type into an stream event value. This method
-// should only used internally within the SDK's EventStream handling.
-func (e *SelectObjectContentEventStreamUnknownEvent) MarshalEvent(pm protocol.PayloadMarshaler) (
- msg eventstream.Message, err error,
-) {
- return e.Message.Clone(), nil
-}
-
-// UnmarshalEvent unmarshals the EventStream Message into the SelectObjectContentEventStreamData value.
-// This method is only used internally within the SDK's EventStream handling.
-func (e *SelectObjectContentEventStreamUnknownEvent) UnmarshalEvent(
- payloadUnmarshaler protocol.PayloadUnmarshaler,
- msg eventstream.Message,
-) error {
- e.Message = msg.Clone()
- return nil
-}
-
-// Request to filter 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 specify a data serialization format (JSON or CSV) of the object.
-// Amazon S3 uses this to parse object data into records. It returns only records
-// that match the specified SQL expression. You must also specify the data serialization
-// format for the response. For more information, see S3Select API Documentation
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html).
-type SelectObjectContentInput struct {
- _ struct{} `locationName:"SelectObjectContentRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // The S3 bucket.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The expression that is used to query the object.
- //
- // Expression is a required field
- Expression *string `type:"string" required:"true"`
-
- // The type of the provided expression (for example, SQL).
- //
- // ExpressionType is a required field
- ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
-
- // Describes the format of the data in the object that is being queried.
- //
- // InputSerialization is a required field
- InputSerialization *InputSerialization `type:"structure" required:"true"`
-
- // The object key.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Describes the format of the data that you want Amazon S3 to return in response.
- //
- // OutputSerialization is a required field
- OutputSerialization *OutputSerialization `type:"structure" required:"true"`
-
- // Specifies if periodic request progress information should be enabled.
- RequestProgress *RequestProgress `type:"structure"`
-
- // The server-side encryption (SSE) algorithm used to encrypt the object. This
- // parameter is needed only when the object was created using a checksum algorithm.
- // For more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
- // in the Amazon S3 User Guide.
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // The server-side encryption (SSE) customer managed key. This parameter is
- // needed only when the object was created using a checksum algorithm. For more
- // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
- // in the Amazon S3 User Guide.
- //
- // SSECustomerKey is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by SelectObjectContentInput's
- // String and GoString methods.
- SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
-
- // The MD5 server-side encryption (SSE) customer managed key. This parameter
- // is needed only when the object was created using a checksum algorithm. For
- // more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
- // in the Amazon S3 User Guide.
- 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.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SelectObjectContentInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SelectObjectContentInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *SelectObjectContentInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SelectObjectContentInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Expression == nil {
- invalidParams.Add(request.NewErrParamRequired("Expression"))
- }
- if s.ExpressionType == nil {
- invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
- }
- if s.InputSerialization == nil {
- invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
- }
- 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.OutputSerialization == nil {
- invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *SelectObjectContentInput) SetBucket(v string) *SelectObjectContentInput {
- s.Bucket = &v
- return s
-}
-
-func (s *SelectObjectContentInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *SelectObjectContentInput) SetExpectedBucketOwner(v string) *SelectObjectContentInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetExpression sets the Expression field's value.
-func (s *SelectObjectContentInput) SetExpression(v string) *SelectObjectContentInput {
- s.Expression = &v
- return s
-}
-
-// SetExpressionType sets the ExpressionType field's value.
-func (s *SelectObjectContentInput) SetExpressionType(v string) *SelectObjectContentInput {
- s.ExpressionType = &v
- return s
-}
-
-// SetInputSerialization sets the InputSerialization field's value.
-func (s *SelectObjectContentInput) SetInputSerialization(v *InputSerialization) *SelectObjectContentInput {
- s.InputSerialization = v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *SelectObjectContentInput) SetKey(v string) *SelectObjectContentInput {
- s.Key = &v
- return s
-}
-
-// SetOutputSerialization sets the OutputSerialization field's value.
-func (s *SelectObjectContentInput) SetOutputSerialization(v *OutputSerialization) *SelectObjectContentInput {
- s.OutputSerialization = v
- return s
-}
-
-// SetRequestProgress sets the RequestProgress field's value.
-func (s *SelectObjectContentInput) SetRequestProgress(v *RequestProgress) *SelectObjectContentInput {
- s.RequestProgress = v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *SelectObjectContentInput) SetSSECustomerAlgorithm(v string) *SelectObjectContentInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *SelectObjectContentInput) SetSSECustomerKey(v string) *SelectObjectContentInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *SelectObjectContentInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *SelectObjectContentInput) SetSSECustomerKeyMD5(v string) *SelectObjectContentInput {
- s.SSECustomerKeyMD5 = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s SelectObjectContentInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type SelectObjectContentOutput struct {
- _ struct{} `type:"structure" payload:"Payload"`
-
- EventStream *SelectObjectContentEventStream
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SelectObjectContentOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SelectObjectContentOutput) GoString() string {
- return s.String()
-}
-
-func (s *SelectObjectContentOutput) SetEventStream(v *SelectObjectContentEventStream) *SelectObjectContentOutput {
- s.EventStream = v
- return s
-}
-func (s *SelectObjectContentOutput) GetEventStream() *SelectObjectContentEventStream {
- return s.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.
-type SelectParameters struct {
- _ struct{} `type:"structure"`
-
- // The expression that is used to query the object.
- //
- // Expression is a required field
- Expression *string `type:"string" required:"true"`
-
- // The type of the provided expression (for example, SQL).
- //
- // ExpressionType is a required field
- ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
-
- // Describes the serialization format of the object.
- //
- // InputSerialization is a required field
- InputSerialization *InputSerialization `type:"structure" required:"true"`
-
- // Describes how the results of the Select job are serialized.
- //
- // OutputSerialization is a required field
- OutputSerialization *OutputSerialization `type:"structure" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SelectParameters) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SelectParameters) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *SelectParameters) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SelectParameters"}
- if s.Expression == nil {
- invalidParams.Add(request.NewErrParamRequired("Expression"))
- }
- if s.ExpressionType == nil {
- invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
- }
- if s.InputSerialization == nil {
- invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
- }
- if s.OutputSerialization == nil {
- invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetExpression sets the Expression field's value.
-func (s *SelectParameters) SetExpression(v string) *SelectParameters {
- s.Expression = &v
- return s
-}
-
-// SetExpressionType sets the ExpressionType field's value.
-func (s *SelectParameters) SetExpressionType(v string) *SelectParameters {
- s.ExpressionType = &v
- return s
-}
-
-// SetInputSerialization sets the InputSerialization field's value.
-func (s *SelectParameters) SetInputSerialization(v *InputSerialization) *SelectParameters {
- s.InputSerialization = v
- return s
-}
-
-// SetOutputSerialization sets the OutputSerialization field's value.
-func (s *SelectParameters) SetOutputSerialization(v *OutputSerialization) *SelectParameters {
- s.OutputSerialization = v
- return s
-}
-
-// Describes the default server-side encryption to apply to new objects in the
-// bucket. If a PUT Object request doesn't specify any server-side encryption,
-// this default encryption will be applied. If you don't specify a customer
-// managed key at configuration, Amazon S3 automatically creates an Amazon Web
-// Services KMS key in your Amazon Web Services account the first time that
-// you add an object encrypted with SSE-KMS to a bucket. By default, Amazon
-// S3 uses this KMS key for SSE-KMS. For more information, see PUT Bucket encryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTencryption.html)
-// in the Amazon S3 API Reference.
-type ServerSideEncryptionByDefault struct {
- _ struct{} `type:"structure"`
-
- // Amazon Web Services Key Management Service (KMS) customer Amazon Web Services
- // KMS 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 KMS key.
- // However, if you are using encryption with cross-account or Amazon Web Services
- // service operations you must use a fully qualified KMS key 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 KMS keys and not asymmetric KMS keys. For
- // more information, see Using symmetric and asymmetric keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
- // in the Amazon Web Services Key Management Service Developer Guide.
- //
- // KMSMasterKeyID is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by ServerSideEncryptionByDefault's
- // String and GoString methods.
- KMSMasterKeyID *string `type:"string" sensitive:"true"`
-
- // Server-side encryption algorithm to use for the default encryption.
- //
- // SSEAlgorithm is a required field
- SSEAlgorithm *string `type:"string" required:"true" enum:"ServerSideEncryption"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ServerSideEncryptionByDefault) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ServerSideEncryptionByDefault) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ServerSideEncryptionByDefault) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionByDefault"}
- if s.SSEAlgorithm == nil {
- invalidParams.Add(request.NewErrParamRequired("SSEAlgorithm"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKMSMasterKeyID sets the KMSMasterKeyID field's value.
-func (s *ServerSideEncryptionByDefault) SetKMSMasterKeyID(v string) *ServerSideEncryptionByDefault {
- s.KMSMasterKeyID = &v
- return s
-}
-
-// SetSSEAlgorithm sets the SSEAlgorithm field's value.
-func (s *ServerSideEncryptionByDefault) SetSSEAlgorithm(v string) *ServerSideEncryptionByDefault {
- s.SSEAlgorithm = &v
- return s
-}
-
-// Specifies the default server-side-encryption configuration.
-type ServerSideEncryptionConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Container for information about a particular server-side encryption configuration
- // rule.
- //
- // Rules is a required field
- Rules []*ServerSideEncryptionRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ServerSideEncryptionConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ServerSideEncryptionConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ServerSideEncryptionConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionConfiguration"}
- if s.Rules == nil {
- invalidParams.Add(request.NewErrParamRequired("Rules"))
- }
- if s.Rules != nil {
- for i, v := range s.Rules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetRules sets the Rules field's value.
-func (s *ServerSideEncryptionConfiguration) SetRules(v []*ServerSideEncryptionRule) *ServerSideEncryptionConfiguration {
- s.Rules = v
- return s
-}
-
-// Specifies the default server-side encryption configuration.
-type ServerSideEncryptionRule struct {
- _ struct{} `type:"structure"`
-
- // Specifies the default server-side encryption to apply to new objects in the
- // bucket. If a PUT Object request doesn't specify any server-side encryption,
- // this default encryption will be applied.
- ApplyServerSideEncryptionByDefault *ServerSideEncryptionByDefault `type:"structure"`
-
- // Specifies whether Amazon S3 should use an S3 Bucket Key with server-side
- // encryption using KMS (SSE-KMS) for new objects in the bucket. Existing objects
- // are not affected. Setting the BucketKeyEnabled element to true causes Amazon
- // S3 to use an S3 Bucket Key. By default, S3 Bucket Key is not enabled.
- //
- // For more information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
- // in the Amazon S3 User Guide.
- BucketKeyEnabled *bool `type:"boolean"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ServerSideEncryptionRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ServerSideEncryptionRule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ServerSideEncryptionRule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionRule"}
- if s.ApplyServerSideEncryptionByDefault != nil {
- if err := s.ApplyServerSideEncryptionByDefault.Validate(); err != nil {
- invalidParams.AddNested("ApplyServerSideEncryptionByDefault", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetApplyServerSideEncryptionByDefault sets the ApplyServerSideEncryptionByDefault field's value.
-func (s *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *ServerSideEncryptionByDefault) *ServerSideEncryptionRule {
- s.ApplyServerSideEncryptionByDefault = v
- return s
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *ServerSideEncryptionRule) SetBucketKeyEnabled(v bool) *ServerSideEncryptionRule {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// 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
-// a customer managed key stored in Amazon Web Services Key Management Service
-// (SSE-KMS).
-type SourceSelectionCriteria struct {
- _ struct{} `type:"structure"`
-
- // A filter that you can specify for selections for modifications on replicas.
- // Amazon S3 doesn't replicate replica modifications by default. In the latest
- // version of replication configuration (when Filter is specified), you can
- // specify this element and set the status to Enabled to replicate modifications
- // on replicas.
- //
- // If you don't specify the Filter element, Amazon S3 assumes that the replication
- // configuration is the earlier version, V1. In the earlier version, this element
- // is not allowed
- ReplicaModifications *ReplicaModifications `type:"structure"`
-
- // A container for filter information for the selection of Amazon S3 objects
- // encrypted with Amazon Web Services KMS. If you include SourceSelectionCriteria
- // in the replication configuration, this element is required.
- SseKmsEncryptedObjects *SseKmsEncryptedObjects `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SourceSelectionCriteria) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SourceSelectionCriteria) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *SourceSelectionCriteria) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SourceSelectionCriteria"}
- if s.ReplicaModifications != nil {
- if err := s.ReplicaModifications.Validate(); err != nil {
- invalidParams.AddNested("ReplicaModifications", err.(request.ErrInvalidParams))
- }
- }
- if s.SseKmsEncryptedObjects != nil {
- if err := s.SseKmsEncryptedObjects.Validate(); err != nil {
- invalidParams.AddNested("SseKmsEncryptedObjects", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetReplicaModifications sets the ReplicaModifications field's value.
-func (s *SourceSelectionCriteria) SetReplicaModifications(v *ReplicaModifications) *SourceSelectionCriteria {
- s.ReplicaModifications = v
- return s
-}
-
-// SetSseKmsEncryptedObjects sets the SseKmsEncryptedObjects field's value.
-func (s *SourceSelectionCriteria) SetSseKmsEncryptedObjects(v *SseKmsEncryptedObjects) *SourceSelectionCriteria {
- s.SseKmsEncryptedObjects = v
- return s
-}
-
-// A container for filter information for the selection of S3 objects encrypted
-// with Amazon Web Services KMS.
-type SseKmsEncryptedObjects struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether Amazon S3 replicates objects created with server-side encryption
- // using an Amazon Web Services KMS key stored in Amazon Web Services Key Management
- // Service.
- //
- // Status is a required field
- Status *string `type:"string" required:"true" enum:"SseKmsEncryptedObjectsStatus"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SseKmsEncryptedObjects) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SseKmsEncryptedObjects) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *SseKmsEncryptedObjects) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SseKmsEncryptedObjects"}
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetStatus sets the Status field's value.
-func (s *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects {
- s.Status = &v
- return s
-}
-
-// Container for the stats details.
-type Stats struct {
- _ struct{} `type:"structure"`
-
- // The total number of uncompressed object bytes processed.
- BytesProcessed *int64 `type:"long"`
-
- // The total number of bytes of records payload data returned.
- BytesReturned *int64 `type:"long"`
-
- // The total number of object bytes scanned.
- BytesScanned *int64 `type:"long"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Stats) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Stats) GoString() string {
- return s.String()
-}
-
-// SetBytesProcessed sets the BytesProcessed field's value.
-func (s *Stats) SetBytesProcessed(v int64) *Stats {
- s.BytesProcessed = &v
- return s
-}
-
-// SetBytesReturned sets the BytesReturned field's value.
-func (s *Stats) SetBytesReturned(v int64) *Stats {
- s.BytesReturned = &v
- return s
-}
-
-// SetBytesScanned sets the BytesScanned field's value.
-func (s *Stats) SetBytesScanned(v int64) *Stats {
- s.BytesScanned = &v
- return s
-}
-
-// Container for the Stats Event.
-type StatsEvent struct {
- _ struct{} `locationName:"StatsEvent" type:"structure" payload:"Details"`
-
- // The Stats event details.
- Details *Stats `locationName:"Details" type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s StatsEvent) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s StatsEvent) GoString() string {
- return s.String()
-}
-
-// SetDetails sets the Details field's value.
-func (s *StatsEvent) SetDetails(v *Stats) *StatsEvent {
- s.Details = v
- return s
-}
-
-// The StatsEvent is and event in the SelectObjectContentEventStream group of events.
-func (s *StatsEvent) eventSelectObjectContentEventStream() {}
-
-// UnmarshalEvent unmarshals the EventStream Message into the StatsEvent value.
-// This method is only used internally within the SDK's EventStream handling.
-func (s *StatsEvent) UnmarshalEvent(
- payloadUnmarshaler protocol.PayloadUnmarshaler,
- msg eventstream.Message,
-) error {
- if err := payloadUnmarshaler.UnmarshalPayload(
- bytes.NewReader(msg.Payload), s,
- ); err != nil {
- return err
- }
- return nil
-}
-
-// MarshalEvent marshals the type into an stream event value. This method
-// should only used internally within the SDK's EventStream handling.
-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.
-type StorageClassAnalysis struct {
- _ struct{} `type:"structure"`
-
- // Specifies how data related to the storage class analysis for an Amazon S3
- // bucket should be exported.
- DataExport *StorageClassAnalysisDataExport `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s StorageClassAnalysis) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s StorageClassAnalysis) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *StorageClassAnalysis) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysis"}
- if s.DataExport != nil {
- if err := s.DataExport.Validate(); err != nil {
- invalidParams.AddNested("DataExport", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDataExport sets the DataExport field's value.
-func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport) *StorageClassAnalysis {
- s.DataExport = v
- return s
-}
-
-// Container for data related to the storage class analysis for an Amazon S3
-// bucket for export.
-type StorageClassAnalysisDataExport struct {
- _ struct{} `type:"structure"`
-
- // The place to store the data for an analysis.
- //
- // Destination is a required field
- Destination *AnalyticsExportDestination `type:"structure" required:"true"`
-
- // The version of the output schema to use when exporting data. Must be V_1.
- //
- // OutputSchemaVersion is a required field
- OutputSchemaVersion *string `type:"string" required:"true" enum:"StorageClassAnalysisSchemaVersion"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s StorageClassAnalysisDataExport) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s StorageClassAnalysisDataExport) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *StorageClassAnalysisDataExport) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysisDataExport"}
- if s.Destination == nil {
- invalidParams.Add(request.NewErrParamRequired("Destination"))
- }
- if s.OutputSchemaVersion == nil {
- invalidParams.Add(request.NewErrParamRequired("OutputSchemaVersion"))
- }
- if s.Destination != nil {
- if err := s.Destination.Validate(); err != nil {
- invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDestination sets the Destination field's value.
-func (s *StorageClassAnalysisDataExport) SetDestination(v *AnalyticsExportDestination) *StorageClassAnalysisDataExport {
- s.Destination = v
- return s
-}
-
-// SetOutputSchemaVersion sets the OutputSchemaVersion field's value.
-func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *StorageClassAnalysisDataExport {
- s.OutputSchemaVersion = &v
- return s
-}
-
-// A container of a key value name pair.
-type Tag struct {
- _ struct{} `type:"structure"`
-
- // Name of the object key.
- //
- // Key is a required field
- Key *string `min:"1" type:"string" required:"true"`
-
- // Value of the tag.
- //
- // Value is a required field
- Value *string `type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Tag) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-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
-}
-
-// 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Tagging) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Tagging) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Tagging) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Tagging"}
- if s.TagSet == nil {
- invalidParams.Add(request.NewErrParamRequired("TagSet"))
- }
- if s.TagSet != nil {
- for i, v := range s.TagSet {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetTagSet sets the TagSet field's value.
-func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
- s.TagSet = v
- return s
-}
-
-// Container for granting information.
-//
-// Buckets that use the bucket owner enforced setting for Object Ownership don't
-// support target grants. For more information, see Permissions server access
-// log delivery (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general)
-// in the Amazon S3 User Guide.
-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.
- Permission *string `type:"string" enum:"BucketLogsPermission"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TargetGrant) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TargetGrant) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *TargetGrant) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "TargetGrant"}
- if s.Grantee != nil {
- if err := s.Grantee.Validate(); err != nil {
- invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetGrantee sets the Grantee field's value.
-func (s *TargetGrant) SetGrantee(v *Grantee) *TargetGrant {
- s.Grantee = v
- return s
-}
-
-// SetPermission sets the Permission field's value.
-func (s *TargetGrant) SetPermission(v string) *TargetGrant {
- s.Permission = &v
- return s
-}
-
-// The S3 Intelligent-Tiering storage class is designed to optimize storage
-// costs by automatically moving data to the most cost-effective storage access
-// tier, without additional operational overhead.
-type Tiering struct {
- _ struct{} `type:"structure"`
-
- // S3 Intelligent-Tiering access tier. See Storage class for automatically optimizing
- // frequently and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access)
- // for a list of access tiers in the S3 Intelligent-Tiering storage class.
- //
- // AccessTier is a required field
- AccessTier *string `type:"string" required:"true" enum:"IntelligentTieringAccessTier"`
-
- // The number of consecutive days of no access after which an object will be
- // eligible to be transitioned to the corresponding tier. The minimum number
- // of days specified for Archive Access tier must be at least 90 days and Deep
- // Archive Access tier must be at least 180 days. The maximum can be up to 2
- // years (730 days).
- //
- // Days is a required field
- Days *int64 `type:"integer" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Tiering) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Tiering) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Tiering) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Tiering"}
- if s.AccessTier == nil {
- invalidParams.Add(request.NewErrParamRequired("AccessTier"))
- }
- if s.Days == nil {
- invalidParams.Add(request.NewErrParamRequired("Days"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessTier sets the AccessTier field's value.
-func (s *Tiering) SetAccessTier(v string) *Tiering {
- s.AccessTier = &v
- return s
-}
-
-// SetDays sets the Days field's value.
-func (s *Tiering) SetDays(v int64) *Tiering {
- s.Days = &v
- 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.
-type TopicConfiguration struct {
- _ struct{} `type:"structure"`
-
- // The Amazon S3 bucket event about which to send notifications. For more information,
- // see Supported Event Types (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
- // in the Amazon S3 User Guide.
- //
- // Events is a required field
- Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true" enum:"Event"`
-
- // Specifies object key name filtering rules. For information about key name
- // filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
- // in the Amazon S3 User Guide.
- Filter *NotificationConfigurationFilter `type:"structure"`
-
- // 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 SNS topic to which Amazon S3
- // publishes a message when it detects events of the specified type.
- //
- // TopicArn is a required field
- TopicArn *string `locationName:"Topic" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TopicConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TopicConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *TopicConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"}
- if s.Events == nil {
- invalidParams.Add(request.NewErrParamRequired("Events"))
- }
- if s.TopicArn == nil {
- invalidParams.Add(request.NewErrParamRequired("TopicArn"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEvents sets the Events field's value.
-func (s *TopicConfiguration) SetEvents(v []*string) *TopicConfiguration {
- s.Events = v
- return s
-}
-
-// SetFilter sets the Filter field's value.
-func (s *TopicConfiguration) SetFilter(v *NotificationConfigurationFilter) *TopicConfiguration {
- s.Filter = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *TopicConfiguration) SetId(v string) *TopicConfiguration {
- s.Id = &v
- return s
-}
-
-// SetTopicArn sets the TopicArn field's value.
-func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration {
- s.TopicArn = &v
- 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
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_TopicConfiguration.html)
-// instead.
-type TopicConfigurationDeprecated struct {
- _ struct{} `type:"structure"`
-
- // Bucket event for which to send notifications.
- //
- // 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" enum:"Event"`
-
- // 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"`
-
- // Amazon SNS topic to which Amazon S3 will publish a message to report the
- // specified events for the bucket.
- Topic *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TopicConfigurationDeprecated) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TopicConfigurationDeprecated) GoString() string {
- return s.String()
-}
-
-// SetEvent sets the Event field's value.
-func (s *TopicConfigurationDeprecated) SetEvent(v string) *TopicConfigurationDeprecated {
- s.Event = &v
- return s
-}
-
-// SetEvents sets the Events field's value.
-func (s *TopicConfigurationDeprecated) SetEvents(v []*string) *TopicConfigurationDeprecated {
- s.Events = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *TopicConfigurationDeprecated) SetId(v string) *TopicConfigurationDeprecated {
- s.Id = &v
- return s
-}
-
-// SetTopic sets the Topic field's value.
-func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDeprecated {
- s.Topic = &v
- return s
-}
-
-// 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 S3 User Guide.
-type Transition struct {
- _ struct{} `type:"structure"`
-
- // Indicates when objects are transitioned to the specified storage class. The
- // date value must be in ISO 8601 format. The time is always midnight UTC.
- Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- // Indicates the number of days after creation when objects are transitioned
- // to the specified storage class. The value must be a positive integer.
- Days *int64 `type:"integer"`
-
- // The storage class to which you want the object to transition.
- StorageClass *string `type:"string" enum:"TransitionStorageClass"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Transition) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Transition) GoString() string {
- return s.String()
-}
-
-// SetDate sets the Date field's value.
-func (s *Transition) SetDate(v time.Time) *Transition {
- s.Date = &v
- return s
-}
-
-// SetDays sets the Days field's value.
-func (s *Transition) SetDays(v int64) *Transition {
- s.Days = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *Transition) SetStorageClass(v string) *Transition {
- s.StorageClass = &v
- return s
-}
-
-type UploadPartCopyInput struct {
- _ struct{} `locationName:"UploadPartCopyRequest" type:"structure"`
-
- // The bucket name.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Specifies the source object for the copy operation. You specify the value
- // in one of two formats, depending on whether you want to access the source
- // object through an access point (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html):
- //
- // * For objects not accessed through an access point, specify the name of
- // the source bucket and key of the source object, separated by a slash (/).
- // For example, to copy the object reports/january.pdf from the bucket awsexamplebucket,
- // use awsexamplebucket/reports/january.pdf. The value must be URL-encoded.
- //
- // * For objects accessed through access points, specify the Amazon Resource
- // Name (ARN) of the object as accessed through the access point, in the
- // format arn:aws:s3:::accesspoint//object/.
- // For example, to copy the object reports/january.pdf through access point
- // my-access-point owned by account 123456789012 in Region us-west-2, use
- // the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf.
- // The value must be URL encoded. Amazon S3 supports copy operations using
- // access points only when the source and destination buckets are in the
- // same Amazon Web Services Region. Alternatively, for objects accessed through
- // Amazon S3 on Outposts, specify the ARN of the object as accessed in the
- // format arn:aws:s3-outposts:::outpost//object/.
- // For example, to copy the object reports/january.pdf through outpost my-outpost
- // owned by account 123456789012 in Region us-west-2, use the URL encoding
- // of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf.
- // The value must be URL-encoded.
- //
- // To copy a specific version of an object, append ?versionId= to
- // the value (for example, awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).
- // If you don't specify a version ID, Amazon S3 copies the latest version of
- // the source object.
- //
- // CopySource is a required field
- CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
-
- // Copies the object if its entity tag (ETag) matches the specified tag.
- CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
-
- // Copies the object if it has been modified since the specified time.
- CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`
-
- // Copies the object if its entity tag (ETag) is different than the specified
- // ETag.
- CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
-
- // 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"`
-
- // 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 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 (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
- // the source object. The encryption key provided in this header must be one
- // that was used when the source object was created.
- //
- // CopySourceSSECustomerKey is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by UploadPartCopyInput's
- // String and GoString methods.
- 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 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 account ID of the expected destination bucket owner. If the destination
- // bucket is owned by a different account, the request fails with the HTTP status
- // code 403 Forbidden (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The account ID of the expected source bucket owner. If the source bucket
- // is owned by a different account, the request fails with the HTTP status code
- // 403 Forbidden (access denied).
- ExpectedSourceBucketOwner *string `location:"header" locationName:"x-amz-source-expected-bucket-owner" 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"`
-
- // Part number of part being copied. This is a positive integer between 1 and
- // 10,000.
- //
- // PartNumber is a required field
- PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // 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
- // 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 is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by UploadPartCopyInput's
- // String and GoString methods.
- 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 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.
- //
- // UploadId is a required field
- UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UploadPartCopyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UploadPartCopyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *UploadPartCopyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.CopySource == nil {
- invalidParams.Add(request.NewErrParamRequired("CopySource"))
- }
- 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.PartNumber == nil {
- invalidParams.Add(request.NewErrParamRequired("PartNumber"))
- }
- if s.UploadId == nil {
- invalidParams.Add(request.NewErrParamRequired("UploadId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput {
- s.Bucket = &v
- return s
-}
-
-func (s *UploadPartCopyInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetCopySource sets the CopySource field's value.
-func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput {
- s.CopySource = &v
- return s
-}
-
-// SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
-func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput {
- s.CopySourceIfMatch = &v
- return s
-}
-
-// SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
-func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput {
- s.CopySourceIfModifiedSince = &v
- return s
-}
-
-// SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
-func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput {
- s.CopySourceIfNoneMatch = &v
- return s
-}
-
-// SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
-func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput {
- s.CopySourceIfUnmodifiedSince = &v
- return s
-}
-
-// SetCopySourceRange sets the CopySourceRange field's value.
-func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput {
- s.CopySourceRange = &v
- return s
-}
-
-// SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
-func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput {
- s.CopySourceSSECustomerAlgorithm = &v
- return s
-}
-
-// SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
-func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput {
- s.CopySourceSSECustomerKey = &v
- return s
-}
-
-func (s *UploadPartCopyInput) getCopySourceSSECustomerKey() (v string) {
- if s.CopySourceSSECustomerKey == nil {
- return v
- }
- return *s.CopySourceSSECustomerKey
-}
-
-// SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
-func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput {
- s.CopySourceSSECustomerKeyMD5 = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *UploadPartCopyInput) SetExpectedBucketOwner(v string) *UploadPartCopyInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetExpectedSourceBucketOwner sets the ExpectedSourceBucketOwner field's value.
-func (s *UploadPartCopyInput) SetExpectedSourceBucketOwner(v string) *UploadPartCopyInput {
- s.ExpectedSourceBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput {
- s.Key = &v
- return s
-}
-
-// SetPartNumber sets the PartNumber field's value.
-func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput {
- s.PartNumber = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *UploadPartCopyInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput {
- s.UploadId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s UploadPartCopyInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type UploadPartCopyOutput struct {
- _ struct{} `type:"structure" payload:"CopyPartResult"`
-
- // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
- // encryption with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Container for all response elements.
- CopyPartResult *CopyPartResult `type:"structure"`
-
- // The version of the source object that was copied, if you have enabled versioning
- // on the source bucket.
- CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" 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 server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm
- // used.
- 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
- // 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 Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for
- // the object.
- //
- // SSEKMSKeyId is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by UploadPartCopyOutput's
- // String and GoString methods.
- 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 Amazon
- // S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UploadPartCopyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UploadPartCopyOutput) GoString() string {
- return s.String()
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *UploadPartCopyOutput) SetBucketKeyEnabled(v bool) *UploadPartCopyOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCopyPartResult sets the CopyPartResult field's value.
-func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput {
- s.CopyPartResult = v
- return s
-}
-
-// SetCopySourceVersionId sets the CopySourceVersionId field's value.
-func (s *UploadPartCopyOutput) SetCopySourceVersionId(v string) *UploadPartCopyOutput {
- s.CopySourceVersionId = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *UploadPartCopyOutput) SetRequestCharged(v string) *UploadPartCopyOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *UploadPartCopyOutput) SetSSECustomerKeyMD5(v string) *UploadPartCopyOutput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *UploadPartCopyOutput) SetSSEKMSKeyId(v string) *UploadPartCopyOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopyOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-type UploadPartInput struct {
- _ struct{} `locationName:"UploadPartRequest" type:"structure" payload:"Body"`
-
- // Object data.
- Body io.ReadSeeker `type:"blob"`
-
- // The name of the bucket to which the multipart upload was initiated.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // This checksum algorithm must be the same for all parts and it match the checksum
- // value supplied in the CreateMultipartUpload request.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 32-bit CRC32 checksum of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 32-bit CRC32C checksum of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 160-bit SHA-1 digest of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 256-bit SHA-256 digest of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
-
- // Size of the body in bytes. This parameter is useful when the size of the
- // body cannot be determined automatically.
- ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
-
- // The base64-encoded 128-bit MD5 digest of the part data. This parameter is
- // 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"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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"`
-
- // Part number of part being uploaded. This is a positive integer between 1
- // and 10,000.
- //
- // PartNumber is a required field
- PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // 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
- // 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 is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by UploadPartInput's
- // String and GoString methods.
- 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 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.
- //
- // UploadId is a required field
- UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UploadPartInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UploadPartInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *UploadPartInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- 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.PartNumber == nil {
- invalidParams.Add(request.NewErrParamRequired("PartNumber"))
- }
- if s.UploadId == nil {
- invalidParams.Add(request.NewErrParamRequired("UploadId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBody sets the Body field's value.
-func (s *UploadPartInput) SetBody(v io.ReadSeeker) *UploadPartInput {
- s.Body = v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *UploadPartInput) SetBucket(v string) *UploadPartInput {
- s.Bucket = &v
- return s
-}
-
-func (s *UploadPartInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
-func (s *UploadPartInput) SetChecksumAlgorithm(v string) *UploadPartInput {
- s.ChecksumAlgorithm = &v
- return s
-}
-
-// SetChecksumCRC32 sets the ChecksumCRC32 field's value.
-func (s *UploadPartInput) SetChecksumCRC32(v string) *UploadPartInput {
- s.ChecksumCRC32 = &v
- return s
-}
-
-// SetChecksumCRC32C sets the ChecksumCRC32C field's value.
-func (s *UploadPartInput) SetChecksumCRC32C(v string) *UploadPartInput {
- s.ChecksumCRC32C = &v
- return s
-}
-
-// SetChecksumSHA1 sets the ChecksumSHA1 field's value.
-func (s *UploadPartInput) SetChecksumSHA1(v string) *UploadPartInput {
- s.ChecksumSHA1 = &v
- return s
-}
-
-// SetChecksumSHA256 sets the ChecksumSHA256 field's value.
-func (s *UploadPartInput) SetChecksumSHA256(v string) *UploadPartInput {
- s.ChecksumSHA256 = &v
- return s
-}
-
-// SetContentLength sets the ContentLength field's value.
-func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
- s.ContentLength = &v
- return s
-}
-
-// SetContentMD5 sets the ContentMD5 field's value.
-func (s *UploadPartInput) SetContentMD5(v string) *UploadPartInput {
- s.ContentMD5 = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *UploadPartInput) SetExpectedBucketOwner(v string) *UploadPartInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *UploadPartInput) SetKey(v string) *UploadPartInput {
- s.Key = &v
- return s
-}
-
-// SetPartNumber sets the PartNumber field's value.
-func (s *UploadPartInput) SetPartNumber(v int64) *UploadPartInput {
- s.PartNumber = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *UploadPartInput) SetRequestPayer(v string) *UploadPartInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *UploadPartInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput {
- s.UploadId = &v
- 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)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s UploadPartInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type UploadPartOutput struct {
- _ struct{} `type:"structure"`
-
- // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
- // encryption with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
-
- // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
-
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
-
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
- // be present if it was uploaded with the object. With multipart uploads, this
- // may not be a checksum value of the object. For more information about how
- // checksums are calculated with multipart uploads, see Checking object integrity
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
- // in the Amazon S3 User Guide.
- ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
-
- // Entity tag for the uploaded object.
- ETag *string `location:"header" locationName:"ETag" 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 server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm
- // used.
- 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
- // 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 Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key was used for the
- // object.
- //
- // SSEKMSKeyId is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by UploadPartOutput's
- // String and GoString methods.
- 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 Amazon
- // S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UploadPartOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UploadPartOutput) GoString() string {
- return s.String()
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *UploadPartOutput) SetBucketKeyEnabled(v bool) *UploadPartOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetChecksumCRC32 sets the ChecksumCRC32 field's value.
-func (s *UploadPartOutput) SetChecksumCRC32(v string) *UploadPartOutput {
- s.ChecksumCRC32 = &v
- return s
-}
-
-// SetChecksumCRC32C sets the ChecksumCRC32C field's value.
-func (s *UploadPartOutput) SetChecksumCRC32C(v string) *UploadPartOutput {
- s.ChecksumCRC32C = &v
- return s
-}
-
-// SetChecksumSHA1 sets the ChecksumSHA1 field's value.
-func (s *UploadPartOutput) SetChecksumSHA1(v string) *UploadPartOutput {
- s.ChecksumSHA1 = &v
- return s
-}
-
-// SetChecksumSHA256 sets the ChecksumSHA256 field's value.
-func (s *UploadPartOutput) SetChecksumSHA256(v string) *UploadPartOutput {
- s.ChecksumSHA256 = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *UploadPartOutput) SetETag(v string) *UploadPartOutput {
- s.ETag = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *UploadPartOutput) SetRequestCharged(v string) *UploadPartOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *UploadPartOutput) SetSSECustomerAlgorithm(v string) *UploadPartOutput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *UploadPartOutput) SetSSECustomerKeyMD5(v string) *UploadPartOutput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *UploadPartOutput) SetSSEKMSKeyId(v string) *UploadPartOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// 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 S3 API Reference.
-type VersioningConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether MFA delete is enabled in the bucket versioning configuration.
- // This element is only returned if the bucket has been configured with MFA
- // delete. If the bucket has never been so configured, this element is not returned.
- MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"`
-
- // The versioning state of the bucket.
- Status *string `type:"string" enum:"BucketVersioningStatus"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s VersioningConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s VersioningConfiguration) GoString() string {
- return s.String()
-}
-
-// SetMFADelete sets the MFADelete field's value.
-func (s *VersioningConfiguration) SetMFADelete(v string) *VersioningConfiguration {
- s.MFADelete = &v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration {
- s.Status = &v
- return s
-}
-
-// Specifies website configuration parameters for an Amazon S3 bucket.
-type WebsiteConfiguration struct {
- _ struct{} `type:"structure"`
-
- // The name of the error document for the website.
- ErrorDocument *ErrorDocument `type:"structure"`
-
- // The name of the index document for the website.
- IndexDocument *IndexDocument `type:"structure"`
-
- // The redirect behavior for every request to this bucket's website endpoint.
- //
- // If you specify this property, you can't specify any other property.
- RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
-
- // Rules that define when a redirect is applied and the redirect behavior.
- RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s WebsiteConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s WebsiteConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *WebsiteConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"}
- if s.ErrorDocument != nil {
- if err := s.ErrorDocument.Validate(); err != nil {
- invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams))
- }
- }
- if s.IndexDocument != nil {
- if err := s.IndexDocument.Validate(); err != nil {
- invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams))
- }
- }
- if s.RedirectAllRequestsTo != nil {
- if err := s.RedirectAllRequestsTo.Validate(); err != nil {
- invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams))
- }
- }
- if s.RoutingRules != nil {
- for i, v := range s.RoutingRules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetErrorDocument sets the ErrorDocument field's value.
-func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration {
- s.ErrorDocument = v
- return s
-}
-
-// SetIndexDocument sets the IndexDocument field's value.
-func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration {
- s.IndexDocument = v
- return s
-}
-
-// SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
-func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration {
- s.RedirectAllRequestsTo = v
- return s
-}
-
-// SetRoutingRules sets the RoutingRules field's value.
-func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration {
- s.RoutingRules = v
- return s
-}
-
-type WriteGetObjectResponseInput struct {
- _ struct{} `locationName:"WriteGetObjectResponseRequest" type:"structure" payload:"Body"`
-
- // Indicates that a range of bytes was specified.
- AcceptRanges *string `location:"header" locationName:"x-amz-fwd-header-accept-ranges" type:"string"`
-
- // The object data.
- //
- // To use an non-seekable io.Reader for this request wrap the io.Reader with
- // "aws.ReadSeekCloser". The SDK will not retry request errors for non-seekable
- // readers. This will allow the SDK to send the reader's payload as chunked
- // transfer encoding.
- Body io.ReadSeeker `type:"blob"`
-
- // Indicates whether the object stored in Amazon S3 uses an S3 bucket key for
- // server-side encryption with Amazon Web Services KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Specifies caching behavior along the request/reply chain.
- CacheControl *string `location:"header" locationName:"x-amz-fwd-header-Cache-Control" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This specifies the base64-encoded,
- // 32-bit CRC32 checksum of the object returned by the Object Lambda function.
- // This may not match the checksum for the object stored in Amazon S3. Amazon
- // S3 will perform validation of the checksum values only when the original
- // GetObject request required checksum validation. For more information about
- // checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // Only one checksum header can be specified at a time. If you supply multiple
- // checksum headers, this request will fail.
- ChecksumCRC32 *string `location:"header" locationName:"x-amz-fwd-header-x-amz-checksum-crc32" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This specifies the base64-encoded,
- // 32-bit CRC32C checksum of the object returned by the Object Lambda function.
- // This may not match the checksum for the object stored in Amazon S3. Amazon
- // S3 will perform validation of the checksum values only when the original
- // GetObject request required checksum validation. For more information about
- // checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // Only one checksum header can be specified at a time. If you supply multiple
- // checksum headers, this request will fail.
- ChecksumCRC32C *string `location:"header" locationName:"x-amz-fwd-header-x-amz-checksum-crc32c" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This specifies the base64-encoded,
- // 160-bit SHA-1 digest of the object returned by the Object Lambda function.
- // This may not match the checksum for the object stored in Amazon S3. Amazon
- // S3 will perform validation of the checksum values only when the original
- // GetObject request required checksum validation. For more information about
- // checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // Only one checksum header can be specified at a time. If you supply multiple
- // checksum headers, this request will fail.
- ChecksumSHA1 *string `location:"header" locationName:"x-amz-fwd-header-x-amz-checksum-sha1" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This specifies the base64-encoded,
- // 256-bit SHA-256 digest of the object returned by the Object Lambda function.
- // This may not match the checksum for the object stored in Amazon S3. Amazon
- // S3 will perform validation of the checksum values only when the original
- // GetObject request required checksum validation. For more information about
- // checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // Only one checksum header can be specified at a time. If you supply multiple
- // checksum headers, this request will fail.
- ChecksumSHA256 *string `location:"header" locationName:"x-amz-fwd-header-x-amz-checksum-sha256" type:"string"`
-
- // Specifies presentational information for the object.
- ContentDisposition *string `location:"header" locationName:"x-amz-fwd-header-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.
- ContentEncoding *string `location:"header" locationName:"x-amz-fwd-header-Content-Encoding" type:"string"`
-
- // The language the content is in.
- ContentLanguage *string `location:"header" locationName:"x-amz-fwd-header-Content-Language" type:"string"`
-
- // The size of the content body in bytes.
- ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
-
- // The portion of the object returned in the response.
- ContentRange *string `location:"header" locationName:"x-amz-fwd-header-Content-Range" type:"string"`
-
- // A standard MIME type describing the format of the object data.
- ContentType *string `location:"header" locationName:"x-amz-fwd-header-Content-Type" type:"string"`
-
- // Specifies whether an object stored in Amazon S3 is (true) or is not (false)
- // a delete marker.
- DeleteMarker *bool `location:"header" locationName:"x-amz-fwd-header-x-amz-delete-marker" type:"boolean"`
-
- // An opaque identifier assigned by a web server to a specific version of a
- // resource found at a URL.
- ETag *string `location:"header" locationName:"x-amz-fwd-header-ETag" type:"string"`
-
- // A string that uniquely identifies an error condition. Returned in the
- // tag of the error XML response for a corresponding GetObject call. Cannot
- // be used with a successful StatusCode header or when the transformed object
- // is provided in the body. All error codes from S3 are sentence-cased. The
- // regular expression (regex) value is "^[A-Z][a-zA-Z]+$".
- ErrorCode *string `location:"header" locationName:"x-amz-fwd-error-code" type:"string"`
-
- // Contains a generic description of the error condition. Returned in the
- // tag of the error XML response for a corresponding GetObject call. Cannot
- // be used with a successful StatusCode header or when the transformed object
- // is provided in body.
- ErrorMessage *string `location:"header" locationName:"x-amz-fwd-error-message" 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
- // that provide the object expiration information. The value of the rule-id
- // is URL-encoded.
- Expiration *string `location:"header" locationName:"x-amz-fwd-header-x-amz-expiration" type:"string"`
-
- // The date and time at which the object is no longer cacheable.
- Expires *time.Time `location:"header" locationName:"x-amz-fwd-header-Expires" type:"timestamp"`
-
- // The date and time that the object was last modified.
- LastModified *time.Time `location:"header" locationName:"x-amz-fwd-header-Last-Modified" type:"timestamp"`
-
- // A map of metadata to store with the object in S3.
- Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
-
- // Set to the number of metadata entries not returned in x-amz-meta headers.
- // This can happen if you create metadata using an API like SOAP that supports
- // more flexible metadata than the REST API. For example, using SOAP, you can
- // create metadata whose values are not legal HTTP headers.
- MissingMeta *int64 `location:"header" locationName:"x-amz-fwd-header-x-amz-missing-meta" type:"integer"`
-
- // Indicates whether an object stored in Amazon S3 has an active legal hold.
- ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-fwd-header-x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
-
- // Indicates whether an object stored in Amazon S3 has Object Lock enabled.
- // For more information about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html).
- ObjectLockMode *string `location:"header" locationName:"x-amz-fwd-header-x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
-
- // The date and time when Object Lock is configured to expire.
- ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-fwd-header-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-fwd-header-x-amz-mp-parts-count" type:"integer"`
-
- // Indicates if request involves bucket that is either a source or destination
- // in a Replication rule. For more information about S3 Replication, see Replication
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html).
- ReplicationStatus *string `location:"header" locationName:"x-amz-fwd-header-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-fwd-header-x-amz-request-charged" type:"string" enum:"RequestCharged"`
-
- // Route prefix to the HTTP URL generated.
- //
- // RequestRoute is a required field
- RequestRoute *string `location:"header" locationName:"x-amz-request-route" type:"string" required:"true"`
-
- // A single use encrypted token that maps WriteGetObjectResponse to the end
- // user GetObject request.
- //
- // RequestToken is a required field
- RequestToken *string `location:"header" locationName:"x-amz-request-token" type:"string" required:"true"`
-
- // Provides information about object restoration operation and expiration time
- // of the restored object copy.
- Restore *string `location:"header" locationName:"x-amz-fwd-header-x-amz-restore" type:"string"`
-
- // Encryption algorithm used if server-side encryption with a customer-provided
- // encryption key was specified for object stored in Amazon S3.
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // 128-bit MD5 digest of customer-provided encryption key used in Amazon S3
- // to encrypt data stored in S3. For more information, see Protecting data using
- // server-side encryption with customer-provided encryption keys (SSE-C) (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html).
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // If present, specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetric customer managed key that was used for
- // stored in Amazon S3 object.
- //
- // SSEKMSKeyId is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by WriteGetObjectResponseInput's
- // String and GoString methods.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // The server-side encryption algorithm used when storing requested object in
- // Amazon S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-
- // The integer status code for an HTTP response of a corresponding GetObject
- // request.
- //
- // Status Codes
- //
- // * 200 - OK
- //
- // * 206 - Partial Content
- //
- // * 304 - Not Modified
- //
- // * 400 - Bad Request
- //
- // * 401 - Unauthorized
- //
- // * 403 - Forbidden
- //
- // * 404 - Not Found
- //
- // * 405 - Method Not Allowed
- //
- // * 409 - Conflict
- //
- // * 411 - Length Required
- //
- // * 412 - Precondition Failed
- //
- // * 416 - Range Not Satisfiable
- //
- // * 500 - Internal Server Error
- //
- // * 503 - Service Unavailable
- StatusCode *int64 `location:"header" locationName:"x-amz-fwd-status" type:"integer"`
-
- // 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-fwd-header-x-amz-storage-class" type:"string" enum:"StorageClass"`
-
- // The number of tags, if any, on the object.
- TagCount *int64 `location:"header" locationName:"x-amz-fwd-header-x-amz-tagging-count" type:"integer"`
-
- // An ID used to reference a specific version of the object.
- VersionId *string `location:"header" locationName:"x-amz-fwd-header-x-amz-version-id" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s WriteGetObjectResponseInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s WriteGetObjectResponseInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *WriteGetObjectResponseInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "WriteGetObjectResponseInput"}
- if s.RequestRoute == nil {
- invalidParams.Add(request.NewErrParamRequired("RequestRoute"))
- }
- if s.RequestRoute != nil && len(*s.RequestRoute) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RequestRoute", 1))
- }
- if s.RequestToken == nil {
- invalidParams.Add(request.NewErrParamRequired("RequestToken"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAcceptRanges sets the AcceptRanges field's value.
-func (s *WriteGetObjectResponseInput) SetAcceptRanges(v string) *WriteGetObjectResponseInput {
- s.AcceptRanges = &v
- return s
-}
-
-// SetBody sets the Body field's value.
-func (s *WriteGetObjectResponseInput) SetBody(v io.ReadSeeker) *WriteGetObjectResponseInput {
- s.Body = v
- return s
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *WriteGetObjectResponseInput) SetBucketKeyEnabled(v bool) *WriteGetObjectResponseInput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCacheControl sets the CacheControl field's value.
-func (s *WriteGetObjectResponseInput) SetCacheControl(v string) *WriteGetObjectResponseInput {
- s.CacheControl = &v
- return s
-}
-
-// SetChecksumCRC32 sets the ChecksumCRC32 field's value.
-func (s *WriteGetObjectResponseInput) SetChecksumCRC32(v string) *WriteGetObjectResponseInput {
- s.ChecksumCRC32 = &v
- return s
-}
-
-// SetChecksumCRC32C sets the ChecksumCRC32C field's value.
-func (s *WriteGetObjectResponseInput) SetChecksumCRC32C(v string) *WriteGetObjectResponseInput {
- s.ChecksumCRC32C = &v
- return s
-}
-
-// SetChecksumSHA1 sets the ChecksumSHA1 field's value.
-func (s *WriteGetObjectResponseInput) SetChecksumSHA1(v string) *WriteGetObjectResponseInput {
- s.ChecksumSHA1 = &v
- return s
-}
-
-// SetChecksumSHA256 sets the ChecksumSHA256 field's value.
-func (s *WriteGetObjectResponseInput) SetChecksumSHA256(v string) *WriteGetObjectResponseInput {
- s.ChecksumSHA256 = &v
- return s
-}
-
-// SetContentDisposition sets the ContentDisposition field's value.
-func (s *WriteGetObjectResponseInput) SetContentDisposition(v string) *WriteGetObjectResponseInput {
- s.ContentDisposition = &v
- return s
-}
-
-// SetContentEncoding sets the ContentEncoding field's value.
-func (s *WriteGetObjectResponseInput) SetContentEncoding(v string) *WriteGetObjectResponseInput {
- s.ContentEncoding = &v
- return s
-}
-
-// SetContentLanguage sets the ContentLanguage field's value.
-func (s *WriteGetObjectResponseInput) SetContentLanguage(v string) *WriteGetObjectResponseInput {
- s.ContentLanguage = &v
- return s
-}
-
-// SetContentLength sets the ContentLength field's value.
-func (s *WriteGetObjectResponseInput) SetContentLength(v int64) *WriteGetObjectResponseInput {
- s.ContentLength = &v
- return s
-}
-
-// SetContentRange sets the ContentRange field's value.
-func (s *WriteGetObjectResponseInput) SetContentRange(v string) *WriteGetObjectResponseInput {
- s.ContentRange = &v
- return s
-}
-
-// SetContentType sets the ContentType field's value.
-func (s *WriteGetObjectResponseInput) SetContentType(v string) *WriteGetObjectResponseInput {
- s.ContentType = &v
- return s
-}
-
-// SetDeleteMarker sets the DeleteMarker field's value.
-func (s *WriteGetObjectResponseInput) SetDeleteMarker(v bool) *WriteGetObjectResponseInput {
- s.DeleteMarker = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *WriteGetObjectResponseInput) SetETag(v string) *WriteGetObjectResponseInput {
- s.ETag = &v
- return s
-}
-
-// SetErrorCode sets the ErrorCode field's value.
-func (s *WriteGetObjectResponseInput) SetErrorCode(v string) *WriteGetObjectResponseInput {
- s.ErrorCode = &v
- return s
-}
-
-// SetErrorMessage sets the ErrorMessage field's value.
-func (s *WriteGetObjectResponseInput) SetErrorMessage(v string) *WriteGetObjectResponseInput {
- s.ErrorMessage = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *WriteGetObjectResponseInput) SetExpiration(v string) *WriteGetObjectResponseInput {
- s.Expiration = &v
- return s
-}
-
-// SetExpires sets the Expires field's value.
-func (s *WriteGetObjectResponseInput) SetExpires(v time.Time) *WriteGetObjectResponseInput {
- s.Expires = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *WriteGetObjectResponseInput) SetLastModified(v time.Time) *WriteGetObjectResponseInput {
- s.LastModified = &v
- return s
-}
-
-// SetMetadata sets the Metadata field's value.
-func (s *WriteGetObjectResponseInput) SetMetadata(v map[string]*string) *WriteGetObjectResponseInput {
- s.Metadata = v
- return s
-}
-
-// SetMissingMeta sets the MissingMeta field's value.
-func (s *WriteGetObjectResponseInput) SetMissingMeta(v int64) *WriteGetObjectResponseInput {
- s.MissingMeta = &v
- return s
-}
-
-// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
-func (s *WriteGetObjectResponseInput) SetObjectLockLegalHoldStatus(v string) *WriteGetObjectResponseInput {
- s.ObjectLockLegalHoldStatus = &v
- return s
-}
-
-// SetObjectLockMode sets the ObjectLockMode field's value.
-func (s *WriteGetObjectResponseInput) SetObjectLockMode(v string) *WriteGetObjectResponseInput {
- s.ObjectLockMode = &v
- return s
-}
-
-// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
-func (s *WriteGetObjectResponseInput) SetObjectLockRetainUntilDate(v time.Time) *WriteGetObjectResponseInput {
- s.ObjectLockRetainUntilDate = &v
- return s
-}
-
-// SetPartsCount sets the PartsCount field's value.
-func (s *WriteGetObjectResponseInput) SetPartsCount(v int64) *WriteGetObjectResponseInput {
- s.PartsCount = &v
- return s
-}
-
-// SetReplicationStatus sets the ReplicationStatus field's value.
-func (s *WriteGetObjectResponseInput) SetReplicationStatus(v string) *WriteGetObjectResponseInput {
- s.ReplicationStatus = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *WriteGetObjectResponseInput) SetRequestCharged(v string) *WriteGetObjectResponseInput {
- s.RequestCharged = &v
- return s
-}
-
-// SetRequestRoute sets the RequestRoute field's value.
-func (s *WriteGetObjectResponseInput) SetRequestRoute(v string) *WriteGetObjectResponseInput {
- s.RequestRoute = &v
- return s
-}
-
-// SetRequestToken sets the RequestToken field's value.
-func (s *WriteGetObjectResponseInput) SetRequestToken(v string) *WriteGetObjectResponseInput {
- s.RequestToken = &v
- return s
-}
-
-// SetRestore sets the Restore field's value.
-func (s *WriteGetObjectResponseInput) SetRestore(v string) *WriteGetObjectResponseInput {
- s.Restore = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *WriteGetObjectResponseInput) SetSSECustomerAlgorithm(v string) *WriteGetObjectResponseInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *WriteGetObjectResponseInput) SetSSECustomerKeyMD5(v string) *WriteGetObjectResponseInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *WriteGetObjectResponseInput) SetSSEKMSKeyId(v string) *WriteGetObjectResponseInput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *WriteGetObjectResponseInput) SetServerSideEncryption(v string) *WriteGetObjectResponseInput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetStatusCode sets the StatusCode field's value.
-func (s *WriteGetObjectResponseInput) SetStatusCode(v int64) *WriteGetObjectResponseInput {
- s.StatusCode = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *WriteGetObjectResponseInput) SetStorageClass(v string) *WriteGetObjectResponseInput {
- s.StorageClass = &v
- return s
-}
-
-// SetTagCount sets the TagCount field's value.
-func (s *WriteGetObjectResponseInput) SetTagCount(v int64) *WriteGetObjectResponseInput {
- s.TagCount = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *WriteGetObjectResponseInput) SetVersionId(v string) *WriteGetObjectResponseInput {
- s.VersionId = &v
- return s
-}
-
-func (s *WriteGetObjectResponseInput) hostLabels() map[string]string {
- return map[string]string{
- "RequestRoute": aws.StringValue(s.RequestRoute),
- }
-}
-
-type WriteGetObjectResponseOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s WriteGetObjectResponseOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s WriteGetObjectResponseOutput) GoString() string {
- return s.String()
-}
-
-const (
- // AnalyticsS3ExportFileFormatCsv is a AnalyticsS3ExportFileFormat enum value
- AnalyticsS3ExportFileFormatCsv = "CSV"
-)
-
-// AnalyticsS3ExportFileFormat_Values returns all elements of the AnalyticsS3ExportFileFormat enum
-func AnalyticsS3ExportFileFormat_Values() []string {
- return []string{
- AnalyticsS3ExportFileFormatCsv,
- }
-}
-
-const (
- // ArchiveStatusArchiveAccess is a ArchiveStatus enum value
- ArchiveStatusArchiveAccess = "ARCHIVE_ACCESS"
-
- // ArchiveStatusDeepArchiveAccess is a ArchiveStatus enum value
- ArchiveStatusDeepArchiveAccess = "DEEP_ARCHIVE_ACCESS"
-)
-
-// ArchiveStatus_Values returns all elements of the ArchiveStatus enum
-func ArchiveStatus_Values() []string {
- return []string{
- ArchiveStatusArchiveAccess,
- ArchiveStatusDeepArchiveAccess,
- }
-}
-
-const (
- // BucketAccelerateStatusEnabled is a BucketAccelerateStatus enum value
- BucketAccelerateStatusEnabled = "Enabled"
-
- // BucketAccelerateStatusSuspended is a BucketAccelerateStatus enum value
- BucketAccelerateStatusSuspended = "Suspended"
-)
-
-// BucketAccelerateStatus_Values returns all elements of the BucketAccelerateStatus enum
-func BucketAccelerateStatus_Values() []string {
- return []string{
- BucketAccelerateStatusEnabled,
- BucketAccelerateStatusSuspended,
- }
-}
-
-const (
- // BucketCannedACLPrivate is a BucketCannedACL enum value
- BucketCannedACLPrivate = "private"
-
- // BucketCannedACLPublicRead is a BucketCannedACL enum value
- BucketCannedACLPublicRead = "public-read"
-
- // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value
- BucketCannedACLPublicReadWrite = "public-read-write"
-
- // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value
- BucketCannedACLAuthenticatedRead = "authenticated-read"
-)
-
-// BucketCannedACL_Values returns all elements of the BucketCannedACL enum
-func BucketCannedACL_Values() []string {
- return []string{
- BucketCannedACLPrivate,
- BucketCannedACLPublicRead,
- BucketCannedACLPublicReadWrite,
- BucketCannedACLAuthenticatedRead,
- }
-}
-
-const (
- // BucketLocationConstraintAfSouth1 is a BucketLocationConstraint enum value
- BucketLocationConstraintAfSouth1 = "af-south-1"
-
- // BucketLocationConstraintApEast1 is a BucketLocationConstraint enum value
- BucketLocationConstraintApEast1 = "ap-east-1"
-
- // BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value
- BucketLocationConstraintApNortheast1 = "ap-northeast-1"
-
- // BucketLocationConstraintApNortheast2 is a BucketLocationConstraint enum value
- BucketLocationConstraintApNortheast2 = "ap-northeast-2"
-
- // BucketLocationConstraintApNortheast3 is a BucketLocationConstraint enum value
- BucketLocationConstraintApNortheast3 = "ap-northeast-3"
-
- // BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value
- BucketLocationConstraintApSouth1 = "ap-south-1"
-
- // BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value
- BucketLocationConstraintApSoutheast1 = "ap-southeast-1"
-
- // BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value
- BucketLocationConstraintApSoutheast2 = "ap-southeast-2"
-
- // BucketLocationConstraintCaCentral1 is a BucketLocationConstraint enum value
- BucketLocationConstraintCaCentral1 = "ca-central-1"
-
- // BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value
- BucketLocationConstraintCnNorth1 = "cn-north-1"
-
- // BucketLocationConstraintCnNorthwest1 is a BucketLocationConstraint enum value
- BucketLocationConstraintCnNorthwest1 = "cn-northwest-1"
-
- // BucketLocationConstraintEu is a BucketLocationConstraint enum value
- BucketLocationConstraintEu = "EU"
-
- // BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value
- BucketLocationConstraintEuCentral1 = "eu-central-1"
-
- // BucketLocationConstraintEuNorth1 is a BucketLocationConstraint enum value
- BucketLocationConstraintEuNorth1 = "eu-north-1"
-
- // BucketLocationConstraintEuSouth1 is a BucketLocationConstraint enum value
- BucketLocationConstraintEuSouth1 = "eu-south-1"
-
- // BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value
- BucketLocationConstraintEuWest1 = "eu-west-1"
-
- // BucketLocationConstraintEuWest2 is a BucketLocationConstraint enum value
- BucketLocationConstraintEuWest2 = "eu-west-2"
-
- // BucketLocationConstraintEuWest3 is a BucketLocationConstraint enum value
- BucketLocationConstraintEuWest3 = "eu-west-3"
-
- // BucketLocationConstraintMeSouth1 is a BucketLocationConstraint enum value
- BucketLocationConstraintMeSouth1 = "me-south-1"
-
- // BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value
- BucketLocationConstraintSaEast1 = "sa-east-1"
-
- // BucketLocationConstraintUsEast2 is a BucketLocationConstraint enum value
- BucketLocationConstraintUsEast2 = "us-east-2"
-
- // BucketLocationConstraintUsGovEast1 is a BucketLocationConstraint enum value
- BucketLocationConstraintUsGovEast1 = "us-gov-east-1"
-
- // BucketLocationConstraintUsGovWest1 is a BucketLocationConstraint enum value
- BucketLocationConstraintUsGovWest1 = "us-gov-west-1"
-
- // BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value
- BucketLocationConstraintUsWest1 = "us-west-1"
-
- // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value
- BucketLocationConstraintUsWest2 = "us-west-2"
-)
-
-// BucketLocationConstraint_Values returns all elements of the BucketLocationConstraint enum
-func BucketLocationConstraint_Values() []string {
- return []string{
- BucketLocationConstraintAfSouth1,
- BucketLocationConstraintApEast1,
- BucketLocationConstraintApNortheast1,
- BucketLocationConstraintApNortheast2,
- BucketLocationConstraintApNortheast3,
- BucketLocationConstraintApSouth1,
- BucketLocationConstraintApSoutheast1,
- BucketLocationConstraintApSoutheast2,
- BucketLocationConstraintCaCentral1,
- BucketLocationConstraintCnNorth1,
- BucketLocationConstraintCnNorthwest1,
- BucketLocationConstraintEu,
- BucketLocationConstraintEuCentral1,
- BucketLocationConstraintEuNorth1,
- BucketLocationConstraintEuSouth1,
- BucketLocationConstraintEuWest1,
- BucketLocationConstraintEuWest2,
- BucketLocationConstraintEuWest3,
- BucketLocationConstraintMeSouth1,
- BucketLocationConstraintSaEast1,
- BucketLocationConstraintUsEast2,
- BucketLocationConstraintUsGovEast1,
- BucketLocationConstraintUsGovWest1,
- BucketLocationConstraintUsWest1,
- BucketLocationConstraintUsWest2,
- }
-}
-
-const (
- // BucketLogsPermissionFullControl is a BucketLogsPermission enum value
- BucketLogsPermissionFullControl = "FULL_CONTROL"
-
- // BucketLogsPermissionRead is a BucketLogsPermission enum value
- BucketLogsPermissionRead = "READ"
-
- // BucketLogsPermissionWrite is a BucketLogsPermission enum value
- BucketLogsPermissionWrite = "WRITE"
-)
-
-// BucketLogsPermission_Values returns all elements of the BucketLogsPermission enum
-func BucketLogsPermission_Values() []string {
- return []string{
- BucketLogsPermissionFullControl,
- BucketLogsPermissionRead,
- BucketLogsPermissionWrite,
- }
-}
-
-const (
- // BucketVersioningStatusEnabled is a BucketVersioningStatus enum value
- BucketVersioningStatusEnabled = "Enabled"
-
- // BucketVersioningStatusSuspended is a BucketVersioningStatus enum value
- BucketVersioningStatusSuspended = "Suspended"
-)
-
-// BucketVersioningStatus_Values returns all elements of the BucketVersioningStatus enum
-func BucketVersioningStatus_Values() []string {
- return []string{
- BucketVersioningStatusEnabled,
- BucketVersioningStatusSuspended,
- }
-}
-
-const (
- // ChecksumAlgorithmCrc32 is a ChecksumAlgorithm enum value
- ChecksumAlgorithmCrc32 = "CRC32"
-
- // ChecksumAlgorithmCrc32c is a ChecksumAlgorithm enum value
- ChecksumAlgorithmCrc32c = "CRC32C"
-
- // ChecksumAlgorithmSha1 is a ChecksumAlgorithm enum value
- ChecksumAlgorithmSha1 = "SHA1"
-
- // ChecksumAlgorithmSha256 is a ChecksumAlgorithm enum value
- ChecksumAlgorithmSha256 = "SHA256"
-)
-
-// ChecksumAlgorithm_Values returns all elements of the ChecksumAlgorithm enum
-func ChecksumAlgorithm_Values() []string {
- return []string{
- ChecksumAlgorithmCrc32,
- ChecksumAlgorithmCrc32c,
- ChecksumAlgorithmSha1,
- ChecksumAlgorithmSha256,
- }
-}
-
-const (
- // ChecksumModeEnabled is a ChecksumMode enum value
- ChecksumModeEnabled = "ENABLED"
-)
-
-// ChecksumMode_Values returns all elements of the ChecksumMode enum
-func ChecksumMode_Values() []string {
- return []string{
- ChecksumModeEnabled,
- }
-}
-
-const (
- // CompressionTypeNone is a CompressionType enum value
- CompressionTypeNone = "NONE"
-
- // CompressionTypeGzip is a CompressionType enum value
- CompressionTypeGzip = "GZIP"
-
- // CompressionTypeBzip2 is a CompressionType enum value
- CompressionTypeBzip2 = "BZIP2"
-)
-
-// CompressionType_Values returns all elements of the CompressionType enum
-func CompressionType_Values() []string {
- return []string{
- CompressionTypeNone,
- CompressionTypeGzip,
- CompressionTypeBzip2,
- }
-}
-
-const (
- // DeleteMarkerReplicationStatusEnabled is a DeleteMarkerReplicationStatus enum value
- DeleteMarkerReplicationStatusEnabled = "Enabled"
-
- // DeleteMarkerReplicationStatusDisabled is a DeleteMarkerReplicationStatus enum value
- DeleteMarkerReplicationStatusDisabled = "Disabled"
-)
-
-// DeleteMarkerReplicationStatus_Values returns all elements of the DeleteMarkerReplicationStatus enum
-func DeleteMarkerReplicationStatus_Values() []string {
- return []string{
- DeleteMarkerReplicationStatusEnabled,
- DeleteMarkerReplicationStatusDisabled,
- }
-}
-
-// Requests Amazon S3 to encode the object keys in the response and specifies
-// the encoding method to use. An object key may contain any Unicode character;
-// however, XML 1.0 parser cannot parse some characters, such as characters
-// with an ASCII value from 0 to 10. For characters that are not supported in
-// XML 1.0, you can add this parameter to request that Amazon S3 encode the
-// keys in the response.
-const (
- // EncodingTypeUrl is a EncodingType enum value
- EncodingTypeUrl = "url"
-)
-
-// EncodingType_Values returns all elements of the EncodingType enum
-func EncodingType_Values() []string {
- return []string{
- EncodingTypeUrl,
- }
-}
-
-// The bucket event for which to send notifications.
-const (
- // EventS3ReducedRedundancyLostObject is a Event enum value
- EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject"
-
- // EventS3ObjectCreated is a Event enum value
- EventS3ObjectCreated = "s3:ObjectCreated:*"
-
- // EventS3ObjectCreatedPut is a Event enum value
- EventS3ObjectCreatedPut = "s3:ObjectCreated:Put"
-
- // EventS3ObjectCreatedPost is a Event enum value
- EventS3ObjectCreatedPost = "s3:ObjectCreated:Post"
-
- // EventS3ObjectCreatedCopy is a Event enum value
- EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy"
-
- // EventS3ObjectCreatedCompleteMultipartUpload is a Event enum value
- EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload"
-
- // EventS3ObjectRemoved is a Event enum value
- EventS3ObjectRemoved = "s3:ObjectRemoved:*"
-
- // EventS3ObjectRemovedDelete is a Event enum value
- EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete"
-
- // 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"
-
- // EventS3ObjectRestoreDelete is a Event enum value
- EventS3ObjectRestoreDelete = "s3:ObjectRestore:Delete"
-
- // EventS3LifecycleTransition is a Event enum value
- EventS3LifecycleTransition = "s3:LifecycleTransition"
-
- // EventS3IntelligentTiering is a Event enum value
- EventS3IntelligentTiering = "s3:IntelligentTiering"
-
- // EventS3ObjectAclPut is a Event enum value
- EventS3ObjectAclPut = "s3:ObjectAcl:Put"
-
- // EventS3LifecycleExpiration is a Event enum value
- EventS3LifecycleExpiration = "s3:LifecycleExpiration:*"
-
- // EventS3LifecycleExpirationDelete is a Event enum value
- EventS3LifecycleExpirationDelete = "s3:LifecycleExpiration:Delete"
-
- // EventS3LifecycleExpirationDeleteMarkerCreated is a Event enum value
- EventS3LifecycleExpirationDeleteMarkerCreated = "s3:LifecycleExpiration:DeleteMarkerCreated"
-
- // EventS3ObjectTagging is a Event enum value
- EventS3ObjectTagging = "s3:ObjectTagging:*"
-
- // EventS3ObjectTaggingPut is a Event enum value
- EventS3ObjectTaggingPut = "s3:ObjectTagging:Put"
-
- // EventS3ObjectTaggingDelete is a Event enum value
- EventS3ObjectTaggingDelete = "s3:ObjectTagging:Delete"
-)
-
-// Event_Values returns all elements of the Event enum
-func Event_Values() []string {
- return []string{
- EventS3ReducedRedundancyLostObject,
- EventS3ObjectCreated,
- EventS3ObjectCreatedPut,
- EventS3ObjectCreatedPost,
- EventS3ObjectCreatedCopy,
- EventS3ObjectCreatedCompleteMultipartUpload,
- EventS3ObjectRemoved,
- EventS3ObjectRemovedDelete,
- EventS3ObjectRemovedDeleteMarkerCreated,
- EventS3ObjectRestore,
- EventS3ObjectRestorePost,
- EventS3ObjectRestoreCompleted,
- EventS3Replication,
- EventS3ReplicationOperationFailedReplication,
- EventS3ReplicationOperationNotTracked,
- EventS3ReplicationOperationMissedThreshold,
- EventS3ReplicationOperationReplicatedAfterThreshold,
- EventS3ObjectRestoreDelete,
- EventS3LifecycleTransition,
- EventS3IntelligentTiering,
- EventS3ObjectAclPut,
- EventS3LifecycleExpiration,
- EventS3LifecycleExpirationDelete,
- EventS3LifecycleExpirationDeleteMarkerCreated,
- EventS3ObjectTagging,
- EventS3ObjectTaggingPut,
- EventS3ObjectTaggingDelete,
- }
-}
-
-const (
- // ExistingObjectReplicationStatusEnabled is a ExistingObjectReplicationStatus enum value
- ExistingObjectReplicationStatusEnabled = "Enabled"
-
- // ExistingObjectReplicationStatusDisabled is a ExistingObjectReplicationStatus enum value
- ExistingObjectReplicationStatusDisabled = "Disabled"
-)
-
-// ExistingObjectReplicationStatus_Values returns all elements of the ExistingObjectReplicationStatus enum
-func ExistingObjectReplicationStatus_Values() []string {
- return []string{
- ExistingObjectReplicationStatusEnabled,
- ExistingObjectReplicationStatusDisabled,
- }
-}
-
-const (
- // ExpirationStatusEnabled is a ExpirationStatus enum value
- ExpirationStatusEnabled = "Enabled"
-
- // ExpirationStatusDisabled is a ExpirationStatus enum value
- ExpirationStatusDisabled = "Disabled"
-)
-
-// ExpirationStatus_Values returns all elements of the ExpirationStatus enum
-func ExpirationStatus_Values() []string {
- return []string{
- ExpirationStatusEnabled,
- ExpirationStatusDisabled,
- }
-}
-
-const (
- // ExpressionTypeSql is a ExpressionType enum value
- ExpressionTypeSql = "SQL"
-)
-
-// ExpressionType_Values returns all elements of the ExpressionType enum
-func ExpressionType_Values() []string {
- return []string{
- ExpressionTypeSql,
- }
-}
-
-const (
- // FileHeaderInfoUse is a FileHeaderInfo enum value
- FileHeaderInfoUse = "USE"
-
- // FileHeaderInfoIgnore is a FileHeaderInfo enum value
- FileHeaderInfoIgnore = "IGNORE"
-
- // FileHeaderInfoNone is a FileHeaderInfo enum value
- FileHeaderInfoNone = "NONE"
-)
-
-// FileHeaderInfo_Values returns all elements of the FileHeaderInfo enum
-func FileHeaderInfo_Values() []string {
- return []string{
- FileHeaderInfoUse,
- FileHeaderInfoIgnore,
- FileHeaderInfoNone,
- }
-}
-
-const (
- // FilterRuleNamePrefix is a FilterRuleName enum value
- FilterRuleNamePrefix = "prefix"
-
- // FilterRuleNameSuffix is a FilterRuleName enum value
- FilterRuleNameSuffix = "suffix"
-)
-
-// FilterRuleName_Values returns all elements of the FilterRuleName enum
-func FilterRuleName_Values() []string {
- return []string{
- FilterRuleNamePrefix,
- FilterRuleNameSuffix,
- }
-}
-
-const (
- // IntelligentTieringAccessTierArchiveAccess is a IntelligentTieringAccessTier enum value
- IntelligentTieringAccessTierArchiveAccess = "ARCHIVE_ACCESS"
-
- // IntelligentTieringAccessTierDeepArchiveAccess is a IntelligentTieringAccessTier enum value
- IntelligentTieringAccessTierDeepArchiveAccess = "DEEP_ARCHIVE_ACCESS"
-)
-
-// IntelligentTieringAccessTier_Values returns all elements of the IntelligentTieringAccessTier enum
-func IntelligentTieringAccessTier_Values() []string {
- return []string{
- IntelligentTieringAccessTierArchiveAccess,
- IntelligentTieringAccessTierDeepArchiveAccess,
- }
-}
-
-const (
- // IntelligentTieringStatusEnabled is a IntelligentTieringStatus enum value
- IntelligentTieringStatusEnabled = "Enabled"
-
- // IntelligentTieringStatusDisabled is a IntelligentTieringStatus enum value
- IntelligentTieringStatusDisabled = "Disabled"
-)
-
-// IntelligentTieringStatus_Values returns all elements of the IntelligentTieringStatus enum
-func IntelligentTieringStatus_Values() []string {
- return []string{
- IntelligentTieringStatusEnabled,
- IntelligentTieringStatusDisabled,
- }
-}
-
-const (
- // InventoryFormatCsv is a InventoryFormat enum value
- InventoryFormatCsv = "CSV"
-
- // InventoryFormatOrc is a InventoryFormat enum value
- InventoryFormatOrc = "ORC"
-
- // InventoryFormatParquet is a InventoryFormat enum value
- InventoryFormatParquet = "Parquet"
-)
-
-// InventoryFormat_Values returns all elements of the InventoryFormat enum
-func InventoryFormat_Values() []string {
- return []string{
- InventoryFormatCsv,
- InventoryFormatOrc,
- InventoryFormatParquet,
- }
-}
-
-const (
- // InventoryFrequencyDaily is a InventoryFrequency enum value
- InventoryFrequencyDaily = "Daily"
-
- // InventoryFrequencyWeekly is a InventoryFrequency enum value
- InventoryFrequencyWeekly = "Weekly"
-)
-
-// InventoryFrequency_Values returns all elements of the InventoryFrequency enum
-func InventoryFrequency_Values() []string {
- return []string{
- InventoryFrequencyDaily,
- InventoryFrequencyWeekly,
- }
-}
-
-const (
- // InventoryIncludedObjectVersionsAll is a InventoryIncludedObjectVersions enum value
- InventoryIncludedObjectVersionsAll = "All"
-
- // InventoryIncludedObjectVersionsCurrent is a InventoryIncludedObjectVersions enum value
- InventoryIncludedObjectVersionsCurrent = "Current"
-)
-
-// InventoryIncludedObjectVersions_Values returns all elements of the InventoryIncludedObjectVersions enum
-func InventoryIncludedObjectVersions_Values() []string {
- return []string{
- InventoryIncludedObjectVersionsAll,
- InventoryIncludedObjectVersionsCurrent,
- }
-}
-
-const (
- // InventoryOptionalFieldSize is a InventoryOptionalField enum value
- InventoryOptionalFieldSize = "Size"
-
- // InventoryOptionalFieldLastModifiedDate is a InventoryOptionalField enum value
- InventoryOptionalFieldLastModifiedDate = "LastModifiedDate"
-
- // InventoryOptionalFieldStorageClass is a InventoryOptionalField enum value
- InventoryOptionalFieldStorageClass = "StorageClass"
-
- // InventoryOptionalFieldEtag is a InventoryOptionalField enum value
- InventoryOptionalFieldEtag = "ETag"
-
- // InventoryOptionalFieldIsMultipartUploaded is a InventoryOptionalField enum value
- InventoryOptionalFieldIsMultipartUploaded = "IsMultipartUploaded"
-
- // InventoryOptionalFieldReplicationStatus is a InventoryOptionalField enum value
- InventoryOptionalFieldReplicationStatus = "ReplicationStatus"
-
- // InventoryOptionalFieldEncryptionStatus is a InventoryOptionalField enum value
- InventoryOptionalFieldEncryptionStatus = "EncryptionStatus"
-
- // InventoryOptionalFieldObjectLockRetainUntilDate is a InventoryOptionalField enum value
- InventoryOptionalFieldObjectLockRetainUntilDate = "ObjectLockRetainUntilDate"
-
- // InventoryOptionalFieldObjectLockMode is a InventoryOptionalField enum value
- InventoryOptionalFieldObjectLockMode = "ObjectLockMode"
-
- // InventoryOptionalFieldObjectLockLegalHoldStatus is a InventoryOptionalField enum value
- InventoryOptionalFieldObjectLockLegalHoldStatus = "ObjectLockLegalHoldStatus"
-
- // InventoryOptionalFieldIntelligentTieringAccessTier is a InventoryOptionalField enum value
- InventoryOptionalFieldIntelligentTieringAccessTier = "IntelligentTieringAccessTier"
-
- // InventoryOptionalFieldBucketKeyStatus is a InventoryOptionalField enum value
- InventoryOptionalFieldBucketKeyStatus = "BucketKeyStatus"
-
- // InventoryOptionalFieldChecksumAlgorithm is a InventoryOptionalField enum value
- InventoryOptionalFieldChecksumAlgorithm = "ChecksumAlgorithm"
-)
-
-// InventoryOptionalField_Values returns all elements of the InventoryOptionalField enum
-func InventoryOptionalField_Values() []string {
- return []string{
- InventoryOptionalFieldSize,
- InventoryOptionalFieldLastModifiedDate,
- InventoryOptionalFieldStorageClass,
- InventoryOptionalFieldEtag,
- InventoryOptionalFieldIsMultipartUploaded,
- InventoryOptionalFieldReplicationStatus,
- InventoryOptionalFieldEncryptionStatus,
- InventoryOptionalFieldObjectLockRetainUntilDate,
- InventoryOptionalFieldObjectLockMode,
- InventoryOptionalFieldObjectLockLegalHoldStatus,
- InventoryOptionalFieldIntelligentTieringAccessTier,
- InventoryOptionalFieldBucketKeyStatus,
- InventoryOptionalFieldChecksumAlgorithm,
- }
-}
-
-const (
- // JSONTypeDocument is a JSONType enum value
- JSONTypeDocument = "DOCUMENT"
-
- // JSONTypeLines is a JSONType enum value
- JSONTypeLines = "LINES"
-)
-
-// JSONType_Values returns all elements of the JSONType enum
-func JSONType_Values() []string {
- return []string{
- JSONTypeDocument,
- JSONTypeLines,
- }
-}
-
-const (
- // MFADeleteEnabled is a MFADelete enum value
- MFADeleteEnabled = "Enabled"
-
- // MFADeleteDisabled is a MFADelete enum value
- MFADeleteDisabled = "Disabled"
-)
-
-// MFADelete_Values returns all elements of the MFADelete enum
-func MFADelete_Values() []string {
- return []string{
- MFADeleteEnabled,
- MFADeleteDisabled,
- }
-}
-
-const (
- // MFADeleteStatusEnabled is a MFADeleteStatus enum value
- MFADeleteStatusEnabled = "Enabled"
-
- // MFADeleteStatusDisabled is a MFADeleteStatus enum value
- MFADeleteStatusDisabled = "Disabled"
-)
-
-// MFADeleteStatus_Values returns all elements of the MFADeleteStatus enum
-func MFADeleteStatus_Values() []string {
- return []string{
- MFADeleteStatusEnabled,
- MFADeleteStatusDisabled,
- }
-}
-
-const (
- // MetadataDirectiveCopy is a MetadataDirective enum value
- MetadataDirectiveCopy = "COPY"
-
- // MetadataDirectiveReplace is a MetadataDirective enum value
- MetadataDirectiveReplace = "REPLACE"
-)
-
-// MetadataDirective_Values returns all elements of the MetadataDirective enum
-func MetadataDirective_Values() []string {
- return []string{
- MetadataDirectiveCopy,
- MetadataDirectiveReplace,
- }
-}
-
-const (
- // MetricsStatusEnabled is a MetricsStatus enum value
- MetricsStatusEnabled = "Enabled"
-
- // MetricsStatusDisabled is a MetricsStatus enum value
- MetricsStatusDisabled = "Disabled"
-)
-
-// MetricsStatus_Values returns all elements of the MetricsStatus enum
-func MetricsStatus_Values() []string {
- return []string{
- MetricsStatusEnabled,
- MetricsStatusDisabled,
- }
-}
-
-const (
- // ObjectAttributesEtag is a ObjectAttributes enum value
- ObjectAttributesEtag = "ETag"
-
- // ObjectAttributesChecksum is a ObjectAttributes enum value
- ObjectAttributesChecksum = "Checksum"
-
- // ObjectAttributesObjectParts is a ObjectAttributes enum value
- ObjectAttributesObjectParts = "ObjectParts"
-
- // ObjectAttributesStorageClass is a ObjectAttributes enum value
- ObjectAttributesStorageClass = "StorageClass"
-
- // ObjectAttributesObjectSize is a ObjectAttributes enum value
- ObjectAttributesObjectSize = "ObjectSize"
-)
-
-// ObjectAttributes_Values returns all elements of the ObjectAttributes enum
-func ObjectAttributes_Values() []string {
- return []string{
- ObjectAttributesEtag,
- ObjectAttributesChecksum,
- ObjectAttributesObjectParts,
- ObjectAttributesStorageClass,
- ObjectAttributesObjectSize,
- }
-}
-
-const (
- // ObjectCannedACLPrivate is a ObjectCannedACL enum value
- ObjectCannedACLPrivate = "private"
-
- // ObjectCannedACLPublicRead is a ObjectCannedACL enum value
- ObjectCannedACLPublicRead = "public-read"
-
- // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value
- ObjectCannedACLPublicReadWrite = "public-read-write"
-
- // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value
- ObjectCannedACLAuthenticatedRead = "authenticated-read"
-
- // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value
- ObjectCannedACLAwsExecRead = "aws-exec-read"
-
- // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value
- ObjectCannedACLBucketOwnerRead = "bucket-owner-read"
-
- // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value
- ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control"
-)
-
-// ObjectCannedACL_Values returns all elements of the ObjectCannedACL enum
-func ObjectCannedACL_Values() []string {
- return []string{
- ObjectCannedACLPrivate,
- ObjectCannedACLPublicRead,
- ObjectCannedACLPublicReadWrite,
- ObjectCannedACLAuthenticatedRead,
- ObjectCannedACLAwsExecRead,
- ObjectCannedACLBucketOwnerRead,
- ObjectCannedACLBucketOwnerFullControl,
- }
-}
-
-const (
- // ObjectLockEnabledEnabled is a ObjectLockEnabled enum value
- ObjectLockEnabledEnabled = "Enabled"
-)
-
-// ObjectLockEnabled_Values returns all elements of the ObjectLockEnabled enum
-func ObjectLockEnabled_Values() []string {
- return []string{
- ObjectLockEnabledEnabled,
- }
-}
-
-const (
- // ObjectLockLegalHoldStatusOn is a ObjectLockLegalHoldStatus enum value
- ObjectLockLegalHoldStatusOn = "ON"
-
- // ObjectLockLegalHoldStatusOff is a ObjectLockLegalHoldStatus enum value
- ObjectLockLegalHoldStatusOff = "OFF"
-)
-
-// ObjectLockLegalHoldStatus_Values returns all elements of the ObjectLockLegalHoldStatus enum
-func ObjectLockLegalHoldStatus_Values() []string {
- return []string{
- ObjectLockLegalHoldStatusOn,
- ObjectLockLegalHoldStatusOff,
- }
-}
-
-const (
- // ObjectLockModeGovernance is a ObjectLockMode enum value
- ObjectLockModeGovernance = "GOVERNANCE"
-
- // ObjectLockModeCompliance is a ObjectLockMode enum value
- ObjectLockModeCompliance = "COMPLIANCE"
-)
-
-// ObjectLockMode_Values returns all elements of the ObjectLockMode enum
-func ObjectLockMode_Values() []string {
- return []string{
- ObjectLockModeGovernance,
- ObjectLockModeCompliance,
- }
-}
-
-const (
- // ObjectLockRetentionModeGovernance is a ObjectLockRetentionMode enum value
- ObjectLockRetentionModeGovernance = "GOVERNANCE"
-
- // ObjectLockRetentionModeCompliance is a ObjectLockRetentionMode enum value
- ObjectLockRetentionModeCompliance = "COMPLIANCE"
-)
-
-// ObjectLockRetentionMode_Values returns all elements of the ObjectLockRetentionMode enum
-func ObjectLockRetentionMode_Values() []string {
- return []string{
- ObjectLockRetentionModeGovernance,
- ObjectLockRetentionModeCompliance,
- }
-}
-
-// The container element for object ownership for a bucket's ownership controls.
-//
-// BucketOwnerPreferred - Objects uploaded to the bucket change ownership to
-// the bucket owner if the objects are uploaded with the bucket-owner-full-control
-// canned ACL.
-//
-// ObjectWriter - The uploading account will own the object if the object is
-// uploaded with the bucket-owner-full-control canned ACL.
-//
-// BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer
-// affect permissions. The bucket owner automatically owns and has full control
-// over every object in the bucket. The bucket only accepts PUT requests that
-// don't specify an ACL or bucket owner full control ACLs, such as the bucket-owner-full-control
-// canned ACL or an equivalent form of this ACL expressed in the XML format.
-const (
- // ObjectOwnershipBucketOwnerPreferred is a ObjectOwnership enum value
- ObjectOwnershipBucketOwnerPreferred = "BucketOwnerPreferred"
-
- // ObjectOwnershipObjectWriter is a ObjectOwnership enum value
- ObjectOwnershipObjectWriter = "ObjectWriter"
-
- // ObjectOwnershipBucketOwnerEnforced is a ObjectOwnership enum value
- ObjectOwnershipBucketOwnerEnforced = "BucketOwnerEnforced"
-)
-
-// ObjectOwnership_Values returns all elements of the ObjectOwnership enum
-func ObjectOwnership_Values() []string {
- return []string{
- ObjectOwnershipBucketOwnerPreferred,
- ObjectOwnershipObjectWriter,
- ObjectOwnershipBucketOwnerEnforced,
- }
-}
-
-const (
- // ObjectStorageClassStandard is a ObjectStorageClass enum value
- ObjectStorageClassStandard = "STANDARD"
-
- // ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value
- ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
-
- // ObjectStorageClassGlacier is a ObjectStorageClass enum value
- ObjectStorageClassGlacier = "GLACIER"
-
- // ObjectStorageClassStandardIa is a ObjectStorageClass enum value
- ObjectStorageClassStandardIa = "STANDARD_IA"
-
- // ObjectStorageClassOnezoneIa is a ObjectStorageClass enum value
- ObjectStorageClassOnezoneIa = "ONEZONE_IA"
-
- // ObjectStorageClassIntelligentTiering is a ObjectStorageClass enum value
- ObjectStorageClassIntelligentTiering = "INTELLIGENT_TIERING"
-
- // ObjectStorageClassDeepArchive is a ObjectStorageClass enum value
- ObjectStorageClassDeepArchive = "DEEP_ARCHIVE"
-
- // ObjectStorageClassOutposts is a ObjectStorageClass enum value
- ObjectStorageClassOutposts = "OUTPOSTS"
-
- // ObjectStorageClassGlacierIr is a ObjectStorageClass enum value
- ObjectStorageClassGlacierIr = "GLACIER_IR"
-)
-
-// ObjectStorageClass_Values returns all elements of the ObjectStorageClass enum
-func ObjectStorageClass_Values() []string {
- return []string{
- ObjectStorageClassStandard,
- ObjectStorageClassReducedRedundancy,
- ObjectStorageClassGlacier,
- ObjectStorageClassStandardIa,
- ObjectStorageClassOnezoneIa,
- ObjectStorageClassIntelligentTiering,
- ObjectStorageClassDeepArchive,
- ObjectStorageClassOutposts,
- ObjectStorageClassGlacierIr,
- }
-}
-
-const (
- // ObjectVersionStorageClassStandard is a ObjectVersionStorageClass enum value
- ObjectVersionStorageClassStandard = "STANDARD"
-)
-
-// ObjectVersionStorageClass_Values returns all elements of the ObjectVersionStorageClass enum
-func ObjectVersionStorageClass_Values() []string {
- return []string{
- ObjectVersionStorageClassStandard,
- }
-}
-
-const (
- // OwnerOverrideDestination is a OwnerOverride enum value
- OwnerOverrideDestination = "Destination"
-)
-
-// OwnerOverride_Values returns all elements of the OwnerOverride enum
-func OwnerOverride_Values() []string {
- return []string{
- OwnerOverrideDestination,
- }
-}
-
-const (
- // PayerRequester is a Payer enum value
- PayerRequester = "Requester"
-
- // PayerBucketOwner is a Payer enum value
- PayerBucketOwner = "BucketOwner"
-)
-
-// Payer_Values returns all elements of the Payer enum
-func Payer_Values() []string {
- return []string{
- PayerRequester,
- PayerBucketOwner,
- }
-}
-
-const (
- // PermissionFullControl is a Permission enum value
- PermissionFullControl = "FULL_CONTROL"
-
- // PermissionWrite is a Permission enum value
- PermissionWrite = "WRITE"
-
- // PermissionWriteAcp is a Permission enum value
- PermissionWriteAcp = "WRITE_ACP"
-
- // PermissionRead is a Permission enum value
- PermissionRead = "READ"
-
- // PermissionReadAcp is a Permission enum value
- PermissionReadAcp = "READ_ACP"
-)
-
-// Permission_Values returns all elements of the Permission enum
-func Permission_Values() []string {
- return []string{
- PermissionFullControl,
- PermissionWrite,
- PermissionWriteAcp,
- PermissionRead,
- PermissionReadAcp,
- }
-}
-
-const (
- // ProtocolHttp is a Protocol enum value
- ProtocolHttp = "http"
-
- // ProtocolHttps is a Protocol enum value
- ProtocolHttps = "https"
-)
-
-// Protocol_Values returns all elements of the Protocol enum
-func Protocol_Values() []string {
- return []string{
- ProtocolHttp,
- ProtocolHttps,
- }
-}
-
-const (
- // QuoteFieldsAlways is a QuoteFields enum value
- QuoteFieldsAlways = "ALWAYS"
-
- // QuoteFieldsAsneeded is a QuoteFields enum value
- QuoteFieldsAsneeded = "ASNEEDED"
-)
-
-// QuoteFields_Values returns all elements of the QuoteFields enum
-func QuoteFields_Values() []string {
- return []string{
- QuoteFieldsAlways,
- QuoteFieldsAsneeded,
- }
-}
-
-const (
- // ReplicaModificationsStatusEnabled is a ReplicaModificationsStatus enum value
- ReplicaModificationsStatusEnabled = "Enabled"
-
- // ReplicaModificationsStatusDisabled is a ReplicaModificationsStatus enum value
- ReplicaModificationsStatusDisabled = "Disabled"
-)
-
-// ReplicaModificationsStatus_Values returns all elements of the ReplicaModificationsStatus enum
-func ReplicaModificationsStatus_Values() []string {
- return []string{
- ReplicaModificationsStatusEnabled,
- ReplicaModificationsStatusDisabled,
- }
-}
-
-const (
- // ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value
- ReplicationRuleStatusEnabled = "Enabled"
-
- // ReplicationRuleStatusDisabled is a ReplicationRuleStatus enum value
- ReplicationRuleStatusDisabled = "Disabled"
-)
-
-// ReplicationRuleStatus_Values returns all elements of the ReplicationRuleStatus enum
-func ReplicationRuleStatus_Values() []string {
- return []string{
- ReplicationRuleStatusEnabled,
- ReplicationRuleStatusDisabled,
- }
-}
-
-const (
- // ReplicationStatusComplete is a ReplicationStatus enum value
- ReplicationStatusComplete = "COMPLETE"
-
- // ReplicationStatusPending is a ReplicationStatus enum value
- ReplicationStatusPending = "PENDING"
-
- // ReplicationStatusFailed is a ReplicationStatus enum value
- ReplicationStatusFailed = "FAILED"
-
- // ReplicationStatusReplica is a ReplicationStatus enum value
- ReplicationStatusReplica = "REPLICA"
-)
-
-// ReplicationStatus_Values returns all elements of the ReplicationStatus enum
-func ReplicationStatus_Values() []string {
- return []string{
- ReplicationStatusComplete,
- ReplicationStatusPending,
- ReplicationStatusFailed,
- ReplicationStatusReplica,
- }
-}
-
-const (
- // ReplicationTimeStatusEnabled is a ReplicationTimeStatus enum value
- ReplicationTimeStatusEnabled = "Enabled"
-
- // ReplicationTimeStatusDisabled is a ReplicationTimeStatus enum value
- ReplicationTimeStatusDisabled = "Disabled"
-)
-
-// ReplicationTimeStatus_Values returns all elements of the ReplicationTimeStatus enum
-func ReplicationTimeStatus_Values() []string {
- return []string{
- ReplicationTimeStatusEnabled,
- ReplicationTimeStatusDisabled,
- }
-}
-
-// If present, indicates that the requester was successfully charged for the
-// request.
-const (
- // RequestChargedRequester is a RequestCharged enum value
- RequestChargedRequester = "requester"
-)
-
-// RequestCharged_Values returns all elements of the RequestCharged enum
-func RequestCharged_Values() []string {
- return []string{
- RequestChargedRequester,
- }
-}
-
-// 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
-// in the Amazon S3 User Guide.
-const (
- // RequestPayerRequester is a RequestPayer enum value
- RequestPayerRequester = "requester"
-)
-
-// RequestPayer_Values returns all elements of the RequestPayer enum
-func RequestPayer_Values() []string {
- return []string{
- RequestPayerRequester,
- }
-}
-
-const (
- // RestoreRequestTypeSelect is a RestoreRequestType enum value
- RestoreRequestTypeSelect = "SELECT"
-)
-
-// RestoreRequestType_Values returns all elements of the RestoreRequestType enum
-func RestoreRequestType_Values() []string {
- return []string{
- RestoreRequestTypeSelect,
- }
-}
-
-const (
- // ServerSideEncryptionAes256 is a ServerSideEncryption enum value
- ServerSideEncryptionAes256 = "AES256"
-
- // ServerSideEncryptionAwsKms is a ServerSideEncryption enum value
- ServerSideEncryptionAwsKms = "aws:kms"
-)
-
-// ServerSideEncryption_Values returns all elements of the ServerSideEncryption enum
-func ServerSideEncryption_Values() []string {
- return []string{
- ServerSideEncryptionAes256,
- ServerSideEncryptionAwsKms,
- }
-}
-
-const (
- // SseKmsEncryptedObjectsStatusEnabled is a SseKmsEncryptedObjectsStatus enum value
- SseKmsEncryptedObjectsStatusEnabled = "Enabled"
-
- // SseKmsEncryptedObjectsStatusDisabled is a SseKmsEncryptedObjectsStatus enum value
- SseKmsEncryptedObjectsStatusDisabled = "Disabled"
-)
-
-// SseKmsEncryptedObjectsStatus_Values returns all elements of the SseKmsEncryptedObjectsStatus enum
-func SseKmsEncryptedObjectsStatus_Values() []string {
- return []string{
- SseKmsEncryptedObjectsStatusEnabled,
- SseKmsEncryptedObjectsStatusDisabled,
- }
-}
-
-const (
- // StorageClassStandard is a StorageClass enum value
- StorageClassStandard = "STANDARD"
-
- // StorageClassReducedRedundancy is a StorageClass enum value
- StorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
-
- // StorageClassStandardIa is a StorageClass enum value
- StorageClassStandardIa = "STANDARD_IA"
-
- // StorageClassOnezoneIa is a StorageClass enum value
- StorageClassOnezoneIa = "ONEZONE_IA"
-
- // StorageClassIntelligentTiering is a StorageClass enum value
- StorageClassIntelligentTiering = "INTELLIGENT_TIERING"
-
- // StorageClassGlacier is a StorageClass enum value
- StorageClassGlacier = "GLACIER"
-
- // StorageClassDeepArchive is a StorageClass enum value
- StorageClassDeepArchive = "DEEP_ARCHIVE"
-
- // StorageClassOutposts is a StorageClass enum value
- StorageClassOutposts = "OUTPOSTS"
-
- // StorageClassGlacierIr is a StorageClass enum value
- StorageClassGlacierIr = "GLACIER_IR"
-)
-
-// StorageClass_Values returns all elements of the StorageClass enum
-func StorageClass_Values() []string {
- return []string{
- StorageClassStandard,
- StorageClassReducedRedundancy,
- StorageClassStandardIa,
- StorageClassOnezoneIa,
- StorageClassIntelligentTiering,
- StorageClassGlacier,
- StorageClassDeepArchive,
- StorageClassOutposts,
- StorageClassGlacierIr,
- }
-}
-
-const (
- // StorageClassAnalysisSchemaVersionV1 is a StorageClassAnalysisSchemaVersion enum value
- StorageClassAnalysisSchemaVersionV1 = "V_1"
-)
-
-// StorageClassAnalysisSchemaVersion_Values returns all elements of the StorageClassAnalysisSchemaVersion enum
-func StorageClassAnalysisSchemaVersion_Values() []string {
- return []string{
- StorageClassAnalysisSchemaVersionV1,
- }
-}
-
-const (
- // TaggingDirectiveCopy is a TaggingDirective enum value
- TaggingDirectiveCopy = "COPY"
-
- // TaggingDirectiveReplace is a TaggingDirective enum value
- TaggingDirectiveReplace = "REPLACE"
-)
-
-// TaggingDirective_Values returns all elements of the TaggingDirective enum
-func TaggingDirective_Values() []string {
- return []string{
- TaggingDirectiveCopy,
- TaggingDirectiveReplace,
- }
-}
-
-const (
- // TierStandard is a Tier enum value
- TierStandard = "Standard"
-
- // TierBulk is a Tier enum value
- TierBulk = "Bulk"
-
- // TierExpedited is a Tier enum value
- TierExpedited = "Expedited"
-)
-
-// Tier_Values returns all elements of the Tier enum
-func Tier_Values() []string {
- return []string{
- TierStandard,
- TierBulk,
- TierExpedited,
- }
-}
-
-const (
- // TransitionStorageClassGlacier is a TransitionStorageClass enum value
- TransitionStorageClassGlacier = "GLACIER"
-
- // TransitionStorageClassStandardIa is a TransitionStorageClass enum value
- TransitionStorageClassStandardIa = "STANDARD_IA"
-
- // TransitionStorageClassOnezoneIa is a TransitionStorageClass enum value
- TransitionStorageClassOnezoneIa = "ONEZONE_IA"
-
- // TransitionStorageClassIntelligentTiering is a TransitionStorageClass enum value
- TransitionStorageClassIntelligentTiering = "INTELLIGENT_TIERING"
-
- // TransitionStorageClassDeepArchive is a TransitionStorageClass enum value
- TransitionStorageClassDeepArchive = "DEEP_ARCHIVE"
-
- // TransitionStorageClassGlacierIr is a TransitionStorageClass enum value
- TransitionStorageClassGlacierIr = "GLACIER_IR"
-)
-
-// TransitionStorageClass_Values returns all elements of the TransitionStorageClass enum
-func TransitionStorageClass_Values() []string {
- return []string{
- TransitionStorageClassGlacier,
- TransitionStorageClassStandardIa,
- TransitionStorageClassOnezoneIa,
- TransitionStorageClassIntelligentTiering,
- TransitionStorageClassDeepArchive,
- TransitionStorageClassGlacierIr,
- }
-}
-
-const (
- // TypeCanonicalUser is a Type enum value
- TypeCanonicalUser = "CanonicalUser"
-
- // TypeAmazonCustomerByEmail is a Type enum value
- TypeAmazonCustomerByEmail = "AmazonCustomerByEmail"
-
- // TypeGroup is a Type enum value
- TypeGroup = "Group"
-)
-
-// Type_Values returns all elements of the Type enum
-func Type_Values() []string {
- return []string{
- TypeCanonicalUser,
- TypeAmazonCustomerByEmail,
- TypeGroup,
- }
-}
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
deleted file mode 100644
index 407f06b6e..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/body_hash.go
+++ /dev/null
@@ -1,202 +0,0 @@
-package s3
-
-import (
- "bytes"
- "crypto/md5"
- "crypto/sha256"
- "encoding/base64"
- "encoding/hex"
- "fmt"
- "hash"
- "io"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-const (
- contentMD5Header = "Content-Md5"
- contentSha256Header = "X-Amz-Content-Sha256"
- amzTeHeader = "X-Amz-Te"
- amzTxEncodingHeader = "X-Amz-Transfer-Encoding"
-
- appendMD5TxEncoding = "append-md5"
-)
-
-// 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.
-func computeBodyHashes(r *request.Request) {
- if aws.BoolValue(r.Config.S3DisableContentMD5Validation) {
- return
- }
- if r.IsPresigned() {
- return
- }
- if r.Error != nil || !aws.IsReaderSeekable(r.Body) {
- return
- }
-
- var md5Hash, sha256Hash hash.Hash
- hashers := make([]io.Writer, 0, 2)
-
- // Determine upfront which hashes can be set without overriding user
- // provide header data.
- if v := r.HTTPRequest.Header.Get(contentMD5Header); len(v) == 0 {
- md5Hash = md5.New()
- hashers = append(hashers, md5Hash)
- }
-
- if v := r.HTTPRequest.Header.Get(contentSha256Header); len(v) == 0 {
- sha256Hash = sha256.New()
- hashers = append(hashers, sha256Hash)
- }
-
- // Create the destination writer based on the hashes that are not already
- // provided by the user.
- var dst io.Writer
- switch len(hashers) {
- case 0:
- return
- case 1:
- dst = hashers[0]
- default:
- dst = io.MultiWriter(hashers...)
- }
-
- if _, err := aws.CopySeekableBody(dst, r.Body); err != nil {
- r.Error = awserr.New("BodyHashError", "failed to compute body hashes", err)
- return
- }
-
- // For the hashes created, set the associated headers that the user did not
- // already provide.
- if md5Hash != nil {
- sum := make([]byte, md5.Size)
- encoded := make([]byte, md5Base64EncLen)
-
- base64.StdEncoding.Encode(encoded, md5Hash.Sum(sum[0:0]))
- r.HTTPRequest.Header[contentMD5Header] = []string{string(encoded)}
- }
-
- if sha256Hash != nil {
- encoded := make([]byte, sha256HexEncLen)
- sum := make([]byte, sha256.Size)
-
- hex.Encode(encoded, sha256Hash.Sum(sum[0:0]))
- r.HTTPRequest.Header[contentSha256Header] = []string{string(encoded)}
- }
-}
-
-const (
- md5Base64EncLen = (md5.Size + 2) / 3 * 4 // base64.StdEncoding.EncodedLen
- sha256HexEncLen = sha256.Size * 2 // hex.EncodedLen
-)
-
-// Adds the x-amz-te: append_md5 header to the request. This requests the service
-// responds with a trailing MD5 checksum.
-//
-// Will not ask for append MD5 if disabled, the request is presigned or,
-// or the API operation does not support content MD5 validation.
-func askForTxEncodingAppendMD5(r *request.Request) {
- if aws.BoolValue(r.Config.S3DisableContentMD5Validation) {
- return
- }
- if r.IsPresigned() {
- return
- }
- r.HTTPRequest.Header.Set(amzTeHeader, appendMD5TxEncoding)
-}
-
-func useMD5ValidationReader(r *request.Request) {
- if r.Error != nil {
- return
- }
-
- if v := r.HTTPResponse.Header.Get(amzTxEncodingHeader); v != appendMD5TxEncoding {
- return
- }
-
- var bodyReader *io.ReadCloser
- var contentLen int64
- switch tv := r.Data.(type) {
- case *GetObjectOutput:
- bodyReader = &tv.Body
- contentLen = aws.Int64Value(tv.ContentLength)
- // Update ContentLength hiden the trailing MD5 checksum.
- tv.ContentLength = aws.Int64(contentLen - md5.Size)
- tv.ContentRange = aws.String(r.HTTPResponse.Header.Get("X-Amz-Content-Range"))
- default:
- r.Error = awserr.New("ChecksumValidationError",
- fmt.Sprintf("%s: %s header received on unsupported API, %s",
- amzTxEncodingHeader, appendMD5TxEncoding, r.Operation.Name,
- ), nil)
- return
- }
-
- if contentLen < md5.Size {
- r.Error = awserr.New("ChecksumValidationError",
- fmt.Sprintf("invalid Content-Length %d for %s %s",
- contentLen, appendMD5TxEncoding, amzTxEncodingHeader,
- ), nil)
- return
- }
-
- // Wrap and swap the response body reader with the validation reader.
- *bodyReader = newMD5ValidationReader(*bodyReader, contentLen-md5.Size)
-}
-
-type md5ValidationReader struct {
- rawReader io.ReadCloser
- payload io.Reader
- hash hash.Hash
-
- payloadLen int64
- read int64
-}
-
-func newMD5ValidationReader(reader io.ReadCloser, payloadLen int64) *md5ValidationReader {
- h := md5.New()
- return &md5ValidationReader{
- rawReader: reader,
- payload: io.TeeReader(&io.LimitedReader{R: reader, N: payloadLen}, h),
- hash: h,
- payloadLen: payloadLen,
- }
-}
-
-func (v *md5ValidationReader) Read(p []byte) (n int, err error) {
- n, err = v.payload.Read(p)
- if err != nil && err != io.EOF {
- return n, err
- }
-
- v.read += int64(n)
-
- if err == io.EOF {
- if v.read != v.payloadLen {
- return n, io.ErrUnexpectedEOF
- }
- expectSum := make([]byte, md5.Size)
- actualSum := make([]byte, md5.Size)
- if _, sumReadErr := io.ReadFull(v.rawReader, expectSum); sumReadErr != nil {
- return n, sumReadErr
- }
- actualSum = v.hash.Sum(actualSum[0:0])
- if !bytes.Equal(expectSum, actualSum) {
- return n, awserr.New("InvalidChecksum",
- fmt.Sprintf("expected MD5 checksum %s, got %s",
- hex.EncodeToString(expectSum),
- hex.EncodeToString(actualSum),
- ),
- nil)
- }
- }
-
- return n, err
-}
-
-func (v *md5ValidationReader) Close() error {
- return v.rawReader.Close()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go b/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go
deleted file mode 100644
index 20828387e..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go
+++ /dev/null
@@ -1,107 +0,0 @@
-package s3
-
-import (
- "io/ioutil"
- "regexp"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-var reBucketLocation = regexp.MustCompile(`>([^<>]+)<\/Location`)
-
-// NormalizeBucketLocation is a utility function which will update the
-// passed in value to always be a region ID. Generally this would be used
-// with GetBucketLocation API operation.
-//
-// Replaces empty string with "us-east-1", and "EU" with "eu-west-1".
-//
-// See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html
-// for more information on the values that can be returned.
-func NormalizeBucketLocation(loc string) string {
- switch loc {
- case "":
- loc = "us-east-1"
- case "EU":
- loc = "eu-west-1"
- }
-
- return loc
-}
-
-// NormalizeBucketLocationHandler is a request handler which will update the
-// GetBucketLocation's result LocationConstraint value to always be a region ID.
-//
-// Replaces empty string with "us-east-1", and "EU" with "eu-west-1".
-//
-// See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html
-// for more information on the values that can be returned.
-//
-// req, result := svc.GetBucketLocationRequest(&s3.GetBucketLocationInput{
-// Bucket: aws.String(bucket),
-// })
-// req.Handlers.Unmarshal.PushBackNamed(NormalizeBucketLocationHandler)
-// err := req.Send()
-var NormalizeBucketLocationHandler = request.NamedHandler{
- Name: "awssdk.s3.NormalizeBucketLocation",
- Fn: func(req *request.Request) {
- if req.Error != nil {
- return
- }
-
- out := req.Data.(*GetBucketLocationOutput)
- loc := NormalizeBucketLocation(aws.StringValue(out.LocationConstraint))
- out.LocationConstraint = aws.String(loc)
- },
-}
-
-// WithNormalizeBucketLocation is a request option which will update the
-// GetBucketLocation's result LocationConstraint value to always be a region ID.
-//
-// Replaces empty string with "us-east-1", and "EU" with "eu-west-1".
-//
-// See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html
-// for more information on the values that can be returned.
-//
-// result, err := svc.GetBucketLocationWithContext(ctx,
-// &s3.GetBucketLocationInput{
-// Bucket: aws.String(bucket),
-// },
-// s3.WithNormalizeBucketLocation,
-// )
-func WithNormalizeBucketLocation(r *request.Request) {
- r.Handlers.Unmarshal.PushBackNamed(NormalizeBucketLocationHandler)
-}
-
-func buildGetBucketLocation(r *request.Request) {
- if r.DataFilled() {
- out := r.Data.(*GetBucketLocationOutput)
- b, err := ioutil.ReadAll(r.HTTPResponse.Body)
- if err != nil {
- r.Error = awserr.New(request.ErrCodeSerialization,
- "failed reading response body", err)
- return
- }
-
- match := reBucketLocation.FindSubmatch(b)
- if len(match) > 1 {
- loc := string(match[1])
- out.LocationConstraint = aws.String(loc)
- }
- }
-}
-
-func populateLocationConstraint(r *request.Request) {
- if r.ParamsFilled() && aws.StringValue(r.Config.Region) != "us-east-1" {
- in := r.Params.(*CreateBucketInput)
- if in.CreateBucketConfiguration == nil {
- r.Params = awsutil.CopyOf(r.Params)
- in = r.Params.(*CreateBucketInput)
- in.CreateBucketConfiguration = &CreateBucketConfiguration{
- LocationConstraint: r.Config.Region,
- }
- }
- }
-}
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
deleted file mode 100644
index 229606b70..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go
+++ /dev/null
@@ -1,89 +0,0 @@
-package s3
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/endpoints"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/s3shared/arn"
- "github.com/aws/aws-sdk-go/internal/s3shared/s3err"
-)
-
-func init() {
- initClient = defaultInitClientFn
- initRequest = defaultInitRequestFn
-}
-
-func defaultInitClientFn(c *client.Client) {
- if c.Config.UseDualStackEndpoint == endpoints.DualStackEndpointStateUnset {
- if aws.BoolValue(c.Config.UseDualStack) {
- c.Config.UseDualStackEndpoint = endpoints.DualStackEndpointStateEnabled
- } else {
- c.Config.UseDualStackEndpoint = endpoints.DualStackEndpointStateDisabled
- }
- }
-
- // Support building custom endpoints based on config
- c.Handlers.Build.PushFront(endpointHandler)
-
- // Require SSL when using SSE keys
- c.Handlers.Validate.PushBack(validateSSERequiresSSL)
- c.Handlers.Build.PushBack(computeSSEKeyMD5)
- c.Handlers.Build.PushBack(computeCopySourceSSEKeyMD5)
-
- // S3 uses custom error unmarshaling logic
- c.Handlers.UnmarshalError.Clear()
- c.Handlers.UnmarshalError.PushBack(unmarshalError)
- c.Handlers.UnmarshalError.PushBackNamed(s3err.RequestFailureWrapperHandler())
-}
-
-func defaultInitRequestFn(r *request.Request) {
- // 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 opGetBucketLocation:
- // GetBucketLocation has custom parsing logic
- r.Handlers.Unmarshal.PushFront(buildGetBucketLocation)
- case opCreateBucket:
- // Auto-populate LocationConstraint with current region
- r.Handlers.Validate.PushFront(populateLocationConstraint)
- case opCopyObject, opUploadPartCopy, opCompleteMultipartUpload:
- r.Handlers.Unmarshal.PushFront(copyMultipartStatusOKUnmarshalError)
- r.Handlers.Unmarshal.PushBackNamed(s3err.RequestFailureWrapperHandler())
- case opPutObject, opUploadPart:
- r.Handlers.Build.PushBack(computeBodyHashes)
- // Disabled until #1837 root issue is resolved.
- // case opGetObject:
- // r.Handlers.Build.PushBack(askForTxEncodingAppendMD5)
- // r.Handlers.Unmarshal.PushBack(useMD5ValidationReader)
- case opWriteGetObjectResponse:
- r.Handlers.Build.PushFront(buildWriteGetObjectResponseEndpoint)
- }
-}
-
-// bucketGetter is an accessor interface to grab the "Bucket" field from
-// an S3 type.
-type bucketGetter interface {
- getBucket() string
-}
-
-// sseCustomerKeyGetter is an accessor interface to grab the "SSECustomerKey"
-// field from an S3 type.
-type sseCustomerKeyGetter interface {
- getSSECustomerKey() string
-}
-
-// copySourceSSECustomerKeyGetter is an accessor interface to grab the
-// "CopySourceSSECustomerKey" field from an S3 type.
-type copySourceSSECustomerKeyGetter interface {
- getCopySourceSSECustomerKey() string
-}
-
-// endpointARNGetter is an accessor interface to grab the
-// the field corresponding to an endpoint ARN input.
-type endpointARNGetter interface {
- getEndpointARN() (arn.Resource, error)
- hasEndpointARN() bool
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go
deleted file mode 100644
index c148f757e..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package s3 provides the client and types for making API
-// requests to Amazon Simple Storage Service.
-//
-// See https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01 for more information on this service.
-//
-// See s3 package documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/
-//
-// # Using the Client
-//
-// To contact Amazon Simple Storage Service with the SDK use the New function to create
-// a new service client. With that client you can make API requests to the service.
-// These clients are safe to use concurrently.
-//
-// See the SDK's documentation for more information on how to use the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/
-//
-// See aws.Config documentation for more information on configuring SDK clients.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
-//
-// See the Amazon Simple Storage Service client S3 for more
-// information on creating client for this service.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/#New
-package s3
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go
deleted file mode 100644
index 2e8244f8f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go
+++ /dev/null
@@ -1,109 +0,0 @@
-// Upload Managers
-//
-// The s3manager package's Uploader provides concurrent upload of content to S3
-// by taking advantage of S3's Multipart APIs. The Uploader also supports both
-// io.Reader for streaming uploads, and will also take advantage of io.ReadSeeker
-// for optimizations if the Body satisfies that type. Once the Uploader instance
-// is created you can call Upload concurrently from multiple goroutines safely.
-//
-// // The session the S3 Uploader will use
-// sess := session.Must(session.NewSession())
-//
-// // Create an uploader with the session and default options
-// uploader := s3manager.NewUploader(sess)
-//
-// f, err := os.Open(filename)
-// if err != nil {
-// return fmt.Errorf("failed to open file %q, %v", filename, err)
-// }
-//
-// // Upload the file to S3.
-// result, err := uploader.Upload(&s3manager.UploadInput{
-// Bucket: aws.String(myBucket),
-// Key: aws.String(myString),
-// Body: f,
-// })
-// if err != nil {
-// return fmt.Errorf("failed to upload file, %v", err)
-// }
-// fmt.Printf("file uploaded to, %s\n", aws.StringValue(result.Location))
-//
-// See the s3manager package's Uploader type documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#Uploader
-//
-// # Download Manager
-//
-// The s3manager package's Downloader provides concurrently downloading of Objects
-// from S3. The Downloader will write S3 Object content with an io.WriterAt.
-// Once the Downloader instance is created you can call Download concurrently from
-// multiple goroutines safely.
-//
-// // The session the S3 Downloader will use
-// sess := session.Must(session.NewSession())
-//
-// // Create a downloader with the session and default options
-// downloader := s3manager.NewDownloader(sess)
-//
-// // Create a file to write the S3 Object contents to.
-// f, err := os.Create(filename)
-// if err != nil {
-// return fmt.Errorf("failed to create file %q, %v", filename, err)
-// }
-//
-// // Write the contents of S3 Object to the file
-// n, err := downloader.Download(f, &s3.GetObjectInput{
-// Bucket: aws.String(myBucket),
-// Key: aws.String(myString),
-// })
-// if err != nil {
-// return fmt.Errorf("failed to download file, %v", err)
-// }
-// fmt.Printf("file downloaded, %d bytes\n", n)
-//
-// See the s3manager package's Downloader type documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#Downloader
-//
-// # Automatic URI cleaning
-//
-// Interacting with objects whose keys contain adjacent slashes (e.g. bucketname/foo//bar/objectname)
-// requires setting DisableRestProtocolURICleaning to true in the aws.Config struct
-// used by the service client.
-//
-// svc := s3.New(sess, &aws.Config{
-// DisableRestProtocolURICleaning: aws.Bool(true),
-// })
-// out, err := svc.GetObject(&s3.GetObjectInput {
-// Bucket: aws.String("bucketname"),
-// Key: aws.String("//foo//bar//moo"),
-// })
-//
-// # Get Bucket Region
-//
-// GetBucketRegion will attempt to get the region for a bucket using a region
-// hint to determine which AWS partition to perform the query on. Use this utility
-// to determine the region a bucket is in.
-//
-// sess := session.Must(session.NewSession())
-//
-// bucket := "my-bucket"
-// region, err := s3manager.GetBucketRegion(ctx, sess, bucket, "us-west-2")
-// if err != nil {
-// if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "NotFound" {
-// fmt.Fprintf(os.Stderr, "unable to find bucket %s's region not found\n", bucket)
-// }
-// return err
-// }
-// fmt.Printf("Bucket %s is in %s region\n", bucket, region)
-//
-// See the s3manager package's GetBucketRegion function documentation for more information
-// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#GetBucketRegion
-//
-// # S3 Crypto Client
-//
-// The s3crypto package provides the tools to upload and download encrypted
-// content from S3. The Encryption and Decryption clients can be used concurrently
-// once the client is created.
-//
-// See the s3crypto package documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3crypto/
-package s3
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go b/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go
deleted file mode 100644
index 71b438692..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go
+++ /dev/null
@@ -1,298 +0,0 @@
-package s3
-
-import (
- "fmt"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/endpoints"
- "net/url"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws"
- awsarn "github.com/aws/aws-sdk-go/aws/arn"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/s3shared"
- "github.com/aws/aws-sdk-go/internal/s3shared/arn"
-)
-
-const (
- s3Namespace = "s3"
- s3AccessPointNamespace = "s3-accesspoint"
- s3ObjectsLambdaNamespace = "s3-object-lambda"
- s3OutpostsNamespace = "s3-outposts"
-)
-
-// Used by shapes with members decorated as endpoint ARN.
-func parseEndpointARN(v string) (arn.Resource, error) {
- return arn.ParseResource(v, accessPointResourceParser)
-}
-
-func accessPointResourceParser(a awsarn.ARN) (arn.Resource, error) {
- resParts := arn.SplitResource(a.Resource)
- switch resParts[0] {
- case "accesspoint":
- switch a.Service {
- case s3Namespace:
- return arn.ParseAccessPointResource(a, resParts[1:])
- case s3ObjectsLambdaNamespace:
- return parseS3ObjectLambdaAccessPointResource(a, resParts)
- default:
- return arn.AccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: fmt.Sprintf("service is not %s or %s", s3Namespace, s3ObjectsLambdaNamespace)}
- }
- case "outpost":
- if a.Service != "s3-outposts" {
- return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "service is not s3-outposts"}
- }
- return parseOutpostAccessPointResource(a, resParts[1:])
- default:
- return nil, arn.InvalidARNError{ARN: a, Reason: "unknown resource type"}
- }
-}
-
-// parseOutpostAccessPointResource attempts to parse the ARNs resource as an
-// outpost access-point resource.
-//
-// Supported Outpost AccessPoint ARN format:
-// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/accesspoint/{accesspointName}
-// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/accesspoint/myaccesspoint
-func parseOutpostAccessPointResource(a awsarn.ARN, resParts []string) (arn.OutpostAccessPointARN, error) {
- // outpost accesspoint arn is only valid if service is s3-outposts
- if a.Service != "s3-outposts" {
- return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "service is not s3-outposts"}
- }
-
- if len(resParts) == 0 {
- return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "outpost resource-id not set"}
- }
-
- if len(resParts) < 3 {
- return arn.OutpostAccessPointARN{}, arn.InvalidARNError{
- ARN: a, Reason: "access-point resource not set in Outpost ARN",
- }
- }
-
- resID := strings.TrimSpace(resParts[0])
- if len(resID) == 0 {
- return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "outpost resource-id not set"}
- }
-
- var outpostAccessPointARN = arn.OutpostAccessPointARN{}
- switch resParts[1] {
- case "accesspoint":
- accessPointARN, err := arn.ParseAccessPointResource(a, resParts[2:])
- if err != nil {
- return arn.OutpostAccessPointARN{}, err
- }
- // set access-point arn
- outpostAccessPointARN.AccessPointARN = accessPointARN
- default:
- return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "access-point resource not set in Outpost ARN"}
- }
-
- // set outpost id
- outpostAccessPointARN.OutpostID = resID
- return outpostAccessPointARN, nil
-}
-
-func parseS3ObjectLambdaAccessPointResource(a awsarn.ARN, resParts []string) (arn.S3ObjectLambdaAccessPointARN, error) {
- if a.Service != s3ObjectsLambdaNamespace {
- return arn.S3ObjectLambdaAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: fmt.Sprintf("service is not %s", s3ObjectsLambdaNamespace)}
- }
-
- accessPointARN, err := arn.ParseAccessPointResource(a, resParts[1:])
- if err != nil {
- return arn.S3ObjectLambdaAccessPointARN{}, err
- }
-
- if len(accessPointARN.Region) == 0 {
- return arn.S3ObjectLambdaAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: fmt.Sprintf("%s region not set", s3ObjectsLambdaNamespace)}
- }
-
- return arn.S3ObjectLambdaAccessPointARN{
- AccessPointARN: accessPointARN,
- }, nil
-}
-
-func endpointHandler(req *request.Request) {
- endpoint, ok := req.Params.(endpointARNGetter)
- if !ok || !endpoint.hasEndpointARN() {
- updateBucketEndpointFromParams(req)
- return
- }
-
- resource, err := endpoint.getEndpointARN()
- if err != nil {
- req.Error = s3shared.NewInvalidARNError(nil, err)
- return
- }
-
- resReq := s3shared.ResourceRequest{
- Resource: resource,
- Request: req,
- }
-
- if len(resReq.Request.ClientInfo.PartitionID) != 0 && resReq.IsCrossPartition() {
- req.Error = s3shared.NewClientPartitionMismatchError(resource,
- req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
- return
- }
-
- if !resReq.AllowCrossRegion() && resReq.IsCrossRegion() {
- req.Error = s3shared.NewClientRegionMismatchError(resource,
- req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
- return
- }
-
- switch tv := resource.(type) {
- case arn.AccessPointARN:
- err = updateRequestAccessPointEndpoint(req, tv)
- if err != nil {
- req.Error = err
- }
- case arn.S3ObjectLambdaAccessPointARN:
- err = updateRequestS3ObjectLambdaAccessPointEndpoint(req, tv)
- if err != nil {
- req.Error = err
- }
- case arn.OutpostAccessPointARN:
- // outposts does not support FIPS regions
- if req.Config.UseFIPSEndpoint == endpoints.FIPSEndpointStateEnabled {
- req.Error = s3shared.NewFIPSConfigurationError(resource, req.ClientInfo.PartitionID,
- aws.StringValue(req.Config.Region), nil)
- return
- }
-
- err = updateRequestOutpostAccessPointEndpoint(req, tv)
- if err != nil {
- req.Error = err
- }
- default:
- req.Error = s3shared.NewInvalidARNError(resource, nil)
- }
-}
-
-func updateBucketEndpointFromParams(r *request.Request) {
- bucket, ok := bucketNameFromReqParams(r.Params)
- if !ok {
- // Ignore operation requests if the bucket name was not provided
- // if this is an input validation error the validation handler
- // will report it.
- return
- }
- updateEndpointForS3Config(r, bucket)
-}
-
-func updateRequestAccessPointEndpoint(req *request.Request, accessPoint arn.AccessPointARN) error {
- // Accelerate not supported
- if aws.BoolValue(req.Config.S3UseAccelerate) {
- return s3shared.NewClientConfiguredForAccelerateError(accessPoint,
- req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
- }
-
- // Ignore the disable host prefix for access points
- req.Config.DisableEndpointHostPrefix = aws.Bool(false)
-
- if err := accessPointEndpointBuilder(accessPoint).build(req); err != nil {
- return err
- }
-
- removeBucketFromPath(req.HTTPRequest.URL)
-
- return nil
-}
-
-func updateRequestS3ObjectLambdaAccessPointEndpoint(req *request.Request, accessPoint arn.S3ObjectLambdaAccessPointARN) error {
- // DualStack not supported
- if isUseDualStackEndpoint(req) {
- return s3shared.NewClientConfiguredForDualStackError(accessPoint,
- req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
- }
-
- // Accelerate not supported
- if aws.BoolValue(req.Config.S3UseAccelerate) {
- return s3shared.NewClientConfiguredForAccelerateError(accessPoint,
- req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
- }
-
- // Ignore the disable host prefix for access points
- req.Config.DisableEndpointHostPrefix = aws.Bool(false)
-
- if err := s3ObjectLambdaAccessPointEndpointBuilder(accessPoint).build(req); err != nil {
- return err
- }
-
- removeBucketFromPath(req.HTTPRequest.URL)
-
- return nil
-}
-
-func updateRequestOutpostAccessPointEndpoint(req *request.Request, accessPoint arn.OutpostAccessPointARN) error {
- // Accelerate not supported
- if aws.BoolValue(req.Config.S3UseAccelerate) {
- return s3shared.NewClientConfiguredForAccelerateError(accessPoint,
- req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
- }
-
- // Dualstack not supported
- if isUseDualStackEndpoint(req) {
- return s3shared.NewClientConfiguredForDualStackError(accessPoint,
- req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
- }
-
- // Ignore the disable host prefix for access points
- req.Config.DisableEndpointHostPrefix = aws.Bool(false)
-
- if err := outpostAccessPointEndpointBuilder(accessPoint).build(req); err != nil {
- return err
- }
-
- removeBucketFromPath(req.HTTPRequest.URL)
- return nil
-}
-
-func removeBucketFromPath(u *url.URL) {
- u.Path = strings.Replace(u.Path, "/{Bucket}", "", -1)
- if u.Path == "" {
- u.Path = "/"
- }
-}
-
-func buildWriteGetObjectResponseEndpoint(req *request.Request) {
- // DualStack not supported
- if isUseDualStackEndpoint(req) {
- req.Error = awserr.New("ConfigurationError", "client configured for dualstack but not supported for operation", nil)
- return
- }
-
- // Accelerate not supported
- if aws.BoolValue(req.Config.S3UseAccelerate) {
- req.Error = awserr.New("ConfigurationError", "client configured for accelerate but not supported for operation", nil)
- return
- }
-
- signingName := s3ObjectsLambdaNamespace
- signingRegion := req.ClientInfo.SigningRegion
-
- if !hasCustomEndpoint(req) {
- endpoint, err := resolveRegionalEndpoint(req, aws.StringValue(req.Config.Region), req.ClientInfo.ResolvedRegion, EndpointsID)
- if err != nil {
- req.Error = awserr.New(request.ErrCodeSerialization, "failed to resolve endpoint", err)
- return
- }
- signingRegion = endpoint.SigningRegion
-
- if err = updateRequestEndpoint(req, endpoint.URL); err != nil {
- req.Error = err
- return
- }
- updateS3HostPrefixForS3ObjectLambda(req)
- }
-
- redirectSigner(req, signingName, signingRegion)
-}
-
-func isUseDualStackEndpoint(req *request.Request) bool {
- if req.Config.UseDualStackEndpoint != endpoints.DualStackEndpointStateUnset {
- return req.Config.UseDualStackEndpoint == endpoints.DualStackEndpointStateEnabled
- }
- return aws.BoolValue(req.Config.UseDualStack)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go b/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go
deleted file mode 100644
index 7ae18ef54..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go
+++ /dev/null
@@ -1,239 +0,0 @@
-package s3
-
-import (
- "net/url"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/endpoints"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/s3shared"
- "github.com/aws/aws-sdk-go/internal/s3shared/arn"
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-const (
- accessPointPrefixLabel = "accesspoint"
- accountIDPrefixLabel = "accountID"
- accessPointPrefixTemplate = "{" + accessPointPrefixLabel + "}-{" + accountIDPrefixLabel + "}."
-
- outpostPrefixLabel = "outpost"
- outpostAccessPointPrefixTemplate = accessPointPrefixTemplate + "{" + outpostPrefixLabel + "}."
-)
-
-// hasCustomEndpoint returns true if endpoint is a custom endpoint
-func hasCustomEndpoint(r *request.Request) bool {
- return len(aws.StringValue(r.Config.Endpoint)) > 0
-}
-
-// accessPointEndpointBuilder represents the endpoint builder for access point arn
-type accessPointEndpointBuilder arn.AccessPointARN
-
-// build builds the endpoint for corresponding access point arn
-//
-// For building an endpoint from access point arn, format used is:
-// - Access point endpoint format : {accesspointName}-{accountId}.s3-accesspoint.{region}.{dnsSuffix}
-// - example : myaccesspoint-012345678901.s3-accesspoint.us-west-2.amazonaws.com
-//
-// Access Point Endpoint requests are signed using "s3" as signing name.
-func (a accessPointEndpointBuilder) build(req *request.Request) error {
- resolveService := arn.AccessPointARN(a).Service
- resolveRegion := arn.AccessPointARN(a).Region
-
- endpoint, err := resolveRegionalEndpoint(req, resolveRegion, "", resolveService)
- if err != nil {
- return s3shared.NewFailedToResolveEndpointError(arn.AccessPointARN(a),
- req.ClientInfo.PartitionID, resolveRegion, err)
- }
-
- endpoint.URL = endpoints.AddScheme(endpoint.URL, aws.BoolValue(req.Config.DisableSSL))
-
- if !hasCustomEndpoint(req) {
- if err = updateRequestEndpoint(req, endpoint.URL); err != nil {
- return err
- }
-
- // dual stack provided by endpoint resolver
- updateS3HostForS3AccessPoint(req)
- }
-
- protocol.HostPrefixBuilder{
- Prefix: accessPointPrefixTemplate,
- LabelsFn: a.hostPrefixLabelValues,
- }.Build(req)
-
- // signer redirection
- redirectSigner(req, endpoint.SigningName, endpoint.SigningRegion)
-
- err = protocol.ValidateEndpointHost(req.Operation.Name, req.HTTPRequest.URL.Host)
- if err != nil {
- return s3shared.NewInvalidARNError(arn.AccessPointARN(a), err)
- }
-
- return nil
-}
-
-func (a accessPointEndpointBuilder) hostPrefixLabelValues() map[string]string {
- return map[string]string{
- accessPointPrefixLabel: arn.AccessPointARN(a).AccessPointName,
- accountIDPrefixLabel: arn.AccessPointARN(a).AccountID,
- }
-}
-
-// s3ObjectLambdaAccessPointEndpointBuilder represents the endpoint builder for an s3 object lambda access point arn
-type s3ObjectLambdaAccessPointEndpointBuilder arn.S3ObjectLambdaAccessPointARN
-
-// build builds the endpoint for corresponding access point arn
-//
-// For building an endpoint from access point arn, format used is:
-// - Access point endpoint format : {accesspointName}-{accountId}.s3-object-lambda.{region}.{dnsSuffix}
-// - example : myaccesspoint-012345678901.s3-object-lambda.us-west-2.amazonaws.com
-//
-// Access Point Endpoint requests are signed using "s3-object-lambda" as signing name.
-func (a s3ObjectLambdaAccessPointEndpointBuilder) build(req *request.Request) error {
- resolveRegion := arn.S3ObjectLambdaAccessPointARN(a).Region
-
- endpoint, err := resolveRegionalEndpoint(req, resolveRegion, "", EndpointsID)
- if err != nil {
- return s3shared.NewFailedToResolveEndpointError(arn.S3ObjectLambdaAccessPointARN(a),
- req.ClientInfo.PartitionID, resolveRegion, err)
- }
-
- endpoint.URL = endpoints.AddScheme(endpoint.URL, aws.BoolValue(req.Config.DisableSSL))
-
- endpoint.SigningName = s3ObjectsLambdaNamespace
-
- if !hasCustomEndpoint(req) {
- if err = updateRequestEndpoint(req, endpoint.URL); err != nil {
- return err
- }
-
- updateS3HostPrefixForS3ObjectLambda(req)
- }
-
- protocol.HostPrefixBuilder{
- Prefix: accessPointPrefixTemplate,
- LabelsFn: a.hostPrefixLabelValues,
- }.Build(req)
-
- // signer redirection
- redirectSigner(req, endpoint.SigningName, endpoint.SigningRegion)
-
- err = protocol.ValidateEndpointHost(req.Operation.Name, req.HTTPRequest.URL.Host)
- if err != nil {
- return s3shared.NewInvalidARNError(arn.S3ObjectLambdaAccessPointARN(a), err)
- }
-
- return nil
-}
-
-func (a s3ObjectLambdaAccessPointEndpointBuilder) hostPrefixLabelValues() map[string]string {
- return map[string]string{
- accessPointPrefixLabel: arn.S3ObjectLambdaAccessPointARN(a).AccessPointName,
- accountIDPrefixLabel: arn.S3ObjectLambdaAccessPointARN(a).AccountID,
- }
-}
-
-// outpostAccessPointEndpointBuilder represents the Endpoint builder for outpost access point arn.
-type outpostAccessPointEndpointBuilder arn.OutpostAccessPointARN
-
-// build builds an endpoint corresponding to the outpost access point arn.
-//
-// For building an endpoint from outpost access point arn, format used is:
-// - Outpost access point endpoint format : {accesspointName}-{accountId}.{outpostId}.s3-outposts.{region}.{dnsSuffix}
-// - example : myaccesspoint-012345678901.op-01234567890123456.s3-outposts.us-west-2.amazonaws.com
-//
-// Outpost AccessPoint Endpoint request are signed using "s3-outposts" as signing name.
-func (o outpostAccessPointEndpointBuilder) build(req *request.Request) error {
- resolveRegion := o.Region
- resolveService := o.Service
-
- endpointsID := resolveService
- if resolveService == s3OutpostsNamespace {
- endpointsID = "s3"
- }
-
- endpoint, err := resolveRegionalEndpoint(req, resolveRegion, "", endpointsID)
- if err != nil {
- return s3shared.NewFailedToResolveEndpointError(o,
- req.ClientInfo.PartitionID, resolveRegion, err)
- }
-
- endpoint.URL = endpoints.AddScheme(endpoint.URL, aws.BoolValue(req.Config.DisableSSL))
-
- if !hasCustomEndpoint(req) {
- if err = updateRequestEndpoint(req, endpoint.URL); err != nil {
- return err
- }
- updateHostPrefix(req, endpointsID, resolveService)
- }
-
- protocol.HostPrefixBuilder{
- Prefix: outpostAccessPointPrefixTemplate,
- LabelsFn: o.hostPrefixLabelValues,
- }.Build(req)
-
- // set the signing region, name to resolved names from ARN
- redirectSigner(req, resolveService, resolveRegion)
-
- err = protocol.ValidateEndpointHost(req.Operation.Name, req.HTTPRequest.URL.Host)
- if err != nil {
- return s3shared.NewInvalidARNError(o, err)
- }
-
- return nil
-}
-
-func (o outpostAccessPointEndpointBuilder) hostPrefixLabelValues() map[string]string {
- return map[string]string{
- accessPointPrefixLabel: o.AccessPointName,
- accountIDPrefixLabel: o.AccountID,
- outpostPrefixLabel: o.OutpostID,
- }
-}
-
-func resolveRegionalEndpoint(r *request.Request, region, resolvedRegion, endpointsID string) (endpoints.ResolvedEndpoint, error) {
- return r.Config.EndpointResolver.EndpointFor(endpointsID, region, func(opts *endpoints.Options) {
- opts.DisableSSL = aws.BoolValue(r.Config.DisableSSL)
- opts.UseDualStack = aws.BoolValue(r.Config.UseDualStack)
- opts.UseDualStackEndpoint = r.Config.UseDualStackEndpoint
- opts.UseFIPSEndpoint = r.Config.UseFIPSEndpoint
- opts.S3UsEast1RegionalEndpoint = endpoints.RegionalS3UsEast1Endpoint
- opts.ResolvedRegion = resolvedRegion
- opts.Logger = r.Config.Logger
- opts.LogDeprecated = r.Config.LogLevel.Matches(aws.LogDebugWithDeprecated)
- })
-}
-
-func updateRequestEndpoint(r *request.Request, endpoint string) (err error) {
- r.HTTPRequest.URL, err = url.Parse(endpoint + r.Operation.HTTPPath)
- if err != nil {
- return awserr.New(request.ErrCodeSerialization,
- "failed to parse endpoint URL", err)
- }
-
- return nil
-}
-
-// redirectSigner sets signing name, signing region for a request
-func redirectSigner(req *request.Request, signingName string, signingRegion string) {
- req.ClientInfo.SigningName = signingName
- req.ClientInfo.SigningRegion = signingRegion
-}
-
-func updateS3HostForS3AccessPoint(req *request.Request) {
- updateHostPrefix(req, "s3", s3AccessPointNamespace)
-}
-
-func updateS3HostPrefixForS3ObjectLambda(req *request.Request) {
- updateHostPrefix(req, "s3", s3ObjectsLambdaNamespace)
-}
-
-func updateHostPrefix(req *request.Request, oldEndpointPrefix, newEndpointPrefix string) {
- host := req.HTTPRequest.URL.Host
- if strings.HasPrefix(host, oldEndpointPrefix) {
- // replace service hostlabel oldEndpointPrefix to newEndpointPrefix
- req.HTTPRequest.URL.Host = newEndpointPrefix + host[len(oldEndpointPrefix):]
- }
-}
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
deleted file mode 100644
index cd6a2e8ae..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package s3
-
-const (
-
- // ErrCodeBucketAlreadyExists for service response error code
- // "BucketAlreadyExists".
- //
- // The requested bucket name is not available. The bucket namespace is shared
- // by all users of the system. Select a different name and try again.
- ErrCodeBucketAlreadyExists = "BucketAlreadyExists"
-
- // 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 Amazon Web Services 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"
-
- // ErrCodeInvalidObjectState for service response error code
- // "InvalidObjectState".
- //
- // Object is archived and inaccessible until restored.
- ErrCodeInvalidObjectState = "InvalidObjectState"
-
- // ErrCodeNoSuchBucket for service response error code
- // "NoSuchBucket".
- //
- // The specified bucket does not exist.
- ErrCodeNoSuchBucket = "NoSuchBucket"
-
- // ErrCodeNoSuchKey for service response error code
- // "NoSuchKey".
- //
- // The specified key does not exist.
- ErrCodeNoSuchKey = "NoSuchKey"
-
- // ErrCodeNoSuchUpload for service response error code
- // "NoSuchUpload".
- //
- // The specified multipart upload does not exist.
- ErrCodeNoSuchUpload = "NoSuchUpload"
-
- // ErrCodeObjectAlreadyInActiveTierError for service response error code
- // "ObjectAlreadyInActiveTierError".
- //
- // This action is not allowed against this storage tier.
- ErrCodeObjectAlreadyInActiveTierError = "ObjectAlreadyInActiveTierError"
-
- // ErrCodeObjectNotInActiveTierError for service response error code
- // "ObjectNotInActiveTierError".
- //
- // The source object of the COPY action is not in the active tier and is 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
deleted file mode 100644
index 81cdec1ae..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
+++ /dev/null
@@ -1,136 +0,0 @@
-package s3
-
-import (
- "fmt"
- "net/url"
- "regexp"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// an operationBlacklist is a list of operation names that should a
-// request handler should not be executed with.
-type operationBlacklist []string
-
-// Continue will return true of the Request's operation name is not
-// in the blacklist. False otherwise.
-func (b operationBlacklist) Continue(r *request.Request) bool {
- for i := 0; i < len(b); i++ {
- if b[i] == r.Operation.Name {
- return false
- }
- }
- return true
-}
-
-var accelerateOpBlacklist = operationBlacklist{
- opListBuckets, opCreateBucket, opDeleteBucket,
-}
-
-// 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, bucketName string) {
- forceHostStyle := aws.BoolValue(r.Config.S3ForcePathStyle)
- accelerate := aws.BoolValue(r.Config.S3UseAccelerate)
-
- if accelerate && accelerateOpBlacklist.Continue(r) {
- if forceHostStyle {
- if r.Config.Logger != nil {
- r.Config.Logger.Log("ERROR: aws.Config.S3UseAccelerate is not compatible with aws.Config.S3ForcePathStyle, ignoring S3ForcePathStyle.")
- }
- }
- updateEndpointForAccelerate(r, bucketName)
- } else if !forceHostStyle && r.Operation.Name != opGetBucketLocation {
- updateEndpointForHostStyle(r, bucketName)
- }
-}
-
-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, bucketName)
-}
-
-var (
- accelElem = []byte("s3-accelerate.dualstack.")
-)
-
-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", bucketName),
- nil)
- return
- }
-
- parts := strings.Split(r.HTTPRequest.URL.Host, ".")
- if len(parts) < 3 {
- r.Error = awserr.New("InvalidParameterExecption",
- fmt.Sprintf("unable to update endpoint host for S3 accelerate, hostname invalid, %s",
- r.HTTPRequest.URL.Host), nil)
- return
- }
-
- if parts[0] == "s3" || strings.HasPrefix(parts[0], "s3-") {
- parts[0] = "s3-accelerate"
- }
- for i := 1; i+1 < len(parts); i++ {
- if parts[i] == aws.StringValue(r.Config.Region) {
- parts = append(parts[:i], parts[i+1:]...)
- break
- }
- }
-
- r.HTTPRequest.URL.Host = strings.Join(parts, ".")
-
- moveBucketToHost(r.HTTPRequest.URL, bucketName)
-}
-
-// Attempts to retrieve the bucket name from the request input parameters.
-// If no bucket is found, or the field is empty "", false will be returned.
-func bucketNameFromReqParams(params interface{}) (string, bool) {
- if iface, ok := params.(bucketGetter); ok {
- b := iface.getBucket()
- return b, len(b) > 0
- }
-
- return "", false
-}
-
-// hostCompatibleBucketName returns true if the request should
-// put the bucket in the host. This is false if S3ForcePathStyle is
-// explicitly set or if the bucket is not DNS compatible.
-func hostCompatibleBucketName(u *url.URL, bucket string) bool {
- // Bucket might be DNS compatible but dots in the hostname will fail
- // certificate validation, so do not use host-style.
- if u.Scheme == "https" && strings.Contains(bucket, ".") {
- return false
- }
-
- // if the bucket is DNS compatible
- return dnsCompatibleBucketName(bucket)
-}
-
-var reDomain = regexp.MustCompile(`^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$`)
-var reIPAddress = regexp.MustCompile(`^(\d+\.){3}\d+$`)
-
-// dnsCompatibleBucketName returns true if the bucket name is DNS compatible.
-// Buckets created outside of the classic region MUST be DNS compatible.
-func dnsCompatibleBucketName(bucket string) bool {
- return reDomain.MatchString(bucket) &&
- !reIPAddress.MatchString(bucket) &&
- !strings.Contains(bucket, "..")
-}
-
-// moveBucketToHost moves the bucket name from the URI path to URL host.
-func moveBucketToHost(u *url.URL, bucket string) {
- u.Host = bucket + "." + u.Host
- removeBucketFromPath(u)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go b/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go
deleted file mode 100644
index 308b7d473..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go
+++ /dev/null
@@ -1,9 +0,0 @@
-//go:build !go1.6
-// +build !go1.6
-
-package s3
-
-import "github.com/aws/aws-sdk-go/aws/request"
-
-func platformRequestHandlers(r *request.Request) {
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go b/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go
deleted file mode 100644
index 339019d32..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go
+++ /dev/null
@@ -1,29 +0,0 @@
-//go:build go1.6
-// +build go1.6
-
-package s3
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-func platformRequestHandlers(r *request.Request) {
- if r.Operation.HTTPMethod == "PUT" {
- // 100-Continue should only be used on put requests.
- r.Handlers.Sign.PushBack(add100Continue)
- }
-}
-
-func add100Continue(r *request.Request) {
- if aws.BoolValue(r.Config.S3Disable100Continue) {
- return
- }
- if r.HTTPRequest.ContentLength < 1024*1024*2 {
- // Ignore requests smaller than 2MB. This helps prevent delaying
- // requests unnecessarily.
- return
- }
-
- r.HTTPRequest.Header.Set("Expect", "100-Continue")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go
deleted file mode 100644
index 6d679a299..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go
+++ /dev/null
@@ -1,479 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package s3iface provides an interface to enable mocking the Amazon Simple Storage Service service client
-// for testing your code.
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters.
-package s3iface
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/service/s3"
-)
-
-// S3API provides an interface to enable mocking the
-// s3.S3 service client's API operation,
-// paginators, and waiters. This make unit testing your code that calls out
-// to the SDK's service client's calls easier.
-//
-// The best way to use this interface is so the SDK's service client's calls
-// can be stubbed out for unit testing your code with the SDK without needing
-// to inject custom request handlers into the SDK's request pipeline.
-//
-// // myFunc uses an SDK service client to make a request to
-// // Amazon Simple Storage Service.
-// func myFunc(svc s3iface.S3API) bool {
-// // Make svc.AbortMultipartUpload request
-// }
-//
-// func main() {
-// sess := session.New()
-// svc := s3.New(sess)
-//
-// myFunc(svc)
-// }
-//
-// In your _test.go file:
-//
-// // Define a mock struct to be used in your unit tests of myFunc.
-// type mockS3Client struct {
-// s3iface.S3API
-// }
-// func (m *mockS3Client) AbortMultipartUpload(input *s3.AbortMultipartUploadInput) (*s3.AbortMultipartUploadOutput, error) {
-// // mock response/functionality
-// }
-//
-// func TestMyFunc(t *testing.T) {
-// // Setup Test
-// mockSvc := &mockS3Client{}
-//
-// myfunc(mockSvc)
-//
-// // Verify myFunc's functionality
-// }
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters. Its suggested to use the pattern above for testing, or using
-// tooling to generate mocks to satisfy the interfaces.
-type S3API interface {
- AbortMultipartUpload(*s3.AbortMultipartUploadInput) (*s3.AbortMultipartUploadOutput, error)
- AbortMultipartUploadWithContext(aws.Context, *s3.AbortMultipartUploadInput, ...request.Option) (*s3.AbortMultipartUploadOutput, error)
- AbortMultipartUploadRequest(*s3.AbortMultipartUploadInput) (*request.Request, *s3.AbortMultipartUploadOutput)
-
- CompleteMultipartUpload(*s3.CompleteMultipartUploadInput) (*s3.CompleteMultipartUploadOutput, error)
- CompleteMultipartUploadWithContext(aws.Context, *s3.CompleteMultipartUploadInput, ...request.Option) (*s3.CompleteMultipartUploadOutput, error)
- CompleteMultipartUploadRequest(*s3.CompleteMultipartUploadInput) (*request.Request, *s3.CompleteMultipartUploadOutput)
-
- CopyObject(*s3.CopyObjectInput) (*s3.CopyObjectOutput, error)
- CopyObjectWithContext(aws.Context, *s3.CopyObjectInput, ...request.Option) (*s3.CopyObjectOutput, error)
- CopyObjectRequest(*s3.CopyObjectInput) (*request.Request, *s3.CopyObjectOutput)
-
- CreateBucket(*s3.CreateBucketInput) (*s3.CreateBucketOutput, error)
- CreateBucketWithContext(aws.Context, *s3.CreateBucketInput, ...request.Option) (*s3.CreateBucketOutput, error)
- CreateBucketRequest(*s3.CreateBucketInput) (*request.Request, *s3.CreateBucketOutput)
-
- CreateMultipartUpload(*s3.CreateMultipartUploadInput) (*s3.CreateMultipartUploadOutput, error)
- CreateMultipartUploadWithContext(aws.Context, *s3.CreateMultipartUploadInput, ...request.Option) (*s3.CreateMultipartUploadOutput, error)
- CreateMultipartUploadRequest(*s3.CreateMultipartUploadInput) (*request.Request, *s3.CreateMultipartUploadOutput)
-
- DeleteBucket(*s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error)
- DeleteBucketWithContext(aws.Context, *s3.DeleteBucketInput, ...request.Option) (*s3.DeleteBucketOutput, error)
- DeleteBucketRequest(*s3.DeleteBucketInput) (*request.Request, *s3.DeleteBucketOutput)
-
- DeleteBucketAnalyticsConfiguration(*s3.DeleteBucketAnalyticsConfigurationInput) (*s3.DeleteBucketAnalyticsConfigurationOutput, error)
- DeleteBucketAnalyticsConfigurationWithContext(aws.Context, *s3.DeleteBucketAnalyticsConfigurationInput, ...request.Option) (*s3.DeleteBucketAnalyticsConfigurationOutput, error)
- DeleteBucketAnalyticsConfigurationRequest(*s3.DeleteBucketAnalyticsConfigurationInput) (*request.Request, *s3.DeleteBucketAnalyticsConfigurationOutput)
-
- DeleteBucketCors(*s3.DeleteBucketCorsInput) (*s3.DeleteBucketCorsOutput, error)
- DeleteBucketCorsWithContext(aws.Context, *s3.DeleteBucketCorsInput, ...request.Option) (*s3.DeleteBucketCorsOutput, error)
- DeleteBucketCorsRequest(*s3.DeleteBucketCorsInput) (*request.Request, *s3.DeleteBucketCorsOutput)
-
- DeleteBucketEncryption(*s3.DeleteBucketEncryptionInput) (*s3.DeleteBucketEncryptionOutput, error)
- DeleteBucketEncryptionWithContext(aws.Context, *s3.DeleteBucketEncryptionInput, ...request.Option) (*s3.DeleteBucketEncryptionOutput, error)
- DeleteBucketEncryptionRequest(*s3.DeleteBucketEncryptionInput) (*request.Request, *s3.DeleteBucketEncryptionOutput)
-
- DeleteBucketIntelligentTieringConfiguration(*s3.DeleteBucketIntelligentTieringConfigurationInput) (*s3.DeleteBucketIntelligentTieringConfigurationOutput, error)
- DeleteBucketIntelligentTieringConfigurationWithContext(aws.Context, *s3.DeleteBucketIntelligentTieringConfigurationInput, ...request.Option) (*s3.DeleteBucketIntelligentTieringConfigurationOutput, error)
- DeleteBucketIntelligentTieringConfigurationRequest(*s3.DeleteBucketIntelligentTieringConfigurationInput) (*request.Request, *s3.DeleteBucketIntelligentTieringConfigurationOutput)
-
- DeleteBucketInventoryConfiguration(*s3.DeleteBucketInventoryConfigurationInput) (*s3.DeleteBucketInventoryConfigurationOutput, error)
- DeleteBucketInventoryConfigurationWithContext(aws.Context, *s3.DeleteBucketInventoryConfigurationInput, ...request.Option) (*s3.DeleteBucketInventoryConfigurationOutput, error)
- DeleteBucketInventoryConfigurationRequest(*s3.DeleteBucketInventoryConfigurationInput) (*request.Request, *s3.DeleteBucketInventoryConfigurationOutput)
-
- DeleteBucketLifecycle(*s3.DeleteBucketLifecycleInput) (*s3.DeleteBucketLifecycleOutput, error)
- DeleteBucketLifecycleWithContext(aws.Context, *s3.DeleteBucketLifecycleInput, ...request.Option) (*s3.DeleteBucketLifecycleOutput, error)
- DeleteBucketLifecycleRequest(*s3.DeleteBucketLifecycleInput) (*request.Request, *s3.DeleteBucketLifecycleOutput)
-
- DeleteBucketMetricsConfiguration(*s3.DeleteBucketMetricsConfigurationInput) (*s3.DeleteBucketMetricsConfigurationOutput, error)
- DeleteBucketMetricsConfigurationWithContext(aws.Context, *s3.DeleteBucketMetricsConfigurationInput, ...request.Option) (*s3.DeleteBucketMetricsConfigurationOutput, error)
- DeleteBucketMetricsConfigurationRequest(*s3.DeleteBucketMetricsConfigurationInput) (*request.Request, *s3.DeleteBucketMetricsConfigurationOutput)
-
- DeleteBucketOwnershipControls(*s3.DeleteBucketOwnershipControlsInput) (*s3.DeleteBucketOwnershipControlsOutput, error)
- DeleteBucketOwnershipControlsWithContext(aws.Context, *s3.DeleteBucketOwnershipControlsInput, ...request.Option) (*s3.DeleteBucketOwnershipControlsOutput, error)
- DeleteBucketOwnershipControlsRequest(*s3.DeleteBucketOwnershipControlsInput) (*request.Request, *s3.DeleteBucketOwnershipControlsOutput)
-
- DeleteBucketPolicy(*s3.DeleteBucketPolicyInput) (*s3.DeleteBucketPolicyOutput, error)
- DeleteBucketPolicyWithContext(aws.Context, *s3.DeleteBucketPolicyInput, ...request.Option) (*s3.DeleteBucketPolicyOutput, error)
- DeleteBucketPolicyRequest(*s3.DeleteBucketPolicyInput) (*request.Request, *s3.DeleteBucketPolicyOutput)
-
- DeleteBucketReplication(*s3.DeleteBucketReplicationInput) (*s3.DeleteBucketReplicationOutput, error)
- DeleteBucketReplicationWithContext(aws.Context, *s3.DeleteBucketReplicationInput, ...request.Option) (*s3.DeleteBucketReplicationOutput, error)
- DeleteBucketReplicationRequest(*s3.DeleteBucketReplicationInput) (*request.Request, *s3.DeleteBucketReplicationOutput)
-
- DeleteBucketTagging(*s3.DeleteBucketTaggingInput) (*s3.DeleteBucketTaggingOutput, error)
- DeleteBucketTaggingWithContext(aws.Context, *s3.DeleteBucketTaggingInput, ...request.Option) (*s3.DeleteBucketTaggingOutput, error)
- DeleteBucketTaggingRequest(*s3.DeleteBucketTaggingInput) (*request.Request, *s3.DeleteBucketTaggingOutput)
-
- DeleteBucketWebsite(*s3.DeleteBucketWebsiteInput) (*s3.DeleteBucketWebsiteOutput, error)
- DeleteBucketWebsiteWithContext(aws.Context, *s3.DeleteBucketWebsiteInput, ...request.Option) (*s3.DeleteBucketWebsiteOutput, error)
- DeleteBucketWebsiteRequest(*s3.DeleteBucketWebsiteInput) (*request.Request, *s3.DeleteBucketWebsiteOutput)
-
- DeleteObject(*s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
- DeleteObjectWithContext(aws.Context, *s3.DeleteObjectInput, ...request.Option) (*s3.DeleteObjectOutput, error)
- DeleteObjectRequest(*s3.DeleteObjectInput) (*request.Request, *s3.DeleteObjectOutput)
-
- DeleteObjectTagging(*s3.DeleteObjectTaggingInput) (*s3.DeleteObjectTaggingOutput, error)
- DeleteObjectTaggingWithContext(aws.Context, *s3.DeleteObjectTaggingInput, ...request.Option) (*s3.DeleteObjectTaggingOutput, error)
- DeleteObjectTaggingRequest(*s3.DeleteObjectTaggingInput) (*request.Request, *s3.DeleteObjectTaggingOutput)
-
- DeleteObjects(*s3.DeleteObjectsInput) (*s3.DeleteObjectsOutput, error)
- DeleteObjectsWithContext(aws.Context, *s3.DeleteObjectsInput, ...request.Option) (*s3.DeleteObjectsOutput, error)
- DeleteObjectsRequest(*s3.DeleteObjectsInput) (*request.Request, *s3.DeleteObjectsOutput)
-
- DeletePublicAccessBlock(*s3.DeletePublicAccessBlockInput) (*s3.DeletePublicAccessBlockOutput, error)
- DeletePublicAccessBlockWithContext(aws.Context, *s3.DeletePublicAccessBlockInput, ...request.Option) (*s3.DeletePublicAccessBlockOutput, error)
- DeletePublicAccessBlockRequest(*s3.DeletePublicAccessBlockInput) (*request.Request, *s3.DeletePublicAccessBlockOutput)
-
- GetBucketAccelerateConfiguration(*s3.GetBucketAccelerateConfigurationInput) (*s3.GetBucketAccelerateConfigurationOutput, error)
- GetBucketAccelerateConfigurationWithContext(aws.Context, *s3.GetBucketAccelerateConfigurationInput, ...request.Option) (*s3.GetBucketAccelerateConfigurationOutput, error)
- GetBucketAccelerateConfigurationRequest(*s3.GetBucketAccelerateConfigurationInput) (*request.Request, *s3.GetBucketAccelerateConfigurationOutput)
-
- GetBucketAcl(*s3.GetBucketAclInput) (*s3.GetBucketAclOutput, error)
- GetBucketAclWithContext(aws.Context, *s3.GetBucketAclInput, ...request.Option) (*s3.GetBucketAclOutput, error)
- GetBucketAclRequest(*s3.GetBucketAclInput) (*request.Request, *s3.GetBucketAclOutput)
-
- GetBucketAnalyticsConfiguration(*s3.GetBucketAnalyticsConfigurationInput) (*s3.GetBucketAnalyticsConfigurationOutput, error)
- GetBucketAnalyticsConfigurationWithContext(aws.Context, *s3.GetBucketAnalyticsConfigurationInput, ...request.Option) (*s3.GetBucketAnalyticsConfigurationOutput, error)
- GetBucketAnalyticsConfigurationRequest(*s3.GetBucketAnalyticsConfigurationInput) (*request.Request, *s3.GetBucketAnalyticsConfigurationOutput)
-
- GetBucketCors(*s3.GetBucketCorsInput) (*s3.GetBucketCorsOutput, error)
- GetBucketCorsWithContext(aws.Context, *s3.GetBucketCorsInput, ...request.Option) (*s3.GetBucketCorsOutput, error)
- GetBucketCorsRequest(*s3.GetBucketCorsInput) (*request.Request, *s3.GetBucketCorsOutput)
-
- GetBucketEncryption(*s3.GetBucketEncryptionInput) (*s3.GetBucketEncryptionOutput, error)
- GetBucketEncryptionWithContext(aws.Context, *s3.GetBucketEncryptionInput, ...request.Option) (*s3.GetBucketEncryptionOutput, error)
- GetBucketEncryptionRequest(*s3.GetBucketEncryptionInput) (*request.Request, *s3.GetBucketEncryptionOutput)
-
- GetBucketIntelligentTieringConfiguration(*s3.GetBucketIntelligentTieringConfigurationInput) (*s3.GetBucketIntelligentTieringConfigurationOutput, error)
- GetBucketIntelligentTieringConfigurationWithContext(aws.Context, *s3.GetBucketIntelligentTieringConfigurationInput, ...request.Option) (*s3.GetBucketIntelligentTieringConfigurationOutput, error)
- GetBucketIntelligentTieringConfigurationRequest(*s3.GetBucketIntelligentTieringConfigurationInput) (*request.Request, *s3.GetBucketIntelligentTieringConfigurationOutput)
-
- GetBucketInventoryConfiguration(*s3.GetBucketInventoryConfigurationInput) (*s3.GetBucketInventoryConfigurationOutput, error)
- GetBucketInventoryConfigurationWithContext(aws.Context, *s3.GetBucketInventoryConfigurationInput, ...request.Option) (*s3.GetBucketInventoryConfigurationOutput, error)
- GetBucketInventoryConfigurationRequest(*s3.GetBucketInventoryConfigurationInput) (*request.Request, *s3.GetBucketInventoryConfigurationOutput)
-
- GetBucketLifecycle(*s3.GetBucketLifecycleInput) (*s3.GetBucketLifecycleOutput, error)
- GetBucketLifecycleWithContext(aws.Context, *s3.GetBucketLifecycleInput, ...request.Option) (*s3.GetBucketLifecycleOutput, error)
- GetBucketLifecycleRequest(*s3.GetBucketLifecycleInput) (*request.Request, *s3.GetBucketLifecycleOutput)
-
- GetBucketLifecycleConfiguration(*s3.GetBucketLifecycleConfigurationInput) (*s3.GetBucketLifecycleConfigurationOutput, error)
- GetBucketLifecycleConfigurationWithContext(aws.Context, *s3.GetBucketLifecycleConfigurationInput, ...request.Option) (*s3.GetBucketLifecycleConfigurationOutput, error)
- GetBucketLifecycleConfigurationRequest(*s3.GetBucketLifecycleConfigurationInput) (*request.Request, *s3.GetBucketLifecycleConfigurationOutput)
-
- GetBucketLocation(*s3.GetBucketLocationInput) (*s3.GetBucketLocationOutput, error)
- GetBucketLocationWithContext(aws.Context, *s3.GetBucketLocationInput, ...request.Option) (*s3.GetBucketLocationOutput, error)
- GetBucketLocationRequest(*s3.GetBucketLocationInput) (*request.Request, *s3.GetBucketLocationOutput)
-
- GetBucketLogging(*s3.GetBucketLoggingInput) (*s3.GetBucketLoggingOutput, error)
- GetBucketLoggingWithContext(aws.Context, *s3.GetBucketLoggingInput, ...request.Option) (*s3.GetBucketLoggingOutput, error)
- GetBucketLoggingRequest(*s3.GetBucketLoggingInput) (*request.Request, *s3.GetBucketLoggingOutput)
-
- GetBucketMetricsConfiguration(*s3.GetBucketMetricsConfigurationInput) (*s3.GetBucketMetricsConfigurationOutput, error)
- GetBucketMetricsConfigurationWithContext(aws.Context, *s3.GetBucketMetricsConfigurationInput, ...request.Option) (*s3.GetBucketMetricsConfigurationOutput, error)
- GetBucketMetricsConfigurationRequest(*s3.GetBucketMetricsConfigurationInput) (*request.Request, *s3.GetBucketMetricsConfigurationOutput)
-
- GetBucketNotification(*s3.GetBucketNotificationConfigurationRequest) (*s3.NotificationConfigurationDeprecated, error)
- GetBucketNotificationWithContext(aws.Context, *s3.GetBucketNotificationConfigurationRequest, ...request.Option) (*s3.NotificationConfigurationDeprecated, error)
- GetBucketNotificationRequest(*s3.GetBucketNotificationConfigurationRequest) (*request.Request, *s3.NotificationConfigurationDeprecated)
-
- GetBucketNotificationConfiguration(*s3.GetBucketNotificationConfigurationRequest) (*s3.NotificationConfiguration, error)
- GetBucketNotificationConfigurationWithContext(aws.Context, *s3.GetBucketNotificationConfigurationRequest, ...request.Option) (*s3.NotificationConfiguration, error)
- GetBucketNotificationConfigurationRequest(*s3.GetBucketNotificationConfigurationRequest) (*request.Request, *s3.NotificationConfiguration)
-
- GetBucketOwnershipControls(*s3.GetBucketOwnershipControlsInput) (*s3.GetBucketOwnershipControlsOutput, error)
- GetBucketOwnershipControlsWithContext(aws.Context, *s3.GetBucketOwnershipControlsInput, ...request.Option) (*s3.GetBucketOwnershipControlsOutput, error)
- GetBucketOwnershipControlsRequest(*s3.GetBucketOwnershipControlsInput) (*request.Request, *s3.GetBucketOwnershipControlsOutput)
-
- GetBucketPolicy(*s3.GetBucketPolicyInput) (*s3.GetBucketPolicyOutput, error)
- GetBucketPolicyWithContext(aws.Context, *s3.GetBucketPolicyInput, ...request.Option) (*s3.GetBucketPolicyOutput, error)
- GetBucketPolicyRequest(*s3.GetBucketPolicyInput) (*request.Request, *s3.GetBucketPolicyOutput)
-
- GetBucketPolicyStatus(*s3.GetBucketPolicyStatusInput) (*s3.GetBucketPolicyStatusOutput, error)
- GetBucketPolicyStatusWithContext(aws.Context, *s3.GetBucketPolicyStatusInput, ...request.Option) (*s3.GetBucketPolicyStatusOutput, error)
- GetBucketPolicyStatusRequest(*s3.GetBucketPolicyStatusInput) (*request.Request, *s3.GetBucketPolicyStatusOutput)
-
- GetBucketReplication(*s3.GetBucketReplicationInput) (*s3.GetBucketReplicationOutput, error)
- GetBucketReplicationWithContext(aws.Context, *s3.GetBucketReplicationInput, ...request.Option) (*s3.GetBucketReplicationOutput, error)
- GetBucketReplicationRequest(*s3.GetBucketReplicationInput) (*request.Request, *s3.GetBucketReplicationOutput)
-
- GetBucketRequestPayment(*s3.GetBucketRequestPaymentInput) (*s3.GetBucketRequestPaymentOutput, error)
- GetBucketRequestPaymentWithContext(aws.Context, *s3.GetBucketRequestPaymentInput, ...request.Option) (*s3.GetBucketRequestPaymentOutput, error)
- GetBucketRequestPaymentRequest(*s3.GetBucketRequestPaymentInput) (*request.Request, *s3.GetBucketRequestPaymentOutput)
-
- GetBucketTagging(*s3.GetBucketTaggingInput) (*s3.GetBucketTaggingOutput, error)
- GetBucketTaggingWithContext(aws.Context, *s3.GetBucketTaggingInput, ...request.Option) (*s3.GetBucketTaggingOutput, error)
- GetBucketTaggingRequest(*s3.GetBucketTaggingInput) (*request.Request, *s3.GetBucketTaggingOutput)
-
- GetBucketVersioning(*s3.GetBucketVersioningInput) (*s3.GetBucketVersioningOutput, error)
- GetBucketVersioningWithContext(aws.Context, *s3.GetBucketVersioningInput, ...request.Option) (*s3.GetBucketVersioningOutput, error)
- GetBucketVersioningRequest(*s3.GetBucketVersioningInput) (*request.Request, *s3.GetBucketVersioningOutput)
-
- GetBucketWebsite(*s3.GetBucketWebsiteInput) (*s3.GetBucketWebsiteOutput, error)
- GetBucketWebsiteWithContext(aws.Context, *s3.GetBucketWebsiteInput, ...request.Option) (*s3.GetBucketWebsiteOutput, error)
- GetBucketWebsiteRequest(*s3.GetBucketWebsiteInput) (*request.Request, *s3.GetBucketWebsiteOutput)
-
- GetObject(*s3.GetObjectInput) (*s3.GetObjectOutput, error)
- GetObjectWithContext(aws.Context, *s3.GetObjectInput, ...request.Option) (*s3.GetObjectOutput, error)
- GetObjectRequest(*s3.GetObjectInput) (*request.Request, *s3.GetObjectOutput)
-
- GetObjectAcl(*s3.GetObjectAclInput) (*s3.GetObjectAclOutput, error)
- GetObjectAclWithContext(aws.Context, *s3.GetObjectAclInput, ...request.Option) (*s3.GetObjectAclOutput, error)
- GetObjectAclRequest(*s3.GetObjectAclInput) (*request.Request, *s3.GetObjectAclOutput)
-
- GetObjectAttributes(*s3.GetObjectAttributesInput) (*s3.GetObjectAttributesOutput, error)
- GetObjectAttributesWithContext(aws.Context, *s3.GetObjectAttributesInput, ...request.Option) (*s3.GetObjectAttributesOutput, error)
- GetObjectAttributesRequest(*s3.GetObjectAttributesInput) (*request.Request, *s3.GetObjectAttributesOutput)
-
- GetObjectLegalHold(*s3.GetObjectLegalHoldInput) (*s3.GetObjectLegalHoldOutput, error)
- GetObjectLegalHoldWithContext(aws.Context, *s3.GetObjectLegalHoldInput, ...request.Option) (*s3.GetObjectLegalHoldOutput, error)
- GetObjectLegalHoldRequest(*s3.GetObjectLegalHoldInput) (*request.Request, *s3.GetObjectLegalHoldOutput)
-
- GetObjectLockConfiguration(*s3.GetObjectLockConfigurationInput) (*s3.GetObjectLockConfigurationOutput, error)
- GetObjectLockConfigurationWithContext(aws.Context, *s3.GetObjectLockConfigurationInput, ...request.Option) (*s3.GetObjectLockConfigurationOutput, error)
- GetObjectLockConfigurationRequest(*s3.GetObjectLockConfigurationInput) (*request.Request, *s3.GetObjectLockConfigurationOutput)
-
- GetObjectRetention(*s3.GetObjectRetentionInput) (*s3.GetObjectRetentionOutput, error)
- GetObjectRetentionWithContext(aws.Context, *s3.GetObjectRetentionInput, ...request.Option) (*s3.GetObjectRetentionOutput, error)
- GetObjectRetentionRequest(*s3.GetObjectRetentionInput) (*request.Request, *s3.GetObjectRetentionOutput)
-
- GetObjectTagging(*s3.GetObjectTaggingInput) (*s3.GetObjectTaggingOutput, error)
- GetObjectTaggingWithContext(aws.Context, *s3.GetObjectTaggingInput, ...request.Option) (*s3.GetObjectTaggingOutput, error)
- GetObjectTaggingRequest(*s3.GetObjectTaggingInput) (*request.Request, *s3.GetObjectTaggingOutput)
-
- GetObjectTorrent(*s3.GetObjectTorrentInput) (*s3.GetObjectTorrentOutput, error)
- GetObjectTorrentWithContext(aws.Context, *s3.GetObjectTorrentInput, ...request.Option) (*s3.GetObjectTorrentOutput, error)
- GetObjectTorrentRequest(*s3.GetObjectTorrentInput) (*request.Request, *s3.GetObjectTorrentOutput)
-
- GetPublicAccessBlock(*s3.GetPublicAccessBlockInput) (*s3.GetPublicAccessBlockOutput, error)
- GetPublicAccessBlockWithContext(aws.Context, *s3.GetPublicAccessBlockInput, ...request.Option) (*s3.GetPublicAccessBlockOutput, error)
- GetPublicAccessBlockRequest(*s3.GetPublicAccessBlockInput) (*request.Request, *s3.GetPublicAccessBlockOutput)
-
- HeadBucket(*s3.HeadBucketInput) (*s3.HeadBucketOutput, error)
- HeadBucketWithContext(aws.Context, *s3.HeadBucketInput, ...request.Option) (*s3.HeadBucketOutput, error)
- HeadBucketRequest(*s3.HeadBucketInput) (*request.Request, *s3.HeadBucketOutput)
-
- HeadObject(*s3.HeadObjectInput) (*s3.HeadObjectOutput, error)
- HeadObjectWithContext(aws.Context, *s3.HeadObjectInput, ...request.Option) (*s3.HeadObjectOutput, error)
- HeadObjectRequest(*s3.HeadObjectInput) (*request.Request, *s3.HeadObjectOutput)
-
- ListBucketAnalyticsConfigurations(*s3.ListBucketAnalyticsConfigurationsInput) (*s3.ListBucketAnalyticsConfigurationsOutput, error)
- ListBucketAnalyticsConfigurationsWithContext(aws.Context, *s3.ListBucketAnalyticsConfigurationsInput, ...request.Option) (*s3.ListBucketAnalyticsConfigurationsOutput, error)
- ListBucketAnalyticsConfigurationsRequest(*s3.ListBucketAnalyticsConfigurationsInput) (*request.Request, *s3.ListBucketAnalyticsConfigurationsOutput)
-
- ListBucketIntelligentTieringConfigurations(*s3.ListBucketIntelligentTieringConfigurationsInput) (*s3.ListBucketIntelligentTieringConfigurationsOutput, error)
- ListBucketIntelligentTieringConfigurationsWithContext(aws.Context, *s3.ListBucketIntelligentTieringConfigurationsInput, ...request.Option) (*s3.ListBucketIntelligentTieringConfigurationsOutput, error)
- ListBucketIntelligentTieringConfigurationsRequest(*s3.ListBucketIntelligentTieringConfigurationsInput) (*request.Request, *s3.ListBucketIntelligentTieringConfigurationsOutput)
-
- ListBucketInventoryConfigurations(*s3.ListBucketInventoryConfigurationsInput) (*s3.ListBucketInventoryConfigurationsOutput, error)
- ListBucketInventoryConfigurationsWithContext(aws.Context, *s3.ListBucketInventoryConfigurationsInput, ...request.Option) (*s3.ListBucketInventoryConfigurationsOutput, error)
- ListBucketInventoryConfigurationsRequest(*s3.ListBucketInventoryConfigurationsInput) (*request.Request, *s3.ListBucketInventoryConfigurationsOutput)
-
- ListBucketMetricsConfigurations(*s3.ListBucketMetricsConfigurationsInput) (*s3.ListBucketMetricsConfigurationsOutput, error)
- ListBucketMetricsConfigurationsWithContext(aws.Context, *s3.ListBucketMetricsConfigurationsInput, ...request.Option) (*s3.ListBucketMetricsConfigurationsOutput, error)
- ListBucketMetricsConfigurationsRequest(*s3.ListBucketMetricsConfigurationsInput) (*request.Request, *s3.ListBucketMetricsConfigurationsOutput)
-
- ListBuckets(*s3.ListBucketsInput) (*s3.ListBucketsOutput, error)
- ListBucketsWithContext(aws.Context, *s3.ListBucketsInput, ...request.Option) (*s3.ListBucketsOutput, error)
- ListBucketsRequest(*s3.ListBucketsInput) (*request.Request, *s3.ListBucketsOutput)
-
- ListMultipartUploads(*s3.ListMultipartUploadsInput) (*s3.ListMultipartUploadsOutput, error)
- ListMultipartUploadsWithContext(aws.Context, *s3.ListMultipartUploadsInput, ...request.Option) (*s3.ListMultipartUploadsOutput, error)
- ListMultipartUploadsRequest(*s3.ListMultipartUploadsInput) (*request.Request, *s3.ListMultipartUploadsOutput)
-
- ListMultipartUploadsPages(*s3.ListMultipartUploadsInput, func(*s3.ListMultipartUploadsOutput, bool) bool) error
- ListMultipartUploadsPagesWithContext(aws.Context, *s3.ListMultipartUploadsInput, func(*s3.ListMultipartUploadsOutput, bool) bool, ...request.Option) error
-
- ListObjectVersions(*s3.ListObjectVersionsInput) (*s3.ListObjectVersionsOutput, error)
- ListObjectVersionsWithContext(aws.Context, *s3.ListObjectVersionsInput, ...request.Option) (*s3.ListObjectVersionsOutput, error)
- ListObjectVersionsRequest(*s3.ListObjectVersionsInput) (*request.Request, *s3.ListObjectVersionsOutput)
-
- ListObjectVersionsPages(*s3.ListObjectVersionsInput, func(*s3.ListObjectVersionsOutput, bool) bool) error
- ListObjectVersionsPagesWithContext(aws.Context, *s3.ListObjectVersionsInput, func(*s3.ListObjectVersionsOutput, bool) bool, ...request.Option) error
-
- ListObjects(*s3.ListObjectsInput) (*s3.ListObjectsOutput, error)
- ListObjectsWithContext(aws.Context, *s3.ListObjectsInput, ...request.Option) (*s3.ListObjectsOutput, error)
- ListObjectsRequest(*s3.ListObjectsInput) (*request.Request, *s3.ListObjectsOutput)
-
- ListObjectsPages(*s3.ListObjectsInput, func(*s3.ListObjectsOutput, bool) bool) error
- ListObjectsPagesWithContext(aws.Context, *s3.ListObjectsInput, func(*s3.ListObjectsOutput, bool) bool, ...request.Option) error
-
- ListObjectsV2(*s3.ListObjectsV2Input) (*s3.ListObjectsV2Output, error)
- ListObjectsV2WithContext(aws.Context, *s3.ListObjectsV2Input, ...request.Option) (*s3.ListObjectsV2Output, error)
- ListObjectsV2Request(*s3.ListObjectsV2Input) (*request.Request, *s3.ListObjectsV2Output)
-
- ListObjectsV2Pages(*s3.ListObjectsV2Input, func(*s3.ListObjectsV2Output, bool) bool) error
- ListObjectsV2PagesWithContext(aws.Context, *s3.ListObjectsV2Input, func(*s3.ListObjectsV2Output, bool) bool, ...request.Option) error
-
- ListParts(*s3.ListPartsInput) (*s3.ListPartsOutput, error)
- ListPartsWithContext(aws.Context, *s3.ListPartsInput, ...request.Option) (*s3.ListPartsOutput, error)
- ListPartsRequest(*s3.ListPartsInput) (*request.Request, *s3.ListPartsOutput)
-
- ListPartsPages(*s3.ListPartsInput, func(*s3.ListPartsOutput, bool) bool) error
- ListPartsPagesWithContext(aws.Context, *s3.ListPartsInput, func(*s3.ListPartsOutput, bool) bool, ...request.Option) error
-
- PutBucketAccelerateConfiguration(*s3.PutBucketAccelerateConfigurationInput) (*s3.PutBucketAccelerateConfigurationOutput, error)
- PutBucketAccelerateConfigurationWithContext(aws.Context, *s3.PutBucketAccelerateConfigurationInput, ...request.Option) (*s3.PutBucketAccelerateConfigurationOutput, error)
- PutBucketAccelerateConfigurationRequest(*s3.PutBucketAccelerateConfigurationInput) (*request.Request, *s3.PutBucketAccelerateConfigurationOutput)
-
- PutBucketAcl(*s3.PutBucketAclInput) (*s3.PutBucketAclOutput, error)
- PutBucketAclWithContext(aws.Context, *s3.PutBucketAclInput, ...request.Option) (*s3.PutBucketAclOutput, error)
- PutBucketAclRequest(*s3.PutBucketAclInput) (*request.Request, *s3.PutBucketAclOutput)
-
- PutBucketAnalyticsConfiguration(*s3.PutBucketAnalyticsConfigurationInput) (*s3.PutBucketAnalyticsConfigurationOutput, error)
- PutBucketAnalyticsConfigurationWithContext(aws.Context, *s3.PutBucketAnalyticsConfigurationInput, ...request.Option) (*s3.PutBucketAnalyticsConfigurationOutput, error)
- PutBucketAnalyticsConfigurationRequest(*s3.PutBucketAnalyticsConfigurationInput) (*request.Request, *s3.PutBucketAnalyticsConfigurationOutput)
-
- PutBucketCors(*s3.PutBucketCorsInput) (*s3.PutBucketCorsOutput, error)
- PutBucketCorsWithContext(aws.Context, *s3.PutBucketCorsInput, ...request.Option) (*s3.PutBucketCorsOutput, error)
- PutBucketCorsRequest(*s3.PutBucketCorsInput) (*request.Request, *s3.PutBucketCorsOutput)
-
- PutBucketEncryption(*s3.PutBucketEncryptionInput) (*s3.PutBucketEncryptionOutput, error)
- PutBucketEncryptionWithContext(aws.Context, *s3.PutBucketEncryptionInput, ...request.Option) (*s3.PutBucketEncryptionOutput, error)
- PutBucketEncryptionRequest(*s3.PutBucketEncryptionInput) (*request.Request, *s3.PutBucketEncryptionOutput)
-
- PutBucketIntelligentTieringConfiguration(*s3.PutBucketIntelligentTieringConfigurationInput) (*s3.PutBucketIntelligentTieringConfigurationOutput, error)
- PutBucketIntelligentTieringConfigurationWithContext(aws.Context, *s3.PutBucketIntelligentTieringConfigurationInput, ...request.Option) (*s3.PutBucketIntelligentTieringConfigurationOutput, error)
- PutBucketIntelligentTieringConfigurationRequest(*s3.PutBucketIntelligentTieringConfigurationInput) (*request.Request, *s3.PutBucketIntelligentTieringConfigurationOutput)
-
- PutBucketInventoryConfiguration(*s3.PutBucketInventoryConfigurationInput) (*s3.PutBucketInventoryConfigurationOutput, error)
- PutBucketInventoryConfigurationWithContext(aws.Context, *s3.PutBucketInventoryConfigurationInput, ...request.Option) (*s3.PutBucketInventoryConfigurationOutput, error)
- PutBucketInventoryConfigurationRequest(*s3.PutBucketInventoryConfigurationInput) (*request.Request, *s3.PutBucketInventoryConfigurationOutput)
-
- PutBucketLifecycle(*s3.PutBucketLifecycleInput) (*s3.PutBucketLifecycleOutput, error)
- PutBucketLifecycleWithContext(aws.Context, *s3.PutBucketLifecycleInput, ...request.Option) (*s3.PutBucketLifecycleOutput, error)
- PutBucketLifecycleRequest(*s3.PutBucketLifecycleInput) (*request.Request, *s3.PutBucketLifecycleOutput)
-
- PutBucketLifecycleConfiguration(*s3.PutBucketLifecycleConfigurationInput) (*s3.PutBucketLifecycleConfigurationOutput, error)
- PutBucketLifecycleConfigurationWithContext(aws.Context, *s3.PutBucketLifecycleConfigurationInput, ...request.Option) (*s3.PutBucketLifecycleConfigurationOutput, error)
- PutBucketLifecycleConfigurationRequest(*s3.PutBucketLifecycleConfigurationInput) (*request.Request, *s3.PutBucketLifecycleConfigurationOutput)
-
- PutBucketLogging(*s3.PutBucketLoggingInput) (*s3.PutBucketLoggingOutput, error)
- PutBucketLoggingWithContext(aws.Context, *s3.PutBucketLoggingInput, ...request.Option) (*s3.PutBucketLoggingOutput, error)
- PutBucketLoggingRequest(*s3.PutBucketLoggingInput) (*request.Request, *s3.PutBucketLoggingOutput)
-
- PutBucketMetricsConfiguration(*s3.PutBucketMetricsConfigurationInput) (*s3.PutBucketMetricsConfigurationOutput, error)
- PutBucketMetricsConfigurationWithContext(aws.Context, *s3.PutBucketMetricsConfigurationInput, ...request.Option) (*s3.PutBucketMetricsConfigurationOutput, error)
- PutBucketMetricsConfigurationRequest(*s3.PutBucketMetricsConfigurationInput) (*request.Request, *s3.PutBucketMetricsConfigurationOutput)
-
- PutBucketNotification(*s3.PutBucketNotificationInput) (*s3.PutBucketNotificationOutput, error)
- PutBucketNotificationWithContext(aws.Context, *s3.PutBucketNotificationInput, ...request.Option) (*s3.PutBucketNotificationOutput, error)
- PutBucketNotificationRequest(*s3.PutBucketNotificationInput) (*request.Request, *s3.PutBucketNotificationOutput)
-
- PutBucketNotificationConfiguration(*s3.PutBucketNotificationConfigurationInput) (*s3.PutBucketNotificationConfigurationOutput, error)
- PutBucketNotificationConfigurationWithContext(aws.Context, *s3.PutBucketNotificationConfigurationInput, ...request.Option) (*s3.PutBucketNotificationConfigurationOutput, error)
- PutBucketNotificationConfigurationRequest(*s3.PutBucketNotificationConfigurationInput) (*request.Request, *s3.PutBucketNotificationConfigurationOutput)
-
- PutBucketOwnershipControls(*s3.PutBucketOwnershipControlsInput) (*s3.PutBucketOwnershipControlsOutput, error)
- PutBucketOwnershipControlsWithContext(aws.Context, *s3.PutBucketOwnershipControlsInput, ...request.Option) (*s3.PutBucketOwnershipControlsOutput, error)
- PutBucketOwnershipControlsRequest(*s3.PutBucketOwnershipControlsInput) (*request.Request, *s3.PutBucketOwnershipControlsOutput)
-
- PutBucketPolicy(*s3.PutBucketPolicyInput) (*s3.PutBucketPolicyOutput, error)
- PutBucketPolicyWithContext(aws.Context, *s3.PutBucketPolicyInput, ...request.Option) (*s3.PutBucketPolicyOutput, error)
- PutBucketPolicyRequest(*s3.PutBucketPolicyInput) (*request.Request, *s3.PutBucketPolicyOutput)
-
- PutBucketReplication(*s3.PutBucketReplicationInput) (*s3.PutBucketReplicationOutput, error)
- PutBucketReplicationWithContext(aws.Context, *s3.PutBucketReplicationInput, ...request.Option) (*s3.PutBucketReplicationOutput, error)
- PutBucketReplicationRequest(*s3.PutBucketReplicationInput) (*request.Request, *s3.PutBucketReplicationOutput)
-
- PutBucketRequestPayment(*s3.PutBucketRequestPaymentInput) (*s3.PutBucketRequestPaymentOutput, error)
- PutBucketRequestPaymentWithContext(aws.Context, *s3.PutBucketRequestPaymentInput, ...request.Option) (*s3.PutBucketRequestPaymentOutput, error)
- PutBucketRequestPaymentRequest(*s3.PutBucketRequestPaymentInput) (*request.Request, *s3.PutBucketRequestPaymentOutput)
-
- PutBucketTagging(*s3.PutBucketTaggingInput) (*s3.PutBucketTaggingOutput, error)
- PutBucketTaggingWithContext(aws.Context, *s3.PutBucketTaggingInput, ...request.Option) (*s3.PutBucketTaggingOutput, error)
- PutBucketTaggingRequest(*s3.PutBucketTaggingInput) (*request.Request, *s3.PutBucketTaggingOutput)
-
- PutBucketVersioning(*s3.PutBucketVersioningInput) (*s3.PutBucketVersioningOutput, error)
- PutBucketVersioningWithContext(aws.Context, *s3.PutBucketVersioningInput, ...request.Option) (*s3.PutBucketVersioningOutput, error)
- PutBucketVersioningRequest(*s3.PutBucketVersioningInput) (*request.Request, *s3.PutBucketVersioningOutput)
-
- PutBucketWebsite(*s3.PutBucketWebsiteInput) (*s3.PutBucketWebsiteOutput, error)
- PutBucketWebsiteWithContext(aws.Context, *s3.PutBucketWebsiteInput, ...request.Option) (*s3.PutBucketWebsiteOutput, error)
- PutBucketWebsiteRequest(*s3.PutBucketWebsiteInput) (*request.Request, *s3.PutBucketWebsiteOutput)
-
- PutObject(*s3.PutObjectInput) (*s3.PutObjectOutput, error)
- PutObjectWithContext(aws.Context, *s3.PutObjectInput, ...request.Option) (*s3.PutObjectOutput, error)
- PutObjectRequest(*s3.PutObjectInput) (*request.Request, *s3.PutObjectOutput)
-
- PutObjectAcl(*s3.PutObjectAclInput) (*s3.PutObjectAclOutput, error)
- PutObjectAclWithContext(aws.Context, *s3.PutObjectAclInput, ...request.Option) (*s3.PutObjectAclOutput, error)
- PutObjectAclRequest(*s3.PutObjectAclInput) (*request.Request, *s3.PutObjectAclOutput)
-
- PutObjectLegalHold(*s3.PutObjectLegalHoldInput) (*s3.PutObjectLegalHoldOutput, error)
- PutObjectLegalHoldWithContext(aws.Context, *s3.PutObjectLegalHoldInput, ...request.Option) (*s3.PutObjectLegalHoldOutput, error)
- PutObjectLegalHoldRequest(*s3.PutObjectLegalHoldInput) (*request.Request, *s3.PutObjectLegalHoldOutput)
-
- PutObjectLockConfiguration(*s3.PutObjectLockConfigurationInput) (*s3.PutObjectLockConfigurationOutput, error)
- PutObjectLockConfigurationWithContext(aws.Context, *s3.PutObjectLockConfigurationInput, ...request.Option) (*s3.PutObjectLockConfigurationOutput, error)
- PutObjectLockConfigurationRequest(*s3.PutObjectLockConfigurationInput) (*request.Request, *s3.PutObjectLockConfigurationOutput)
-
- PutObjectRetention(*s3.PutObjectRetentionInput) (*s3.PutObjectRetentionOutput, error)
- PutObjectRetentionWithContext(aws.Context, *s3.PutObjectRetentionInput, ...request.Option) (*s3.PutObjectRetentionOutput, error)
- PutObjectRetentionRequest(*s3.PutObjectRetentionInput) (*request.Request, *s3.PutObjectRetentionOutput)
-
- PutObjectTagging(*s3.PutObjectTaggingInput) (*s3.PutObjectTaggingOutput, error)
- PutObjectTaggingWithContext(aws.Context, *s3.PutObjectTaggingInput, ...request.Option) (*s3.PutObjectTaggingOutput, error)
- PutObjectTaggingRequest(*s3.PutObjectTaggingInput) (*request.Request, *s3.PutObjectTaggingOutput)
-
- PutPublicAccessBlock(*s3.PutPublicAccessBlockInput) (*s3.PutPublicAccessBlockOutput, error)
- PutPublicAccessBlockWithContext(aws.Context, *s3.PutPublicAccessBlockInput, ...request.Option) (*s3.PutPublicAccessBlockOutput, error)
- PutPublicAccessBlockRequest(*s3.PutPublicAccessBlockInput) (*request.Request, *s3.PutPublicAccessBlockOutput)
-
- RestoreObject(*s3.RestoreObjectInput) (*s3.RestoreObjectOutput, error)
- RestoreObjectWithContext(aws.Context, *s3.RestoreObjectInput, ...request.Option) (*s3.RestoreObjectOutput, error)
- RestoreObjectRequest(*s3.RestoreObjectInput) (*request.Request, *s3.RestoreObjectOutput)
-
- SelectObjectContent(*s3.SelectObjectContentInput) (*s3.SelectObjectContentOutput, error)
- SelectObjectContentWithContext(aws.Context, *s3.SelectObjectContentInput, ...request.Option) (*s3.SelectObjectContentOutput, error)
- SelectObjectContentRequest(*s3.SelectObjectContentInput) (*request.Request, *s3.SelectObjectContentOutput)
-
- UploadPart(*s3.UploadPartInput) (*s3.UploadPartOutput, error)
- UploadPartWithContext(aws.Context, *s3.UploadPartInput, ...request.Option) (*s3.UploadPartOutput, error)
- UploadPartRequest(*s3.UploadPartInput) (*request.Request, *s3.UploadPartOutput)
-
- UploadPartCopy(*s3.UploadPartCopyInput) (*s3.UploadPartCopyOutput, error)
- UploadPartCopyWithContext(aws.Context, *s3.UploadPartCopyInput, ...request.Option) (*s3.UploadPartCopyOutput, error)
- UploadPartCopyRequest(*s3.UploadPartCopyInput) (*request.Request, *s3.UploadPartCopyOutput)
-
- WriteGetObjectResponse(*s3.WriteGetObjectResponseInput) (*s3.WriteGetObjectResponseOutput, error)
- WriteGetObjectResponseWithContext(aws.Context, *s3.WriteGetObjectResponseInput, ...request.Option) (*s3.WriteGetObjectResponseOutput, error)
- WriteGetObjectResponseRequest(*s3.WriteGetObjectResponseInput) (*request.Request, *s3.WriteGetObjectResponseOutput)
-
- WaitUntilBucketExists(*s3.HeadBucketInput) error
- WaitUntilBucketExistsWithContext(aws.Context, *s3.HeadBucketInput, ...request.WaiterOption) error
-
- WaitUntilBucketNotExists(*s3.HeadBucketInput) error
- WaitUntilBucketNotExistsWithContext(aws.Context, *s3.HeadBucketInput, ...request.WaiterOption) error
-
- WaitUntilObjectExists(*s3.HeadObjectInput) error
- WaitUntilObjectExistsWithContext(aws.Context, *s3.HeadObjectInput, ...request.WaiterOption) error
-
- WaitUntilObjectNotExists(*s3.HeadObjectInput) error
- WaitUntilObjectNotExistsWithContext(aws.Context, *s3.HeadObjectInput, ...request.WaiterOption) error
-}
-
-var _ S3API = (*s3.S3)(nil)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/batch.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/batch.go
deleted file mode 100644
index 0804bca65..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/batch.go
+++ /dev/null
@@ -1,532 +0,0 @@
-package s3manager
-
-import (
- "bytes"
- "fmt"
- "io"
-
- "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/request"
- "github.com/aws/aws-sdk-go/service/s3"
- "github.com/aws/aws-sdk-go/service/s3/s3iface"
-)
-
-const (
- // DefaultBatchSize is the batch size we initialize when constructing a batch delete client.
- // This value is used when calling DeleteObjects. This represents how many objects to delete
- // per DeleteObjects call.
- DefaultBatchSize = 100
-)
-
-// BatchError will contain the key and bucket of the object that failed to
-// either upload or download.
-type BatchError struct {
- Errors Errors
- code string
- message string
-}
-
-// Errors is a typed alias for a slice of errors to satisfy the error
-// interface.
-type Errors []Error
-
-func (errs Errors) Error() string {
- buf := bytes.NewBuffer(nil)
- for i, err := range errs {
- buf.WriteString(err.Error())
- if i+1 < len(errs) {
- buf.WriteString("\n")
- }
- }
- return buf.String()
-}
-
-// Error will contain the original error, bucket, and key of the operation that failed
-// during batch operations.
-type Error struct {
- OrigErr error
- Bucket *string
- Key *string
-}
-
-func newError(err error, bucket, key *string) Error {
- return Error{
- err,
- bucket,
- key,
- }
-}
-
-func (err *Error) Error() string {
- origErr := ""
- if err.OrigErr != nil {
- origErr = ":\n" + err.OrigErr.Error()
- }
- return fmt.Sprintf("failed to perform batch operation on %q to %q%s",
- aws.StringValue(err.Key),
- aws.StringValue(err.Bucket),
- origErr,
- )
-}
-
-// NewBatchError will return a BatchError that satisfies the awserr.Error interface.
-func NewBatchError(code, message string, err []Error) awserr.Error {
- return &BatchError{
- Errors: err,
- code: code,
- message: message,
- }
-}
-
-// Code will return the code associated with the batch error.
-func (err *BatchError) Code() string {
- return err.code
-}
-
-// Message will return the message associated with the batch error.
-func (err *BatchError) Message() string {
- return err.message
-}
-
-func (err *BatchError) Error() string {
- return awserr.SprintError(err.Code(), err.Message(), "", err.Errors)
-}
-
-// OrigErr will return the original error. Which, in this case, will always be nil
-// for batched operations.
-func (err *BatchError) OrigErr() error {
- return err.Errors
-}
-
-// BatchDeleteIterator is an interface that uses the scanner pattern to
-// iterate through what needs to be deleted.
-type BatchDeleteIterator interface {
- Next() bool
- Err() error
- DeleteObject() BatchDeleteObject
-}
-
-// DeleteListIterator is an alternative iterator for the BatchDelete client. This will
-// iterate through a list of objects and delete the objects.
-//
-// Example:
-//
-// iter := &s3manager.DeleteListIterator{
-// Client: svc,
-// Input: &s3.ListObjectsInput{
-// Bucket: aws.String("bucket"),
-// MaxKeys: aws.Int64(5),
-// },
-// Paginator: request.Pagination{
-// NewRequest: func() (*request.Request, error) {
-// var inCpy *ListObjectsInput
-// if input != nil {
-// tmp := *input
-// inCpy = &tmp
-// }
-// req, _ := c.ListObjectsRequest(inCpy)
-// return req, nil
-// },
-// },
-// }
-//
-// batcher := s3manager.NewBatchDeleteWithClient(svc)
-// if err := batcher.Delete(aws.BackgroundContext(), iter); err != nil {
-// return err
-// }
-type DeleteListIterator struct {
- Bucket *string
- Paginator request.Pagination
- objects []*s3.Object
-}
-
-// NewDeleteListIterator will return a new DeleteListIterator.
-func NewDeleteListIterator(svc s3iface.S3API, input *s3.ListObjectsInput, opts ...func(*DeleteListIterator)) BatchDeleteIterator {
- iter := &DeleteListIterator{
- Bucket: input.Bucket,
- Paginator: request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *s3.ListObjectsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := svc.ListObjectsRequest(inCpy)
- return req, nil
- },
- },
- }
-
- for _, opt := range opts {
- opt(iter)
- }
- return iter
-}
-
-// Next will use the S3API client to iterate through a list of objects.
-func (iter *DeleteListIterator) Next() bool {
- if len(iter.objects) > 0 {
- iter.objects = iter.objects[1:]
- }
-
- if len(iter.objects) == 0 && iter.Paginator.Next() {
- iter.objects = iter.Paginator.Page().(*s3.ListObjectsOutput).Contents
- }
-
- return len(iter.objects) > 0
-}
-
-// Err will return the last known error from Next.
-func (iter *DeleteListIterator) Err() error {
- return iter.Paginator.Err()
-}
-
-// DeleteObject will return the current object to be deleted.
-func (iter *DeleteListIterator) DeleteObject() BatchDeleteObject {
- return BatchDeleteObject{
- Object: &s3.DeleteObjectInput{
- Bucket: iter.Bucket,
- Key: iter.objects[0].Key,
- },
- }
-}
-
-// BatchDelete will use the s3 package's service client to perform a batch
-// delete.
-type BatchDelete struct {
- Client s3iface.S3API
- BatchSize int
-}
-
-// NewBatchDeleteWithClient will return a new delete client that can delete a batched amount of
-// objects.
-//
-// Example:
-//
-// batcher := s3manager.NewBatchDeleteWithClient(client, size)
-//
-// objects := []BatchDeleteObject{
-// {
-// Object: &s3.DeleteObjectInput {
-// Key: aws.String("key"),
-// Bucket: aws.String("bucket"),
-// },
-// },
-// }
-//
-// if err := batcher.Delete(aws.BackgroundContext(), &s3manager.DeleteObjectsIterator{
-// Objects: objects,
-// }); err != nil {
-// return err
-// }
-func NewBatchDeleteWithClient(client s3iface.S3API, options ...func(*BatchDelete)) *BatchDelete {
- svc := &BatchDelete{
- Client: client,
- BatchSize: DefaultBatchSize,
- }
-
- for _, opt := range options {
- opt(svc)
- }
-
- return svc
-}
-
-// NewBatchDelete will return a new delete client that can delete a batched amount of
-// objects.
-//
-// Example:
-//
-// batcher := s3manager.NewBatchDelete(sess, size)
-//
-// objects := []BatchDeleteObject{
-// {
-// Object: &s3.DeleteObjectInput {
-// Key: aws.String("key"),
-// Bucket: aws.String("bucket"),
-// },
-// },
-// }
-//
-// if err := batcher.Delete(aws.BackgroundContext(), &s3manager.DeleteObjectsIterator{
-// Objects: objects,
-// }); err != nil {
-// return err
-// }
-func NewBatchDelete(c client.ConfigProvider, options ...func(*BatchDelete)) *BatchDelete {
- client := s3.New(c)
- return NewBatchDeleteWithClient(client, options...)
-}
-
-// BatchDeleteObject is a wrapper object for calling the batch delete operation.
-type BatchDeleteObject struct {
- Object *s3.DeleteObjectInput
- // After will run after each iteration during the batch process. This function will
- // be executed whether or not the request was successful.
- After func() error
-}
-
-// DeleteObjectsIterator is an interface that uses the scanner pattern to iterate
-// through a series of objects to be deleted.
-type DeleteObjectsIterator struct {
- Objects []BatchDeleteObject
- index int
- inc bool
-}
-
-// Next will increment the default iterator's index and ensure that there
-// is another object to iterator to.
-func (iter *DeleteObjectsIterator) Next() bool {
- if iter.inc {
- iter.index++
- } else {
- iter.inc = true
- }
- return iter.index < len(iter.Objects)
-}
-
-// Err will return an error. Since this is just used to satisfy the BatchDeleteIterator interface
-// this will only return nil.
-func (iter *DeleteObjectsIterator) Err() error {
- return nil
-}
-
-// DeleteObject will return the BatchDeleteObject at the current batched index.
-func (iter *DeleteObjectsIterator) DeleteObject() BatchDeleteObject {
- object := iter.Objects[iter.index]
- return object
-}
-
-// Delete will use the iterator to queue up objects that need to be deleted.
-// Once the batch size is met, this will call the deleteBatch function.
-func (d *BatchDelete) Delete(ctx aws.Context, iter BatchDeleteIterator) error {
- var errs []Error
- objects := []BatchDeleteObject{}
- var input *s3.DeleteObjectsInput
-
- for iter.Next() {
- o := iter.DeleteObject()
-
- if input == nil {
- input = initDeleteObjectsInput(o.Object)
- }
-
- parity := hasParity(input, o)
- if parity {
- input.Delete.Objects = append(input.Delete.Objects, &s3.ObjectIdentifier{
- Key: o.Object.Key,
- VersionId: o.Object.VersionId,
- })
- objects = append(objects, o)
- }
-
- if len(input.Delete.Objects) == d.BatchSize || !parity {
- if err := deleteBatch(ctx, d, input, objects); err != nil {
- errs = append(errs, err...)
- }
-
- objects = objects[:0]
- input = nil
-
- if !parity {
- objects = append(objects, o)
- input = initDeleteObjectsInput(o.Object)
- input.Delete.Objects = append(input.Delete.Objects, &s3.ObjectIdentifier{
- Key: o.Object.Key,
- VersionId: o.Object.VersionId,
- })
- }
- }
- }
-
- // iter.Next() could return false (above) plus populate iter.Err()
- if iter.Err() != nil {
- errs = append(errs, newError(iter.Err(), nil, nil))
- }
-
- if input != nil && len(input.Delete.Objects) > 0 {
- if err := deleteBatch(ctx, d, input, objects); err != nil {
- errs = append(errs, err...)
- }
- }
-
- if len(errs) > 0 {
- return NewBatchError("BatchedDeleteIncomplete", "some objects have failed to be deleted.", errs)
- }
- return nil
-}
-
-func initDeleteObjectsInput(o *s3.DeleteObjectInput) *s3.DeleteObjectsInput {
- return &s3.DeleteObjectsInput{
- Bucket: o.Bucket,
- MFA: o.MFA,
- RequestPayer: o.RequestPayer,
- Delete: &s3.Delete{},
- }
-}
-
-const (
- // ErrDeleteBatchFailCode represents an error code which will be returned
- // only when DeleteObjects.Errors has an error that does not contain a code.
- ErrDeleteBatchFailCode = "DeleteBatchError"
- errDefaultDeleteBatchMessage = "failed to delete"
-)
-
-// deleteBatch will delete a batch of items in the objects parameters.
-func deleteBatch(ctx aws.Context, d *BatchDelete, input *s3.DeleteObjectsInput, objects []BatchDeleteObject) []Error {
- errs := []Error{}
-
- if result, err := d.Client.DeleteObjectsWithContext(ctx, input); err != nil {
- for i := 0; i < len(input.Delete.Objects); i++ {
- errs = append(errs, newError(err, input.Bucket, input.Delete.Objects[i].Key))
- }
- } else if len(result.Errors) > 0 {
- for i := 0; i < len(result.Errors); i++ {
- code := ErrDeleteBatchFailCode
- msg := errDefaultDeleteBatchMessage
- if result.Errors[i].Message != nil {
- msg = *result.Errors[i].Message
- }
- if result.Errors[i].Code != nil {
- code = *result.Errors[i].Code
- }
-
- errs = append(errs, newError(awserr.New(code, msg, err), input.Bucket, result.Errors[i].Key))
- }
- }
- for _, object := range objects {
- if object.After == nil {
- continue
- }
- if err := object.After(); err != nil {
- errs = append(errs, newError(err, object.Object.Bucket, object.Object.Key))
- }
- }
-
- return errs
-}
-
-func hasParity(o1 *s3.DeleteObjectsInput, o2 BatchDeleteObject) bool {
- if o1.Bucket != nil && o2.Object.Bucket != nil {
- if *o1.Bucket != *o2.Object.Bucket {
- return false
- }
- } else if o1.Bucket != o2.Object.Bucket {
- return false
- }
-
- if o1.MFA != nil && o2.Object.MFA != nil {
- if *o1.MFA != *o2.Object.MFA {
- return false
- }
- } else if o1.MFA != o2.Object.MFA {
- return false
- }
-
- if o1.RequestPayer != nil && o2.Object.RequestPayer != nil {
- if *o1.RequestPayer != *o2.Object.RequestPayer {
- return false
- }
- } else if o1.RequestPayer != o2.Object.RequestPayer {
- return false
- }
-
- return true
-}
-
-// BatchDownloadIterator is an interface that uses the scanner pattern to iterate
-// through a series of objects to be downloaded.
-type BatchDownloadIterator interface {
- Next() bool
- Err() error
- DownloadObject() BatchDownloadObject
-}
-
-// BatchDownloadObject contains all necessary information to run a batch operation once.
-type BatchDownloadObject struct {
- Object *s3.GetObjectInput
- Writer io.WriterAt
- // After will run after each iteration during the batch process. This function will
- // be executed whether or not the request was successful.
- After func() error
-}
-
-// DownloadObjectsIterator implements the BatchDownloadIterator interface and allows for batched
-// download of objects.
-type DownloadObjectsIterator struct {
- Objects []BatchDownloadObject
- index int
- inc bool
-}
-
-// Next will increment the default iterator's index and ensure that there
-// is another object to iterator to.
-func (batcher *DownloadObjectsIterator) Next() bool {
- if batcher.inc {
- batcher.index++
- } else {
- batcher.inc = true
- }
- return batcher.index < len(batcher.Objects)
-}
-
-// DownloadObject will return the BatchDownloadObject at the current batched index.
-func (batcher *DownloadObjectsIterator) DownloadObject() BatchDownloadObject {
- object := batcher.Objects[batcher.index]
- return object
-}
-
-// Err will return an error. Since this is just used to satisfy the BatchDeleteIterator interface
-// this will only return nil.
-func (batcher *DownloadObjectsIterator) Err() error {
- return nil
-}
-
-// BatchUploadIterator is an interface that uses the scanner pattern to
-// iterate through what needs to be uploaded.
-type BatchUploadIterator interface {
- Next() bool
- Err() error
- UploadObject() BatchUploadObject
-}
-
-// UploadObjectsIterator implements the BatchUploadIterator interface and allows for batched
-// upload of objects.
-type UploadObjectsIterator struct {
- Objects []BatchUploadObject
- index int
- inc bool
-}
-
-// Next will increment the default iterator's index and ensure that there
-// is another object to iterator to.
-func (batcher *UploadObjectsIterator) Next() bool {
- if batcher.inc {
- batcher.index++
- } else {
- batcher.inc = true
- }
- return batcher.index < len(batcher.Objects)
-}
-
-// Err will return an error. Since this is just used to satisfy the BatchUploadIterator interface
-// this will only return nil.
-func (batcher *UploadObjectsIterator) Err() error {
- return nil
-}
-
-// UploadObject will return the BatchUploadObject at the current batched index.
-func (batcher *UploadObjectsIterator) UploadObject() BatchUploadObject {
- object := batcher.Objects[batcher.index]
- return object
-}
-
-// BatchUploadObject contains all necessary information to run a batch operation once.
-type BatchUploadObject struct {
- Object *UploadInput
- // After will run after each iteration during the batch process. This function will
- // be executed whether or not the request was successful.
- After func() error
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/bucket_region.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/bucket_region.go
deleted file mode 100644
index 569474c28..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/bucket_region.go
+++ /dev/null
@@ -1,159 +0,0 @@
-package s3manager
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/corehandlers"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/service/s3"
- "github.com/aws/aws-sdk-go/service/s3/s3iface"
-)
-
-// GetBucketRegion will attempt to get the region for a bucket using the
-// regionHint to determine which AWS partition to perform the query on.
-//
-// The request will not be signed, and will not use your AWS credentials.
-//
-// A "NotFound" error code will be returned if the bucket does not exist in the
-// AWS partition the regionHint belongs to. If the regionHint parameter is an
-// empty string GetBucketRegion will fallback to the ConfigProvider's region
-// config. If the regionHint is empty, and the ConfigProvider does not have a
-// region value, an error will be returned..
-//
-// For example to get the region of a bucket which exists in "eu-central-1"
-// you could provide a region hint of "us-west-2".
-//
-// sess := session.Must(session.NewSession())
-//
-// bucket := "my-bucket"
-// region, err := s3manager.GetBucketRegion(ctx, sess, bucket, "us-west-2")
-// if err != nil {
-// if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "NotFound" {
-// fmt.Fprintf(os.Stderr, "unable to find bucket %s's region not found\n", bucket)
-// }
-// return err
-// }
-// fmt.Printf("Bucket %s is in %s region\n", bucket, region)
-//
-// By default the request will be made to the Amazon S3 endpoint using the Path
-// style addressing.
-//
-// s3.us-west-2.amazonaws.com/bucketname
-//
-// This is not compatible with Amazon S3's FIPS endpoints. To override this
-// behavior to use Virtual Host style addressing, provide a functional option
-// that will set the Request's Config.S3ForcePathStyle to aws.Bool(false).
-//
-// region, err := s3manager.GetBucketRegion(ctx, sess, "bucketname", "us-west-2", func(r *request.Request) {
-// r.S3ForcePathStyle = aws.Bool(false)
-// })
-//
-// To configure the GetBucketRegion to make a request via the Amazon
-// S3 FIPS endpoints directly when a FIPS region name is not available, (e.g.
-// fips-us-gov-west-1) set the Config.Endpoint on the Session, or client the
-// utility is called with. The hint region will be ignored if an endpoint URL
-// is configured on the session or client.
-//
-// sess, err := session.NewSession(&aws.Config{
-// Endpoint: aws.String("https://s3-fips.us-west-2.amazonaws.com"),
-// })
-//
-// region, err := s3manager.GetBucketRegion(context.Background(), sess, "bucketname", "")
-func GetBucketRegion(ctx aws.Context, c client.ConfigProvider, bucket, regionHint string, opts ...request.Option) (string, error) {
- var cfg aws.Config
- if len(regionHint) != 0 {
- cfg.Region = aws.String(regionHint)
- }
- svc := s3.New(c, &cfg)
- return GetBucketRegionWithClient(ctx, svc, bucket, opts...)
-}
-
-const bucketRegionHeader = "X-Amz-Bucket-Region"
-
-// GetBucketRegionWithClient is the same as GetBucketRegion with the exception
-// that it takes a S3 service client instead of a Session. The regionHint is
-// derived from the region the S3 service client was created in.
-//
-// By default the request will be made to the Amazon S3 endpoint using the Path
-// style addressing.
-//
-// s3.us-west-2.amazonaws.com/bucketname
-//
-// This is not compatible with Amazon S3's FIPS endpoints. To override this
-// behavior to use Virtual Host style addressing, provide a functional option
-// that will set the Request's Config.S3ForcePathStyle to aws.Bool(false).
-//
-// region, err := s3manager.GetBucketRegionWithClient(ctx, client, "bucketname", func(r *request.Request) {
-// r.S3ForcePathStyle = aws.Bool(false)
-// })
-//
-// To configure the GetBucketRegion to make a request via the Amazon
-// S3 FIPS endpoints directly when a FIPS region name is not available, (e.g.
-// fips-us-gov-west-1) set the Config.Endpoint on the Session, or client the
-// utility is called with. The hint region will be ignored if an endpoint URL
-// is configured on the session or client.
-//
-// region, err := s3manager.GetBucketRegionWithClient(context.Background(),
-// s3.New(sess, &aws.Config{
-// Endpoint: aws.String("https://s3-fips.us-west-2.amazonaws.com"),
-// }),
-// "bucketname")
-//
-// See GetBucketRegion for more information.
-func GetBucketRegionWithClient(ctx aws.Context, svc s3iface.S3API, bucket string, opts ...request.Option) (string, error) {
- req, _ := svc.HeadBucketRequest(&s3.HeadBucketInput{
- Bucket: aws.String(bucket),
- })
- req.Config.S3ForcePathStyle = aws.Bool(true)
-
- req.Config.Credentials = credentials.AnonymousCredentials
- req.SetContext(ctx)
-
- // Disable HTTP redirects to prevent an invalid 301 from eating the response
- // because Go's HTTP client will fail, and drop the response if an 301 is
- // received without a location header. S3 will return a 301 without the
- // location header for HeadObject API calls.
- req.DisableFollowRedirects = true
-
- var bucketRegion string
- req.Handlers.Send.PushBack(func(r *request.Request) {
- bucketRegion = r.HTTPResponse.Header.Get(bucketRegionHeader)
- if len(bucketRegion) == 0 {
- return
- }
- r.HTTPResponse.StatusCode = 200
- r.HTTPResponse.Status = "OK"
- r.Error = nil
- })
- // Replace the endpoint validation handler to not require a region if an
- // endpoint URL was specified. Since these requests are not authenticated,
- // requiring a region is not needed when an endpoint URL is provided.
- req.Handlers.Validate.Swap(
- corehandlers.ValidateEndpointHandler.Name,
- request.NamedHandler{
- Name: "validateEndpointWithoutRegion",
- Fn: validateEndpointWithoutRegion,
- },
- )
-
- req.ApplyOptions(opts...)
-
- if err := req.Send(); err != nil {
- return "", err
- }
-
- bucketRegion = s3.NormalizeBucketLocation(bucketRegion)
-
- return bucketRegion, nil
-}
-
-func validateEndpointWithoutRegion(r *request.Request) {
- // Check if the caller provided an explicit URL instead of one derived by
- // the SDK's endpoint resolver. For GetBucketRegion, with an explicit
- // endpoint URL, a region is not needed. If no endpoint URL is provided,
- // fallback the SDK's standard endpoint validation handler.
- if len(aws.StringValue(r.Config.Endpoint)) == 0 {
- corehandlers.ValidateEndpointHandler.Fn(r)
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/doc.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/doc.go
deleted file mode 100644
index 229c0d63b..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/doc.go
+++ /dev/null
@@ -1,3 +0,0 @@
-// Package s3manager provides utilities to upload and download objects from
-// S3 concurrently. Helpful for when working with large objects.
-package s3manager
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload_input.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload_input.go
deleted file mode 100644
index 1cd115f48..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload_input.go
+++ /dev/null
@@ -1,262 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package s3manager
-
-import (
- "io"
- "time"
-)
-
-// UploadInput provides the input parameters for uploading a stream or buffer
-// to an object in an Amazon S3 bucket. This type is similar to the s3
-// package's PutObjectInput with the exception that the Body member is an
-// io.Reader instead of an io.ReadSeeker.
-//
-// The ContentMD5 member for pre-computed MD5 checksums will be ignored for
-// multipart uploads. Objects that will be uploaded in a single part, the
-// ContentMD5 will be used.
-//
-// The Checksum members for pre-computed checksums will be ignored for
-// multipart uploads. Objects that will be uploaded in a single part, will
-// include the checksum member in the request.
-type UploadInput struct {
- _ struct{} `locationName:"PutObjectRequest" type:"structure" payload:"Body"`
-
- // 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).
- //
- // This action is not supported by Amazon S3 on Outposts.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
-
- // The readable body payload to send to S3.
- Body io.Reader
-
- // The bucket name to which the PUT action was initiated.
- //
- // When using this action 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 action with an access point through the Amazon Web Services
- // 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/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action with S3 on Outposts through the Amazon Web Services SDKs,
- // you provide the Outposts bucket ARN in place of the bucket name. For more
- // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
- // with server-side encryption using AWS KMS (SSE-KMS). Setting this header
- // to true causes Amazon S3 to use an S3 Bucket Key for object encryption with
- // SSE-KMS.
- //
- // Specifying this header with a PUT action doesn’t affect bucket-level settings
- // for S3 Bucket Key.
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // 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"`
-
- // Indicates the algorithm used to create the checksum for the object when using
- // the SDK. This header will not provide any additional functionality if not
- // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
- // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
- // the HTTP status code 400 Bad Request. For more information, see Checking
- // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- //
- // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter.
- //
- // The AWS SDK for Go v1 does not support automatic computing request payload
- // checksum. This feature is available in the AWS SDK for Go v2. If a value
- // is specified for this parameter, the matching algorithm's checksum member
- // must be populated with the algorithm's checksum of the request payload.
- ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 32-bit CRC32 checksum of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 32-bit CRC32C checksum of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 160-bit SHA-1 digest of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
-
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies
- // the base64-encoded, 256-bit SHA-256 digest of the object. For more information,
- // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
- // in the Amazon S3 User Guide.
- ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
-
- // 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. 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"`
-
- // 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).
- //
- // If the ContentMD5 is provided for a multipart upload, it will be ignored.
- // Objects that will be uploaded in a single part, the ContentMD5 will be used.
- ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
-
- // 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 account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request fails with the HTTP status code 403 Forbidden
- // (access denied).
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // 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.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
-
- // Allows grantee to read the object data and its metadata.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
-
- // Allows grantee to read the object ACL.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
-
- // Allows grantee to write the ACL for the applicable object.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
-
- // Object key for which the PUT action was initiated.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // A map of metadata to store with the object in S3.
- Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
-
- // 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.
- 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. Must
- // be formatted as a timestamp parameter.
- ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
-
- // 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 Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // 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
- // 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 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 Amazon Web Services KMS Encryption Context to use for object
- // encryption. The value of this header is a base64-encoded UTF-8 string holding
- // JSON with the encryption context key-value pairs.
- SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
-
- // If x-amz-server-side-encryption is present and has the value of aws:kms,
- // this header specifies the ID of the Amazon Web Services Key Management Service
- // (Amazon Web Services KMS) symmetrical customer managed key that was 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 Amazon Web Services managed key to protect the data. If the KMS key does
- // not exist in the same account issuing the command, you must use the full
- // ARN and not just the ID.
- 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 Amazon
- // S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-
- // 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.
- // Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information,
- // see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
- // in the Amazon S3 User Guide.
- 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.
- // (For example, "Key1=Value1")
- Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
-
- // 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. 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"`
-}
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
deleted file mode 100644
index 3e75d0e94..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package s3
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/signer/v4"
- "github.com/aws/aws-sdk-go/private/protocol/restxml"
-)
-
-// S3 provides the API operation methods for making requests to
-// Amazon Simple Storage Service. See this package's package overview docs
-// for details on the service.
-//
-// S3 methods are safe to use concurrently. It is not safe to
-// modify mutate any of the struct's properties though.
-type S3 struct {
- *client.Client
-}
-
-// Used for custom client initialization logic
-var initClient func(*client.Client)
-
-// Used for custom request initialization logic
-var initRequest func(*request.Request)
-
-// Service information constants
-const (
- ServiceName = "s3" // Name of service.
- EndpointsID = ServiceName // ID to lookup a service endpoint with.
- ServiceID = "S3" // ServiceID is a unique identifier of a specific service.
-)
-
-// New creates a new instance of the S3 client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-//
-// mySession := session.Must(session.NewSession())
-//
-// // Create a S3 client from just a session.
-// svc := s3.New(mySession)
-//
-// // Create a S3 client with additional configuration
-// svc := s3.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func New(p client.ConfigProvider, cfgs ...*aws.Config) *S3 {
- c := p.ClientConfig(EndpointsID, cfgs...)
- if c.SigningNameDerived || len(c.SigningName) == 0 {
- c.SigningName = "s3"
- }
- return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *S3 {
- svc := &S3{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: ServiceName,
- ServiceID: ServiceID,
- SigningName: signingName,
- SigningRegion: signingRegion,
- PartitionID: partitionID,
- Endpoint: endpoint,
- APIVersion: "2006-03-01",
- ResolvedRegion: resolvedRegion,
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.BuildNamedHandler(v4.SignRequestHandler.Name, func(s *v4.Signer) {
- s.DisableURIPathEscaping = true
- }))
- svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
- 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
- if initClient != nil {
- initClient(svc.Client)
- }
-
- return svc
-}
-
-// newRequest creates a new request for a S3 operation and runs any
-// custom request initialization.
-func (c *S3) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- // Run custom request initialization if present
- if initRequest != nil {
- initRequest(req)
- }
-
- return req
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go b/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go
deleted file mode 100644
index 57a0bd92c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go
+++ /dev/null
@@ -1,84 +0,0 @@
-package s3
-
-import (
- "crypto/md5"
- "encoding/base64"
- "net/http"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-var errSSERequiresSSL = awserr.New("ConfigError", "cannot send SSE keys over HTTP.", nil)
-
-func validateSSERequiresSSL(r *request.Request) {
- if r.HTTPRequest.URL.Scheme == "https" {
- return
- }
-
- if iface, ok := r.Params.(sseCustomerKeyGetter); ok {
- if len(iface.getSSECustomerKey()) > 0 {
- r.Error = errSSERequiresSSL
- return
- }
- }
-
- if iface, ok := r.Params.(copySourceSSECustomerKeyGetter); ok {
- if len(iface.getCopySourceSSECustomerKey()) > 0 {
- r.Error = errSSERequiresSSL
- return
- }
- }
-}
-
-const (
- sseKeyHeader = "x-amz-server-side-encryption-customer-key"
- sseKeyMD5Header = sseKeyHeader + "-md5"
-)
-
-func computeSSEKeyMD5(r *request.Request) {
- var key string
- if g, ok := r.Params.(sseCustomerKeyGetter); ok {
- key = g.getSSECustomerKey()
- }
-
- computeKeyMD5(sseKeyHeader, sseKeyMD5Header, key, r.HTTPRequest)
-}
-
-const (
- copySrcSSEKeyHeader = "x-amz-copy-source-server-side-encryption-customer-key"
- copySrcSSEKeyMD5Header = copySrcSSEKeyHeader + "-md5"
-)
-
-func computeCopySourceSSEKeyMD5(r *request.Request) {
- var key string
- if g, ok := r.Params.(copySourceSSECustomerKeyGetter); ok {
- key = g.getCopySourceSSECustomerKey()
- }
-
- computeKeyMD5(copySrcSSEKeyHeader, copySrcSSEKeyMD5Header, key, r.HTTPRequest)
-}
-
-func computeKeyMD5(keyHeader, keyMD5Header, key string, r *http.Request) {
- if len(key) == 0 {
- // Backwards compatiablity where user just set the header value instead
- // of using the API parameter, or setting the header value for an
- // operation without the parameters modeled.
- key = r.Header.Get(keyHeader)
- if len(key) == 0 {
- return
- }
-
- // In backwards compatible, the header's value is not base64 encoded,
- // and needs to be encoded and updated by the SDK's customizations.
- b64Key := base64.StdEncoding.EncodeToString([]byte(key))
- r.Header.Set(keyHeader, b64Key)
- }
-
- // Only update Key's MD5 if not already set.
- if len(r.Header.Get(keyMD5Header)) == 0 {
- sum := md5.Sum([]byte(key))
- keyMD5 := base64.StdEncoding.EncodeToString(sum[:])
- r.Header.Set(keyMD5Header, keyMD5)
- }
-}
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
deleted file mode 100644
index 096adc091..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package s3
-
-import (
- "bytes"
- "io"
- "io/ioutil"
- "net/http"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/sdkio"
-)
-
-func copyMultipartStatusOKUnmarshalError(r *request.Request) {
- b, err := ioutil.ReadAll(r.HTTPResponse.Body)
- r.HTTPResponse.Body.Close()
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization, "unable to read response body", err),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
- // Note, some middleware later in the stack like restxml.Unmarshal expect a valid, non-closed Body
- // even in case of an error, so we replace it with an empty Reader.
- r.HTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(nil))
- return
- }
-
- body := bytes.NewReader(b)
- r.HTTPResponse.Body = ioutil.NopCloser(body)
- defer body.Seek(0, sdkio.SeekStart)
-
- unmarshalError(r)
- if err, ok := r.Error.(awserr.Error); ok && err != nil {
- if err.Code() == request.ErrCodeSerialization &&
- err.OrigErr() != io.EOF {
- r.Error = nil
- return
- }
- // 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
deleted file mode 100644
index 6eecf6691..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go
+++ /dev/null
@@ -1,114 +0,0 @@
-package s3
-
-import (
- "bytes"
- "encoding/xml"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "strings"
-
- "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/private/protocol/xml/xmlutil"
-)
-
-type xmlErrorResponse struct {
- XMLName xml.Name `xml:"Error"`
- Code string `xml:"Code"`
- Message string `xml:"Message"`
-}
-
-func unmarshalError(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
- defer io.Copy(ioutil.Discard, r.HTTPResponse.Body)
-
- // Bucket exists in a different region, and request needs
- // to be made to the correct region.
- if r.HTTPResponse.StatusCode == http.StatusMovedPermanently {
- msg := fmt.Sprintf(
- "incorrect region, the bucket is not in '%s' region at endpoint '%s'",
- aws.StringValue(r.Config.Region),
- aws.StringValue(r.Config.Endpoint),
- )
- if v := r.HTTPResponse.Header.Get("x-amz-bucket-region"); len(v) != 0 {
- msg += fmt.Sprintf(", bucket is in '%s' region", v)
- }
- r.Error = awserr.NewRequestFailure(
- awserr.New("BucketRegionError", msg, nil),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
- return
- }
-
- // Attempt to parse error from body if it is known
- var errResp xmlErrorResponse
- 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,
- errorMsg, err),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
- return
- }
-
- // Fallback to status code converted to message if still no error code
- if len(errResp.Code) == 0 {
- statusText := http.StatusText(r.HTTPResponse.StatusCode)
- errResp.Code = strings.Replace(statusText, " ", "", -1)
- errResp.Message = statusText
- }
-
- r.Error = awserr.NewRequestFailure(
- awserr.New(errResp.Code, errResp.Message, err),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
-}
-
-// A RequestFailure provides access to the S3 Request ID and Host ID values
-// returned from API operation errors. Getting the error as a string will
-// return the formated error with the same information as awserr.RequestFailure,
-// while also adding the HostID value from the response.
-type RequestFailure interface {
- awserr.RequestFailure
-
- // 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/s3/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
deleted file mode 100644
index 2596c694b..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
+++ /dev/null
@@ -1,214 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package s3
-
-import (
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// WaitUntilBucketExists uses the Amazon S3 API operation
-// HeadBucket 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 *S3) WaitUntilBucketExists(input *HeadBucketInput) error {
- return c.WaitUntilBucketExistsWithContext(aws.BackgroundContext(), input)
-}
-
-// WaitUntilBucketExistsWithContext is an extended version of WaitUntilBucketExists.
-// 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 *S3) WaitUntilBucketExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error {
- w := request.Waiter{
- Name: "WaitUntilBucketExists",
- MaxAttempts: 20,
- Delay: request.ConstantWaiterDelay(5 * time.Second),
- Acceptors: []request.WaiterAcceptor{
- {
- State: request.SuccessWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 200,
- },
- {
- State: request.SuccessWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 301,
- },
- {
- State: request.SuccessWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 403,
- },
- {
- State: request.RetryWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 404,
- },
- },
- Logger: c.Config.Logger,
- NewRequest: func(opts []request.Option) (*request.Request, error) {
- var inCpy *HeadBucketInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.HeadBucketRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- w.ApplyOptions(opts...)
-
- return w.WaitWithContext(ctx)
-}
-
-// WaitUntilBucketNotExists uses the Amazon S3 API operation
-// HeadBucket 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 *S3) WaitUntilBucketNotExists(input *HeadBucketInput) error {
- return c.WaitUntilBucketNotExistsWithContext(aws.BackgroundContext(), input)
-}
-
-// WaitUntilBucketNotExistsWithContext is an extended version of WaitUntilBucketNotExists.
-// 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 *S3) WaitUntilBucketNotExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error {
- w := request.Waiter{
- Name: "WaitUntilBucketNotExists",
- MaxAttempts: 20,
- Delay: request.ConstantWaiterDelay(5 * time.Second),
- Acceptors: []request.WaiterAcceptor{
- {
- State: request.SuccessWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 404,
- },
- },
- Logger: c.Config.Logger,
- NewRequest: func(opts []request.Option) (*request.Request, error) {
- var inCpy *HeadBucketInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.HeadBucketRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- w.ApplyOptions(opts...)
-
- return w.WaitWithContext(ctx)
-}
-
-// WaitUntilObjectExists uses the Amazon S3 API operation
-// HeadObject 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 *S3) WaitUntilObjectExists(input *HeadObjectInput) error {
- return c.WaitUntilObjectExistsWithContext(aws.BackgroundContext(), input)
-}
-
-// WaitUntilObjectExistsWithContext is an extended version of WaitUntilObjectExists.
-// 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 *S3) WaitUntilObjectExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error {
- w := request.Waiter{
- Name: "WaitUntilObjectExists",
- MaxAttempts: 20,
- Delay: request.ConstantWaiterDelay(5 * time.Second),
- Acceptors: []request.WaiterAcceptor{
- {
- State: request.SuccessWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 200,
- },
- {
- State: request.RetryWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 404,
- },
- },
- Logger: c.Config.Logger,
- NewRequest: func(opts []request.Option) (*request.Request, error) {
- var inCpy *HeadObjectInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.HeadObjectRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- w.ApplyOptions(opts...)
-
- return w.WaitWithContext(ctx)
-}
-
-// WaitUntilObjectNotExists uses the Amazon S3 API operation
-// HeadObject 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 *S3) WaitUntilObjectNotExists(input *HeadObjectInput) error {
- return c.WaitUntilObjectNotExistsWithContext(aws.BackgroundContext(), input)
-}
-
-// WaitUntilObjectNotExistsWithContext is an extended version of WaitUntilObjectNotExists.
-// 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 *S3) WaitUntilObjectNotExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error {
- w := request.Waiter{
- Name: "WaitUntilObjectNotExists",
- MaxAttempts: 20,
- Delay: request.ConstantWaiterDelay(5 * time.Second),
- Acceptors: []request.WaiterAcceptor{
- {
- State: request.SuccessWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 404,
- },
- },
- Logger: c.Config.Logger,
- NewRequest: func(opts []request.Option) (*request.Request, error) {
- var inCpy *HeadObjectInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.HeadObjectRequest(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/sso/api.go b/vendor/github.com/aws/aws-sdk-go/service/sso/api.go
deleted file mode 100644
index b8f590f71..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sso/api.go
+++ /dev/null
@@ -1,1367 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package sso
-
-import (
- "fmt"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/restjson"
-)
-
-const opGetRoleCredentials = "GetRoleCredentials"
-
-// GetRoleCredentialsRequest generates a "aws/request.Request" representing the
-// client's request for the GetRoleCredentials 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 GetRoleCredentials for more information on using the GetRoleCredentials
-// 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 GetRoleCredentialsRequest method.
-// req, resp := client.GetRoleCredentialsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials
-func (c *SSO) GetRoleCredentialsRequest(input *GetRoleCredentialsInput) (req *request.Request, output *GetRoleCredentialsOutput) {
- op := &request.Operation{
- Name: opGetRoleCredentials,
- HTTPMethod: "GET",
- HTTPPath: "/federation/credentials",
- }
-
- if input == nil {
- input = &GetRoleCredentialsInput{}
- }
-
- output = &GetRoleCredentialsOutput{}
- req = c.newRequest(op, input, output)
- req.Config.Credentials = credentials.AnonymousCredentials
- return
-}
-
-// GetRoleCredentials API operation for AWS Single Sign-On.
-//
-// Returns the STS short-term credentials for a given role name that is assigned
-// to the user.
-//
-// Returns awserr.Error for 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 Single Sign-On's
-// API operation GetRoleCredentials for usage and error information.
-//
-// Returned Error Types:
-//
-// - InvalidRequestException
-// Indicates that a problem occurred with the input to the request. For example,
-// a required parameter might be missing or out of range.
-//
-// - UnauthorizedException
-// Indicates that the request is not authorized. This can happen due to an invalid
-// access token in the request.
-//
-// - TooManyRequestsException
-// Indicates that the request is being made too frequently and is more than
-// what the server can handle.
-//
-// - ResourceNotFoundException
-// The specified resource doesn't exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials
-func (c *SSO) GetRoleCredentials(input *GetRoleCredentialsInput) (*GetRoleCredentialsOutput, error) {
- req, out := c.GetRoleCredentialsRequest(input)
- return out, req.Send()
-}
-
-// GetRoleCredentialsWithContext is the same as GetRoleCredentials with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetRoleCredentials 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 *SSO) GetRoleCredentialsWithContext(ctx aws.Context, input *GetRoleCredentialsInput, opts ...request.Option) (*GetRoleCredentialsOutput, error) {
- req, out := c.GetRoleCredentialsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListAccountRoles = "ListAccountRoles"
-
-// ListAccountRolesRequest generates a "aws/request.Request" representing the
-// client's request for the ListAccountRoles 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 ListAccountRoles for more information on using the ListAccountRoles
-// 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 ListAccountRolesRequest method.
-// req, resp := client.ListAccountRolesRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles
-func (c *SSO) ListAccountRolesRequest(input *ListAccountRolesInput) (req *request.Request, output *ListAccountRolesOutput) {
- op := &request.Operation{
- Name: opListAccountRoles,
- HTTPMethod: "GET",
- HTTPPath: "/assignment/roles",
- Paginator: &request.Paginator{
- InputTokens: []string{"nextToken"},
- OutputTokens: []string{"nextToken"},
- LimitToken: "maxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListAccountRolesInput{}
- }
-
- output = &ListAccountRolesOutput{}
- req = c.newRequest(op, input, output)
- req.Config.Credentials = credentials.AnonymousCredentials
- return
-}
-
-// ListAccountRoles API operation for AWS Single Sign-On.
-//
-// Lists all roles that are assigned to the user for a given AWS account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Single Sign-On's
-// API operation ListAccountRoles for usage and error information.
-//
-// Returned Error Types:
-//
-// - InvalidRequestException
-// Indicates that a problem occurred with the input to the request. For example,
-// a required parameter might be missing or out of range.
-//
-// - UnauthorizedException
-// Indicates that the request is not authorized. This can happen due to an invalid
-// access token in the request.
-//
-// - TooManyRequestsException
-// Indicates that the request is being made too frequently and is more than
-// what the server can handle.
-//
-// - ResourceNotFoundException
-// The specified resource doesn't exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles
-func (c *SSO) ListAccountRoles(input *ListAccountRolesInput) (*ListAccountRolesOutput, error) {
- req, out := c.ListAccountRolesRequest(input)
- return out, req.Send()
-}
-
-// ListAccountRolesWithContext is the same as ListAccountRoles with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListAccountRoles 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 *SSO) ListAccountRolesWithContext(ctx aws.Context, input *ListAccountRolesInput, opts ...request.Option) (*ListAccountRolesOutput, error) {
- req, out := c.ListAccountRolesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListAccountRolesPages iterates over the pages of a ListAccountRoles operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListAccountRoles 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 ListAccountRoles operation.
-// pageNum := 0
-// err := client.ListAccountRolesPages(params,
-// func(page *sso.ListAccountRolesOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-func (c *SSO) ListAccountRolesPages(input *ListAccountRolesInput, fn func(*ListAccountRolesOutput, bool) bool) error {
- return c.ListAccountRolesPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListAccountRolesPagesWithContext same as ListAccountRolesPages 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 *SSO) ListAccountRolesPagesWithContext(ctx aws.Context, input *ListAccountRolesInput, fn func(*ListAccountRolesOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListAccountRolesInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListAccountRolesRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListAccountRolesOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListAccounts = "ListAccounts"
-
-// ListAccountsRequest generates a "aws/request.Request" representing the
-// client's request for the ListAccounts 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 ListAccounts for more information on using the ListAccounts
-// 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 ListAccountsRequest method.
-// req, resp := client.ListAccountsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts
-func (c *SSO) ListAccountsRequest(input *ListAccountsInput) (req *request.Request, output *ListAccountsOutput) {
- op := &request.Operation{
- Name: opListAccounts,
- HTTPMethod: "GET",
- HTTPPath: "/assignment/accounts",
- Paginator: &request.Paginator{
- InputTokens: []string{"nextToken"},
- OutputTokens: []string{"nextToken"},
- LimitToken: "maxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListAccountsInput{}
- }
-
- output = &ListAccountsOutput{}
- req = c.newRequest(op, input, output)
- req.Config.Credentials = credentials.AnonymousCredentials
- return
-}
-
-// ListAccounts API operation for AWS Single Sign-On.
-//
-// Lists all AWS accounts assigned to the user. These AWS accounts are assigned
-// by the administrator of the account. For more information, see Assign User
-// Access (https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers)
-// in the IAM Identity Center User Guide. This operation returns a paginated
-// response.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Single Sign-On's
-// API operation ListAccounts for usage and error information.
-//
-// Returned Error Types:
-//
-// - InvalidRequestException
-// Indicates that a problem occurred with the input to the request. For example,
-// a required parameter might be missing or out of range.
-//
-// - UnauthorizedException
-// Indicates that the request is not authorized. This can happen due to an invalid
-// access token in the request.
-//
-// - TooManyRequestsException
-// Indicates that the request is being made too frequently and is more than
-// what the server can handle.
-//
-// - ResourceNotFoundException
-// The specified resource doesn't exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts
-func (c *SSO) ListAccounts(input *ListAccountsInput) (*ListAccountsOutput, error) {
- req, out := c.ListAccountsRequest(input)
- return out, req.Send()
-}
-
-// ListAccountsWithContext is the same as ListAccounts with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListAccounts 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 *SSO) ListAccountsWithContext(ctx aws.Context, input *ListAccountsInput, opts ...request.Option) (*ListAccountsOutput, error) {
- req, out := c.ListAccountsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListAccountsPages iterates over the pages of a ListAccounts operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListAccounts 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 ListAccounts operation.
-// pageNum := 0
-// err := client.ListAccountsPages(params,
-// func(page *sso.ListAccountsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-func (c *SSO) ListAccountsPages(input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool) error {
- return c.ListAccountsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListAccountsPagesWithContext same as ListAccountsPages 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 *SSO) ListAccountsPagesWithContext(ctx aws.Context, input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListAccountsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListAccountsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListAccountsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opLogout = "Logout"
-
-// LogoutRequest generates a "aws/request.Request" representing the
-// client's request for the Logout 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 Logout for more information on using the Logout
-// 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 LogoutRequest method.
-// req, resp := client.LogoutRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout
-func (c *SSO) LogoutRequest(input *LogoutInput) (req *request.Request, output *LogoutOutput) {
- op := &request.Operation{
- Name: opLogout,
- HTTPMethod: "POST",
- HTTPPath: "/logout",
- }
-
- if input == nil {
- input = &LogoutInput{}
- }
-
- output = &LogoutOutput{}
- req = c.newRequest(op, input, output)
- req.Config.Credentials = credentials.AnonymousCredentials
- req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// Logout API operation for AWS Single Sign-On.
-//
-// Removes the locally stored SSO tokens from the client-side cache and sends
-// an API call to the IAM Identity Center service to invalidate the corresponding
-// server-side IAM Identity Center sign in session.
-//
-// If a user uses IAM Identity Center to access the AWS CLI, the user’s IAM
-// Identity Center sign in session is used to obtain an IAM session, as specified
-// in the corresponding IAM Identity Center permission set. More specifically,
-// IAM Identity Center assumes an IAM role in the target account on behalf of
-// the user, and the corresponding temporary AWS credentials are returned to
-// the client.
-//
-// After user logout, any existing IAM role sessions that were created by using
-// IAM Identity Center permission sets continue based on the duration configured
-// in the permission set. For more information, see User authentications (https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html)
-// in the IAM Identity Center User Guide.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Single Sign-On's
-// API operation Logout for usage and error information.
-//
-// Returned Error Types:
-//
-// - InvalidRequestException
-// Indicates that a problem occurred with the input to the request. For example,
-// a required parameter might be missing or out of range.
-//
-// - UnauthorizedException
-// Indicates that the request is not authorized. This can happen due to an invalid
-// access token in the request.
-//
-// - TooManyRequestsException
-// Indicates that the request is being made too frequently and is more than
-// what the server can handle.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout
-func (c *SSO) Logout(input *LogoutInput) (*LogoutOutput, error) {
- req, out := c.LogoutRequest(input)
- return out, req.Send()
-}
-
-// LogoutWithContext is the same as Logout with the addition of
-// the ability to pass a context and additional request options.
-//
-// See Logout 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 *SSO) LogoutWithContext(ctx aws.Context, input *LogoutInput, opts ...request.Option) (*LogoutOutput, error) {
- req, out := c.LogoutRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// Provides information about your AWS account.
-type AccountInfo struct {
- _ struct{} `type:"structure"`
-
- // The identifier of the AWS account that is assigned to the user.
- AccountId *string `locationName:"accountId" type:"string"`
-
- // The display name of the AWS account that is assigned to the user.
- AccountName *string `locationName:"accountName" type:"string"`
-
- // The email address of the AWS account that is assigned to the user.
- EmailAddress *string `locationName:"emailAddress" min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AccountInfo) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AccountInfo) GoString() string {
- return s.String()
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *AccountInfo) SetAccountId(v string) *AccountInfo {
- s.AccountId = &v
- return s
-}
-
-// SetAccountName sets the AccountName field's value.
-func (s *AccountInfo) SetAccountName(v string) *AccountInfo {
- s.AccountName = &v
- return s
-}
-
-// SetEmailAddress sets the EmailAddress field's value.
-func (s *AccountInfo) SetEmailAddress(v string) *AccountInfo {
- s.EmailAddress = &v
- return s
-}
-
-type GetRoleCredentialsInput struct {
- _ struct{} `type:"structure" nopayload:"true"`
-
- // The token issued by the CreateToken API call. For more information, see CreateToken
- // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
- // in the IAM Identity Center OIDC API Reference Guide.
- //
- // AccessToken is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by GetRoleCredentialsInput's
- // String and GoString methods.
- //
- // AccessToken is a required field
- AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`
-
- // The identifier for the AWS account that is assigned to the user.
- //
- // AccountId is a required field
- AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"`
-
- // The friendly name of the role that is assigned to the user.
- //
- // RoleName is a required field
- RoleName *string `location:"querystring" locationName:"role_name" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetRoleCredentialsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetRoleCredentialsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetRoleCredentialsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetRoleCredentialsInput"}
- if s.AccessToken == nil {
- invalidParams.Add(request.NewErrParamRequired("AccessToken"))
- }
- if s.AccountId == nil {
- invalidParams.Add(request.NewErrParamRequired("AccountId"))
- }
- if s.RoleName == nil {
- invalidParams.Add(request.NewErrParamRequired("RoleName"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessToken sets the AccessToken field's value.
-func (s *GetRoleCredentialsInput) SetAccessToken(v string) *GetRoleCredentialsInput {
- s.AccessToken = &v
- return s
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *GetRoleCredentialsInput) SetAccountId(v string) *GetRoleCredentialsInput {
- s.AccountId = &v
- return s
-}
-
-// SetRoleName sets the RoleName field's value.
-func (s *GetRoleCredentialsInput) SetRoleName(v string) *GetRoleCredentialsInput {
- s.RoleName = &v
- return s
-}
-
-type GetRoleCredentialsOutput struct {
- _ struct{} `type:"structure"`
-
- // The credentials for the role that is assigned to the user.
- RoleCredentials *RoleCredentials `locationName:"roleCredentials" type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetRoleCredentialsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetRoleCredentialsOutput) GoString() string {
- return s.String()
-}
-
-// SetRoleCredentials sets the RoleCredentials field's value.
-func (s *GetRoleCredentialsOutput) SetRoleCredentials(v *RoleCredentials) *GetRoleCredentialsOutput {
- s.RoleCredentials = v
- return s
-}
-
-// Indicates that a problem occurred with the input to the request. For example,
-// a required parameter might be missing or out of range.
-type InvalidRequestException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidRequestException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidRequestException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidRequestException(v protocol.ResponseMetadata) error {
- return &InvalidRequestException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidRequestException) Code() string {
- return "InvalidRequestException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidRequestException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidRequestException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidRequestException) 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 *InvalidRequestException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidRequestException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type ListAccountRolesInput struct {
- _ struct{} `type:"structure" nopayload:"true"`
-
- // The token issued by the CreateToken API call. For more information, see CreateToken
- // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
- // in the IAM Identity Center OIDC API Reference Guide.
- //
- // AccessToken is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by ListAccountRolesInput's
- // String and GoString methods.
- //
- // AccessToken is a required field
- AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`
-
- // The identifier for the AWS account that is assigned to the user.
- //
- // AccountId is a required field
- AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"`
-
- // The number of items that clients can request per page.
- MaxResults *int64 `location:"querystring" locationName:"max_result" min:"1" type:"integer"`
-
- // The page token from the previous response output when you request subsequent
- // pages.
- NextToken *string `location:"querystring" locationName:"next_token" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountRolesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountRolesInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListAccountRolesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListAccountRolesInput"}
- if s.AccessToken == nil {
- invalidParams.Add(request.NewErrParamRequired("AccessToken"))
- }
- if s.AccountId == nil {
- invalidParams.Add(request.NewErrParamRequired("AccountId"))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessToken sets the AccessToken field's value.
-func (s *ListAccountRolesInput) SetAccessToken(v string) *ListAccountRolesInput {
- s.AccessToken = &v
- return s
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *ListAccountRolesInput) SetAccountId(v string) *ListAccountRolesInput {
- s.AccountId = &v
- return s
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListAccountRolesInput) SetMaxResults(v int64) *ListAccountRolesInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListAccountRolesInput) SetNextToken(v string) *ListAccountRolesInput {
- s.NextToken = &v
- return s
-}
-
-type ListAccountRolesOutput struct {
- _ struct{} `type:"structure"`
-
- // The page token client that is used to retrieve the list of accounts.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // A paginated response with the list of roles and the next token if more results
- // are available.
- RoleList []*RoleInfo `locationName:"roleList" type:"list"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountRolesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountRolesOutput) GoString() string {
- return s.String()
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListAccountRolesOutput) SetNextToken(v string) *ListAccountRolesOutput {
- s.NextToken = &v
- return s
-}
-
-// SetRoleList sets the RoleList field's value.
-func (s *ListAccountRolesOutput) SetRoleList(v []*RoleInfo) *ListAccountRolesOutput {
- s.RoleList = v
- return s
-}
-
-type ListAccountsInput struct {
- _ struct{} `type:"structure" nopayload:"true"`
-
- // The token issued by the CreateToken API call. For more information, see CreateToken
- // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
- // in the IAM Identity Center OIDC API Reference Guide.
- //
- // AccessToken is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by ListAccountsInput's
- // String and GoString methods.
- //
- // AccessToken is a required field
- AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`
-
- // This is the number of items clients can request per page.
- MaxResults *int64 `location:"querystring" locationName:"max_result" min:"1" type:"integer"`
-
- // (Optional) When requesting subsequent pages, this is the page token from
- // the previous response output.
- NextToken *string `location:"querystring" locationName:"next_token" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListAccountsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListAccountsInput"}
- if s.AccessToken == nil {
- invalidParams.Add(request.NewErrParamRequired("AccessToken"))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessToken sets the AccessToken field's value.
-func (s *ListAccountsInput) SetAccessToken(v string) *ListAccountsInput {
- s.AccessToken = &v
- return s
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListAccountsInput) SetMaxResults(v int64) *ListAccountsInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListAccountsInput) SetNextToken(v string) *ListAccountsInput {
- s.NextToken = &v
- return s
-}
-
-type ListAccountsOutput struct {
- _ struct{} `type:"structure"`
-
- // A paginated response with the list of account information and the next token
- // if more results are available.
- AccountList []*AccountInfo `locationName:"accountList" type:"list"`
-
- // The page token client that is used to retrieve the list of accounts.
- NextToken *string `locationName:"nextToken" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountsOutput) GoString() string {
- return s.String()
-}
-
-// SetAccountList sets the AccountList field's value.
-func (s *ListAccountsOutput) SetAccountList(v []*AccountInfo) *ListAccountsOutput {
- s.AccountList = v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListAccountsOutput) SetNextToken(v string) *ListAccountsOutput {
- s.NextToken = &v
- return s
-}
-
-type LogoutInput struct {
- _ struct{} `type:"structure" nopayload:"true"`
-
- // The token issued by the CreateToken API call. For more information, see CreateToken
- // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
- // in the IAM Identity Center OIDC API Reference Guide.
- //
- // AccessToken is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by LogoutInput's
- // String and GoString methods.
- //
- // AccessToken is a required field
- AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LogoutInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LogoutInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LogoutInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LogoutInput"}
- if s.AccessToken == nil {
- invalidParams.Add(request.NewErrParamRequired("AccessToken"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessToken sets the AccessToken field's value.
-func (s *LogoutInput) SetAccessToken(v string) *LogoutInput {
- s.AccessToken = &v
- return s
-}
-
-type LogoutOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LogoutOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LogoutOutput) GoString() string {
- return s.String()
-}
-
-// The specified resource doesn't exist.
-type ResourceNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ResourceNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ResourceNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
- return &ResourceNotFoundException{
- RespMetadata: v,
- }
-}
-
-// 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
-}
-
-func (s *ResourceNotFoundException) 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 *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
-}
-
-// Provides information about the role credentials that are assigned to the
-// user.
-type RoleCredentials struct {
- _ struct{} `type:"structure"`
-
- // The identifier used for the temporary security credentials. For more information,
- // see Using Temporary Security Credentials to Request Access to AWS Resources
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
- // in the AWS IAM User Guide.
- AccessKeyId *string `locationName:"accessKeyId" type:"string"`
-
- // The date on which temporary security credentials expire.
- Expiration *int64 `locationName:"expiration" type:"long"`
-
- // The key that is used to sign the request. For more information, see Using
- // Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
- // in the AWS IAM User Guide.
- //
- // SecretAccessKey is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by RoleCredentials's
- // String and GoString methods.
- SecretAccessKey *string `locationName:"secretAccessKey" type:"string" sensitive:"true"`
-
- // The token used for temporary credentials. For more information, see Using
- // Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
- // in the AWS IAM User Guide.
- //
- // SessionToken is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by RoleCredentials's
- // String and GoString methods.
- SessionToken *string `locationName:"sessionToken" type:"string" sensitive:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RoleCredentials) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RoleCredentials) GoString() string {
- return s.String()
-}
-
-// SetAccessKeyId sets the AccessKeyId field's value.
-func (s *RoleCredentials) SetAccessKeyId(v string) *RoleCredentials {
- s.AccessKeyId = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *RoleCredentials) SetExpiration(v int64) *RoleCredentials {
- s.Expiration = &v
- return s
-}
-
-// SetSecretAccessKey sets the SecretAccessKey field's value.
-func (s *RoleCredentials) SetSecretAccessKey(v string) *RoleCredentials {
- s.SecretAccessKey = &v
- return s
-}
-
-// SetSessionToken sets the SessionToken field's value.
-func (s *RoleCredentials) SetSessionToken(v string) *RoleCredentials {
- s.SessionToken = &v
- return s
-}
-
-// Provides information about the role that is assigned to the user.
-type RoleInfo struct {
- _ struct{} `type:"structure"`
-
- // The identifier of the AWS account assigned to the user.
- AccountId *string `locationName:"accountId" type:"string"`
-
- // The friendly name of the role that is assigned to the user.
- RoleName *string `locationName:"roleName" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RoleInfo) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RoleInfo) GoString() string {
- return s.String()
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *RoleInfo) SetAccountId(v string) *RoleInfo {
- s.AccountId = &v
- return s
-}
-
-// SetRoleName sets the RoleName field's value.
-func (s *RoleInfo) SetRoleName(v string) *RoleInfo {
- s.RoleName = &v
- return s
-}
-
-// Indicates that the request is being made too frequently and is more than
-// what the server can handle.
-type TooManyRequestsException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TooManyRequestsException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TooManyRequestsException) GoString() string {
- return s.String()
-}
-
-func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error {
- return &TooManyRequestsException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *TooManyRequestsException) Code() string {
- return "TooManyRequestsException"
-}
-
-// Message returns the exception's message.
-func (s *TooManyRequestsException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *TooManyRequestsException) OrigErr() error {
- return nil
-}
-
-func (s *TooManyRequestsException) 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 *TooManyRequestsException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *TooManyRequestsException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Indicates that the request is not authorized. This can happen due to an invalid
-// access token in the request.
-type UnauthorizedException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UnauthorizedException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UnauthorizedException) GoString() string {
- return s.String()
-}
-
-func newErrorUnauthorizedException(v protocol.ResponseMetadata) error {
- return &UnauthorizedException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *UnauthorizedException) Code() string {
- return "UnauthorizedException"
-}
-
-// Message returns the exception's message.
-func (s *UnauthorizedException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *UnauthorizedException) OrigErr() error {
- return nil
-}
-
-func (s *UnauthorizedException) 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 *UnauthorizedException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *UnauthorizedException) RequestID() string {
- return s.RespMetadata.RequestID
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sso/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sso/doc.go
deleted file mode 100644
index 15e61a322..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sso/doc.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package sso provides the client and types for making API
-// requests to AWS Single Sign-On.
-//
-// AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web
-// service that makes it easy for you to assign user access to IAM Identity
-// Center resources such as the AWS access portal. Users can get AWS account
-// applications and roles assigned to them and get federated into the application.
-//
-// Although AWS Single Sign-On was renamed, the sso and identitystore API namespaces
-// will continue to retain their original name for backward compatibility purposes.
-// For more information, see IAM Identity Center rename (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed).
-//
-// This reference guide describes the IAM Identity Center Portal operations
-// that you can call programatically and includes detailed information on data
-// types and errors.
-//
-// AWS provides SDKs that consist of libraries and sample code for various programming
-// languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs
-// provide a convenient way to create programmatic access to IAM Identity Center
-// and other AWS services. For more information about the AWS SDKs, including
-// how to download and install them, see Tools for Amazon Web Services (http://aws.amazon.com/tools/).
-//
-// See https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10 for more information on this service.
-//
-// See sso package documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/sso/
-//
-// # Using the Client
-//
-// To contact AWS Single Sign-On with the SDK use the New function to create
-// a new service client. With that client you can make API requests to the service.
-// These clients are safe to use concurrently.
-//
-// See the SDK's documentation for more information on how to use the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/
-//
-// See aws.Config documentation for more information on configuring SDK clients.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
-//
-// See the AWS Single Sign-On client SSO for more
-// information on creating client for this service.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/sso/#New
-package sso
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sso/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sso/errors.go
deleted file mode 100644
index 77a6792e3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sso/errors.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package sso
-
-import (
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-const (
-
- // ErrCodeInvalidRequestException for service response error code
- // "InvalidRequestException".
- //
- // Indicates that a problem occurred with the input to the request. For example,
- // a required parameter might be missing or out of range.
- ErrCodeInvalidRequestException = "InvalidRequestException"
-
- // ErrCodeResourceNotFoundException for service response error code
- // "ResourceNotFoundException".
- //
- // The specified resource doesn't exist.
- ErrCodeResourceNotFoundException = "ResourceNotFoundException"
-
- // ErrCodeTooManyRequestsException for service response error code
- // "TooManyRequestsException".
- //
- // Indicates that the request is being made too frequently and is more than
- // what the server can handle.
- ErrCodeTooManyRequestsException = "TooManyRequestsException"
-
- // ErrCodeUnauthorizedException for service response error code
- // "UnauthorizedException".
- //
- // Indicates that the request is not authorized. This can happen due to an invalid
- // access token in the request.
- ErrCodeUnauthorizedException = "UnauthorizedException"
-)
-
-var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
- "InvalidRequestException": newErrorInvalidRequestException,
- "ResourceNotFoundException": newErrorResourceNotFoundException,
- "TooManyRequestsException": newErrorTooManyRequestsException,
- "UnauthorizedException": newErrorUnauthorizedException,
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sso/service.go b/vendor/github.com/aws/aws-sdk-go/service/sso/service.go
deleted file mode 100644
index 7094cfe41..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sso/service.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package sso
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/signer/v4"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/restjson"
-)
-
-// SSO provides the API operation methods for making requests to
-// AWS Single Sign-On. See this package's package overview docs
-// for details on the service.
-//
-// SSO methods are safe to use concurrently. It is not safe to
-// modify mutate any of the struct's properties though.
-type SSO struct {
- *client.Client
-}
-
-// Used for custom client initialization logic
-var initClient func(*client.Client)
-
-// Used for custom request initialization logic
-var initRequest func(*request.Request)
-
-// Service information constants
-const (
- ServiceName = "SSO" // Name of service.
- EndpointsID = "portal.sso" // ID to lookup a service endpoint with.
- ServiceID = "SSO" // ServiceID is a unique identifier of a specific service.
-)
-
-// New creates a new instance of the SSO client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-//
-// mySession := session.Must(session.NewSession())
-//
-// // Create a SSO client from just a session.
-// svc := sso.New(mySession)
-//
-// // Create a SSO client with additional configuration
-// svc := sso.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func New(p client.ConfigProvider, cfgs ...*aws.Config) *SSO {
- c := p.ClientConfig(EndpointsID, cfgs...)
- if c.SigningNameDerived || len(c.SigningName) == 0 {
- c.SigningName = "awsssoportal"
- }
- return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *SSO {
- svc := &SSO{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: ServiceName,
- ServiceID: ServiceID,
- SigningName: signingName,
- SigningRegion: signingRegion,
- PartitionID: partitionID,
- Endpoint: endpoint,
- APIVersion: "2019-06-10",
- ResolvedRegion: resolvedRegion,
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(
- protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
- )
-
- // Run custom client initialization if present
- if initClient != nil {
- initClient(svc.Client)
- }
-
- return svc
-}
-
-// newRequest creates a new request for a SSO operation and runs any
-// custom request initialization.
-func (c *SSO) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- // Run custom request initialization if present
- if initRequest != nil {
- initRequest(req)
- }
-
- return req
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sso/ssoiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/sso/ssoiface/interface.go
deleted file mode 100644
index 818cab7cd..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sso/ssoiface/interface.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package ssoiface provides an interface to enable mocking the AWS Single Sign-On service client
-// for testing your code.
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters.
-package ssoiface
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/service/sso"
-)
-
-// SSOAPI provides an interface to enable mocking the
-// sso.SSO service client's API operation,
-// paginators, and waiters. This make unit testing your code that calls out
-// to the SDK's service client's calls easier.
-//
-// The best way to use this interface is so the SDK's service client's calls
-// can be stubbed out for unit testing your code with the SDK without needing
-// to inject custom request handlers into the SDK's request pipeline.
-//
-// // myFunc uses an SDK service client to make a request to
-// // AWS Single Sign-On.
-// func myFunc(svc ssoiface.SSOAPI) bool {
-// // Make svc.GetRoleCredentials request
-// }
-//
-// func main() {
-// sess := session.New()
-// svc := sso.New(sess)
-//
-// myFunc(svc)
-// }
-//
-// In your _test.go file:
-//
-// // Define a mock struct to be used in your unit tests of myFunc.
-// type mockSSOClient struct {
-// ssoiface.SSOAPI
-// }
-// func (m *mockSSOClient) GetRoleCredentials(input *sso.GetRoleCredentialsInput) (*sso.GetRoleCredentialsOutput, error) {
-// // mock response/functionality
-// }
-//
-// func TestMyFunc(t *testing.T) {
-// // Setup Test
-// mockSvc := &mockSSOClient{}
-//
-// myfunc(mockSvc)
-//
-// // Verify myFunc's functionality
-// }
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters. Its suggested to use the pattern above for testing, or using
-// tooling to generate mocks to satisfy the interfaces.
-type SSOAPI interface {
- GetRoleCredentials(*sso.GetRoleCredentialsInput) (*sso.GetRoleCredentialsOutput, error)
- GetRoleCredentialsWithContext(aws.Context, *sso.GetRoleCredentialsInput, ...request.Option) (*sso.GetRoleCredentialsOutput, error)
- GetRoleCredentialsRequest(*sso.GetRoleCredentialsInput) (*request.Request, *sso.GetRoleCredentialsOutput)
-
- ListAccountRoles(*sso.ListAccountRolesInput) (*sso.ListAccountRolesOutput, error)
- ListAccountRolesWithContext(aws.Context, *sso.ListAccountRolesInput, ...request.Option) (*sso.ListAccountRolesOutput, error)
- ListAccountRolesRequest(*sso.ListAccountRolesInput) (*request.Request, *sso.ListAccountRolesOutput)
-
- ListAccountRolesPages(*sso.ListAccountRolesInput, func(*sso.ListAccountRolesOutput, bool) bool) error
- ListAccountRolesPagesWithContext(aws.Context, *sso.ListAccountRolesInput, func(*sso.ListAccountRolesOutput, bool) bool, ...request.Option) error
-
- ListAccounts(*sso.ListAccountsInput) (*sso.ListAccountsOutput, error)
- ListAccountsWithContext(aws.Context, *sso.ListAccountsInput, ...request.Option) (*sso.ListAccountsOutput, error)
- ListAccountsRequest(*sso.ListAccountsInput) (*request.Request, *sso.ListAccountsOutput)
-
- ListAccountsPages(*sso.ListAccountsInput, func(*sso.ListAccountsOutput, bool) bool) error
- ListAccountsPagesWithContext(aws.Context, *sso.ListAccountsInput, func(*sso.ListAccountsOutput, bool) bool, ...request.Option) error
-
- Logout(*sso.LogoutInput) (*sso.LogoutOutput, error)
- LogoutWithContext(aws.Context, *sso.LogoutInput, ...request.Option) (*sso.LogoutOutput, error)
- LogoutRequest(*sso.LogoutInput) (*request.Request, *sso.LogoutOutput)
-}
-
-var _ SSOAPI = (*sso.SSO)(nil)
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
deleted file mode 100644
index 2b7e675ab..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
+++ /dev/null
@@ -1,3441 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package sts
-
-import (
- "fmt"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-const opAssumeRole = "AssumeRole"
-
-// AssumeRoleRequest generates a "aws/request.Request" representing the
-// client's request for the AssumeRole 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 AssumeRole for more information on using the AssumeRole
-// 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 AssumeRoleRequest method.
-// req, resp := client.AssumeRoleRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole
-func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, output *AssumeRoleOutput) {
- op := &request.Operation{
- Name: opAssumeRole,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AssumeRoleInput{}
- }
-
- output = &AssumeRoleOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// AssumeRole API operation for AWS Security Token Service.
-//
-// Returns a set of temporary security credentials that you can use to access
-// Amazon Web Services resources that you might not normally have access to.
-// These temporary credentials consist of an access key ID, a secret access
-// key, and a security token. Typically, you use AssumeRole within your account
-// or for cross-account access. For a comparison of AssumeRole with other API
-// operations that produce temporary credentials, see Requesting Temporary Security
-// Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
-// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
-// in the IAM User Guide.
-//
-// # Permissions
-//
-// The temporary security credentials created by AssumeRole can be used to make
-// API calls to any Amazon Web Services service with the following exception:
-// You cannot call the Amazon Web Services STS GetFederationToken or GetSessionToken
-// API operations.
-//
-// (Optional) You can pass inline or managed session policies (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 plaintext that you use for both inline
-// 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
-// Amazon Web Services 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.
-//
-// When you create a role, you create two policies: A role trust policy that
-// specifies who can assume the role and a permissions policy that specifies
-// what can be done with the role. You specify the trusted principal who is
-// allowed to assume the role in the role trust policy.
-//
-// To assume a role from a different account, your Amazon Web Services account
-// must be trusted by the role. The trust relationship is defined in the role's
-// trust policy when the role is created. That trust policy states which accounts
-// are allowed to delegate that access to users in the account.
-//
-// A user who wants to access a role in a different account must also have permissions
-// that are delegated from the user account administrator. The administrator
-// must attach a policy that allows the user to call AssumeRole for the ARN
-// of the role in the other account.
-//
-// To allow a user to assume a role in the same account, you can do either of
-// the following:
-//
-// - Attach a policy to the user that allows the user to call AssumeRole
-// (as long as the role's trust policy trusts the account).
-//
-// - Add the user as a principal directly in the role's trust policy.
-//
-// You can do either because the role’s trust policy acts as an IAM resource-based
-// policy. When a resource-based policy grants access to a principal in the
-// same account, no additional identity-based policy is required. For more information
-// about trust policies and resource-based policies, 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
-// when you call AssumeRole. This is useful for cross-account scenarios to ensure
-// that the user that assumes the role has been authenticated with an Amazon
-// Web Services MFA device. In that scenario, the trust policy of the role being
-// assumed includes a condition that tests for MFA authentication. If the caller
-// does not include valid MFA information, the request to assume the role is
-// denied. The condition in a trust policy that tests for MFA authentication
-// might look like the following example.
-//
-// "Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}
-//
-// For more information, see Configuring MFA-Protected API Access (https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html)
-// in the IAM User Guide guide.
-//
-// To use MFA with AssumeRole, you pass values for the SerialNumber and TokenCode
-// parameters. The SerialNumber value identifies the user's hardware or virtual
-// MFA device. The TokenCode is the time-based one-time password (TOTP) that
-// the MFA device produces.
-//
-// Returns awserr.Error for 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 Security Token Service's
-// API operation AssumeRole for usage and error information.
-//
-// Returned Error Codes:
-//
-// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
-// The request was rejected because the policy document was malformed. The error
-// message describes the specific error.
-//
-// - ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
-// The request was rejected because the total packed size of the session policies
-// and session tags combined was too large. An Amazon Web Services 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/reference_iam-quotas.html#reference_iam-limits-entity-length)
-// in the IAM User Guide.
-//
-// - ErrCodeRegionDisabledException "RegionDisabledException"
-// STS is not activated in the requested region for the account that is being
-// asked to generate credentials. The account administrator must use the IAM
-// console to activate STS in that region. For more information, see Activating
-// and Deactivating Amazon Web Services STS in an Amazon Web Services Region
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
-// in the IAM User Guide.
-//
-// - ErrCodeExpiredTokenException "ExpiredTokenException"
-// The web identity token that was passed is expired or is not valid. Get a
-// new identity token from the identity provider and then retry the request.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole
-func (c *STS) AssumeRole(input *AssumeRoleInput) (*AssumeRoleOutput, error) {
- req, out := c.AssumeRoleRequest(input)
- return out, req.Send()
-}
-
-// AssumeRoleWithContext is the same as AssumeRole with the addition of
-// the ability to pass a context and additional request options.
-//
-// See AssumeRole 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 *STS) AssumeRoleWithContext(ctx aws.Context, input *AssumeRoleInput, opts ...request.Option) (*AssumeRoleOutput, error) {
- req, out := c.AssumeRoleRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opAssumeRoleWithSAML = "AssumeRoleWithSAML"
-
-// AssumeRoleWithSAMLRequest generates a "aws/request.Request" representing the
-// client's request for the AssumeRoleWithSAML 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 AssumeRoleWithSAML for more information on using the AssumeRoleWithSAML
-// 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 AssumeRoleWithSAMLRequest method.
-// req, resp := client.AssumeRoleWithSAMLRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML
-func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *request.Request, output *AssumeRoleWithSAMLOutput) {
- op := &request.Operation{
- Name: opAssumeRoleWithSAML,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AssumeRoleWithSAMLInput{}
- }
-
- output = &AssumeRoleWithSAMLOutput{}
- req = c.newRequest(op, input, output)
- req.Config.Credentials = credentials.AnonymousCredentials
- return
-}
-
-// AssumeRoleWithSAML API operation for AWS Security Token Service.
-//
-// Returns a set of temporary security credentials for users who have been authenticated
-// via a SAML authentication response. This operation provides a mechanism for
-// tying an enterprise identity store or directory to role-based Amazon Web
-// Services access without user-specific credentials or configuration. For a
-// comparison of AssumeRoleWithSAML with the other API operations that produce
-// temporary credentials, see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
-// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
-// in the IAM User Guide.
-//
-// The temporary security credentials returned by this operation consist of
-// an access key ID, a secret access key, and a security token. Applications
-// can use these temporary security credentials to sign calls to Amazon Web
-// Services 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
-// duration that you specify, or until the time specified in the SAML authentication
-// response's SessionNotOnOrAfter value, whichever is shorter. You can provide
-// a DurationSeconds value from 900 seconds (15 minutes) up to the maximum session
-// duration setting for the role. This setting can have a value from 1 hour
-// to 12 hours. To learn how to view the maximum value for your role, see View
-// the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
-// in the IAM User Guide. The maximum session duration limit applies when you
-// use the AssumeRole* API operations or the assume-role* CLI commands. However
-// the limit does not apply when you use those operations to create a console
-// 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.
-//
-// Role chaining (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining)
-// limits your CLI or Amazon Web Services API role session to a maximum of one
-// hour. When you use the AssumeRole API operation to assume a role, you can
-// specify the duration of your role session with the DurationSeconds parameter.
-// You can specify a parameter value of up to 43200 seconds (12 hours), depending
-// on the maximum session duration setting for your role. However, if you assume
-// a role using role chaining and provide a DurationSeconds parameter value
-// greater than one hour, the operation fails.
-//
-// # Permissions
-//
-// The temporary security credentials created by AssumeRoleWithSAML can be used
-// to make API calls to any Amazon Web Services service with the following exception:
-// you cannot call the STS GetFederationToken or GetSessionToken API operations.
-//
-// (Optional) You can pass inline or managed session policies (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 plaintext that you use for both inline
-// 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
-// Amazon Web Services 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.
-//
-// Calling AssumeRoleWithSAML does not require the use of Amazon Web Services
-// 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.
-//
-// Calling AssumeRoleWithSAML can result in an entry in your 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).
-//
-// # 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 plaintext 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 Amazon Web Services 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 plaintext 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 Amazon Web Services.
-// Additionally, you must use Identity and Access Management (IAM) to create
-// a SAML provider entity in your Amazon Web Services 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:
-//
-// - About SAML 2.0-based Federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html)
-// in the IAM User Guide.
-//
-// - Creating SAML Identity Providers (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html)
-// in the IAM User Guide.
-//
-// - Configuring a Relying Party and Claims (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html)
-// in the IAM User Guide.
-//
-// - Creating a Role for SAML 2.0 Federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.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.
-//
-// See the AWS API reference guide for AWS Security Token Service's
-// API operation AssumeRoleWithSAML for usage and error information.
-//
-// Returned Error Codes:
-//
-// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
-// The request was rejected because the policy document was malformed. The error
-// message describes the specific error.
-//
-// - ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
-// The request was rejected because the total packed size of the session policies
-// and session tags combined was too large. An Amazon Web Services 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/reference_iam-quotas.html#reference_iam-limits-entity-length)
-// in the IAM User Guide.
-//
-// - ErrCodeIDPRejectedClaimException "IDPRejectedClaim"
-// The identity provider (IdP) reported that authentication failed. This might
-// be because the claim is invalid.
-//
-// If this error is returned for the AssumeRoleWithWebIdentity operation, it
-// can also mean that the claim has expired or has been explicitly revoked.
-//
-// - ErrCodeInvalidIdentityTokenException "InvalidIdentityToken"
-// The web identity token that was passed could not be validated by Amazon Web
-// Services. Get a new identity token from the identity provider and then retry
-// the request.
-//
-// - ErrCodeExpiredTokenException "ExpiredTokenException"
-// The web identity token that was passed is expired or is not valid. Get a
-// new identity token from the identity provider and then retry the request.
-//
-// - ErrCodeRegionDisabledException "RegionDisabledException"
-// STS is not activated in the requested region for the account that is being
-// asked to generate credentials. The account administrator must use the IAM
-// console to activate STS in that region. For more information, see Activating
-// and Deactivating Amazon Web Services STS in an Amazon Web Services Region
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
-// in the IAM User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML
-func (c *STS) AssumeRoleWithSAML(input *AssumeRoleWithSAMLInput) (*AssumeRoleWithSAMLOutput, error) {
- req, out := c.AssumeRoleWithSAMLRequest(input)
- return out, req.Send()
-}
-
-// AssumeRoleWithSAMLWithContext is the same as AssumeRoleWithSAML with the addition of
-// the ability to pass a context and additional request options.
-//
-// See AssumeRoleWithSAML 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 *STS) AssumeRoleWithSAMLWithContext(ctx aws.Context, input *AssumeRoleWithSAMLInput, opts ...request.Option) (*AssumeRoleWithSAMLOutput, error) {
- req, out := c.AssumeRoleWithSAMLRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity"
-
-// AssumeRoleWithWebIdentityRequest generates a "aws/request.Request" representing the
-// client's request for the AssumeRoleWithWebIdentity 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 AssumeRoleWithWebIdentity for more information on using the AssumeRoleWithWebIdentity
-// 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 AssumeRoleWithWebIdentityRequest method.
-// req, resp := client.AssumeRoleWithWebIdentityRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity
-func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityInput) (req *request.Request, output *AssumeRoleWithWebIdentityOutput) {
- op := &request.Operation{
- Name: opAssumeRoleWithWebIdentity,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AssumeRoleWithWebIdentityInput{}
- }
-
- output = &AssumeRoleWithWebIdentityOutput{}
- req = c.newRequest(op, input, output)
- req.Config.Credentials = credentials.AnonymousCredentials
- return
-}
-
-// AssumeRoleWithWebIdentity API operation for AWS Security Token Service.
-//
-// Returns a set of temporary security credentials for users who have been authenticated
-// in a mobile or web application with a web identity provider. Example providers
-// include the OAuth 2.0 providers Login with Amazon and Facebook, or any OpenID
-// Connect-compatible identity provider such as Google or Amazon Cognito federated
-// identities (https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html).
-//
-// For mobile applications, we recommend that you use Amazon Cognito. You can
-// use Amazon Cognito with the Amazon Web Services SDK for iOS Developer Guide
-// (http://aws.amazon.com/sdkforios/) and the Amazon Web Services SDK for Android
-// Developer Guide (http://aws.amazon.com/sdkforandroid/) to uniquely identify
-// a user. You can also supply the user with a consistent identity throughout
-// the lifetime of an application.
-//
-// To learn more about Amazon Cognito, see Amazon Cognito Overview (https://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-auth.html#d0e840)
-// in Amazon Web Services SDK for Android Developer Guide and Amazon Cognito
-// Overview (https://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664)
-// in the Amazon Web Services SDK for iOS Developer Guide.
-//
-// Calling AssumeRoleWithWebIdentity does not require the use of Amazon Web
-// Services security credentials. Therefore, you can distribute an application
-// (for example, on mobile devices) that requests temporary security credentials
-// without including long-term Amazon Web Services credentials in the application.
-// You also don't need to deploy server-based proxy services that use long-term
-// Amazon Web Services credentials. Instead, the identity of the caller is validated
-// by using a token from the web identity provider. For a comparison of AssumeRoleWithWebIdentity
-// with the other API operations that produce temporary credentials, see Requesting
-// Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
-// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
-// in the IAM User Guide.
-//
-// The temporary security credentials returned by this API consist of an access
-// key ID, a secret access key, and a security token. Applications can use these
-// temporary security credentials to sign calls to Amazon Web Services 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
-// seconds (15 minutes) up to the maximum session duration setting for the role.
-// This setting can have a value from 1 hour to 12 hours. To learn how to view
-// the maximum value for your role, see View the Maximum Session Duration Setting
-// for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
-// in the IAM User Guide. The maximum session duration limit applies when you
-// use the AssumeRole* API operations or the assume-role* CLI commands. However
-// the limit does not apply when you use those operations to create a console
-// 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 Amazon Web Services service with the following
-// exception: you cannot call the STS GetFederationToken or GetSessionToken
-// API operations.
-//
-// (Optional) You can pass inline or managed session policies (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 plaintext that you use for both inline
-// 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
-// Amazon Web Services 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.
-//
-// # 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 plaintext 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 Amazon Web Services 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 plaintext 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
-// the identity provider that is associated with the identity token. In other
-// words, the identity provider must be specified in the role's trust policy.
-//
-// Calling AssumeRoleWithWebIdentity can result in an entry in your CloudTrail
-// logs. The entry includes the Subject (http://openid.net/specs/openid-connect-core-1_0.html#Claims)
-// of the provided web identity token. We recommend that you avoid using any
-// personally identifiable information (PII) in this field. For example, you
-// could instead use a GUID or a pairwise identifier, as suggested in the OIDC
-// specification (http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes).
-//
-// For more information about how to use web identity federation and the AssumeRoleWithWebIdentity
-// API, see the following resources:
-//
-// - Using Web Identity Federation API Operations for Mobile Apps (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html)
-// and Federation Through a Web-based Identity Provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity).
-//
-// - Web Identity Federation Playground (https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/).
-// Walk through the process of authenticating through Login with Amazon,
-// Facebook, or Google, getting temporary security credentials, and then
-// using those credentials to make a request to Amazon Web Services.
-//
-// - Amazon Web Services SDK for iOS Developer Guide (http://aws.amazon.com/sdkforios/)
-// and Amazon Web Services SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/).
-// These toolkits contain sample apps that show how to invoke the identity
-// 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
-// how to use web identity federation to get access to content in Amazon
-// S3.
-//
-// Returns awserr.Error for 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 Security Token Service's
-// API operation AssumeRoleWithWebIdentity for usage and error information.
-//
-// Returned Error Codes:
-//
-// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
-// The request was rejected because the policy document was malformed. The error
-// message describes the specific error.
-//
-// - ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
-// The request was rejected because the total packed size of the session policies
-// and session tags combined was too large. An Amazon Web Services 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/reference_iam-quotas.html#reference_iam-limits-entity-length)
-// in the IAM User Guide.
-//
-// - ErrCodeIDPRejectedClaimException "IDPRejectedClaim"
-// The identity provider (IdP) reported that authentication failed. This might
-// be because the claim is invalid.
-//
-// If this error is returned for the AssumeRoleWithWebIdentity operation, it
-// can also mean that the claim has expired or has been explicitly revoked.
-//
-// - ErrCodeIDPCommunicationErrorException "IDPCommunicationError"
-// 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 identity provider might be down or not responding.
-//
-// - ErrCodeInvalidIdentityTokenException "InvalidIdentityToken"
-// The web identity token that was passed could not be validated by Amazon Web
-// Services. Get a new identity token from the identity provider and then retry
-// the request.
-//
-// - ErrCodeExpiredTokenException "ExpiredTokenException"
-// The web identity token that was passed is expired or is not valid. Get a
-// new identity token from the identity provider and then retry the request.
-//
-// - ErrCodeRegionDisabledException "RegionDisabledException"
-// STS is not activated in the requested region for the account that is being
-// asked to generate credentials. The account administrator must use the IAM
-// console to activate STS in that region. For more information, see Activating
-// and Deactivating Amazon Web Services STS in an Amazon Web Services Region
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
-// in the IAM User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity
-func (c *STS) AssumeRoleWithWebIdentity(input *AssumeRoleWithWebIdentityInput) (*AssumeRoleWithWebIdentityOutput, error) {
- req, out := c.AssumeRoleWithWebIdentityRequest(input)
- return out, req.Send()
-}
-
-// AssumeRoleWithWebIdentityWithContext is the same as AssumeRoleWithWebIdentity with the addition of
-// the ability to pass a context and additional request options.
-//
-// See AssumeRoleWithWebIdentity 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 *STS) AssumeRoleWithWebIdentityWithContext(ctx aws.Context, input *AssumeRoleWithWebIdentityInput, opts ...request.Option) (*AssumeRoleWithWebIdentityOutput, error) {
- req, out := c.AssumeRoleWithWebIdentityRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage"
-
-// DecodeAuthorizationMessageRequest generates a "aws/request.Request" representing the
-// client's request for the DecodeAuthorizationMessage 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 DecodeAuthorizationMessage for more information on using the DecodeAuthorizationMessage
-// 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 DecodeAuthorizationMessageRequest method.
-// req, resp := client.DecodeAuthorizationMessageRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage
-func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessageInput) (req *request.Request, output *DecodeAuthorizationMessageOutput) {
- op := &request.Operation{
- Name: opDecodeAuthorizationMessage,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DecodeAuthorizationMessageInput{}
- }
-
- output = &DecodeAuthorizationMessageOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DecodeAuthorizationMessage API operation for AWS Security Token Service.
-//
-// Decodes additional information about the authorization status of a request
-// from an encoded message returned in response to an Amazon Web Services request.
-//
-// For example, if a user is not authorized to perform an operation that he
-// or she has requested, the request returns a Client.UnauthorizedOperation
-// response (an HTTP 403 response). Some Amazon Web Services operations additionally
-// return an encoded message that can provide details about this authorization
-// failure.
-//
-// Only certain Amazon Web Services operations return an encoded authorization
-// message. The documentation for an individual operation indicates whether
-// that operation returns an encoded message in addition to returning an HTTP
-// code.
-//
-// The message is encoded because the details of the authorization status can
-// contain privileged information that the user who requested the operation
-// should not see. To decode an authorization status message, a user must be
-// granted permissions through an IAM policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)
-// to request the DecodeAuthorizationMessage (sts:DecodeAuthorizationMessage)
-// action.
-//
-// The decoded message includes the following type of information:
-//
-// - Whether the request was denied due to an explicit deny or due to the
-// absence of an explicit allow. For more information, see Determining Whether
-// a Request is Allowed or Denied (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow)
-// in the IAM User Guide.
-//
-// - The principal who made the request.
-//
-// - The requested action.
-//
-// - The requested resource.
-//
-// - The values of condition keys in the context of the user's 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 Security Token Service's
-// API operation DecodeAuthorizationMessage for usage and error information.
-//
-// Returned Error Codes:
-// - ErrCodeInvalidAuthorizationMessageException "InvalidAuthorizationMessageException"
-// The error returned if the message passed to DecodeAuthorizationMessage was
-// invalid. This can happen if the token contains invalid characters, such as
-// linebreaks.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage
-func (c *STS) DecodeAuthorizationMessage(input *DecodeAuthorizationMessageInput) (*DecodeAuthorizationMessageOutput, error) {
- req, out := c.DecodeAuthorizationMessageRequest(input)
- return out, req.Send()
-}
-
-// DecodeAuthorizationMessageWithContext is the same as DecodeAuthorizationMessage with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DecodeAuthorizationMessage 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 *STS) DecodeAuthorizationMessageWithContext(ctx aws.Context, input *DecodeAuthorizationMessageInput, opts ...request.Option) (*DecodeAuthorizationMessageOutput, error) {
- req, out := c.DecodeAuthorizationMessageRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetAccessKeyInfo = "GetAccessKeyInfo"
-
-// GetAccessKeyInfoRequest generates a "aws/request.Request" representing the
-// client's request for the GetAccessKeyInfo 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 GetAccessKeyInfo for more information on using the GetAccessKeyInfo
-// 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 GetAccessKeyInfoRequest method.
-// req, resp := client.GetAccessKeyInfoRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetAccessKeyInfo
-func (c *STS) GetAccessKeyInfoRequest(input *GetAccessKeyInfoInput) (req *request.Request, output *GetAccessKeyInfoOutput) {
- op := &request.Operation{
- Name: opGetAccessKeyInfo,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetAccessKeyInfoInput{}
- }
-
- output = &GetAccessKeyInfoOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetAccessKeyInfo API operation for AWS Security Token Service.
-//
-// Returns the account identifier for the specified access key ID.
-//
-// Access keys consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE)
-// and a secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY).
-// For more information about access keys, see Managing Access Keys for IAM
-// Users (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)
-// in the IAM User Guide.
-//
-// When you pass an access key ID to this operation, it returns the ID of the
-// Amazon Web Services account to which the keys belong. Access key IDs beginning
-// with AKIA are long-term credentials for an IAM user or the Amazon Web Services
-// account root user. Access key IDs beginning with ASIA are temporary credentials
-// that are created using STS operations. If the account in the response belongs
-// to you, you can sign in as the root user and review your root user access
-// keys. Then, you can 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)
-// 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
-// perform an operation. Providing a deleted access key might return an error
-// that the key doesn't exist.
-//
-// Returns awserr.Error for 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 Security Token Service's
-// API operation GetAccessKeyInfo for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetAccessKeyInfo
-func (c *STS) GetAccessKeyInfo(input *GetAccessKeyInfoInput) (*GetAccessKeyInfoOutput, error) {
- req, out := c.GetAccessKeyInfoRequest(input)
- return out, req.Send()
-}
-
-// GetAccessKeyInfoWithContext is the same as GetAccessKeyInfo with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetAccessKeyInfo 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 *STS) GetAccessKeyInfoWithContext(ctx aws.Context, input *GetAccessKeyInfoInput, opts ...request.Option) (*GetAccessKeyInfoOutput, error) {
- req, out := c.GetAccessKeyInfoRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetCallerIdentity = "GetCallerIdentity"
-
-// GetCallerIdentityRequest generates a "aws/request.Request" representing the
-// client's request for the GetCallerIdentity 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 GetCallerIdentity for more information on using the GetCallerIdentity
-// 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 GetCallerIdentityRequest method.
-// req, resp := client.GetCallerIdentityRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity
-func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (req *request.Request, output *GetCallerIdentityOutput) {
- op := &request.Operation{
- Name: opGetCallerIdentity,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetCallerIdentityInput{}
- }
-
- output = &GetCallerIdentityOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetCallerIdentity API operation for AWS Security Token Service.
-//
-// Returns details about the IAM user or role whose credentials are used to
-// call the operation.
-//
-// No permissions are required to perform this operation. If an administrator
-// adds a policy to your IAM user or role that explicitly denies access to the
-// 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)
-// in the IAM User Guide.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Security Token Service's
-// API operation GetCallerIdentity for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity
-func (c *STS) GetCallerIdentity(input *GetCallerIdentityInput) (*GetCallerIdentityOutput, error) {
- req, out := c.GetCallerIdentityRequest(input)
- return out, req.Send()
-}
-
-// GetCallerIdentityWithContext is the same as GetCallerIdentity with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetCallerIdentity 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 *STS) GetCallerIdentityWithContext(ctx aws.Context, input *GetCallerIdentityInput, opts ...request.Option) (*GetCallerIdentityOutput, error) {
- req, out := c.GetCallerIdentityRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetFederationToken = "GetFederationToken"
-
-// GetFederationTokenRequest generates a "aws/request.Request" representing the
-// client's request for the GetFederationToken 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 GetFederationToken for more information on using the GetFederationToken
-// 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 GetFederationTokenRequest method.
-// req, resp := client.GetFederationTokenRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken
-func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *request.Request, output *GetFederationTokenOutput) {
- op := &request.Operation{
- Name: opGetFederationToken,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetFederationTokenInput{}
- }
-
- output = &GetFederationTokenOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetFederationToken API operation for AWS Security Token Service.
-//
-// Returns a set of temporary security credentials (consisting of an access
-// key ID, a secret access key, and a security token) for a federated user.
-// A typical use is in a proxy application that gets temporary security credentials
-// on behalf of distributed applications inside a corporate network. You must
-// call the GetFederationToken operation using the long-term security credentials
-// of an IAM user. As a result, this call is appropriate in contexts where those
-// credentials can be safely stored, usually in a server-based application.
-// For a comparison of GetFederationToken with the other API operations that
-// produce temporary credentials, see Requesting Temporary Security Credentials
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
-// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
-// in the IAM User Guide.
-//
-// You can create a mobile-based or browser-based app that can authenticate
-// users using a web identity provider like Login with Amazon, Facebook, Google,
-// 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)
-// in the IAM User Guide.
-//
-// You can also call GetFederationToken using the security credentials of an
-// Amazon Web Services account root user, but we do not recommend it. Instead,
-// we recommend that you create an IAM user for the purpose of the proxy application.
-// Then attach a policy to the IAM user that limits federated users to only
-// the actions and resources that they need to access. For more information,
-// see IAM Best 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
-// session duration is 43,200 seconds (12 hours). Temporary credentials obtained
-// by using the Amazon Web Services account root user credentials have a maximum
-// duration of 3,600 seconds (1 hour).
-//
-// # Permissions
-//
-// You can use the temporary credentials created by GetFederationToken in any
-// Amazon Web Services service except the following:
-//
-// - You cannot call any IAM operations using the CLI or the Amazon Web Services
-// API.
-//
-// - 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 plaintext that you use for both inline
-// 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. 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.
-//
-// You can create a mobile-based or browser-based app that can authenticate
-// users using a web identity provider like Login with Amazon, Facebook, Google,
-// 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)
-// 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.
-//
-// See the AWS API reference guide for AWS Security Token Service's
-// API operation GetFederationToken for usage and error information.
-//
-// Returned Error Codes:
-//
-// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
-// The request was rejected because the policy document was malformed. The error
-// message describes the specific error.
-//
-// - ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
-// The request was rejected because the total packed size of the session policies
-// and session tags combined was too large. An Amazon Web Services 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/reference_iam-quotas.html#reference_iam-limits-entity-length)
-// in the IAM User Guide.
-//
-// - ErrCodeRegionDisabledException "RegionDisabledException"
-// STS is not activated in the requested region for the account that is being
-// asked to generate credentials. The account administrator must use the IAM
-// console to activate STS in that region. For more information, see Activating
-// and Deactivating Amazon Web Services STS in an Amazon Web Services Region
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
-// in the IAM User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken
-func (c *STS) GetFederationToken(input *GetFederationTokenInput) (*GetFederationTokenOutput, error) {
- req, out := c.GetFederationTokenRequest(input)
- return out, req.Send()
-}
-
-// GetFederationTokenWithContext is the same as GetFederationToken with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetFederationToken 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 *STS) GetFederationTokenWithContext(ctx aws.Context, input *GetFederationTokenInput, opts ...request.Option) (*GetFederationTokenOutput, error) {
- req, out := c.GetFederationTokenRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetSessionToken = "GetSessionToken"
-
-// GetSessionTokenRequest generates a "aws/request.Request" representing the
-// client's request for the GetSessionToken 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 GetSessionToken for more information on using the GetSessionToken
-// 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 GetSessionTokenRequest method.
-// req, resp := client.GetSessionTokenRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken
-func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.Request, output *GetSessionTokenOutput) {
- op := &request.Operation{
- Name: opGetSessionToken,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetSessionTokenInput{}
- }
-
- output = &GetSessionTokenOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetSessionToken API operation for AWS Security Token Service.
-//
-// Returns a set of temporary credentials for an Amazon Web Services account
-// or IAM user. The credentials consist of an access key ID, a secret access
-// key, and a security token. Typically, you use GetSessionToken if you want
-// to use MFA to protect programmatic calls to specific Amazon Web Services
-// API operations like Amazon EC2 StopInstances. MFA-enabled IAM users would
-// need to call GetSessionToken and submit an MFA code that is associated with
-// their MFA device. Using the temporary security credentials that are returned
-// from the call, IAM users can then make programmatic calls to API operations
-// that require MFA authentication. If you do not supply a correct MFA code,
-// then the API returns an access denied error. For a comparison of GetSessionToken
-// with the other API operations that produce temporary credentials, see Requesting
-// Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
-// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
-// in the IAM User Guide.
-//
-// No permissions are required for users to perform this operation. The purpose
-// of the sts:GetSessionToken operation is to authenticate the user using MFA.
-// You cannot use policies to control authentication operations. For more information,
-// see Permissions for GetSessionToken (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html)
-// in the IAM User Guide.
-//
-// # Session Duration
-//
-// The GetSessionToken operation must be called by using the long-term Amazon
-// Web Services security credentials of the Amazon Web Services account root
-// user or an IAM user. Credentials that are created by IAM users are valid
-// for the duration that you specify. This duration can range from 900 seconds
-// (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default
-// of 43,200 seconds (12 hours). Credentials 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 Amazon Web Services service with the following exceptions:
-//
-// - You cannot call any IAM API operations unless MFA authentication information
-// is included in the request.
-//
-// - You cannot call any STS API except AssumeRole or GetCallerIdentity.
-//
-// We recommend that you do not call GetSessionToken with Amazon Web Services
-// account root user credentials. Instead, follow our best practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users)
-// by creating one or more IAM users, giving them the necessary permissions,
-// and using IAM users for everyday interaction with Amazon Web Services.
-//
-// The credentials that are returned by GetSessionToken are based on permissions
-// associated with the user whose credentials were used to call the operation.
-// If GetSessionToken is called using Amazon Web Services account root user
-// credentials, the temporary credentials have root user permissions. Similarly,
-// if GetSessionToken is called using the credentials of an IAM user, the temporary
-// credentials have the same permissions as the IAM user.
-//
-// For more information about using GetSessionToken to create temporary credentials,
-// go to Temporary Credentials for Users in Untrusted Environments (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken)
-// in the IAM User Guide.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Security Token Service's
-// API operation GetSessionToken for usage and error information.
-//
-// Returned Error Codes:
-// - ErrCodeRegionDisabledException "RegionDisabledException"
-// STS is not activated in the requested region for the account that is being
-// asked to generate credentials. The account administrator must use the IAM
-// console to activate STS in that region. For more information, see Activating
-// and Deactivating Amazon Web Services STS in an Amazon Web Services Region
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
-// in the IAM User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken
-func (c *STS) GetSessionToken(input *GetSessionTokenInput) (*GetSessionTokenOutput, error) {
- req, out := c.GetSessionTokenRequest(input)
- return out, req.Send()
-}
-
-// GetSessionTokenWithContext is the same as GetSessionToken with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetSessionToken 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 *STS) GetSessionTokenWithContext(ctx aws.Context, input *GetSessionTokenInput, opts ...request.Option) (*GetSessionTokenOutput, error) {
- req, out := c.GetSessionTokenRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-type AssumeRoleInput struct {
- _ struct{} `type:"structure"`
-
- // The duration, in seconds, of the role session. The value specified can range
- // from 900 seconds (15 minutes) up to the maximum session duration set for
- // the role. The maximum session duration setting can have a value from 1 hour
- // to 12 hours. If you specify a value higher than this setting or the administrator
- // setting (whichever is lower), the operation fails. For example, if you specify
- // a session duration of 12 hours, but your administrator set the maximum session
- // duration to 6 hours, your operation fails.
- //
- // Role chaining limits your Amazon Web Services CLI or Amazon Web Services
- // API role session to a maximum of one hour. When you use the AssumeRole API
- // operation to assume a role, you can specify the duration of your role session
- // with the DurationSeconds parameter. You can specify a parameter value of
- // up to 43200 seconds (12 hours), depending on the maximum session duration
- // setting for your role. However, if you assume a role using role chaining
- // and provide a DurationSeconds parameter value greater than one hour, the
- // operation fails. To learn how to view the maximum value for your role, see
- // View the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
- // in the IAM User Guide.
- //
- // By default, the value is set to 3600 seconds.
- //
- // The DurationSeconds parameter is separate from the duration of a console
- // session that you might request using the returned credentials. The request
- // to the federation endpoint for a console sign-in token takes a SessionDuration
- // parameter that specifies the maximum length of the console session. For more
- // information, see Creating a URL that Enables Federated Users to Access the
- // Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
- // in the IAM User Guide.
- DurationSeconds *int64 `min:"900" type:"integer"`
-
- // A unique identifier that might be required when you assume a role in another
- // account. If the administrator of the account to which the role belongs provided
- // you with an external ID, then provide that value in the ExternalId parameter.
- // This value can be any string, such as a passphrase or account number. A cross-account
- // role is usually set up to trust everyone in an account. Therefore, the administrator
- // of the trusting account might send an external ID to the administrator of
- // the trusted account. That way, only someone with the ID can assume the role,
- // rather than everyone in the account. For more information about the external
- // ID, see How to Use an External ID When Granting Access to Your Amazon Web
- // Services Resources to a Third Party (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html)
- // in the IAM User Guide.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@:/-
- ExternalId *string `min:"2" type:"string"`
-
- // An IAM policy in JSON format that you want to use as an inline session policy.
- //
- // This parameter is optional. 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 Amazon Web Services 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.
- //
- // The plaintext that you use for both inline and managed session policies 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.
- //
- // An Amazon Web Services 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 plaintext 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
- // 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 plaintext that you use for both inline and managed session policies
- // can't exceed 2,048 characters. For more information about ARNs, see Amazon
- // Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // in the Amazon Web Services General Reference.
- //
- // An Amazon Web Services 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 plaintext 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 Amazon Web Services 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 []*PolicyDescriptorType `type:"list"`
-
- // The Amazon Resource Name (ARN) of the role to assume.
- //
- // RoleArn is a required field
- RoleArn *string `min:"20" type:"string" required:"true"`
-
- // An identifier for the assumed role session.
- //
- // Use the role session name to uniquely identify a session when the same role
- // is assumed by different principals or for different reasons. In cross-account
- // scenarios, the role session name is visible to, and can be logged by the
- // account that owns the role. The role session name is also used in the ARN
- // of the assumed role principal. This means that subsequent cross-account API
- // requests that use the temporary security credentials will expose the role
- // session name to the external account in their CloudTrail logs.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
- //
- // RoleSessionName is a required field
- RoleSessionName *string `min:"2" type:"string" required:"true"`
-
- // 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.
- // The value is either the serial number for a hardware device (such as GAHT12345678)
- // or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
- SerialNumber *string `min:"9" type:"string"`
-
- // The source identity specified by the principal that is calling the AssumeRole
- // operation.
- //
- // You can require users to specify a source identity when they assume a role.
- // You do this by using the sts:SourceIdentity condition key in a role trust
- // policy. You can use source identity information in CloudTrail logs to determine
- // who took actions with a role. You can use the aws:SourceIdentity condition
- // key to further control access to Amazon Web Services resources based on the
- // value of source identity. For more information about using source identity,
- // see Monitor and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
- // in the IAM User Guide.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-. You cannot
- // use a value that begins with the text aws:. This prefix is reserved for Amazon
- // Web Services internal use.
- SourceIdentity *string `min:"2" 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 Amazon Web Services 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 plaintext
- // 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 Amazon Web Services 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 plaintext 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 CloudTrail logs.
- // For more information, see Viewing Session Tags in CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_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. (In other words, if the policy includes a condition
- // that tests for MFA). If the role being assumed requires MFA and if the TokenCode
- // value is missing or expired, the AssumeRole call returns an "access denied"
- // error.
- //
- // 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.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AssumeRoleInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AssumeRoleInput"}
- if s.DurationSeconds != nil && *s.DurationSeconds < 900 {
- invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900))
- }
- if s.ExternalId != nil && len(*s.ExternalId) < 2 {
- invalidParams.Add(request.NewErrParamMinLen("ExternalId", 2))
- }
- if s.Policy != nil && len(*s.Policy) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Policy", 1))
- }
- if s.RoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("RoleArn"))
- }
- if s.RoleArn != nil && len(*s.RoleArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20))
- }
- if s.RoleSessionName == nil {
- invalidParams.Add(request.NewErrParamRequired("RoleSessionName"))
- }
- if s.RoleSessionName != nil && len(*s.RoleSessionName) < 2 {
- invalidParams.Add(request.NewErrParamMinLen("RoleSessionName", 2))
- }
- if s.SerialNumber != nil && len(*s.SerialNumber) < 9 {
- invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9))
- }
- if s.SourceIdentity != nil && len(*s.SourceIdentity) < 2 {
- invalidParams.Add(request.NewErrParamMinLen("SourceIdentity", 2))
- }
- if s.TokenCode != nil && len(*s.TokenCode) < 6 {
- invalidParams.Add(request.NewErrParamMinLen("TokenCode", 6))
- }
- if s.PolicyArns != nil {
- for i, v := range s.PolicyArns {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PolicyArns", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDurationSeconds sets the DurationSeconds field's value.
-func (s *AssumeRoleInput) SetDurationSeconds(v int64) *AssumeRoleInput {
- s.DurationSeconds = &v
- return s
-}
-
-// SetExternalId sets the ExternalId field's value.
-func (s *AssumeRoleInput) SetExternalId(v string) *AssumeRoleInput {
- s.ExternalId = &v
- return s
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *AssumeRoleInput) SetPolicy(v string) *AssumeRoleInput {
- s.Policy = &v
- return s
-}
-
-// SetPolicyArns sets the PolicyArns field's value.
-func (s *AssumeRoleInput) SetPolicyArns(v []*PolicyDescriptorType) *AssumeRoleInput {
- s.PolicyArns = v
- return s
-}
-
-// SetRoleArn sets the RoleArn field's value.
-func (s *AssumeRoleInput) SetRoleArn(v string) *AssumeRoleInput {
- s.RoleArn = &v
- return s
-}
-
-// SetRoleSessionName sets the RoleSessionName field's value.
-func (s *AssumeRoleInput) SetRoleSessionName(v string) *AssumeRoleInput {
- s.RoleSessionName = &v
- return s
-}
-
-// SetSerialNumber sets the SerialNumber field's value.
-func (s *AssumeRoleInput) SetSerialNumber(v string) *AssumeRoleInput {
- s.SerialNumber = &v
- return s
-}
-
-// SetSourceIdentity sets the SourceIdentity field's value.
-func (s *AssumeRoleInput) SetSourceIdentity(v string) *AssumeRoleInput {
- s.SourceIdentity = &v
- 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
-// Amazon Web Services credentials that can be used to make Amazon Web Services
-// requests.
-type AssumeRoleOutput struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers
- // that you can use to refer to the resulting temporary security credentials.
- // For example, you can reference these credentials as a principal in a resource-based
- // policy by using the ARN or assumed role ID. The ARN and ID include the RoleSessionName
- // that you specified when you called AssumeRole.
- AssumedRoleUser *AssumedRoleUser `type:"structure"`
-
- // The temporary security credentials, which include an access key ID, a secret
- // access key, and a security (or session) token.
- //
- // The size of the security token that STS API operations return is not fixed.
- // We strongly recommend that you make no assumptions about the maximum size.
- Credentials *Credentials `type:"structure"`
-
- // 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 source identity specified by the principal that is calling the AssumeRole
- // operation.
- //
- // You can require users to specify a source identity when they assume a role.
- // You do this by using the sts:SourceIdentity condition key in a role trust
- // policy. You can use source identity information in CloudTrail logs to determine
- // who took actions with a role. You can use the aws:SourceIdentity condition
- // key to further control access to Amazon Web Services resources based on the
- // value of source identity. For more information about using source identity,
- // see Monitor and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
- // in the IAM User Guide.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
- SourceIdentity *string `min:"2" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleOutput) GoString() string {
- return s.String()
-}
-
-// SetAssumedRoleUser sets the AssumedRoleUser field's value.
-func (s *AssumeRoleOutput) SetAssumedRoleUser(v *AssumedRoleUser) *AssumeRoleOutput {
- s.AssumedRoleUser = v
- return s
-}
-
-// SetCredentials sets the Credentials field's value.
-func (s *AssumeRoleOutput) SetCredentials(v *Credentials) *AssumeRoleOutput {
- s.Credentials = v
- return s
-}
-
-// SetPackedPolicySize sets the PackedPolicySize field's value.
-func (s *AssumeRoleOutput) SetPackedPolicySize(v int64) *AssumeRoleOutput {
- s.PackedPolicySize = &v
- return s
-}
-
-// SetSourceIdentity sets the SourceIdentity field's value.
-func (s *AssumeRoleOutput) SetSourceIdentity(v string) *AssumeRoleOutput {
- s.SourceIdentity = &v
- return s
-}
-
-type AssumeRoleWithSAMLInput struct {
- _ struct{} `type:"structure"`
-
- // The duration, in seconds, of the role session. Your role session lasts for
- // the duration that you specify for the DurationSeconds parameter, or until
- // the time specified in the SAML authentication response's SessionNotOnOrAfter
- // value, whichever is shorter. You can provide a DurationSeconds value from
- // 900 seconds (15 minutes) up to the maximum session duration setting for the
- // role. This setting can have a value from 1 hour to 12 hours. If you specify
- // a value higher than this setting, the operation fails. For example, if you
- // specify a session duration of 12 hours, but your administrator set the maximum
- // session duration to 6 hours, your operation fails. To learn how to view the
- // maximum value for your role, see View the Maximum Session Duration Setting
- // for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
- // in the IAM User Guide.
- //
- // By default, the value is set to 3600 seconds.
- //
- // The DurationSeconds parameter is separate from the duration of a console
- // session that you might request using the returned credentials. The request
- // to the federation endpoint for a console sign-in token takes a SessionDuration
- // parameter that specifies the maximum length of the console session. For more
- // information, see Creating a URL that Enables Federated Users to Access the
- // Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
- // in the IAM User Guide.
- DurationSeconds *int64 `min:"900" type:"integer"`
-
- // An IAM policy in JSON format that you want to use as an inline session policy.
- //
- // This parameter is optional. 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 Amazon Web Services 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.
- //
- // The plaintext that you use for both inline and managed session policies 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.
- //
- // An Amazon Web Services 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 plaintext 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
- // 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 plaintext that you use for both inline and managed session policies
- // can't exceed 2,048 characters. For more information about ARNs, see Amazon
- // Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // in the Amazon Web Services General Reference.
- //
- // An Amazon Web Services 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 plaintext 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 Amazon Web Services 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 []*PolicyDescriptorType `type:"list"`
-
- // The Amazon Resource Name (ARN) of the SAML provider in IAM that describes
- // the IdP.
- //
- // PrincipalArn is a required field
- PrincipalArn *string `min:"20" type:"string" required:"true"`
-
- // The Amazon Resource Name (ARN) of the role that the caller is assuming.
- //
- // RoleArn is a required field
- RoleArn *string `min:"20" type:"string" required:"true"`
-
- // The base64 encoded SAML authentication response provided by the IdP.
- //
- // For more information, see Configuring a Relying Party and Adding Claims (https://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html)
- // in the IAM User Guide.
- //
- // SAMLAssertion is a required field
- SAMLAssertion *string `min:"4" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithSAMLInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithSAMLInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AssumeRoleWithSAMLInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AssumeRoleWithSAMLInput"}
- if s.DurationSeconds != nil && *s.DurationSeconds < 900 {
- invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900))
- }
- if s.Policy != nil && len(*s.Policy) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Policy", 1))
- }
- if s.PrincipalArn == nil {
- invalidParams.Add(request.NewErrParamRequired("PrincipalArn"))
- }
- if s.PrincipalArn != nil && len(*s.PrincipalArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("PrincipalArn", 20))
- }
- if s.RoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("RoleArn"))
- }
- if s.RoleArn != nil && len(*s.RoleArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20))
- }
- if s.SAMLAssertion == nil {
- invalidParams.Add(request.NewErrParamRequired("SAMLAssertion"))
- }
- if s.SAMLAssertion != nil && len(*s.SAMLAssertion) < 4 {
- invalidParams.Add(request.NewErrParamMinLen("SAMLAssertion", 4))
- }
- if s.PolicyArns != nil {
- for i, v := range s.PolicyArns {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PolicyArns", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDurationSeconds sets the DurationSeconds field's value.
-func (s *AssumeRoleWithSAMLInput) SetDurationSeconds(v int64) *AssumeRoleWithSAMLInput {
- s.DurationSeconds = &v
- return s
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *AssumeRoleWithSAMLInput) SetPolicy(v string) *AssumeRoleWithSAMLInput {
- s.Policy = &v
- return s
-}
-
-// SetPolicyArns sets the PolicyArns field's value.
-func (s *AssumeRoleWithSAMLInput) SetPolicyArns(v []*PolicyDescriptorType) *AssumeRoleWithSAMLInput {
- s.PolicyArns = v
- return s
-}
-
-// SetPrincipalArn sets the PrincipalArn field's value.
-func (s *AssumeRoleWithSAMLInput) SetPrincipalArn(v string) *AssumeRoleWithSAMLInput {
- s.PrincipalArn = &v
- return s
-}
-
-// SetRoleArn sets the RoleArn field's value.
-func (s *AssumeRoleWithSAMLInput) SetRoleArn(v string) *AssumeRoleWithSAMLInput {
- s.RoleArn = &v
- return s
-}
-
-// SetSAMLAssertion sets the SAMLAssertion field's value.
-func (s *AssumeRoleWithSAMLInput) SetSAMLAssertion(v string) *AssumeRoleWithSAMLInput {
- s.SAMLAssertion = &v
- return s
-}
-
-// Contains the response to a successful AssumeRoleWithSAML request, including
-// temporary Amazon Web Services credentials that can be used to make Amazon
-// Web Services requests.
-type AssumeRoleWithSAMLOutput struct {
- _ struct{} `type:"structure"`
-
- // The identifiers for the temporary security credentials that the operation
- // returns.
- AssumedRoleUser *AssumedRoleUser `type:"structure"`
-
- // The value of the Recipient attribute of the SubjectConfirmationData element
- // of the SAML assertion.
- Audience *string `type:"string"`
-
- // The temporary security credentials, which include an access key ID, a secret
- // access key, and a security (or session) token.
- //
- // The size of the security token that STS API operations return is not fixed.
- // We strongly recommend that you make no assumptions about the maximum size.
- Credentials *Credentials `type:"structure"`
-
- // The value of the Issuer element of the SAML assertion.
- Issuer *string `type:"string"`
-
- // A hash value based on the concatenation of the following:
- //
- // * The Issuer response value.
- //
- // * The Amazon Web Services account ID.
- //
- // * The friendly name (the last part of the ARN) of the SAML provider in
- // IAM.
- //
- // The combination of NameQualifier and Subject can be used to uniquely identify
- // a federated user.
- //
- // The following pseudocode shows how the hash value is calculated:
- //
- // BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP"
- // ) )
- NameQualifier *string `type:"string"`
-
- // 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 in the SourceIdentity attribute in the SAML assertion.
- //
- // You can require users to set a source identity value when they assume a role.
- // You do this by using the sts:SourceIdentity condition key in a role trust
- // policy. That way, actions that are taken with the role are associated with
- // that user. After the source identity is set, the value cannot be changed.
- // It is present in the request for all actions that are taken by the role and
- // persists across chained role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining)
- // sessions. You can configure your SAML identity provider to use an attribute
- // associated with your users, like user name or email, as the source identity
- // when calling AssumeRoleWithSAML. You do this by adding an attribute to the
- // SAML assertion. For more information about using source identity, see Monitor
- // and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
- // in the IAM User Guide.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
- SourceIdentity *string `min:"2" type:"string"`
-
- // The value of the NameID element in the Subject element of the SAML assertion.
- Subject *string `type:"string"`
-
- // The format of the name ID, as defined by the Format attribute in the NameID
- // element of the SAML assertion. Typical examples of the format are transient
- // or persistent.
- //
- // If the format includes the prefix urn:oasis:names:tc:SAML:2.0:nameid-format,
- // that prefix is removed. For example, urn:oasis:names:tc:SAML:2.0:nameid-format:transient
- // is returned as transient. If the format includes any other prefix, the format
- // is returned with no modifications.
- SubjectType *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithSAMLOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithSAMLOutput) GoString() string {
- return s.String()
-}
-
-// SetAssumedRoleUser sets the AssumedRoleUser field's value.
-func (s *AssumeRoleWithSAMLOutput) SetAssumedRoleUser(v *AssumedRoleUser) *AssumeRoleWithSAMLOutput {
- s.AssumedRoleUser = v
- return s
-}
-
-// SetAudience sets the Audience field's value.
-func (s *AssumeRoleWithSAMLOutput) SetAudience(v string) *AssumeRoleWithSAMLOutput {
- s.Audience = &v
- return s
-}
-
-// SetCredentials sets the Credentials field's value.
-func (s *AssumeRoleWithSAMLOutput) SetCredentials(v *Credentials) *AssumeRoleWithSAMLOutput {
- s.Credentials = v
- return s
-}
-
-// SetIssuer sets the Issuer field's value.
-func (s *AssumeRoleWithSAMLOutput) SetIssuer(v string) *AssumeRoleWithSAMLOutput {
- s.Issuer = &v
- return s
-}
-
-// SetNameQualifier sets the NameQualifier field's value.
-func (s *AssumeRoleWithSAMLOutput) SetNameQualifier(v string) *AssumeRoleWithSAMLOutput {
- s.NameQualifier = &v
- return s
-}
-
-// SetPackedPolicySize sets the PackedPolicySize field's value.
-func (s *AssumeRoleWithSAMLOutput) SetPackedPolicySize(v int64) *AssumeRoleWithSAMLOutput {
- s.PackedPolicySize = &v
- return s
-}
-
-// SetSourceIdentity sets the SourceIdentity field's value.
-func (s *AssumeRoleWithSAMLOutput) SetSourceIdentity(v string) *AssumeRoleWithSAMLOutput {
- s.SourceIdentity = &v
- return s
-}
-
-// SetSubject sets the Subject field's value.
-func (s *AssumeRoleWithSAMLOutput) SetSubject(v string) *AssumeRoleWithSAMLOutput {
- s.Subject = &v
- return s
-}
-
-// SetSubjectType sets the SubjectType field's value.
-func (s *AssumeRoleWithSAMLOutput) SetSubjectType(v string) *AssumeRoleWithSAMLOutput {
- s.SubjectType = &v
- return s
-}
-
-type AssumeRoleWithWebIdentityInput struct {
- _ struct{} `type:"structure"`
-
- // The duration, in seconds, of the role session. The value can range from 900
- // seconds (15 minutes) up to the maximum session duration setting for the role.
- // This setting can have a value from 1 hour to 12 hours. If you specify a value
- // higher than this setting, the operation fails. For example, if you specify
- // a session duration of 12 hours, but your administrator set the maximum session
- // duration to 6 hours, your operation fails. To learn how to view the maximum
- // value for your role, see View the Maximum Session Duration Setting for a
- // Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
- // in the IAM User Guide.
- //
- // By default, the value is set to 3600 seconds.
- //
- // The DurationSeconds parameter is separate from the duration of a console
- // session that you might request using the returned credentials. The request
- // to the federation endpoint for a console sign-in token takes a SessionDuration
- // parameter that specifies the maximum length of the console session. For more
- // information, see Creating a URL that Enables Federated Users to Access the
- // Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
- // in the IAM User Guide.
- DurationSeconds *int64 `min:"900" type:"integer"`
-
- // An IAM policy in JSON format that you want to use as an inline session policy.
- //
- // This parameter is optional. 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 Amazon Web Services 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.
- //
- // The plaintext that you use for both inline and managed session policies 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.
- //
- // An Amazon Web Services 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 plaintext 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
- // 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 plaintext that you use for both inline and managed session policies
- // can't exceed 2,048 characters. For more information about ARNs, see Amazon
- // Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // in the Amazon Web Services General Reference.
- //
- // An Amazon Web Services 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 plaintext 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 Amazon Web Services 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 []*PolicyDescriptorType `type:"list"`
-
- // The fully qualified host component of the domain name of the OAuth 2.0 identity
- // provider. Do not specify this value for an OpenID Connect identity provider.
- //
- // Currently www.amazon.com and graph.facebook.com are the only supported identity
- // providers for OAuth 2.0 access tokens. Do not include URL schemes and port
- // numbers.
- //
- // Do not specify this value for OpenID Connect ID tokens.
- ProviderId *string `min:"4" type:"string"`
-
- // The Amazon Resource Name (ARN) of the role that the caller is assuming.
- //
- // RoleArn is a required field
- RoleArn *string `min:"20" type:"string" required:"true"`
-
- // An identifier for the assumed role session. Typically, you pass the name
- // or identifier that is associated with the user who is using your application.
- // That way, the temporary security credentials that your application will use
- // are associated with that user. This session name is included as part of the
- // ARN and assumed role ID in the AssumedRoleUser response element.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
- //
- // RoleSessionName is a required field
- RoleSessionName *string `min:"2" type:"string" required:"true"`
-
- // The OAuth 2.0 access token or OpenID Connect ID token that is provided by
- // the identity provider. Your application must get this token by authenticating
- // the user who is using your application with a web identity provider before
- // the application makes an AssumeRoleWithWebIdentity call.
- //
- // WebIdentityToken is a required field
- WebIdentityToken *string `min:"4" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithWebIdentityInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithWebIdentityInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AssumeRoleWithWebIdentityInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AssumeRoleWithWebIdentityInput"}
- if s.DurationSeconds != nil && *s.DurationSeconds < 900 {
- invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900))
- }
- if s.Policy != nil && len(*s.Policy) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Policy", 1))
- }
- if s.ProviderId != nil && len(*s.ProviderId) < 4 {
- invalidParams.Add(request.NewErrParamMinLen("ProviderId", 4))
- }
- if s.RoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("RoleArn"))
- }
- if s.RoleArn != nil && len(*s.RoleArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20))
- }
- if s.RoleSessionName == nil {
- invalidParams.Add(request.NewErrParamRequired("RoleSessionName"))
- }
- if s.RoleSessionName != nil && len(*s.RoleSessionName) < 2 {
- invalidParams.Add(request.NewErrParamMinLen("RoleSessionName", 2))
- }
- if s.WebIdentityToken == nil {
- invalidParams.Add(request.NewErrParamRequired("WebIdentityToken"))
- }
- if s.WebIdentityToken != nil && len(*s.WebIdentityToken) < 4 {
- invalidParams.Add(request.NewErrParamMinLen("WebIdentityToken", 4))
- }
- if s.PolicyArns != nil {
- for i, v := range s.PolicyArns {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PolicyArns", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDurationSeconds sets the DurationSeconds field's value.
-func (s *AssumeRoleWithWebIdentityInput) SetDurationSeconds(v int64) *AssumeRoleWithWebIdentityInput {
- s.DurationSeconds = &v
- return s
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *AssumeRoleWithWebIdentityInput) SetPolicy(v string) *AssumeRoleWithWebIdentityInput {
- s.Policy = &v
- return s
-}
-
-// SetPolicyArns sets the PolicyArns field's value.
-func (s *AssumeRoleWithWebIdentityInput) SetPolicyArns(v []*PolicyDescriptorType) *AssumeRoleWithWebIdentityInput {
- s.PolicyArns = v
- return s
-}
-
-// SetProviderId sets the ProviderId field's value.
-func (s *AssumeRoleWithWebIdentityInput) SetProviderId(v string) *AssumeRoleWithWebIdentityInput {
- s.ProviderId = &v
- return s
-}
-
-// SetRoleArn sets the RoleArn field's value.
-func (s *AssumeRoleWithWebIdentityInput) SetRoleArn(v string) *AssumeRoleWithWebIdentityInput {
- s.RoleArn = &v
- return s
-}
-
-// SetRoleSessionName sets the RoleSessionName field's value.
-func (s *AssumeRoleWithWebIdentityInput) SetRoleSessionName(v string) *AssumeRoleWithWebIdentityInput {
- s.RoleSessionName = &v
- return s
-}
-
-// SetWebIdentityToken sets the WebIdentityToken field's value.
-func (s *AssumeRoleWithWebIdentityInput) SetWebIdentityToken(v string) *AssumeRoleWithWebIdentityInput {
- s.WebIdentityToken = &v
- return s
-}
-
-// Contains the response to a successful AssumeRoleWithWebIdentity request,
-// including temporary Amazon Web Services credentials that can be used to make
-// Amazon Web Services requests.
-type AssumeRoleWithWebIdentityOutput struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers
- // that you can use to refer to the resulting temporary security credentials.
- // For example, you can reference these credentials as a principal in a resource-based
- // policy by using the ARN or assumed role ID. The ARN and ID include the RoleSessionName
- // that you specified when you called AssumeRole.
- AssumedRoleUser *AssumedRoleUser `type:"structure"`
-
- // The intended audience (also known as client ID) of the web identity token.
- // This is traditionally the client identifier issued to the application that
- // requested the web identity token.
- Audience *string `type:"string"`
-
- // The temporary security credentials, which include an access key ID, a secret
- // access key, and a security token.
- //
- // The size of the security token that STS API operations return is not fixed.
- // We strongly recommend that you make no assumptions about the maximum size.
- Credentials *Credentials `type:"structure"`
-
- // 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
- // ID tokens, this contains the value of the iss field. For OAuth 2.0 access
- // tokens, this contains the value of the ProviderId parameter that was passed
- // in the AssumeRoleWithWebIdentity request.
- Provider *string `type:"string"`
-
- // The value of the source identity that is returned in the JSON web token (JWT)
- // from the identity provider.
- //
- // You can require users to set a source identity value when they assume a role.
- // You do this by using the sts:SourceIdentity condition key in a role trust
- // policy. That way, actions that are taken with the role are associated with
- // that user. After the source identity is set, the value cannot be changed.
- // It is present in the request for all actions that are taken by the role and
- // persists across chained role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining)
- // sessions. You can configure your identity provider to use an attribute associated
- // with your users, like user name or email, as the source identity when calling
- // AssumeRoleWithWebIdentity. You do this by adding a claim to the JSON web
- // token. To learn more about OIDC tokens and claims, see Using Tokens with
- // User Pools (https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html)
- // in the Amazon Cognito Developer Guide. For more information about using source
- // identity, see Monitor and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
- // in the IAM User Guide.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
- SourceIdentity *string `min:"2" type:"string"`
-
- // The unique user identifier that is returned by the identity provider. This
- // identifier is associated with the WebIdentityToken that was submitted with
- // the AssumeRoleWithWebIdentity call. The identifier is typically unique to
- // the user and the application that acquired the WebIdentityToken (pairwise
- // identifier). For OpenID Connect ID tokens, this field contains the value
- // returned by the identity provider as the token's sub (Subject) claim.
- SubjectFromWebIdentityToken *string `min:"6" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithWebIdentityOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithWebIdentityOutput) GoString() string {
- return s.String()
-}
-
-// SetAssumedRoleUser sets the AssumedRoleUser field's value.
-func (s *AssumeRoleWithWebIdentityOutput) SetAssumedRoleUser(v *AssumedRoleUser) *AssumeRoleWithWebIdentityOutput {
- s.AssumedRoleUser = v
- return s
-}
-
-// SetAudience sets the Audience field's value.
-func (s *AssumeRoleWithWebIdentityOutput) SetAudience(v string) *AssumeRoleWithWebIdentityOutput {
- s.Audience = &v
- return s
-}
-
-// SetCredentials sets the Credentials field's value.
-func (s *AssumeRoleWithWebIdentityOutput) SetCredentials(v *Credentials) *AssumeRoleWithWebIdentityOutput {
- s.Credentials = v
- return s
-}
-
-// SetPackedPolicySize sets the PackedPolicySize field's value.
-func (s *AssumeRoleWithWebIdentityOutput) SetPackedPolicySize(v int64) *AssumeRoleWithWebIdentityOutput {
- s.PackedPolicySize = &v
- return s
-}
-
-// SetProvider sets the Provider field's value.
-func (s *AssumeRoleWithWebIdentityOutput) SetProvider(v string) *AssumeRoleWithWebIdentityOutput {
- s.Provider = &v
- return s
-}
-
-// SetSourceIdentity sets the SourceIdentity field's value.
-func (s *AssumeRoleWithWebIdentityOutput) SetSourceIdentity(v string) *AssumeRoleWithWebIdentityOutput {
- s.SourceIdentity = &v
- return s
-}
-
-// SetSubjectFromWebIdentityToken sets the SubjectFromWebIdentityToken field's value.
-func (s *AssumeRoleWithWebIdentityOutput) SetSubjectFromWebIdentityToken(v string) *AssumeRoleWithWebIdentityOutput {
- s.SubjectFromWebIdentityToken = &v
- return s
-}
-
-// The identifiers for the temporary security credentials that the operation
-// returns.
-type AssumedRoleUser struct {
- _ struct{} `type:"structure"`
-
- // 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 the IAM User Guide.
- //
- // Arn is a required field
- Arn *string `min:"20" type:"string" required:"true"`
-
- // A unique identifier that contains the role ID and the role session name of
- // the role that is being assumed. The role ID is generated by Amazon Web Services
- // when the role is created.
- //
- // AssumedRoleId is a required field
- AssumedRoleId *string `min:"2" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumedRoleUser) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumedRoleUser) GoString() string {
- return s.String()
-}
-
-// SetArn sets the Arn field's value.
-func (s *AssumedRoleUser) SetArn(v string) *AssumedRoleUser {
- s.Arn = &v
- return s
-}
-
-// SetAssumedRoleId sets the AssumedRoleId field's value.
-func (s *AssumedRoleUser) SetAssumedRoleId(v string) *AssumedRoleUser {
- s.AssumedRoleId = &v
- return s
-}
-
-// Amazon Web Services credentials for API authentication.
-type Credentials struct {
- _ struct{} `type:"structure"`
-
- // The access key ID that identifies the temporary security credentials.
- //
- // AccessKeyId is a required field
- AccessKeyId *string `min:"16" type:"string" required:"true"`
-
- // The date on which the current credentials expire.
- //
- // Expiration is a required field
- Expiration *time.Time `type:"timestamp" required:"true"`
-
- // The secret access key that can be used to sign requests.
- //
- // SecretAccessKey is a required field
- SecretAccessKey *string `type:"string" required:"true"`
-
- // The token that users must pass to the service API to use the temporary credentials.
- //
- // SessionToken is a required field
- SessionToken *string `type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Credentials) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Credentials) GoString() string {
- return s.String()
-}
-
-// SetAccessKeyId sets the AccessKeyId field's value.
-func (s *Credentials) SetAccessKeyId(v string) *Credentials {
- s.AccessKeyId = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *Credentials) SetExpiration(v time.Time) *Credentials {
- s.Expiration = &v
- return s
-}
-
-// SetSecretAccessKey sets the SecretAccessKey field's value.
-func (s *Credentials) SetSecretAccessKey(v string) *Credentials {
- s.SecretAccessKey = &v
- return s
-}
-
-// SetSessionToken sets the SessionToken field's value.
-func (s *Credentials) SetSessionToken(v string) *Credentials {
- s.SessionToken = &v
- return s
-}
-
-type DecodeAuthorizationMessageInput struct {
- _ struct{} `type:"structure"`
-
- // The encoded message that was returned with the response.
- //
- // EncodedMessage is a required field
- EncodedMessage *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DecodeAuthorizationMessageInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DecodeAuthorizationMessageInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DecodeAuthorizationMessageInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DecodeAuthorizationMessageInput"}
- if s.EncodedMessage == nil {
- invalidParams.Add(request.NewErrParamRequired("EncodedMessage"))
- }
- if s.EncodedMessage != nil && len(*s.EncodedMessage) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("EncodedMessage", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEncodedMessage sets the EncodedMessage field's value.
-func (s *DecodeAuthorizationMessageInput) SetEncodedMessage(v string) *DecodeAuthorizationMessageInput {
- s.EncodedMessage = &v
- return s
-}
-
-// A document that contains additional information about the authorization status
-// of a request from an encoded message that is returned in response to an Amazon
-// Web Services request.
-type DecodeAuthorizationMessageOutput struct {
- _ struct{} `type:"structure"`
-
- // The API returns a response with the decoded message.
- DecodedMessage *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DecodeAuthorizationMessageOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DecodeAuthorizationMessageOutput) GoString() string {
- return s.String()
-}
-
-// SetDecodedMessage sets the DecodedMessage field's value.
-func (s *DecodeAuthorizationMessageOutput) SetDecodedMessage(v string) *DecodeAuthorizationMessageOutput {
- s.DecodedMessage = &v
- return s
-}
-
-// Identifiers for the federated user that is associated with the credentials.
-type FederatedUser struct {
- _ struct{} `type:"structure"`
-
- // 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 the IAM User Guide.
- //
- // Arn is a required field
- Arn *string `min:"20" type:"string" required:"true"`
-
- // The string that identifies the federated user associated with the credentials,
- // similar to the unique ID of an IAM user.
- //
- // FederatedUserId is a required field
- FederatedUserId *string `min:"2" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s FederatedUser) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s FederatedUser) GoString() string {
- return s.String()
-}
-
-// SetArn sets the Arn field's value.
-func (s *FederatedUser) SetArn(v string) *FederatedUser {
- s.Arn = &v
- return s
-}
-
-// SetFederatedUserId sets the FederatedUserId field's value.
-func (s *FederatedUser) SetFederatedUserId(v string) *FederatedUser {
- s.FederatedUserId = &v
- return s
-}
-
-type GetAccessKeyInfoInput struct {
- _ struct{} `type:"structure"`
-
- // The identifier of an access key.
- //
- // This parameter allows (through its regex pattern) a string of characters
- // that can consist of any upper- or lowercase letter or digit.
- //
- // AccessKeyId is a required field
- AccessKeyId *string `min:"16" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetAccessKeyInfoInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetAccessKeyInfoInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetAccessKeyInfoInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetAccessKeyInfoInput"}
- if s.AccessKeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("AccessKeyId"))
- }
- if s.AccessKeyId != nil && len(*s.AccessKeyId) < 16 {
- invalidParams.Add(request.NewErrParamMinLen("AccessKeyId", 16))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessKeyId sets the AccessKeyId field's value.
-func (s *GetAccessKeyInfoInput) SetAccessKeyId(v string) *GetAccessKeyInfoInput {
- s.AccessKeyId = &v
- return s
-}
-
-type GetAccessKeyInfoOutput struct {
- _ struct{} `type:"structure"`
-
- // The number used to identify the Amazon Web Services account.
- Account *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetAccessKeyInfoOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetAccessKeyInfoOutput) GoString() string {
- return s.String()
-}
-
-// SetAccount sets the Account field's value.
-func (s *GetAccessKeyInfoOutput) SetAccount(v string) *GetAccessKeyInfoOutput {
- s.Account = &v
- return s
-}
-
-type GetCallerIdentityInput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetCallerIdentityInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetCallerIdentityInput) GoString() string {
- return s.String()
-}
-
-// Contains the response to a successful GetCallerIdentity request, including
-// information about the entity making the request.
-type GetCallerIdentityOutput struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Web Services account ID number of the account that owns or contains
- // the calling entity.
- Account *string `type:"string"`
-
- // The Amazon Web Services ARN associated with the calling entity.
- Arn *string `min:"20" type:"string"`
-
- // The unique identifier of the calling entity. The exact value depends on the
- // type of entity that is making the call. The values returned are those listed
- // in the aws:userid column in the Principal table (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable)
- // found on the Policy Variables reference page in the IAM User Guide.
- UserId *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetCallerIdentityOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetCallerIdentityOutput) GoString() string {
- return s.String()
-}
-
-// SetAccount sets the Account field's value.
-func (s *GetCallerIdentityOutput) SetAccount(v string) *GetCallerIdentityOutput {
- s.Account = &v
- return s
-}
-
-// SetArn sets the Arn field's value.
-func (s *GetCallerIdentityOutput) SetArn(v string) *GetCallerIdentityOutput {
- s.Arn = &v
- return s
-}
-
-// SetUserId sets the UserId field's value.
-func (s *GetCallerIdentityOutput) SetUserId(v string) *GetCallerIdentityOutput {
- s.UserId = &v
- return s
-}
-
-type GetFederationTokenInput struct {
- _ struct{} `type:"structure"`
-
- // The duration, in seconds, that the session should last. Acceptable durations
- // for federation sessions range from 900 seconds (15 minutes) to 129,600 seconds
- // (36 hours), with 43,200 seconds (12 hours) as the default. Sessions obtained
- // using Amazon Web Services account root user credentials are restricted to
- // a maximum of 3,600 seconds (one hour). If the specified duration is longer
- // than one hour, the session obtained by using root user credentials defaults
- // to one hour.
- DurationSeconds *int64 `min:"900" type:"integer"`
-
- // The name of the federated user. The name is used as an identifier for the
- // temporary security credentials (such as Bob). For example, you can reference
- // the federated user name in a resource-based policy, such as in an Amazon
- // S3 bucket policy.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
- //
- // Name is a required field
- Name *string `min:"2" type:"string" required:"true"`
-
- // An IAM policy in JSON format that you want to use as an inline session policy.
- //
- // 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.
- //
- // This parameter is optional. However, if you do not pass any session policies,
- // 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.
- //
- // 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 plaintext that you use for both inline and managed session policies 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.
- //
- // An Amazon Web Services 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 plaintext 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
- // to use as a managed session policy. The policies must exist in the same account
- // as the IAM user that is requesting federated access.
- //
- // 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 plaintext that you use for both inline
- // 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 Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // in the Amazon Web Services General Reference.
- //
- // This parameter is optional. However, if you do not pass any session policies,
- // 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.
- //
- // 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 Amazon Web Services 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 plaintext 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 plaintext
- // 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 Amazon Web Services 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 plaintext 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.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetFederationTokenInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetFederationTokenInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetFederationTokenInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetFederationTokenInput"}
- if s.DurationSeconds != nil && *s.DurationSeconds < 900 {
- invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 2 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 2))
- }
- if s.Policy != nil && len(*s.Policy) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Policy", 1))
- }
- if s.PolicyArns != nil {
- for i, v := range s.PolicyArns {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PolicyArns", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDurationSeconds sets the DurationSeconds field's value.
-func (s *GetFederationTokenInput) SetDurationSeconds(v int64) *GetFederationTokenInput {
- s.DurationSeconds = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *GetFederationTokenInput) SetName(v string) *GetFederationTokenInput {
- s.Name = &v
- return s
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *GetFederationTokenInput) SetPolicy(v string) *GetFederationTokenInput {
- s.Policy = &v
- return s
-}
-
-// SetPolicyArns sets the PolicyArns field's value.
-func (s *GetFederationTokenInput) SetPolicyArns(v []*PolicyDescriptorType) *GetFederationTokenInput {
- s.PolicyArns = v
- 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 Amazon Web Services credentials that can be used to make Amazon
-// Web Services requests.
-type GetFederationTokenOutput struct {
- _ struct{} `type:"structure"`
-
- // The temporary security credentials, which include an access key ID, a secret
- // access key, and a security (or session) token.
- //
- // The size of the security token that STS API operations return is not fixed.
- // We strongly recommend that you make no assumptions about the maximum size.
- Credentials *Credentials `type:"structure"`
-
- // Identifiers for the federated user associated with the credentials (such
- // as arn:aws:sts::123456789012:federated-user/Bob or 123456789012:Bob). You
- // can use the federated user's ARN in your resource-based policies, such as
- // an Amazon S3 bucket policy.
- FederatedUser *FederatedUser `type:"structure"`
-
- // 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"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetFederationTokenOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetFederationTokenOutput) GoString() string {
- return s.String()
-}
-
-// SetCredentials sets the Credentials field's value.
-func (s *GetFederationTokenOutput) SetCredentials(v *Credentials) *GetFederationTokenOutput {
- s.Credentials = v
- return s
-}
-
-// SetFederatedUser sets the FederatedUser field's value.
-func (s *GetFederationTokenOutput) SetFederatedUser(v *FederatedUser) *GetFederationTokenOutput {
- s.FederatedUser = v
- return s
-}
-
-// SetPackedPolicySize sets the PackedPolicySize field's value.
-func (s *GetFederationTokenOutput) SetPackedPolicySize(v int64) *GetFederationTokenOutput {
- s.PackedPolicySize = &v
- return s
-}
-
-type GetSessionTokenInput struct {
- _ struct{} `type:"structure"`
-
- // The duration, in seconds, that the credentials should remain valid. Acceptable
- // durations for IAM user sessions range from 900 seconds (15 minutes) to 129,600
- // seconds (36 hours), with 43,200 seconds (12 hours) as the default. Sessions
- // for Amazon Web Services account owners are restricted to a maximum of 3,600
- // seconds (one hour). If the duration is longer than one hour, the session
- // for Amazon Web Services account owners defaults to one hour.
- DurationSeconds *int64 `min:"900" type:"integer"`
-
- // The identification number of the MFA device that is associated with the IAM
- // user who is making the GetSessionToken call. Specify this value if the IAM
- // user has a policy that requires MFA authentication. The value is either the
- // serial number for a hardware device (such as GAHT12345678) or an Amazon Resource
- // Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).
- // You can find the device for an IAM user by going to the Amazon Web Services
- // Management Console and viewing the user's security credentials.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@:/-
- SerialNumber *string `min:"9" type:"string"`
-
- // The value provided by the MFA device, if MFA is required. If any policy requires
- // the IAM user to submit an MFA code, specify this value. If MFA authentication
- // is required, the user must provide a code when requesting a set of temporary
- // security credentials. A user who fails to provide the code receives an "access
- // denied" response when requesting resources that require MFA authentication.
- //
- // The format for this parameter, as described by its regex pattern, is a sequence
- // of six numeric digits.
- TokenCode *string `min:"6" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetSessionTokenInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetSessionTokenInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetSessionTokenInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetSessionTokenInput"}
- if s.DurationSeconds != nil && *s.DurationSeconds < 900 {
- invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900))
- }
- if s.SerialNumber != nil && len(*s.SerialNumber) < 9 {
- invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9))
- }
- if s.TokenCode != nil && len(*s.TokenCode) < 6 {
- invalidParams.Add(request.NewErrParamMinLen("TokenCode", 6))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDurationSeconds sets the DurationSeconds field's value.
-func (s *GetSessionTokenInput) SetDurationSeconds(v int64) *GetSessionTokenInput {
- s.DurationSeconds = &v
- return s
-}
-
-// SetSerialNumber sets the SerialNumber field's value.
-func (s *GetSessionTokenInput) SetSerialNumber(v string) *GetSessionTokenInput {
- s.SerialNumber = &v
- return s
-}
-
-// SetTokenCode sets the TokenCode field's value.
-func (s *GetSessionTokenInput) SetTokenCode(v string) *GetSessionTokenInput {
- s.TokenCode = &v
- return s
-}
-
-// Contains the response to a successful GetSessionToken request, including
-// temporary Amazon Web Services credentials that can be used to make Amazon
-// Web Services requests.
-type GetSessionTokenOutput struct {
- _ struct{} `type:"structure"`
-
- // The temporary security credentials, which include an access key ID, a secret
- // access key, and a security (or session) token.
- //
- // The size of the security token that STS API operations return is not fixed.
- // We strongly recommend that you make no assumptions about the maximum size.
- Credentials *Credentials `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetSessionTokenOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetSessionTokenOutput) GoString() string {
- return s.String()
-}
-
-// SetCredentials sets the Credentials field's value.
-func (s *GetSessionTokenOutput) SetCredentials(v *Credentials) *GetSessionTokenOutput {
- s.Credentials = v
- return s
-}
-
-// A reference to the IAM managed policy that is passed as a session policy
-// for a role session or a federated user session.
-type PolicyDescriptorType struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of the IAM managed policy to use as a session
- // policy for the role. For more information about ARNs, see Amazon Resource
- // Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // in the Amazon Web Services General Reference.
- Arn *string `locationName:"arn" min:"20" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PolicyDescriptorType) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PolicyDescriptorType) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PolicyDescriptorType) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PolicyDescriptorType"}
- if s.Arn != nil && len(*s.Arn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("Arn", 20))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetArn sets the Arn field's value.
-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 Amazon
-// Web Services 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.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Tag) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-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/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go
deleted file mode 100644
index d5307fcaa..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package sts
-
-import "github.com/aws/aws-sdk-go/aws/request"
-
-func init() {
- initRequest = customizeRequest
-}
-
-func customizeRequest(r *request.Request) {
- r.RetryErrorCodes = append(r.RetryErrorCodes, ErrCodeIDPCommunicationErrorException)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go
deleted file mode 100644
index c40f5a2a5..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package sts provides the client and types for making API
-// requests to AWS Security Token Service.
-//
-// Security Token Service (STS) enables you to request temporary, limited-privilege
-// credentials for Identity and Access Management (IAM) users or for users that
-// you authenticate (federated users). This guide provides descriptions of the
-// STS API. For more information about using this service, see Temporary Security
-// Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html).
-//
-// See https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15 for more information on this service.
-//
-// See sts package documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/sts/
-//
-// # Using the Client
-//
-// To contact AWS Security Token Service with the SDK use the New function to create
-// a new service client. With that client you can make API requests to the service.
-// These clients are safe to use concurrently.
-//
-// See the SDK's documentation for more information on how to use the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/
-//
-// See aws.Config documentation for more information on configuring SDK clients.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
-//
-// See the AWS Security Token Service client STS for more
-// information on creating client for this service.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/sts/#New
-package sts
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
deleted file mode 100644
index b680bbd5d..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go
+++ /dev/null
@@ -1,84 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package sts
-
-const (
-
- // ErrCodeExpiredTokenException for service response error code
- // "ExpiredTokenException".
- //
- // The web identity token that was passed is expired or is not valid. Get a
- // new identity token from the identity provider and then retry the request.
- ErrCodeExpiredTokenException = "ExpiredTokenException"
-
- // ErrCodeIDPCommunicationErrorException for service response error code
- // "IDPCommunicationError".
- //
- // 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 identity provider might be down or not responding.
- ErrCodeIDPCommunicationErrorException = "IDPCommunicationError"
-
- // ErrCodeIDPRejectedClaimException for service response error code
- // "IDPRejectedClaim".
- //
- // The identity provider (IdP) reported that authentication failed. This might
- // be because the claim is invalid.
- //
- // If this error is returned for the AssumeRoleWithWebIdentity operation, it
- // can also mean that the claim has expired or has been explicitly revoked.
- ErrCodeIDPRejectedClaimException = "IDPRejectedClaim"
-
- // ErrCodeInvalidAuthorizationMessageException for service response error code
- // "InvalidAuthorizationMessageException".
- //
- // The error returned if the message passed to DecodeAuthorizationMessage was
- // invalid. This can happen if the token contains invalid characters, such as
- // linebreaks.
- ErrCodeInvalidAuthorizationMessageException = "InvalidAuthorizationMessageException"
-
- // ErrCodeInvalidIdentityTokenException for service response error code
- // "InvalidIdentityToken".
- //
- // The web identity token that was passed could not be validated by Amazon Web
- // Services. Get a new identity token from the identity provider and then retry
- // the request.
- ErrCodeInvalidIdentityTokenException = "InvalidIdentityToken"
-
- // ErrCodeMalformedPolicyDocumentException for service response error code
- // "MalformedPolicyDocument".
- //
- // The request was rejected because the policy document was malformed. The error
- // message describes the specific error.
- ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocument"
-
- // ErrCodePackedPolicyTooLargeException for service response error code
- // "PackedPolicyTooLarge".
- //
- // The request was rejected because the total packed size of the session policies
- // and session tags combined was too large. An Amazon Web Services 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/reference_iam-quotas.html#reference_iam-limits-entity-length)
- // in the IAM User Guide.
- ErrCodePackedPolicyTooLargeException = "PackedPolicyTooLarge"
-
- // ErrCodeRegionDisabledException for service response error code
- // "RegionDisabledException".
- //
- // STS is not activated in the requested region for the account that is being
- // asked to generate credentials. The account administrator must use the IAM
- // console to activate STS in that region. For more information, see Activating
- // and Deactivating Amazon Web Services STS in an Amazon Web Services Region
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
- // in the IAM User Guide.
- ErrCodeRegionDisabledException = "RegionDisabledException"
-)
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
deleted file mode 100644
index 12327d053..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go
+++ /dev/null
@@ -1,104 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package sts
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/signer/v4"
- "github.com/aws/aws-sdk-go/private/protocol/query"
-)
-
-// STS provides the API operation methods for making requests to
-// AWS Security Token Service. See this package's package overview docs
-// for details on the service.
-//
-// STS methods are safe to use concurrently. It is not safe to
-// modify mutate any of the struct's properties though.
-type STS struct {
- *client.Client
-}
-
-// Used for custom client initialization logic
-var initClient func(*client.Client)
-
-// Used for custom request initialization logic
-var initRequest func(*request.Request)
-
-// Service information constants
-const (
- ServiceName = "sts" // Name of service.
- EndpointsID = ServiceName // ID to lookup a service endpoint with.
- ServiceID = "STS" // ServiceID is a unique identifier of a specific service.
-)
-
-// New creates a new instance of the STS client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-//
-// mySession := session.Must(session.NewSession())
-//
-// // Create a STS client from just a session.
-// svc := sts.New(mySession)
-//
-// // Create a STS client with additional configuration
-// svc := sts.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func New(p client.ConfigProvider, cfgs ...*aws.Config) *STS {
- c := p.ClientConfig(EndpointsID, cfgs...)
- if c.SigningNameDerived || len(c.SigningName) == 0 {
- c.SigningName = EndpointsID
- // No Fallback
- }
- return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *STS {
- svc := &STS{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: ServiceName,
- ServiceID: ServiceID,
- SigningName: signingName,
- SigningRegion: signingRegion,
- PartitionID: partitionID,
- Endpoint: endpoint,
- APIVersion: "2011-06-15",
- ResolvedRegion: resolvedRegion,
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(query.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
-
- // Run custom client initialization if present
- if initClient != nil {
- initClient(svc.Client)
- }
-
- return svc
-}
-
-// newRequest creates a new request for a STS operation and runs any
-// custom request initialization.
-func (c *STS) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- // Run custom request initialization if present
- if initRequest != nil {
- initRequest(req)
- }
-
- return req
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go
deleted file mode 100644
index bf06b2e7d..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package stsiface provides an interface to enable mocking the AWS Security Token Service service client
-// for testing your code.
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters.
-package stsiface
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/service/sts"
-)
-
-// STSAPI provides an interface to enable mocking the
-// sts.STS service client's API operation,
-// paginators, and waiters. This make unit testing your code that calls out
-// to the SDK's service client's calls easier.
-//
-// The best way to use this interface is so the SDK's service client's calls
-// can be stubbed out for unit testing your code with the SDK without needing
-// to inject custom request handlers into the SDK's request pipeline.
-//
-// // myFunc uses an SDK service client to make a request to
-// // AWS Security Token Service.
-// func myFunc(svc stsiface.STSAPI) bool {
-// // Make svc.AssumeRole request
-// }
-//
-// func main() {
-// sess := session.New()
-// svc := sts.New(sess)
-//
-// myFunc(svc)
-// }
-//
-// In your _test.go file:
-//
-// // Define a mock struct to be used in your unit tests of myFunc.
-// type mockSTSClient struct {
-// stsiface.STSAPI
-// }
-// func (m *mockSTSClient) AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) {
-// // mock response/functionality
-// }
-//
-// func TestMyFunc(t *testing.T) {
-// // Setup Test
-// mockSvc := &mockSTSClient{}
-//
-// myfunc(mockSvc)
-//
-// // Verify myFunc's functionality
-// }
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters. Its suggested to use the pattern above for testing, or using
-// tooling to generate mocks to satisfy the interfaces.
-type STSAPI interface {
- AssumeRole(*sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error)
- AssumeRoleWithContext(aws.Context, *sts.AssumeRoleInput, ...request.Option) (*sts.AssumeRoleOutput, error)
- AssumeRoleRequest(*sts.AssumeRoleInput) (*request.Request, *sts.AssumeRoleOutput)
-
- AssumeRoleWithSAML(*sts.AssumeRoleWithSAMLInput) (*sts.AssumeRoleWithSAMLOutput, error)
- AssumeRoleWithSAMLWithContext(aws.Context, *sts.AssumeRoleWithSAMLInput, ...request.Option) (*sts.AssumeRoleWithSAMLOutput, error)
- AssumeRoleWithSAMLRequest(*sts.AssumeRoleWithSAMLInput) (*request.Request, *sts.AssumeRoleWithSAMLOutput)
-
- AssumeRoleWithWebIdentity(*sts.AssumeRoleWithWebIdentityInput) (*sts.AssumeRoleWithWebIdentityOutput, error)
- AssumeRoleWithWebIdentityWithContext(aws.Context, *sts.AssumeRoleWithWebIdentityInput, ...request.Option) (*sts.AssumeRoleWithWebIdentityOutput, error)
- AssumeRoleWithWebIdentityRequest(*sts.AssumeRoleWithWebIdentityInput) (*request.Request, *sts.AssumeRoleWithWebIdentityOutput)
-
- DecodeAuthorizationMessage(*sts.DecodeAuthorizationMessageInput) (*sts.DecodeAuthorizationMessageOutput, error)
- DecodeAuthorizationMessageWithContext(aws.Context, *sts.DecodeAuthorizationMessageInput, ...request.Option) (*sts.DecodeAuthorizationMessageOutput, error)
- DecodeAuthorizationMessageRequest(*sts.DecodeAuthorizationMessageInput) (*request.Request, *sts.DecodeAuthorizationMessageOutput)
-
- GetAccessKeyInfo(*sts.GetAccessKeyInfoInput) (*sts.GetAccessKeyInfoOutput, error)
- GetAccessKeyInfoWithContext(aws.Context, *sts.GetAccessKeyInfoInput, ...request.Option) (*sts.GetAccessKeyInfoOutput, error)
- GetAccessKeyInfoRequest(*sts.GetAccessKeyInfoInput) (*request.Request, *sts.GetAccessKeyInfoOutput)
-
- GetCallerIdentity(*sts.GetCallerIdentityInput) (*sts.GetCallerIdentityOutput, error)
- GetCallerIdentityWithContext(aws.Context, *sts.GetCallerIdentityInput, ...request.Option) (*sts.GetCallerIdentityOutput, error)
- GetCallerIdentityRequest(*sts.GetCallerIdentityInput) (*request.Request, *sts.GetCallerIdentityOutput)
-
- GetFederationToken(*sts.GetFederationTokenInput) (*sts.GetFederationTokenOutput, error)
- GetFederationTokenWithContext(aws.Context, *sts.GetFederationTokenInput, ...request.Option) (*sts.GetFederationTokenOutput, error)
- GetFederationTokenRequest(*sts.GetFederationTokenInput) (*request.Request, *sts.GetFederationTokenOutput)
-
- GetSessionToken(*sts.GetSessionTokenInput) (*sts.GetSessionTokenOutput, error)
- GetSessionTokenWithContext(aws.Context, *sts.GetSessionTokenInput, ...request.Option) (*sts.GetSessionTokenOutput, error)
- GetSessionTokenRequest(*sts.GetSessionTokenInput) (*request.Request, *sts.GetSessionTokenOutput)
-}
-
-var _ STSAPI = (*sts.STS)(nil)
diff --git a/vendor/github.com/aws/smithy-go/.gitignore b/vendor/github.com/aws/smithy-go/.gitignore
new file mode 100644
index 000000000..c01141aa4
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/.gitignore
@@ -0,0 +1,22 @@
+# Eclipse
+.classpath
+.project
+.settings/
+
+# Intellij
+.idea/
+*.iml
+*.iws
+
+# Mac
+.DS_Store
+
+# Maven
+target/
+**/dependency-reduced-pom.xml
+
+# Gradle
+/.gradle
+build/
+*/out/
+*/*/out/
diff --git a/vendor/github.com/aws/smithy-go/.travis.yml b/vendor/github.com/aws/smithy-go/.travis.yml
new file mode 100644
index 000000000..f8d1035cc
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/.travis.yml
@@ -0,0 +1,28 @@
+language: go
+sudo: true
+dist: bionic
+
+branches:
+ only:
+ - main
+
+os:
+ - linux
+ - osx
+ # Travis doesn't work with windows and Go tip
+ #- windows
+
+go:
+ - tip
+
+matrix:
+ allow_failures:
+ - go: tip
+
+before_install:
+ - if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install make; fi
+ - (cd /tmp/; go get golang.org/x/lint/golint)
+
+script:
+ - make go test -v ./...;
+
diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md
new file mode 100644
index 000000000..a608e2b63
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md
@@ -0,0 +1,157 @@
+# Release (2022-09-14)
+
+* No change notes available for this release.
+
+# Release (v1.13.2)
+
+* No change notes available for this release.
+
+# Release (v1.13.1)
+
+* No change notes available for this release.
+
+# Release (v1.13.0)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.13.0
+ * **Feature**: Adds support for the Smithy httpBearerAuth authentication trait to smithy-go. This allows the SDK to support the bearer authentication flow for API operations decorated with httpBearerAuth. An API client will need to be provided with its own bearer.TokenProvider implementation or use the bearer.StaticTokenProvider implementation.
+
+# Release (v1.12.1)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.12.1
+ * **Bug Fix**: Fixes a bug where JSON object keys were not escaped.
+
+# Release (v1.12.0)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.12.0
+ * **Feature**: `transport/http`: Add utility for setting context metadata when operation serializer automatically assigns content-type default value.
+
+# Release (v1.11.3)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.11.3
+ * **Dependency Update**: Updates smithy-go unit test dependency go-cmp to 0.5.8.
+
+# Release (v1.11.2)
+
+* No change notes available for this release.
+
+# Release (v1.11.1)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.11.1
+ * **Bug Fix**: Updates the smithy-go HTTP Request to correctly handle building the request to an http.Request. Related to [aws/aws-sdk-go-v2#1583](https://github.com/aws/aws-sdk-go-v2/issues/1583)
+
+# Release (v1.11.0)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.11.0
+ * **Feature**: Updates deserialization of header list to supported quoted strings
+
+# Release (v1.10.0)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.10.0
+ * **Feature**: Add `ptr.Duration`, `ptr.ToDuration`, `ptr.DurationSlice`, `ptr.ToDurationSlice`, `ptr.DurationMap`, and `ptr.ToDurationMap` functions for the `time.Duration` type.
+
+# Release (v1.9.1)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.9.1
+ * **Documentation**: Fixes various typos in Go package documentation.
+
+# Release (v1.9.0)
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.9.0
+ * **Feature**: sync: OnceErr, can be used to concurrently record a signal when an error has occurred.
+ * **Bug Fix**: `transport/http`: CloseResponseBody and ErrorCloseResponseBody middleware have been updated to ensure that the body is fully drained before closing.
+
+# Release v1.8.1
+
+### Smithy Go Module
+* **Bug Fix**: Fixed an issue that would cause the HTTP Content-Length to be set to 0 if the stream body was not set.
+ * Fixes [aws/aws-sdk-go-v2#1418](https://github.com/aws/aws-sdk-go-v2/issues/1418)
+
+# Release v1.8.0
+
+### Smithy Go Module
+
+* `time`: Add support for parsing additional DateTime timestamp format ([#324](https://github.com/aws/smithy-go/pull/324))
+ * Adds support for parsing DateTime timestamp formatted time similar to RFC 3339, but without the `Z` character, nor UTC offset.
+ * Fixes [#1387](https://github.com/aws/aws-sdk-go-v2/issues/1387)
+
+# Release v1.7.0
+
+### Smithy Go Module
+* `ptr`: Handle error for deferred file close call ([#314](https://github.com/aws/smithy-go/pull/314))
+ * Handle error for defer close call
+* `middleware`: Add Clone to Metadata ([#318](https://github.com/aws/smithy-go/pull/318))
+ * Adds a new Clone method to the middleware Metadata type. This provides a shallow clone of the entries in the Metadata.
+* `document`: Add new package for document shape serialization support ([#310](https://github.com/aws/smithy-go/pull/310))
+
+### Codegen
+* Add Smithy Document Shape Support ([#310](https://github.com/aws/smithy-go/pull/310))
+ * Adds support for Smithy Document shapes and supporting types for protocols to implement support
+
+# Release v1.6.0 (2021-07-15)
+
+### Smithy Go Module
+* `encoding/httpbinding`: Support has been added for encoding `float32` and `float64` values that are `NaN`, `Infinity`, or `-Infinity`. ([#316](https://github.com/aws/smithy-go/pull/316))
+
+### Codegen
+* Adds support for handling `float32` and `float64` `NaN` values in HTTP Protocol Unit Tests. ([#316](https://github.com/aws/smithy-go/pull/316))
+* Adds support protocol generator implementations to override the error code string returned by `ErrorCode` methods on generated error types. ([#315](https://github.com/aws/smithy-go/pull/315))
+
+# Release v1.5.0 (2021-06-25)
+
+### Smithy Go module
+* `time`: Update time parsing to not be as strict for HTTPDate and DateTime ([#307](https://github.com/aws/smithy-go/pull/307))
+ * Fixes [#302](https://github.com/aws/smithy-go/issues/302) by changing time to UTC before formatting so no local offset time is lost.
+
+### Codegen
+* Adds support for integrating client members via plugins ([#301](https://github.com/aws/smithy-go/pull/301))
+* Fix serialization of enum types marked with payload trait ([#296](https://github.com/aws/smithy-go/pull/296))
+* Update generation of API client modules to include a manifest of files generated ([#283](https://github.com/aws/smithy-go/pull/283))
+* Update Group Java group ID for smithy-go generator ([#298](https://github.com/aws/smithy-go/pull/298))
+* Support the delegation of determining the errors that can occur for an operation ([#304](https://github.com/aws/smithy-go/pull/304))
+* Support for marking and documenting deprecated client config fields. ([#303](https://github.com/aws/smithy-go/pull/303))
+
+# Release v1.4.0 (2021-05-06)
+
+### Smithy Go module
+* `encoding/xml`: Fix escaping of Next Line and Line Start in XML Encoder ([#267](https://github.com/aws/smithy-go/pull/267))
+
+### Codegen
+* Add support for Smithy 1.7 ([#289](https://github.com/aws/smithy-go/pull/289))
+* Add support for httpQueryParams location
+* Add support for model renaming conflict resolution with service closure
+
+# Release v1.3.1 (2021-04-08)
+
+### Smithy Go module
+* `transport/http`: Loosen endpoint hostname validation to allow specifying port numbers. ([#279](https://github.com/aws/smithy-go/pull/279))
+* `io`: Fix RingBuffer panics due to out of bounds index. ([#282](https://github.com/aws/smithy-go/pull/282))
+
+# Release v1.3.0 (2021-04-01)
+
+### Smithy Go module
+* `transport/http`: Add utility to safely join string to url path, and url raw query.
+
+### Codegen
+* Update HttpBindingProtocolGenerator to use http/transport JoinPath and JoinQuery utility.
+
+# Release v1.2.0 (2021-03-12)
+
+### Smithy Go module
+* Fix support for parsing shortened year format in HTTP Date header.
+* Fix GitHub APIDiff action workflow to get gorelease tool correctly.
+* Fix codegen artifact unit test for Go 1.16
+
+### Codegen
+* Fix generating paginator nil parameter handling before usage.
+* Fix Serialize unboxed members decorated as required.
+* Add ability to define resolvers at both client construction and operation invocation.
+* Support for extending paginators with custom runtime trait
diff --git a/vendor/github.com/aws/smithy-go/CODE_OF_CONDUCT.md b/vendor/github.com/aws/smithy-go/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000..5b627cfa6
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/CODE_OF_CONDUCT.md
@@ -0,0 +1,4 @@
+## Code of Conduct
+This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
+For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
+opensource-codeofconduct@amazon.com with any additional questions or comments.
diff --git a/vendor/github.com/aws/smithy-go/CONTRIBUTING.md b/vendor/github.com/aws/smithy-go/CONTRIBUTING.md
new file mode 100644
index 000000000..c4b6a1c50
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/CONTRIBUTING.md
@@ -0,0 +1,59 @@
+# Contributing Guidelines
+
+Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
+documentation, we greatly value feedback and contributions from our community.
+
+Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
+information to effectively respond to your bug report or contribution.
+
+
+## Reporting Bugs/Feature Requests
+
+We welcome you to use the GitHub issue tracker to report bugs or suggest features.
+
+When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already
+reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
+
+* A reproducible test case or series of steps
+* The version of our code being used
+* Any modifications you've made relevant to the bug
+* Anything unusual about your environment or deployment
+
+
+## Contributing via Pull Requests
+Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
+
+1. You are working against the latest source on the *main* branch.
+2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
+3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
+
+To send us a pull request, please:
+
+1. Fork the repository.
+2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
+3. Ensure local tests pass.
+4. Commit to your fork using clear commit messages.
+5. Send us a pull request, answering any default questions in the pull request interface.
+6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
+
+GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
+[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
+
+
+## Finding contributions to work on
+Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
+
+
+## Code of Conduct
+This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
+For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
+opensource-codeofconduct@amazon.com with any additional questions or comments.
+
+
+## Security issue notifications
+If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
+
+
+## Licensing
+
+See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
diff --git a/vendor/github.com/aws/smithy-go/LICENSE b/vendor/github.com/aws/smithy-go/LICENSE
new file mode 100644
index 000000000..67db85882
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/LICENSE
@@ -0,0 +1,175 @@
+
+ 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.
diff --git a/vendor/github.com/aws/smithy-go/Makefile b/vendor/github.com/aws/smithy-go/Makefile
new file mode 100644
index 000000000..b8c657435
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/Makefile
@@ -0,0 +1,63 @@
+PRE_RELEASE_VERSION ?=
+
+RELEASE_MANIFEST_FILE ?=
+RELEASE_CHGLOG_DESC_FILE ?=
+
+REPOTOOLS_VERSION ?= latest
+REPOTOOLS_MODULE = github.com/awslabs/aws-go-multi-module-repository-tools
+REPOTOOLS_CMD_CALCULATE_RELEASE = ${REPOTOOLS_MODULE}/cmd/calculaterelease@${REPOTOOLS_VERSION}
+REPOTOOLS_CMD_CALCULATE_RELEASE_ADDITIONAL_ARGS ?=
+REPOTOOLS_CMD_UPDATE_REQUIRES = ${REPOTOOLS_MODULE}/cmd/updaterequires@${REPOTOOLS_VERSION}
+REPOTOOLS_CMD_UPDATE_MODULE_METADATA = ${REPOTOOLS_MODULE}/cmd/updatemodulemeta@${REPOTOOLS_VERSION}
+REPOTOOLS_CMD_GENERATE_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/generatechangelog@${REPOTOOLS_VERSION}
+REPOTOOLS_CMD_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/changelog@${REPOTOOLS_VERSION}
+REPOTOOLS_CMD_TAG_RELEASE = ${REPOTOOLS_MODULE}/cmd/tagrelease@${REPOTOOLS_VERSION}
+REPOTOOLS_CMD_MODULE_VERSION = ${REPOTOOLS_MODULE}/cmd/moduleversion@${REPOTOOLS_VERSION}
+
+ifneq ($(PRE_RELEASE_VERSION),)
+ REPOTOOLS_CMD_CALCULATE_RELEASE_ADDITIONAL_ARGS += -preview=${PRE_RELEASE_VERSION}
+endif
+
+smithy-publish-local:
+ cd codegen && ./gradlew publishToMavenLocal
+
+smithy-build:
+ cd codegen && ./gradlew build
+
+smithy-clean:
+ cd codegen && ./gradlew clean
+
+#####################
+# Release Process #
+#####################
+.PHONY: preview-release pre-release-validation release
+
+preview-release:
+ go run ${REPOTOOLS_CMD_CALCULATE_RELEASE} ${REPOTOOLS_CMD_CALCULATE_RELEASE_ADDITIONAL_ARGS}
+
+pre-release-validation:
+ @if [[ -z "${RELEASE_MANIFEST_FILE}" ]]; then \
+ echo "RELEASE_MANIFEST_FILE is required to specify the file to write the release manifest" && false; \
+ fi
+ @if [[ -z "${RELEASE_CHGLOG_DESC_FILE}" ]]; then \
+ echo "RELEASE_CHGLOG_DESC_FILE is required to specify the file to write the release notes" && false; \
+ fi
+
+release: pre-release-validation
+ go run ${REPOTOOLS_CMD_CALCULATE_RELEASE} -o ${RELEASE_MANIFEST_FILE} ${REPOTOOLS_CMD_CALCULATE_RELEASE_ADDITIONAL_ARGS}
+ go run ${REPOTOOLS_CMD_UPDATE_REQUIRES} -release ${RELEASE_MANIFEST_FILE}
+ go run ${REPOTOOLS_CMD_UPDATE_MODULE_METADATA} -release ${RELEASE_MANIFEST_FILE}
+ go run ${REPOTOOLS_CMD_GENERATE_CHANGELOG} -release ${RELEASE_MANIFEST_FILE} -o ${RELEASE_CHGLOG_DESC_FILE}
+ go run ${REPOTOOLS_CMD_CHANGELOG} rm -all
+ go run ${REPOTOOLS_CMD_TAG_RELEASE} -release ${RELEASE_MANIFEST_FILE}
+
+module-version:
+ @go run ${REPOTOOLS_CMD_MODULE_VERSION} .
+
+##############
+# Repo Tools #
+##############
+.PHONY: install-changelog
+
+install-changelog:
+ go install ${REPOTOOLS_MODULE}/cmd/changelog@${REPOTOOLS_VERSION}
diff --git a/vendor/github.com/aws/smithy-go/NOTICE b/vendor/github.com/aws/smithy-go/NOTICE
new file mode 100644
index 000000000..616fc5889
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/NOTICE
@@ -0,0 +1 @@
+Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
diff --git a/vendor/github.com/aws/smithy-go/README.md b/vendor/github.com/aws/smithy-go/README.md
new file mode 100644
index 000000000..789b37889
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/README.md
@@ -0,0 +1,12 @@
+## Smithy Go
+
+[![Go Build Status](https://github.com/aws/smithy-go/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/go.yml)[![Codegen Build Status](https://github.com/aws/smithy-go/actions/workflows/codegen.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/codegen.yml)
+
+Smithy code generators for Go.
+
+**WARNING: All interfaces are subject to change.**
+
+## License
+
+This project is licensed under the Apache-2.0 License.
+
diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/docs.go b/vendor/github.com/aws/smithy-go/auth/bearer/docs.go
new file mode 100644
index 000000000..1c9b9715c
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/auth/bearer/docs.go
@@ -0,0 +1,3 @@
+// Package bearer provides middleware and utilities for authenticating API
+// operation calls with a Bearer Token.
+package bearer
diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/middleware.go b/vendor/github.com/aws/smithy-go/auth/bearer/middleware.go
new file mode 100644
index 000000000..8c7d72099
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/auth/bearer/middleware.go
@@ -0,0 +1,104 @@
+package bearer
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Message is the middleware stack's request transport message value.
+type Message interface{}
+
+// Signer provides an interface for implementations to decorate a request
+// message with a bearer token. The signer is responsible for validating the
+// message type is compatible with the signer.
+type Signer interface {
+ SignWithBearerToken(context.Context, Token, Message) (Message, error)
+}
+
+// AuthenticationMiddleware provides the Finalize middleware step for signing
+// an request message with a bearer token.
+type AuthenticationMiddleware struct {
+ signer Signer
+ tokenProvider TokenProvider
+}
+
+// AddAuthenticationMiddleware helper adds the AuthenticationMiddleware to the
+// middleware Stack in the Finalize step with the options provided.
+func AddAuthenticationMiddleware(s *middleware.Stack, signer Signer, tokenProvider TokenProvider) error {
+ return s.Finalize.Add(
+ NewAuthenticationMiddleware(signer, tokenProvider),
+ middleware.After,
+ )
+}
+
+// NewAuthenticationMiddleware returns an initialized AuthenticationMiddleware.
+func NewAuthenticationMiddleware(signer Signer, tokenProvider TokenProvider) *AuthenticationMiddleware {
+ return &AuthenticationMiddleware{
+ signer: signer,
+ tokenProvider: tokenProvider,
+ }
+}
+
+const authenticationMiddlewareID = "BearerTokenAuthentication"
+
+// ID returns the resolver identifier
+func (m *AuthenticationMiddleware) ID() string {
+ return authenticationMiddlewareID
+}
+
+// HandleFinalize implements the FinalizeMiddleware interface in order to
+// update the request with bearer token authentication.
+func (m *AuthenticationMiddleware) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
+) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ token, err := m.tokenProvider.RetrieveBearerToken(ctx)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed AuthenticationMiddleware wrap message, %w", err)
+ }
+
+ signedMessage, err := m.signer.SignWithBearerToken(ctx, token, in.Request)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed AuthenticationMiddleware sign message, %w", err)
+ }
+
+ in.Request = signedMessage
+ return next.HandleFinalize(ctx, in)
+}
+
+// SignHTTPSMessage provides a bearer token authentication implementation that
+// will sign the message with the provided bearer token.
+//
+// Will fail if the message is not a smithy-go HTTP request or the request is
+// not HTTPS.
+type SignHTTPSMessage struct{}
+
+// NewSignHTTPSMessage returns an initialized signer for HTTP messages.
+func NewSignHTTPSMessage() *SignHTTPSMessage {
+ return &SignHTTPSMessage{}
+}
+
+// SignWithBearerToken returns a copy of the HTTP request with the bearer token
+// added via the "Authorization" header, per RFC 6750, https://datatracker.ietf.org/doc/html/rfc6750.
+//
+// Returns an error if the request's URL scheme is not HTTPS, or the request
+// message is not an smithy-go HTTP Request pointer type.
+func (SignHTTPSMessage) SignWithBearerToken(ctx context.Context, token Token, message Message) (Message, error) {
+ req, ok := message.(*smithyhttp.Request)
+ if !ok {
+ return nil, fmt.Errorf("expect smithy-go HTTP Request, got %T", message)
+ }
+
+ if !req.IsHTTPS() {
+ return nil, fmt.Errorf("bearer token with HTTP request requires HTTPS")
+ }
+
+ reqClone := req.Clone()
+ reqClone.Header.Set("Authorization", "Bearer "+token.Value)
+
+ return reqClone, nil
+}
diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/token.go b/vendor/github.com/aws/smithy-go/auth/bearer/token.go
new file mode 100644
index 000000000..be260d4c7
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/auth/bearer/token.go
@@ -0,0 +1,50 @@
+package bearer
+
+import (
+ "context"
+ "time"
+)
+
+// Token provides a type wrapping a bearer token and expiration metadata.
+type Token struct {
+ Value string
+
+ CanExpire bool
+ Expires time.Time
+}
+
+// Expired returns if the token's Expires time is before or equal to the time
+// provided. If CanExpires is false, Expired will always return false.
+func (t Token) Expired(now time.Time) bool {
+ if !t.CanExpire {
+ return false
+ }
+ now = now.Round(0)
+ return now.Equal(t.Expires) || now.After(t.Expires)
+}
+
+// TokenProvider provides interface for retrieving bearer tokens.
+type TokenProvider interface {
+ RetrieveBearerToken(context.Context) (Token, error)
+}
+
+// TokenProviderFunc provides a helper utility to wrap a function as a type
+// that implements the TokenProvider interface.
+type TokenProviderFunc func(context.Context) (Token, error)
+
+// RetrieveBearerToken calls the wrapped function, returning the Token or
+// error.
+func (fn TokenProviderFunc) RetrieveBearerToken(ctx context.Context) (Token, error) {
+ return fn(ctx)
+}
+
+// StaticTokenProvider provides a utility for wrapping a static bearer token
+// value within an implementation of a token provider.
+type StaticTokenProvider struct {
+ Token Token
+}
+
+// RetrieveBearerToken returns the static token specified.
+func (s StaticTokenProvider) RetrieveBearerToken(context.Context) (Token, error) {
+ return s.Token, nil
+}
diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/token_cache.go b/vendor/github.com/aws/smithy-go/auth/bearer/token_cache.go
new file mode 100644
index 000000000..223ddf52b
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/auth/bearer/token_cache.go
@@ -0,0 +1,208 @@
+package bearer
+
+import (
+ "context"
+ "fmt"
+ "sync/atomic"
+ "time"
+
+ smithycontext "github.com/aws/smithy-go/context"
+ "github.com/aws/smithy-go/internal/sync/singleflight"
+)
+
+// package variable that can be override in unit tests.
+var timeNow = time.Now
+
+// TokenCacheOptions provides a set of optional configuration options for the
+// TokenCache TokenProvider.
+type TokenCacheOptions struct {
+ // The duration before the token will expire when the credentials will be
+ // refreshed. If DisableAsyncRefresh is true, the RetrieveBearerToken calls
+ // will be blocking.
+ //
+ // Asynchronous refreshes are deduplicated, and only one will be in-flight
+ // at a time. If the token expires while an asynchronous refresh is in
+ // flight, the next call to RetrieveBearerToken will block on that refresh
+ // to return.
+ RefreshBeforeExpires time.Duration
+
+ // The timeout the underlying TokenProvider's RetrieveBearerToken call must
+ // return within, or will be canceled. Defaults to 0, no timeout.
+ //
+ // If 0 timeout, its possible for the underlying tokenProvider's
+ // RetrieveBearerToken call to block forever. Preventing subsequent
+ // TokenCache attempts to refresh the token.
+ //
+ // If this timeout is reached all pending deduplicated calls to
+ // TokenCache RetrieveBearerToken will fail with an error.
+ RetrieveBearerTokenTimeout time.Duration
+
+ // The minimum duration between asynchronous refresh attempts. If the next
+ // asynchronous recent refresh attempt was within the minimum delay
+ // duration, the call to retrieve will return the current cached token, if
+ // not expired.
+ //
+ // The asynchronous retrieve is deduplicated across multiple calls when
+ // RetrieveBearerToken is called. The asynchronous retrieve is not a
+ // periodic task. It is only performed when the token has not yet expired,
+ // and the current item is within the RefreshBeforeExpires window, and the
+ // TokenCache's RetrieveBearerToken method is called.
+ //
+ // If 0, (default) there will be no minimum delay between asynchronous
+ // refresh attempts.
+ //
+ // If DisableAsyncRefresh is true, this option is ignored.
+ AsyncRefreshMinimumDelay time.Duration
+
+ // Sets if the TokenCache will attempt to refresh the token in the
+ // background asynchronously instead of blocking for credentials to be
+ // refreshed. If disabled token refresh will be blocking.
+ //
+ // The first call to RetrieveBearerToken will always be blocking, because
+ // there is no cached token.
+ DisableAsyncRefresh bool
+}
+
+// TokenCache provides an utility to cache Bearer Authentication tokens from a
+// wrapped TokenProvider. The TokenCache can be has options to configure the
+// cache's early and asynchronous refresh of the token.
+type TokenCache struct {
+ options TokenCacheOptions
+ provider TokenProvider
+
+ cachedToken atomic.Value
+ lastRefreshAttemptTime atomic.Value
+ sfGroup singleflight.Group
+}
+
+// NewTokenCache returns a initialized TokenCache that implements the
+// TokenProvider interface. Wrapping the provider passed in. Also taking a set
+// of optional functional option parameters to configure the token cache.
+func NewTokenCache(provider TokenProvider, optFns ...func(*TokenCacheOptions)) *TokenCache {
+ var options TokenCacheOptions
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &TokenCache{
+ options: options,
+ provider: provider,
+ }
+}
+
+// RetrieveBearerToken returns the token if it could be obtained, or error if a
+// valid token could not be retrieved.
+//
+// The passed in Context's cancel/deadline/timeout will impacting only this
+// individual retrieve call and not any other already queued up calls. This
+// means underlying provider's RetrieveBearerToken calls could block for ever,
+// and not be canceled with the Context. Set RetrieveBearerTokenTimeout to
+// provide a timeout, preventing the underlying TokenProvider blocking forever.
+//
+// By default, if the passed in Context is canceled, all of its values will be
+// considered expired. The wrapped TokenProvider will not be able to lookup the
+// values from the Context once it is expired. This is done to protect against
+// expired values no longer being valid. To disable this behavior, use
+// smithy-go's context.WithPreserveExpiredValues to add a value to the Context
+// before calling RetrieveBearerToken to enable support for expired values.
+//
+// Without RetrieveBearerTokenTimeout there is the potential for a underlying
+// Provider's RetrieveBearerToken call to sit forever. Blocking in subsequent
+// attempts at refreshing the token.
+func (p *TokenCache) RetrieveBearerToken(ctx context.Context) (Token, error) {
+ cachedToken, ok := p.getCachedToken()
+ if !ok || cachedToken.Expired(timeNow()) {
+ return p.refreshBearerToken(ctx)
+ }
+
+ // Check if the token should be refreshed before it expires.
+ refreshToken := cachedToken.Expired(timeNow().Add(p.options.RefreshBeforeExpires))
+ if !refreshToken {
+ return cachedToken, nil
+ }
+
+ if p.options.DisableAsyncRefresh {
+ return p.refreshBearerToken(ctx)
+ }
+
+ p.tryAsyncRefresh(ctx)
+
+ return cachedToken, nil
+}
+
+// tryAsyncRefresh attempts to asynchronously refresh the token returning the
+// already cached token. If it AsyncRefreshMinimumDelay option is not zero, and
+// the duration since the last refresh is less than that value, nothing will be
+// done.
+func (p *TokenCache) tryAsyncRefresh(ctx context.Context) {
+ if p.options.AsyncRefreshMinimumDelay != 0 {
+ var lastRefreshAttempt time.Time
+ if v := p.lastRefreshAttemptTime.Load(); v != nil {
+ lastRefreshAttempt = v.(time.Time)
+ }
+
+ if timeNow().Before(lastRefreshAttempt.Add(p.options.AsyncRefreshMinimumDelay)) {
+ return
+ }
+ }
+
+ // Ignore the returned channel so this won't be blocking, and limit the
+ // number of additional goroutines created.
+ p.sfGroup.DoChan("async-refresh", func() (interface{}, error) {
+ res, err := p.refreshBearerToken(ctx)
+ if p.options.AsyncRefreshMinimumDelay != 0 {
+ var refreshAttempt time.Time
+ if err != nil {
+ refreshAttempt = timeNow()
+ }
+ p.lastRefreshAttemptTime.Store(refreshAttempt)
+ }
+
+ return res, err
+ })
+}
+
+func (p *TokenCache) refreshBearerToken(ctx context.Context) (Token, error) {
+ resCh := p.sfGroup.DoChan("refresh-token", func() (interface{}, error) {
+ ctx := smithycontext.WithSuppressCancel(ctx)
+ if v := p.options.RetrieveBearerTokenTimeout; v != 0 {
+ var cancel func()
+ ctx, cancel = context.WithTimeout(ctx, v)
+ defer cancel()
+ }
+ return p.singleRetrieve(ctx)
+ })
+
+ select {
+ case res := <-resCh:
+ return res.Val.(Token), res.Err
+ case <-ctx.Done():
+ return Token{}, fmt.Errorf("retrieve bearer token canceled, %w", ctx.Err())
+ }
+}
+
+func (p *TokenCache) singleRetrieve(ctx context.Context) (interface{}, error) {
+ token, err := p.provider.RetrieveBearerToken(ctx)
+ if err != nil {
+ return Token{}, fmt.Errorf("failed to retrieve bearer token, %w", err)
+ }
+
+ p.cachedToken.Store(&token)
+ return token, nil
+}
+
+// getCachedToken returns the currently cached token and true if found. Returns
+// false if no token is cached.
+func (p *TokenCache) getCachedToken() (Token, bool) {
+ v := p.cachedToken.Load()
+ if v == nil {
+ return Token{}, false
+ }
+
+ t := v.(*Token)
+ if t == nil || t.Value == "" {
+ return Token{}, false
+ }
+
+ return *t, true
+}
diff --git a/vendor/github.com/aws/smithy-go/context/suppress_expired.go b/vendor/github.com/aws/smithy-go/context/suppress_expired.go
new file mode 100644
index 000000000..a39b84a27
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/context/suppress_expired.go
@@ -0,0 +1,81 @@
+package context
+
+import "context"
+
+// valueOnlyContext provides a utility to preserve only the values of a
+// Context. Suppressing any cancellation or deadline on that context being
+// propagated downstream of this value.
+//
+// If preserveExpiredValues is false (default), and the valueCtx is canceled,
+// calls to lookup values with the Values method, will always return nil. Setting
+// preserveExpiredValues to true, will allow the valueOnlyContext to lookup
+// values in valueCtx even if valueCtx is canceled.
+//
+// Based on the Go standard libraries net/lookup.go onlyValuesCtx utility.
+// https://github.com/golang/go/blob/da2773fe3e2f6106634673a38dc3a6eb875fe7d8/src/net/lookup.go
+type valueOnlyContext struct {
+ context.Context
+
+ preserveExpiredValues bool
+ valuesCtx context.Context
+}
+
+var _ context.Context = (*valueOnlyContext)(nil)
+
+// Value looks up the key, returning its value. If configured to not preserve
+// values of expired context, and the wrapping context is canceled, nil will be
+// returned.
+func (v *valueOnlyContext) Value(key interface{}) interface{} {
+ if !v.preserveExpiredValues {
+ select {
+ case <-v.valuesCtx.Done():
+ return nil
+ default:
+ }
+ }
+
+ return v.valuesCtx.Value(key)
+}
+
+// WithSuppressCancel wraps the Context value, suppressing its deadline and
+// cancellation events being propagated downstream to consumer of the returned
+// context.
+//
+// By default the wrapped Context's Values are available downstream until the
+// wrapped Context is canceled. Once the wrapped Context is canceled, Values
+// method called on the context return will no longer lookup any key. As they
+// are now considered expired.
+//
+// To override this behavior, use WithPreserveExpiredValues on the Context
+// before it is wrapped by WithSuppressCancel. This will make the Context
+// returned by WithSuppressCancel allow lookup of expired values.
+func WithSuppressCancel(ctx context.Context) context.Context {
+ return &valueOnlyContext{
+ Context: context.Background(),
+ valuesCtx: ctx,
+
+ preserveExpiredValues: GetPreserveExpiredValues(ctx),
+ }
+}
+
+type preserveExpiredValuesKey struct{}
+
+// WithPreserveExpiredValues adds a Value to the Context if expired values
+// should be preserved, and looked up by a Context wrapped by
+// WithSuppressCancel.
+//
+// WithPreserveExpiredValues must be added as a value to a Context, before that
+// Context is wrapped by WithSuppressCancel
+func WithPreserveExpiredValues(ctx context.Context, enable bool) context.Context {
+ return context.WithValue(ctx, preserveExpiredValuesKey{}, enable)
+}
+
+// GetPreserveExpiredValues looks up, and returns the PreserveExpressValues
+// value in the context. Returning true if enabled, false otherwise.
+func GetPreserveExpiredValues(ctx context.Context) bool {
+ v := ctx.Value(preserveExpiredValuesKey{})
+ if v != nil {
+ return v.(bool)
+ }
+ return false
+}
diff --git a/vendor/github.com/aws/smithy-go/doc.go b/vendor/github.com/aws/smithy-go/doc.go
new file mode 100644
index 000000000..87b0c74b7
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/doc.go
@@ -0,0 +1,2 @@
+// Package smithy provides the core components for a Smithy SDK.
+package smithy
diff --git a/vendor/github.com/aws/smithy-go/document.go b/vendor/github.com/aws/smithy-go/document.go
new file mode 100644
index 000000000..dec498c57
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/document.go
@@ -0,0 +1,10 @@
+package smithy
+
+// Document provides access to loosely structured data in a document-like
+// format.
+//
+// Deprecated: See the github.com/aws/smithy-go/document package.
+type Document interface {
+ UnmarshalDocument(interface{}) error
+ GetValue() (interface{}, error)
+}
diff --git a/vendor/github.com/aws/smithy-go/document/doc.go b/vendor/github.com/aws/smithy-go/document/doc.go
new file mode 100644
index 000000000..03055b7a1
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/document/doc.go
@@ -0,0 +1,12 @@
+// Package document provides interface definitions and error types for document types.
+//
+// A document is a protocol-agnostic type which supports a JSON-like data-model. You can use this type to send
+// UTF-8 strings, arbitrary precision numbers, booleans, nulls, a list of these values, and a map of UTF-8
+// strings to these values.
+//
+// API Clients expose document constructors in their respective client document packages which must be used to
+// Marshal and Unmarshal Go types to and from their respective protocol representations.
+//
+// See the Marshaler and Unmarshaler type documentation for more details on how to Go types can be converted to and from
+// document types.
+package document
diff --git a/vendor/github.com/aws/smithy-go/document/document.go b/vendor/github.com/aws/smithy-go/document/document.go
new file mode 100644
index 000000000..8f852d95c
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/document/document.go
@@ -0,0 +1,153 @@
+package document
+
+import (
+ "fmt"
+ "math/big"
+ "strconv"
+)
+
+// Marshaler is an interface for a type that marshals a document to its protocol-specific byte representation and
+// returns the resulting bytes. A non-nil error will be returned if an error is encountered during marshaling.
+//
+// Marshal supports basic scalars (int,uint,float,bool,string), big.Int, and big.Float, maps, slices, and structs.
+// Anonymous nested types are flattened based on Go anonymous type visibility.
+//
+// When defining struct types. the `document` struct tag can be used to control how the value will be
+// marshaled into the resulting protocol document.
+//
+// // Field is ignored
+// Field int `document:"-"`
+//
+// // Field object of key "myName"
+// Field int `document:"myName"`
+//
+// // Field object key of key "myName", and
+// // Field is omitted if the field is a zero value for the type.
+// Field int `document:"myName,omitempty"`
+//
+// // Field object key of "Field", and
+// // Field is omitted if the field is a zero value for the type.
+// Field int `document:",omitempty"`
+//
+// All struct fields, including anonymous fields, are marshaled unless the
+// any of the following conditions are meet.
+//
+// - the field is not exported
+// - document field tag is "-"
+// - document field tag specifies "omitempty", and is a zero value.
+//
+// Pointer and interface values are encoded as the value pointed to or
+// contained in the interface. A nil value encodes as a null
+// value unless `omitempty` struct tag is provided.
+//
+// Channel, complex, and function values are not encoded and will be skipped
+// when walking the value to be marshaled.
+//
+// time.Time is not supported and will cause the Marshaler to return an error. These values should be represented
+// by your application as a string or numerical representation.
+//
+// Errors that occur when marshaling will stop the marshaler, and return the error.
+//
+// Marshal cannot represent cyclic data structures and will not handle them.
+// Passing cyclic structures to Marshal will result in an infinite recursion.
+type Marshaler interface {
+ MarshalSmithyDocument() ([]byte, error)
+}
+
+// Unmarshaler is an interface for a type that unmarshals a document from its protocol-specific representation, and
+// stores the result into the value pointed by v. If v is nil or not a pointer then InvalidUnmarshalError will be
+// returned.
+//
+// Unmarshaler supports the same encodings produced by a document Marshaler. This includes support for the `document`
+// struct field tag for controlling how struct fields are unmarshaled.
+//
+// Both generic interface{} and concrete types are valid unmarshal destination types. When unmarshaling a document
+// into an empty interface the Unmarshaler will store one of these values:
+// bool, for boolean values
+// document.Number, for arbitrary-precision numbers (int64, float64, big.Int, big.Float)
+// string, for string values
+// []interface{}, for array values
+// map[string]interface{}, for objects
+// nil, for null values
+//
+// When unmarshaling, any error that occurs will halt the unmarshal and return the error.
+type Unmarshaler interface {
+ UnmarshalSmithyDocument(v interface{}) error
+}
+
+type noSerde interface {
+ noSmithyDocumentSerde()
+}
+
+// NoSerde is a sentinel value to indicate that a given type should not be marshaled or unmarshaled
+// into a protocol document.
+type NoSerde struct{}
+
+func (n NoSerde) noSmithyDocumentSerde() {}
+
+var _ noSerde = (*NoSerde)(nil)
+
+// IsNoSerde returns whether the given type implements the no smithy document serde interface.
+func IsNoSerde(x interface{}) bool {
+ _, ok := x.(noSerde)
+ return ok
+}
+
+// Number is an arbitrary precision numerical value
+type Number string
+
+// Int64 returns the number as a string.
+func (n Number) String() string {
+ return string(n)
+}
+
+// Int64 returns the number as an int64.
+func (n Number) Int64() (int64, error) {
+ return n.intOfBitSize(64)
+}
+
+func (n Number) intOfBitSize(bitSize int) (int64, error) {
+ return strconv.ParseInt(string(n), 10, bitSize)
+}
+
+// Uint64 returns the number as a uint64.
+func (n Number) Uint64() (uint64, error) {
+ return n.uintOfBitSize(64)
+}
+
+func (n Number) uintOfBitSize(bitSize int) (uint64, error) {
+ return strconv.ParseUint(string(n), 10, bitSize)
+}
+
+// Float32 returns the number parsed as a 32-bit float, returns a float64.
+func (n Number) Float32() (float64, error) {
+ return n.floatOfBitSize(32)
+}
+
+// Float64 returns the number as a float64.
+func (n Number) Float64() (float64, error) {
+ return n.floatOfBitSize(64)
+}
+
+// Float64 returns the number as a float64.
+func (n Number) floatOfBitSize(bitSize int) (float64, error) {
+ return strconv.ParseFloat(string(n), bitSize)
+}
+
+// BigFloat attempts to convert the number to a big.Float, returns an error if the operation fails.
+func (n Number) BigFloat() (*big.Float, error) {
+ f, ok := (&big.Float{}).SetString(string(n))
+ if !ok {
+ return nil, fmt.Errorf("failed to convert to big.Float")
+ }
+ return f, nil
+}
+
+// BigInt attempts to convert the number to a big.Int, returns an error if the operation fails.
+func (n Number) BigInt() (*big.Int, error) {
+ f, ok := (&big.Int{}).SetString(string(n), 10)
+ if !ok {
+ return nil, fmt.Errorf("failed to convert to big.Float")
+ }
+ return f, nil
+}
diff --git a/vendor/github.com/aws/smithy-go/document/errors.go b/vendor/github.com/aws/smithy-go/document/errors.go
new file mode 100644
index 000000000..046a7a765
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/document/errors.go
@@ -0,0 +1,75 @@
+package document
+
+import (
+ "fmt"
+ "reflect"
+)
+
+// UnmarshalTypeError is an error type representing an error
+// unmarshaling a Smithy document to a Go value type. This is different
+// from UnmarshalError in that it does not wrap an underlying error type.
+type UnmarshalTypeError struct {
+ Value string
+ Type reflect.Type
+}
+
+// Error returns the string representation of the error.
+// Satisfying the error interface.
+func (e *UnmarshalTypeError) Error() string {
+ return fmt.Sprintf("unmarshal failed, cannot unmarshal %s into Go value type %s",
+ e.Value, e.Type.String())
+}
+
+// An InvalidUnmarshalError is an error type representing an invalid type
+// encountered while unmarshaling a Smithy document to a Go value type.
+type InvalidUnmarshalError struct {
+ Type reflect.Type
+}
+
+// Error returns the string representation of the error.
+// Satisfying the error interface.
+func (e *InvalidUnmarshalError) Error() string {
+ var msg string
+ if e.Type == nil {
+ msg = "cannot unmarshal to nil value"
+ } else if e.Type.Kind() != reflect.Ptr {
+ msg = fmt.Sprintf("cannot unmarshal to non-pointer value, got %s", e.Type.String())
+ } else {
+ msg = fmt.Sprintf("cannot unmarshal to nil value, %s", e.Type.String())
+ }
+
+ return fmt.Sprintf("unmarshal failed, %s", msg)
+}
+
+// An UnmarshalError wraps an error that occurred while unmarshaling a
+// Smithy document into a Go type. This is different from
+// UnmarshalTypeError in that it wraps the underlying error that occurred.
+type UnmarshalError struct {
+ Err error
+ Value string
+ Type reflect.Type
+}
+
+// Unwrap returns the underlying unmarshaling error
+func (e *UnmarshalError) Unwrap() error {
+ return e.Err
+}
+
+// Error returns the string representation of the error.
+// Satisfying the error interface.
+func (e *UnmarshalError) Error() string {
+ return fmt.Sprintf("unmarshal failed, cannot unmarshal %q into %s, %v",
+ e.Value, e.Type.String(), e.Err)
+}
+
+// An InvalidMarshalError is an error type representing an error
+// occurring when marshaling a Go value type.
+type InvalidMarshalError struct {
+ Message string
+}
+
+// Error returns the string representation of the error.
+// Satisfying the error interface.
+func (e *InvalidMarshalError) Error() string {
+ return fmt.Sprintf("marshal failed, %s", e.Message)
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/doc.go b/vendor/github.com/aws/smithy-go/encoding/doc.go
new file mode 100644
index 000000000..792fdfa08
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/doc.go
@@ -0,0 +1,4 @@
+// Package encoding provides utilities for encoding values for specific
+// document encodings.
+
+package encoding
diff --git a/vendor/github.com/aws/smithy-go/encoding/encoding.go b/vendor/github.com/aws/smithy-go/encoding/encoding.go
new file mode 100644
index 000000000..2fdfb5225
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/encoding.go
@@ -0,0 +1,40 @@
+package encoding
+
+import (
+ "fmt"
+ "math"
+ "strconv"
+)
+
+// EncodeFloat encodes a float value as per the stdlib encoder for json and xml protocol
+// This encodes a float value into dst while attempting to conform to ES6 ToString for Numbers
+//
+// Based on encoding/json floatEncoder from the Go Standard Library
+// https://golang.org/src/encoding/json/encode.go
+func EncodeFloat(dst []byte, v float64, bits int) []byte {
+ if math.IsInf(v, 0) || math.IsNaN(v) {
+ panic(fmt.Sprintf("invalid float value: %s", strconv.FormatFloat(v, 'g', -1, bits)))
+ }
+
+ abs := math.Abs(v)
+ fmt := byte('f')
+
+ if abs != 0 {
+ if bits == 64 && (abs < 1e-6 || abs >= 1e21) || bits == 32 && (float32(abs) < 1e-6 || float32(abs) >= 1e21) {
+ fmt = 'e'
+ }
+ }
+
+ dst = strconv.AppendFloat(dst, v, fmt, -1, bits)
+
+ if fmt == 'e' {
+ // clean up e-09 to e-9
+ n := len(dst)
+ if n >= 4 && dst[n-4] == 'e' && dst[n-3] == '-' && dst[n-2] == '0' {
+ dst[n-2] = dst[n-1]
+ dst = dst[:n-1]
+ }
+ }
+
+ return dst
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/encode.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/encode.go
new file mode 100644
index 000000000..96abd073a
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/httpbinding/encode.go
@@ -0,0 +1,116 @@
+package httpbinding
+
+import (
+ "fmt"
+ "net/http"
+ "net/url"
+ "strconv"
+ "strings"
+)
+
+const (
+ contentLengthHeader = "Content-Length"
+ floatNaN = "NaN"
+ floatInfinity = "Infinity"
+ floatNegInfinity = "-Infinity"
+)
+
+// An Encoder provides encoding of REST URI path, query, and header components
+// of an HTTP request. Can also encode a stream as the payload.
+//
+// Does not support SetFields.
+type Encoder struct {
+ path, rawPath, pathBuffer []byte
+
+ query url.Values
+ header http.Header
+}
+
+// NewEncoder creates a new encoder from the passed in request. All query and
+// header values will be added on top of the request's existing values. Overwriting
+// duplicate values.
+func NewEncoder(path, query string, headers http.Header) (*Encoder, error) {
+ parseQuery, err := url.ParseQuery(query)
+ if err != nil {
+ return nil, fmt.Errorf("failed to parse query string: %w", err)
+ }
+
+ e := &Encoder{
+ path: []byte(path),
+ rawPath: []byte(path),
+ query: parseQuery,
+ header: headers.Clone(),
+ }
+
+ return e, nil
+}
+
+// Encode returns a REST protocol encoder for encoding HTTP bindings.
+//
+// Due net/http requiring `Content-Length` to be specified on the http.Request#ContentLength directly. Encode
+// will look for whether the header is present, and if so will remove it and set the respective value on http.Request.
+//
+// Returns any error occurring during encoding.
+func (e *Encoder) Encode(req *http.Request) (*http.Request, error) {
+ req.URL.Path, req.URL.RawPath = string(e.path), string(e.rawPath)
+ req.URL.RawQuery = e.query.Encode()
+
+ // net/http ignores Content-Length header and requires it to be set on http.Request
+ if v := e.header.Get(contentLengthHeader); len(v) > 0 {
+ iv, err := strconv.ParseInt(v, 10, 64)
+ if err != nil {
+ return nil, err
+ }
+ req.ContentLength = iv
+ e.header.Del(contentLengthHeader)
+ }
+
+ req.Header = e.header
+
+ return req, nil
+}
+
+// AddHeader returns a HeaderValue for appending to the given header name
+func (e *Encoder) AddHeader(key string) HeaderValue {
+ return newHeaderValue(e.header, key, true)
+}
+
+// SetHeader returns a HeaderValue for setting the given header name
+func (e *Encoder) SetHeader(key string) HeaderValue {
+ return newHeaderValue(e.header, key, false)
+}
+
+// Headers returns a Header used for encoding headers with the given prefix
+func (e *Encoder) Headers(prefix string) Headers {
+ return Headers{
+ header: e.header,
+ prefix: strings.TrimSpace(prefix),
+ }
+}
+
+// HasHeader returns if a header with the key specified exists with one or
+// more value.
+func (e Encoder) HasHeader(key string) bool {
+ return len(e.header[key]) != 0
+}
+
+// SetURI returns a URIValue used for setting the given path key
+func (e *Encoder) SetURI(key string) URIValue {
+ return newURIValue(&e.path, &e.rawPath, &e.pathBuffer, key)
+}
+
+// SetQuery returns a QueryValue used for setting the given query key
+func (e *Encoder) SetQuery(key string) QueryValue {
+ return NewQueryValue(e.query, key, false)
+}
+
+// AddQuery returns a QueryValue used for appending the given query key
+func (e *Encoder) AddQuery(key string) QueryValue {
+ return NewQueryValue(e.query, key, true)
+}
+
+// HasQuery returns if a query with the key specified exists with one or
+// more values.
+func (e *Encoder) HasQuery(key string) bool {
+ return len(e.query.Get(key)) != 0
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/header.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/header.go
new file mode 100644
index 000000000..f9256e175
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/httpbinding/header.go
@@ -0,0 +1,122 @@
+package httpbinding
+
+import (
+ "encoding/base64"
+ "math"
+ "math/big"
+ "net/http"
+ "strconv"
+ "strings"
+)
+
+// Headers is used to encode header keys using a provided prefix
+type Headers struct {
+ header http.Header
+ prefix string
+}
+
+// AddHeader returns a HeaderValue used to append values to prefix+key
+func (h Headers) AddHeader(key string) HeaderValue {
+ return h.newHeaderValue(key, true)
+}
+
+// SetHeader returns a HeaderValue used to set the value of prefix+key
+func (h Headers) SetHeader(key string) HeaderValue {
+ return h.newHeaderValue(key, false)
+}
+
+func (h Headers) newHeaderValue(key string, append bool) HeaderValue {
+ return newHeaderValue(h.header, h.prefix+strings.TrimSpace(key), append)
+}
+
+// HeaderValue is used to encode values to an HTTP header
+type HeaderValue struct {
+ header http.Header
+ key string
+ append bool
+}
+
+func newHeaderValue(header http.Header, key string, append bool) HeaderValue {
+ return HeaderValue{header: header, key: strings.TrimSpace(key), append: append}
+}
+
+func (h HeaderValue) modifyHeader(value string) {
+ if h.append {
+ h.header[h.key] = append(h.header[h.key], value)
+ } else {
+ h.header[h.key] = append(h.header[h.key][:0], value)
+ }
+}
+
+// String encodes the value v as the header string value
+func (h HeaderValue) String(v string) {
+ h.modifyHeader(v)
+}
+
+// Byte encodes the value v as a query string value
+func (h HeaderValue) Byte(v int8) {
+ h.Long(int64(v))
+}
+
+// Short encodes the value v as a query string value
+func (h HeaderValue) Short(v int16) {
+ h.Long(int64(v))
+}
+
+// Integer encodes the value v as the header string value
+func (h HeaderValue) Integer(v int32) {
+ h.Long(int64(v))
+}
+
+// Long encodes the value v as the header string value
+func (h HeaderValue) Long(v int64) {
+ h.modifyHeader(strconv.FormatInt(v, 10))
+}
+
+// Boolean encodes the value v as a query string value
+func (h HeaderValue) Boolean(v bool) {
+ h.modifyHeader(strconv.FormatBool(v))
+}
+
+// Float encodes the value v as a query string value
+func (h HeaderValue) Float(v float32) {
+ h.float(float64(v), 32)
+}
+
+// Double encodes the value v as a query string value
+func (h HeaderValue) Double(v float64) {
+ h.float(v, 64)
+}
+
+func (h HeaderValue) float(v float64, bitSize int) {
+ switch {
+ case math.IsNaN(v):
+ h.String(floatNaN)
+ case math.IsInf(v, 1):
+ h.String(floatInfinity)
+ case math.IsInf(v, -1):
+ h.String(floatNegInfinity)
+ default:
+ h.modifyHeader(strconv.FormatFloat(v, 'f', -1, bitSize))
+ }
+}
+
+// BigInteger encodes the value v as a query string value
+func (h HeaderValue) BigInteger(v *big.Int) {
+ h.modifyHeader(v.String())
+}
+
+// BigDecimal encodes the value v as a query string value
+func (h HeaderValue) BigDecimal(v *big.Float) {
+ if i, accuracy := v.Int64(); accuracy == big.Exact {
+ h.Long(i)
+ return
+ }
+ h.modifyHeader(v.Text('e', -1))
+}
+
+// Blob encodes the value v as a base64 header string value
+func (h HeaderValue) Blob(v []byte) {
+ encodeToString := base64.StdEncoding.EncodeToString(v)
+ h.modifyHeader(encodeToString)
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go
new file mode 100644
index 000000000..e78926c9a
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go
@@ -0,0 +1,108 @@
+package httpbinding
+
+import (
+ "bytes"
+ "fmt"
+)
+
+const (
+ uriTokenStart = '{'
+ uriTokenStop = '}'
+ uriTokenSkip = '+'
+)
+
+func bufCap(b []byte, n int) []byte {
+ if cap(b) < n {
+ return make([]byte, 0, n)
+ }
+
+ return b[0:0]
+}
+
+// replacePathElement replaces a single element in the path []byte.
+// Escape is used to control whether the value will be escaped using Amazon path escape style.
+func replacePathElement(path, fieldBuf []byte, key, val string, escape bool) ([]byte, []byte, error) {
+ fieldBuf = bufCap(fieldBuf, len(key)+3) // { [+] }
+ fieldBuf = append(fieldBuf, uriTokenStart)
+ fieldBuf = append(fieldBuf, key...)
+
+ start := bytes.Index(path, fieldBuf)
+ end := start + len(fieldBuf)
+ if start < 0 || len(path[end:]) == 0 {
+ // TODO what to do about error?
+ return path, fieldBuf, fmt.Errorf("invalid path index, start=%d,end=%d. %s", start, end, path)
+ }
+
+ encodeSep := true
+ if path[end] == uriTokenSkip {
+ // '+' token means do not escape slashes
+ encodeSep = false
+ end++
+ }
+
+ if escape {
+ val = EscapePath(val, encodeSep)
+ }
+
+ if path[end] != uriTokenStop {
+ return path, fieldBuf, fmt.Errorf("invalid path element, does not contain token stop, %s", path)
+ }
+ end++
+
+ fieldBuf = bufCap(fieldBuf, len(val))
+ fieldBuf = append(fieldBuf, val...)
+
+ keyLen := end - start
+ valLen := len(fieldBuf)
+
+ if keyLen == valLen {
+ copy(path[start:], fieldBuf)
+ return path, fieldBuf, nil
+ }
+
+ newLen := len(path) + (valLen - keyLen)
+ if len(path) < newLen {
+ path = path[:cap(path)]
+ }
+ if cap(path) < newLen {
+ newURI := make([]byte, newLen)
+ copy(newURI, path)
+ path = newURI
+ }
+
+ // shift
+ copy(path[start+valLen:], path[end:])
+ path = path[:newLen]
+ copy(path[start:], fieldBuf)
+
+ return path, fieldBuf, nil
+}
+
+// EscapePath escapes part of a URL path in Amazon style.
+func EscapePath(path string, encodeSep bool) string {
+ var buf bytes.Buffer
+ for i := 0; i < len(path); i++ {
+ c := path[i]
+ if noEscape[c] || (c == '/' && !encodeSep) {
+ buf.WriteByte(c)
+ } else {
+ fmt.Fprintf(&buf, "%%%02X", c)
+ }
+ }
+ return buf.String()
+}
+
+var noEscape [256]bool
+
+func init() {
+ for i := 0; i < len(noEscape); i++ {
+ // AWS expects every character except these to be escaped
+ noEscape[i] = (i >= 'A' && i <= 'Z') ||
+ (i >= 'a' && i <= 'z') ||
+ (i >= '0' && i <= '9') ||
+ i == '-' ||
+ i == '.' ||
+ i == '_' ||
+ i == '~'
+ }
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/query.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/query.go
new file mode 100644
index 000000000..c2e7d0a20
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/httpbinding/query.go
@@ -0,0 +1,107 @@
+package httpbinding
+
+import (
+ "encoding/base64"
+ "math"
+ "math/big"
+ "net/url"
+ "strconv"
+)
+
+// QueryValue is used to encode query key values
+type QueryValue struct {
+ query url.Values
+ key string
+ append bool
+}
+
+// NewQueryValue creates a new QueryValue which enables encoding
+// a query value into the given url.Values.
+func NewQueryValue(query url.Values, key string, append bool) QueryValue {
+ return QueryValue{
+ query: query,
+ key: key,
+ append: append,
+ }
+}
+
+func (qv QueryValue) updateKey(value string) {
+ if qv.append {
+ qv.query.Add(qv.key, value)
+ } else {
+ qv.query.Set(qv.key, value)
+ }
+}
+
+// Blob encodes v as a base64 query string value
+func (qv QueryValue) Blob(v []byte) {
+ encodeToString := base64.StdEncoding.EncodeToString(v)
+ qv.updateKey(encodeToString)
+}
+
+// Boolean encodes v as a query string value
+func (qv QueryValue) Boolean(v bool) {
+ qv.updateKey(strconv.FormatBool(v))
+}
+
+// String encodes v as a query string value
+func (qv QueryValue) String(v string) {
+ qv.updateKey(v)
+}
+
+// Byte encodes v as a query string value
+func (qv QueryValue) Byte(v int8) {
+ qv.Long(int64(v))
+}
+
+// Short encodes v as a query string value
+func (qv QueryValue) Short(v int16) {
+ qv.Long(int64(v))
+}
+
+// Integer encodes v as a query string value
+func (qv QueryValue) Integer(v int32) {
+ qv.Long(int64(v))
+}
+
+// Long encodes v as a query string value
+func (qv QueryValue) Long(v int64) {
+ qv.updateKey(strconv.FormatInt(v, 10))
+}
+
+// Float encodes v as a query string value
+func (qv QueryValue) Float(v float32) {
+ qv.float(float64(v), 32)
+}
+
+// Double encodes v as a query string value
+func (qv QueryValue) Double(v float64) {
+ qv.float(v, 64)
+}
+
+func (qv QueryValue) float(v float64, bitSize int) {
+ switch {
+ case math.IsNaN(v):
+ qv.String(floatNaN)
+ case math.IsInf(v, 1):
+ qv.String(floatInfinity)
+ case math.IsInf(v, -1):
+ qv.String(floatNegInfinity)
+ default:
+ qv.updateKey(strconv.FormatFloat(v, 'f', -1, bitSize))
+ }
+}
+
+// BigInteger encodes v as a query string value
+func (qv QueryValue) BigInteger(v *big.Int) {
+ qv.updateKey(v.String())
+}
+
+// BigDecimal encodes v as a query string value
+func (qv QueryValue) BigDecimal(v *big.Float) {
+ if i, accuracy := v.Int64(); accuracy == big.Exact {
+ qv.Long(i)
+ return
+ }
+ qv.updateKey(v.Text('e', -1))
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/uri.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/uri.go
new file mode 100644
index 000000000..f04e11984
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/httpbinding/uri.go
@@ -0,0 +1,111 @@
+package httpbinding
+
+import (
+ "math"
+ "math/big"
+ "strconv"
+ "strings"
+)
+
+// URIValue is used to encode named URI parameters
+type URIValue struct {
+ path, rawPath, buffer *[]byte
+
+ key string
+}
+
+func newURIValue(path *[]byte, rawPath *[]byte, buffer *[]byte, key string) URIValue {
+ return URIValue{path: path, rawPath: rawPath, buffer: buffer, key: key}
+}
+
+func (u URIValue) modifyURI(value string) (err error) {
+ *u.path, *u.buffer, err = replacePathElement(*u.path, *u.buffer, u.key, value, false)
+ if err != nil {
+ return err
+ }
+ *u.rawPath, *u.buffer, err = replacePathElement(*u.rawPath, *u.buffer, u.key, value, true)
+ return err
+}
+
+// Boolean encodes v as a URI string value
+func (u URIValue) Boolean(v bool) error {
+ return u.modifyURI(strconv.FormatBool(v))
+}
+
+// String encodes v as a URI string value
+func (u URIValue) String(v string) error {
+ return u.modifyURI(v)
+}
+
+// Byte encodes v as a URI string value
+func (u URIValue) Byte(v int8) error {
+ return u.Long(int64(v))
+}
+
+// Short encodes v as a URI string value
+func (u URIValue) Short(v int16) error {
+ return u.Long(int64(v))
+}
+
+// Integer encodes v as a URI string value
+func (u URIValue) Integer(v int32) error {
+ return u.Long(int64(v))
+}
+
+// Long encodes v as a URI string value
+func (u URIValue) Long(v int64) error {
+ return u.modifyURI(strconv.FormatInt(v, 10))
+}
+
+// Float encodes v as a query string value
+func (u URIValue) Float(v float32) error {
+ return u.float(float64(v), 32)
+}
+
+// Double encodes v as a query string value
+func (u URIValue) Double(v float64) error {
+ return u.float(v, 64)
+}
+
+func (u URIValue) float(v float64, bitSize int) error {
+ switch {
+ case math.IsNaN(v):
+ return u.String(floatNaN)
+ case math.IsInf(v, 1):
+ return u.String(floatInfinity)
+ case math.IsInf(v, -1):
+ return u.String(floatNegInfinity)
+ default:
+ return u.modifyURI(strconv.FormatFloat(v, 'f', -1, bitSize))
+ }
+}
+
+// BigInteger encodes v as a query string value
+func (u URIValue) BigInteger(v *big.Int) error {
+ return u.modifyURI(v.String())
+}
+
+// BigDecimal encodes v as a query string value
+func (u URIValue) BigDecimal(v *big.Float) error {
+ if i, accuracy := v.Int64(); accuracy == big.Exact {
+ return u.Long(i)
+ }
+ return u.modifyURI(v.Text('e', -1))
+}
+
+// SplitURI parses a Smithy HTTP binding trait URI
+func SplitURI(uri string) (path, query string) {
+ queryStart := strings.IndexRune(uri, '?')
+ if queryStart == -1 {
+ path = uri
+ return path, query
+ }
+
+ path = uri[:queryStart]
+ if queryStart+1 >= len(uri) {
+ return path, query
+ }
+ query = uri[queryStart+1:]
+
+ return path, query
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/json/array.go b/vendor/github.com/aws/smithy-go/encoding/json/array.go
new file mode 100644
index 000000000..7a232f660
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/json/array.go
@@ -0,0 +1,35 @@
+package json
+
+import (
+ "bytes"
+)
+
+// Array represents the encoding of a JSON Array
+type Array struct {
+ w *bytes.Buffer
+ writeComma bool
+ scratch *[]byte
+}
+
+func newArray(w *bytes.Buffer, scratch *[]byte) *Array {
+ w.WriteRune(leftBracket)
+ return &Array{w: w, scratch: scratch}
+}
+
+// Value adds a new element to the JSON Array.
+// Returns a Value type that is used to encode
+// the array element.
+func (a *Array) Value() Value {
+ if a.writeComma {
+ a.w.WriteRune(comma)
+ } else {
+ a.writeComma = true
+ }
+
+ return newValue(a.w, a.scratch)
+}
+
+// Close encodes the end of the JSON Array
+func (a *Array) Close() {
+ a.w.WriteRune(rightBracket)
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/json/constants.go b/vendor/github.com/aws/smithy-go/encoding/json/constants.go
new file mode 100644
index 000000000..91044092a
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/json/constants.go
@@ -0,0 +1,15 @@
+package json
+
+const (
+ leftBrace = '{'
+ rightBrace = '}'
+
+ leftBracket = '['
+ rightBracket = ']'
+
+ comma = ','
+ quote = '"'
+ colon = ':'
+
+ null = "null"
+)
diff --git a/vendor/github.com/aws/smithy-go/encoding/json/decoder_util.go b/vendor/github.com/aws/smithy-go/encoding/json/decoder_util.go
new file mode 100644
index 000000000..7050c85b3
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/json/decoder_util.go
@@ -0,0 +1,139 @@
+package json
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "io"
+)
+
+// DiscardUnknownField discards unknown fields from a decoder body.
+// This function is useful while deserializing a JSON body with additional
+// unknown information that should be discarded.
+func DiscardUnknownField(decoder *json.Decoder) error {
+ // This deliberately does not share logic with CollectUnknownField, even
+ // though it could, because if we were to delegate to that then we'd incur
+ // extra allocations and general memory usage.
+ v, err := decoder.Token()
+ if err == io.EOF {
+ return nil
+ }
+ if err != nil {
+ return err
+ }
+
+ if _, ok := v.(json.Delim); ok {
+ for decoder.More() {
+ err = DiscardUnknownField(decoder)
+ }
+ endToken, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if _, ok := endToken.(json.Delim); !ok {
+ return fmt.Errorf("invalid JSON : expected json delimiter, found %T %v",
+ endToken, endToken)
+ }
+ }
+
+ return nil
+}
+
+// CollectUnknownField grabs the contents of unknown fields from the decoder body
+// and returns them as a byte slice. This is useful for skipping unknown fields without
+// completely discarding them.
+func CollectUnknownField(decoder *json.Decoder) ([]byte, error) {
+ result, err := collectUnknownField(decoder)
+ if err != nil {
+ return nil, err
+ }
+
+ buff := bytes.NewBuffer(nil)
+ encoder := json.NewEncoder(buff)
+
+ if err := encoder.Encode(result); err != nil {
+ return nil, err
+ }
+
+ return buff.Bytes(), nil
+}
+
+func collectUnknownField(decoder *json.Decoder) (interface{}, error) {
+ // Grab the initial value. This could either be a concrete value like a string or a a
+ // delimiter.
+ token, err := decoder.Token()
+ if err == io.EOF {
+ return nil, nil
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ // If it's an array or object, we'll need to recurse.
+ delim, ok := token.(json.Delim)
+ if ok {
+ var result interface{}
+ if delim == '{' {
+ result, err = collectUnknownObject(decoder)
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ result, err = collectUnknownArray(decoder)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // Discard the closing token. decoder.Token handles checking for matching delimiters
+ if _, err := decoder.Token(); err != nil {
+ return nil, err
+ }
+ return result, nil
+ }
+
+ return token, nil
+}
+
+func collectUnknownArray(decoder *json.Decoder) ([]interface{}, error) {
+ // We need to create an empty array here instead of a nil array, since by getting
+ // into this function at all we necessarily have seen a non-nil list.
+ array := []interface{}{}
+
+ for decoder.More() {
+ value, err := collectUnknownField(decoder)
+ if err != nil {
+ return nil, err
+ }
+ array = append(array, value)
+ }
+
+ return array, nil
+}
+
+func collectUnknownObject(decoder *json.Decoder) (map[string]interface{}, error) {
+ object := make(map[string]interface{})
+
+ for decoder.More() {
+ key, err := collectUnknownField(decoder)
+ if err != nil {
+ return nil, err
+ }
+
+ // Keys have to be strings, which is particularly important as the encoder
+ // won't except a map with interface{} keys
+ stringKey, ok := key.(string)
+ if !ok {
+ return nil, fmt.Errorf("expected string key, found %T", key)
+ }
+
+ value, err := collectUnknownField(decoder)
+ if err != nil {
+ return nil, err
+ }
+
+ object[stringKey] = value
+ }
+
+ return object, nil
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/json/encoder.go b/vendor/github.com/aws/smithy-go/encoding/json/encoder.go
new file mode 100644
index 000000000..8772953f1
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/json/encoder.go
@@ -0,0 +1,30 @@
+package json
+
+import (
+ "bytes"
+)
+
+// Encoder is JSON encoder that supports construction of JSON values
+// using methods.
+type Encoder struct {
+ w *bytes.Buffer
+ Value
+}
+
+// NewEncoder returns a new JSON encoder
+func NewEncoder() *Encoder {
+ writer := bytes.NewBuffer(nil)
+ scratch := make([]byte, 64)
+
+ return &Encoder{w: writer, Value: newValue(writer, &scratch)}
+}
+
+// String returns the String output of the JSON encoder
+func (e Encoder) String() string {
+ return e.w.String()
+}
+
+// Bytes returns the []byte slice of the JSON encoder
+func (e Encoder) Bytes() []byte {
+ return e.w.Bytes()
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/json/escape.go b/vendor/github.com/aws/smithy-go/encoding/json/escape.go
new file mode 100644
index 000000000..d984d0cdc
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/json/escape.go
@@ -0,0 +1,198 @@
+// Copyright 2016 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.
+
+// Copied and modified from Go 1.8 stdlib's encoding/json/#safeSet
+
+package json
+
+import (
+ "bytes"
+ "unicode/utf8"
+)
+
+// safeSet holds the value true if the ASCII character with the given array
+// position can be represented inside a JSON string without any further
+// escaping.
+//
+// All values are true except for the ASCII control characters (0-31), the
+// double quote ("), and the backslash character ("\").
+var safeSet = [utf8.RuneSelf]bool{
+ ' ': true,
+ '!': true,
+ '"': false,
+ '#': true,
+ '$': true,
+ '%': true,
+ '&': true,
+ '\'': true,
+ '(': true,
+ ')': true,
+ '*': true,
+ '+': true,
+ ',': true,
+ '-': true,
+ '.': true,
+ '/': true,
+ '0': true,
+ '1': true,
+ '2': true,
+ '3': true,
+ '4': true,
+ '5': true,
+ '6': true,
+ '7': true,
+ '8': true,
+ '9': true,
+ ':': true,
+ ';': true,
+ '<': true,
+ '=': true,
+ '>': true,
+ '?': true,
+ '@': true,
+ 'A': true,
+ 'B': true,
+ 'C': true,
+ 'D': true,
+ 'E': true,
+ 'F': true,
+ 'G': true,
+ 'H': true,
+ 'I': true,
+ 'J': true,
+ 'K': true,
+ 'L': true,
+ 'M': true,
+ 'N': true,
+ 'O': true,
+ 'P': true,
+ 'Q': true,
+ 'R': true,
+ 'S': true,
+ 'T': true,
+ 'U': true,
+ 'V': true,
+ 'W': true,
+ 'X': true,
+ 'Y': true,
+ 'Z': true,
+ '[': true,
+ '\\': false,
+ ']': true,
+ '^': true,
+ '_': true,
+ '`': true,
+ 'a': true,
+ 'b': true,
+ 'c': true,
+ 'd': true,
+ 'e': true,
+ 'f': true,
+ 'g': true,
+ 'h': true,
+ 'i': true,
+ 'j': true,
+ 'k': true,
+ 'l': true,
+ 'm': true,
+ 'n': true,
+ 'o': true,
+ 'p': true,
+ 'q': true,
+ 'r': true,
+ 's': true,
+ 't': true,
+ 'u': true,
+ 'v': true,
+ 'w': true,
+ 'x': true,
+ 'y': true,
+ 'z': true,
+ '{': true,
+ '|': true,
+ '}': true,
+ '~': true,
+ '\u007f': true,
+}
+
+// copied from Go 1.8 stdlib's encoding/json/#hex
+var hex = "0123456789abcdef"
+
+// escapeStringBytes escapes and writes the passed in string bytes to the dst
+// buffer
+//
+// Copied and modifed from Go 1.8 stdlib's encodeing/json/#encodeState.stringBytes
+func escapeStringBytes(e *bytes.Buffer, s []byte) {
+ e.WriteByte('"')
+ start := 0
+ for i := 0; i < len(s); {
+ if b := s[i]; b < utf8.RuneSelf {
+ if safeSet[b] {
+ i++
+ continue
+ }
+ if start < i {
+ e.Write(s[start:i])
+ }
+ switch b {
+ case '\\', '"':
+ e.WriteByte('\\')
+ e.WriteByte(b)
+ case '\n':
+ e.WriteByte('\\')
+ e.WriteByte('n')
+ case '\r':
+ e.WriteByte('\\')
+ e.WriteByte('r')
+ case '\t':
+ e.WriteByte('\\')
+ e.WriteByte('t')
+ default:
+ // This encodes bytes < 0x20 except for \t, \n and \r.
+ // If escapeHTML is set, it also escapes <, >, and &
+ // because they can lead to security holes when
+ // user-controlled strings are rendered into JSON
+ // and served to some browsers.
+ e.WriteString(`\u00`)
+ e.WriteByte(hex[b>>4])
+ e.WriteByte(hex[b&0xF])
+ }
+ i++
+ start = i
+ continue
+ }
+ c, size := utf8.DecodeRune(s[i:])
+ if c == utf8.RuneError && size == 1 {
+ if start < i {
+ e.Write(s[start:i])
+ }
+ e.WriteString(`\ufffd`)
+ i += size
+ start = i
+ continue
+ }
+ // U+2028 is LINE SEPARATOR.
+ // U+2029 is PARAGRAPH SEPARATOR.
+ // They are both technically valid characters in JSON strings,
+ // but don't work in JSONP, which has to be evaluated as JavaScript,
+ // and can lead to security holes there. It is valid JSON to
+ // escape them, so we do so unconditionally.
+ // See http://timelessrepo.com/json-isnt-a-javascript-subset for discussion.
+ if c == '\u2028' || c == '\u2029' {
+ if start < i {
+ e.Write(s[start:i])
+ }
+ e.WriteString(`\u202`)
+ e.WriteByte(hex[c&0xF])
+ i += size
+ start = i
+ continue
+ }
+ i += size
+ }
+ if start < len(s) {
+ e.Write(s[start:])
+ }
+ e.WriteByte('"')
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/json/object.go b/vendor/github.com/aws/smithy-go/encoding/json/object.go
new file mode 100644
index 000000000..722346d03
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/json/object.go
@@ -0,0 +1,40 @@
+package json
+
+import (
+ "bytes"
+)
+
+// Object represents the encoding of a JSON Object type
+type Object struct {
+ w *bytes.Buffer
+ writeComma bool
+ scratch *[]byte
+}
+
+func newObject(w *bytes.Buffer, scratch *[]byte) *Object {
+ w.WriteRune(leftBrace)
+ return &Object{w: w, scratch: scratch}
+}
+
+func (o *Object) writeKey(key string) {
+ escapeStringBytes(o.w, []byte(key))
+ o.w.WriteRune(colon)
+}
+
+// Key adds the given named key to the JSON object.
+// Returns a Value encoder that should be used to encode
+// a JSON value type.
+func (o *Object) Key(name string) Value {
+ if o.writeComma {
+ o.w.WriteRune(comma)
+ } else {
+ o.writeComma = true
+ }
+ o.writeKey(name)
+ return newValue(o.w, o.scratch)
+}
+
+// Close encodes the end of the JSON Object
+func (o *Object) Close() {
+ o.w.WriteRune(rightBrace)
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/json/value.go b/vendor/github.com/aws/smithy-go/encoding/json/value.go
new file mode 100644
index 000000000..b41ff1e15
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/json/value.go
@@ -0,0 +1,149 @@
+package json
+
+import (
+ "bytes"
+ "encoding/base64"
+ "math/big"
+ "strconv"
+
+ "github.com/aws/smithy-go/encoding"
+)
+
+// Value represents a JSON Value type
+// JSON Value types: Object, Array, String, Number, Boolean, and Null
+type Value struct {
+ w *bytes.Buffer
+ scratch *[]byte
+}
+
+// newValue returns a new Value encoder
+func newValue(w *bytes.Buffer, scratch *[]byte) Value {
+ return Value{w: w, scratch: scratch}
+}
+
+// String encodes v as a JSON string
+func (jv Value) String(v string) {
+ escapeStringBytes(jv.w, []byte(v))
+}
+
+// Byte encodes v as a JSON number
+func (jv Value) Byte(v int8) {
+ jv.Long(int64(v))
+}
+
+// Short encodes v as a JSON number
+func (jv Value) Short(v int16) {
+ jv.Long(int64(v))
+}
+
+// Integer encodes v as a JSON number
+func (jv Value) Integer(v int32) {
+ jv.Long(int64(v))
+}
+
+// Long encodes v as a JSON number
+func (jv Value) Long(v int64) {
+ *jv.scratch = strconv.AppendInt((*jv.scratch)[:0], v, 10)
+ jv.w.Write(*jv.scratch)
+}
+
+// ULong encodes v as a JSON number
+func (jv Value) ULong(v uint64) {
+ *jv.scratch = strconv.AppendUint((*jv.scratch)[:0], v, 10)
+ jv.w.Write(*jv.scratch)
+}
+
+// Float encodes v as a JSON number
+func (jv Value) Float(v float32) {
+ jv.float(float64(v), 32)
+}
+
+// Double encodes v as a JSON number
+func (jv Value) Double(v float64) {
+ jv.float(v, 64)
+}
+
+func (jv Value) float(v float64, bits int) {
+ *jv.scratch = encoding.EncodeFloat((*jv.scratch)[:0], v, bits)
+ jv.w.Write(*jv.scratch)
+}
+
+// Boolean encodes v as a JSON boolean
+func (jv Value) Boolean(v bool) {
+ *jv.scratch = strconv.AppendBool((*jv.scratch)[:0], v)
+ jv.w.Write(*jv.scratch)
+}
+
+// Base64EncodeBytes writes v as a base64 value in JSON string
+func (jv Value) Base64EncodeBytes(v []byte) {
+ encodeByteSlice(jv.w, (*jv.scratch)[:0], v)
+}
+
+// Write writes v directly to the JSON document
+func (jv Value) Write(v []byte) {
+ jv.w.Write(v)
+}
+
+// Array returns a new Array encoder
+func (jv Value) Array() *Array {
+ return newArray(jv.w, jv.scratch)
+}
+
+// Object returns a new Object encoder
+func (jv Value) Object() *Object {
+ return newObject(jv.w, jv.scratch)
+}
+
+// Null encodes a null JSON value
+func (jv Value) Null() {
+ jv.w.WriteString(null)
+}
+
+// BigInteger encodes v as JSON value
+func (jv Value) BigInteger(v *big.Int) {
+ jv.w.Write([]byte(v.Text(10)))
+}
+
+// BigDecimal encodes v as JSON value
+func (jv Value) BigDecimal(v *big.Float) {
+ if i, accuracy := v.Int64(); accuracy == big.Exact {
+ jv.Long(i)
+ return
+ }
+ // TODO: Should this try to match ES6 ToString similar to stdlib JSON?
+ jv.w.Write([]byte(v.Text('e', -1)))
+}
+
+// Based on encoding/json encodeByteSlice from the Go Standard Library
+// https://golang.org/src/encoding/json/encode.go
+func encodeByteSlice(w *bytes.Buffer, scratch []byte, v []byte) {
+ if v == nil {
+ w.WriteString(null)
+ return
+ }
+
+ w.WriteRune(quote)
+
+ encodedLen := base64.StdEncoding.EncodedLen(len(v))
+ if encodedLen <= len(scratch) {
+ // If the encoded bytes fit in e.scratch, avoid an extra
+ // allocation and use the cheaper Encoding.Encode.
+ dst := scratch[:encodedLen]
+ base64.StdEncoding.Encode(dst, v)
+ w.Write(dst)
+ } else if encodedLen <= 1024 {
+ // The encoded bytes are short enough to allocate for, and
+ // Encoding.Encode is still cheaper.
+ dst := make([]byte, encodedLen)
+ base64.StdEncoding.Encode(dst, v)
+ w.Write(dst)
+ } else {
+ // The encoded bytes are too long to cheaply allocate, and
+ // Encoding.Encode is no longer noticeably cheaper.
+ enc := base64.NewEncoder(base64.StdEncoding, w)
+ enc.Write(v)
+ enc.Close()
+ }
+
+ w.WriteRune(quote)
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/array.go b/vendor/github.com/aws/smithy-go/encoding/xml/array.go
new file mode 100644
index 000000000..508f3c997
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/xml/array.go
@@ -0,0 +1,49 @@
+package xml
+
+// arrayMemberWrapper is the default member wrapper tag name for XML Array type
+var arrayMemberWrapper = StartElement{
+ Name: Name{Local: "member"},
+}
+
+// Array represents the encoding of a XML array type
+type Array struct {
+ w writer
+ scratch *[]byte
+
+ // member start element is the array member wrapper start element
+ memberStartElement StartElement
+
+ // isFlattened indicates if the array is a flattened array.
+ isFlattened bool
+}
+
+// newArray returns an array encoder.
+// It also takes in the member start element, array start element.
+// It takes in a isFlattened bool, indicating that an array is flattened array.
+//
+// A wrapped array ["value1", "value2"] is represented as
+// `value1value2
`.
+
+// A flattened array `someList: ["value1", "value2"]` is represented as
+// `value1value2`.
+func newArray(w writer, scratch *[]byte, memberStartElement StartElement, arrayStartElement StartElement, isFlattened bool) *Array {
+ var memberWrapper = memberStartElement
+ if isFlattened {
+ memberWrapper = arrayStartElement
+ }
+
+ return &Array{
+ w: w,
+ scratch: scratch,
+ memberStartElement: memberWrapper,
+ isFlattened: isFlattened,
+ }
+}
+
+// Member adds a new member to the XML array.
+// It returns a Value encoder.
+func (a *Array) Member() Value {
+ v := newValue(a.w, a.scratch, a.memberStartElement)
+ v.isFlattened = a.isFlattened
+ return v
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/constants.go b/vendor/github.com/aws/smithy-go/encoding/xml/constants.go
new file mode 100644
index 000000000..ccee90a63
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/xml/constants.go
@@ -0,0 +1,10 @@
+package xml
+
+const (
+ leftAngleBracket = '<'
+ rightAngleBracket = '>'
+ forwardSlash = '/'
+ colon = ':'
+ equals = '='
+ quote = '"'
+)
diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/doc.go b/vendor/github.com/aws/smithy-go/encoding/xml/doc.go
new file mode 100644
index 000000000..d6e1e41e1
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/xml/doc.go
@@ -0,0 +1,49 @@
+/*
+Package xml holds the XMl encoder utility. This utility is written in accordance to our design to delegate to
+shape serializer function in which a xml.Value will be passed around.
+
+Resources followed: https://awslabs.github.io/smithy/1.0/spec/core/xml-traits.html#
+
+Member Element
+
+Member element should be used to encode xml shapes into xml elements except for flattened xml shapes. Member element
+write their own element start tag. These elements should always be closed.
+
+Flattened Element
+
+Flattened element should be used to encode shapes marked with flattened trait into xml elements. Flattened element
+do not write a start tag, and thus should not be closed.
+
+Simple types encoding
+
+All simple type methods on value such as String(), Long() etc; auto close the associated member element.
+
+Array
+
+Array returns the collection encoder. It has two modes, wrapped and flattened encoding.
+
+Wrapped arrays have two methods Array() and ArrayWithCustomName() which facilitate array member wrapping.
+By default, a wrapped array members are wrapped with `member` named start element.
+
+ appletree
+
+Flattened arrays rely on Value being marked as flattened.
+If a shape is marked as flattened, Array() will use the shape element name as wrapper for array elements.
+
+ appletree
+
+Map
+
+Map is the map encoder. It has two modes, wrapped and flattened encoding.
+
+Wrapped map has Array() method, which facilitate map member wrapping.
+By default, a wrapped map members are wrapped with `entry` named start element.
+
+ appletreesnowice
+
+Flattened map rely on Value being marked as flattened.
+If a shape is marked as flattened, Map() will use the shape element name as wrapper for map entry elements.
+
+ appletreesnowice
+*/
+package xml
diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/element.go b/vendor/github.com/aws/smithy-go/encoding/xml/element.go
new file mode 100644
index 000000000..ae84e7999
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/xml/element.go
@@ -0,0 +1,91 @@
+// Copyright 2009 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.
+
+// Copied and modified from Go 1.14 stdlib's encoding/xml
+
+package xml
+
+// A Name represents an XML name (Local) annotated
+// with a name space identifier (Space).
+// In tokens returned by Decoder.Token, the Space identifier
+// is given as a canonical URL, not the short prefix used
+// in the document being parsed.
+type Name struct {
+ Space, Local string
+}
+
+// An Attr represents an attribute in an XML element (Name=Value).
+type Attr struct {
+ Name Name
+ Value string
+}
+
+/*
+NewAttribute returns a pointer to an attribute.
+It takes in a local name aka attribute name, and value
+representing the attribute value.
+*/
+func NewAttribute(local, value string) Attr {
+ return Attr{
+ Name: Name{
+ Local: local,
+ },
+ Value: value,
+ }
+}
+
+/*
+NewNamespaceAttribute returns a pointer to an attribute.
+It takes in a local name aka attribute name, and value
+representing the attribute value.
+
+NewNamespaceAttribute appends `xmlns:` in front of namespace
+prefix.
+
+For creating a name space attribute representing
+`xmlns:prefix="http://example.com`, the breakdown would be:
+local = "prefix"
+value = "http://example.com"
+*/
+func NewNamespaceAttribute(local, value string) Attr {
+ attr := NewAttribute(local, value)
+
+ // default name space identifier
+ attr.Name.Space = "xmlns"
+ return attr
+}
+
+// A StartElement represents an XML start element.
+type StartElement struct {
+ Name Name
+ Attr []Attr
+}
+
+// Copy creates a new copy of StartElement.
+func (e StartElement) Copy() StartElement {
+ attrs := make([]Attr, len(e.Attr))
+ copy(attrs, e.Attr)
+ e.Attr = attrs
+ return e
+}
+
+// End returns the corresponding XML end element.
+func (e StartElement) End() EndElement {
+ return EndElement{e.Name}
+}
+
+// returns true if start element local name is empty
+func (e StartElement) isZero() bool {
+ return len(e.Name.Local) == 0
+}
+
+// An EndElement represents an XML end element.
+type EndElement struct {
+ Name Name
+}
+
+// returns true if end element local name is empty
+func (e EndElement) isZero() bool {
+ return len(e.Name.Local) == 0
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/encoder.go b/vendor/github.com/aws/smithy-go/encoding/xml/encoder.go
new file mode 100644
index 000000000..16fb3dddb
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/xml/encoder.go
@@ -0,0 +1,51 @@
+package xml
+
+// writer interface used by the xml encoder to write an encoded xml
+// document in a writer.
+type writer interface {
+
+ // Write takes in a byte slice and returns number of bytes written and error
+ Write(p []byte) (n int, err error)
+
+ // WriteRune takes in a rune and returns number of bytes written and error
+ WriteRune(r rune) (n int, err error)
+
+ // WriteString takes in a string and returns number of bytes written and error
+ WriteString(s string) (n int, err error)
+
+ // String method returns a string
+ String() string
+
+ // Bytes return a byte slice.
+ Bytes() []byte
+}
+
+// Encoder is an XML encoder that supports construction of XML values
+// using methods. The encoder takes in a writer and maintains a scratch buffer.
+type Encoder struct {
+ w writer
+ scratch *[]byte
+}
+
+// NewEncoder returns an XML encoder
+func NewEncoder(w writer) *Encoder {
+ scratch := make([]byte, 64)
+
+ return &Encoder{w: w, scratch: &scratch}
+}
+
+// String returns the string output of the XML encoder
+func (e Encoder) String() string {
+ return e.w.String()
+}
+
+// Bytes returns the []byte slice of the XML encoder
+func (e Encoder) Bytes() []byte {
+ return e.w.Bytes()
+}
+
+// RootElement builds a root element encoding
+// It writes it's start element tag. The value should be closed.
+func (e Encoder) RootElement(element StartElement) Value {
+ return newValue(e.w, e.scratch, element)
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/error_utils.go b/vendor/github.com/aws/smithy-go/encoding/xml/error_utils.go
new file mode 100644
index 000000000..f3db6ccca
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/xml/error_utils.go
@@ -0,0 +1,51 @@
+package xml
+
+import (
+ "encoding/xml"
+ "fmt"
+ "io"
+)
+
+// ErrorComponents represents the error response fields
+// that will be deserialized from an xml error response body
+type ErrorComponents struct {
+ Code string
+ Message string
+}
+
+// GetErrorResponseComponents returns the error fields from an xml error response body
+func GetErrorResponseComponents(r io.Reader, noErrorWrapping bool) (ErrorComponents, error) {
+ if noErrorWrapping {
+ var errResponse noWrappedErrorResponse
+ if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF {
+ return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err)
+ }
+ return ErrorComponents{
+ Code: errResponse.Code,
+ Message: errResponse.Message,
+ }, nil
+ }
+
+ var errResponse wrappedErrorResponse
+ if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF {
+ return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err)
+ }
+ return ErrorComponents{
+ Code: errResponse.Code,
+ Message: errResponse.Message,
+ }, nil
+}
+
+// noWrappedErrorResponse represents the error response body with
+// no internal ...
+type wrappedErrorResponse struct {
+ Code string `xml:"Error>Code"`
+ Message string `xml:"Error>Message"`
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/escape.go b/vendor/github.com/aws/smithy-go/encoding/xml/escape.go
new file mode 100644
index 000000000..1c5479af6
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/xml/escape.go
@@ -0,0 +1,137 @@
+// Copyright 2009 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.
+
+// Copied and modified from Go 1.14 stdlib's encoding/xml
+
+package xml
+
+import (
+ "unicode/utf8"
+)
+
+// Copied from Go 1.14 stdlib's encoding/xml
+var (
+ escQuot = []byte(""") // shorter than """
+ escApos = []byte("'") // shorter than "'"
+ escAmp = []byte("&")
+ escLT = []byte("<")
+ escGT = []byte(">")
+ escTab = []byte(" ")
+ escNL = []byte("
")
+ escCR = []byte("
")
+ escFFFD = []byte("\uFFFD") // Unicode replacement character
+
+ // Additional Escapes
+ escNextLine = []byte("
")
+ escLS = []byte("
")
+)
+
+// Decide whether the given rune is in the XML Character Range, per
+// the Char production of https://www.xml.com/axml/testaxml.htm,
+// Section 2.2 Characters.
+func isInCharacterRange(r rune) (inrange bool) {
+ return r == 0x09 ||
+ r == 0x0A ||
+ r == 0x0D ||
+ r >= 0x20 && r <= 0xD7FF ||
+ r >= 0xE000 && r <= 0xFFFD ||
+ r >= 0x10000 && r <= 0x10FFFF
+}
+
+// TODO: When do we need to escape the string?
+// Based on encoding/xml escapeString from the Go Standard Library.
+// https://golang.org/src/encoding/xml/xml.go
+func escapeString(e writer, s string) {
+ var esc []byte
+ last := 0
+ for i := 0; i < len(s); {
+ r, width := utf8.DecodeRuneInString(s[i:])
+ i += width
+ switch r {
+ case '"':
+ esc = escQuot
+ case '\'':
+ esc = escApos
+ case '&':
+ esc = escAmp
+ case '<':
+ esc = escLT
+ case '>':
+ esc = escGT
+ case '\t':
+ esc = escTab
+ case '\n':
+ esc = escNL
+ case '\r':
+ esc = escCR
+ case '\u0085':
+ // Not escaped by stdlib
+ esc = escNextLine
+ case '\u2028':
+ // Not escaped by stdlib
+ esc = escLS
+ default:
+ if !isInCharacterRange(r) || (r == 0xFFFD && width == 1) {
+ esc = escFFFD
+ break
+ }
+ continue
+ }
+ e.WriteString(s[last : i-width])
+ e.Write(esc)
+ last = i
+ }
+ e.WriteString(s[last:])
+}
+
+// escapeText writes to w the properly escaped XML equivalent
+// of the plain text data s. If escapeNewline is true, newline
+// characters will be escaped.
+//
+// Based on encoding/xml escapeText from the Go Standard Library.
+// https://golang.org/src/encoding/xml/xml.go
+func escapeText(e writer, s []byte) {
+ var esc []byte
+ last := 0
+ for i := 0; i < len(s); {
+ r, width := utf8.DecodeRune(s[i:])
+ i += width
+ switch r {
+ case '"':
+ esc = escQuot
+ case '\'':
+ esc = escApos
+ case '&':
+ esc = escAmp
+ case '<':
+ esc = escLT
+ case '>':
+ esc = escGT
+ case '\t':
+ esc = escTab
+ case '\n':
+ // This always escapes newline, which is different than stdlib's optional
+ // escape of new line.
+ esc = escNL
+ case '\r':
+ esc = escCR
+ case '\u0085':
+ // Not escaped by stdlib
+ esc = escNextLine
+ case '\u2028':
+ // Not escaped by stdlib
+ esc = escLS
+ default:
+ if !isInCharacterRange(r) || (r == 0xFFFD && width == 1) {
+ esc = escFFFD
+ break
+ }
+ continue
+ }
+ e.Write(s[last : i-width])
+ e.Write(esc)
+ last = i
+ }
+ e.Write(s[last:])
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/map.go b/vendor/github.com/aws/smithy-go/encoding/xml/map.go
new file mode 100644
index 000000000..e42858965
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/xml/map.go
@@ -0,0 +1,53 @@
+package xml
+
+// mapEntryWrapper is the default member wrapper start element for XML Map entry
+var mapEntryWrapper = StartElement{
+ Name: Name{Local: "entry"},
+}
+
+// Map represents the encoding of a XML map type
+type Map struct {
+ w writer
+ scratch *[]byte
+
+ // member start element is the map entry wrapper start element
+ memberStartElement StartElement
+
+ // isFlattened returns true if the map is a flattened map
+ isFlattened bool
+}
+
+// newMap returns a map encoder which sets the default map
+// entry wrapper to `entry`.
+//
+// A map `someMap : {{key:"abc", value:"123"}}` is represented as
+// `abc123`.
+func newMap(w writer, scratch *[]byte) *Map {
+ return &Map{
+ w: w,
+ scratch: scratch,
+ memberStartElement: mapEntryWrapper,
+ }
+}
+
+// newFlattenedMap returns a map encoder which sets the map
+// entry wrapper to the passed in memberWrapper`.
+//
+// A flattened map `someMap : {{key:"abc", value:"123"}}` is represented as
+// `abc123`.
+func newFlattenedMap(w writer, scratch *[]byte, memberWrapper StartElement) *Map {
+ return &Map{
+ w: w,
+ scratch: scratch,
+ memberStartElement: memberWrapper,
+ isFlattened: true,
+ }
+}
+
+// Entry returns a Value encoder with map's element.
+// It writes the member wrapper start tag for each entry.
+func (m *Map) Entry() Value {
+ v := newValue(m.w, m.scratch, m.memberStartElement)
+ v.isFlattened = m.isFlattened
+ return v
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/value.go b/vendor/github.com/aws/smithy-go/encoding/xml/value.go
new file mode 100644
index 000000000..09434b2c0
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/xml/value.go
@@ -0,0 +1,302 @@
+package xml
+
+import (
+ "encoding/base64"
+ "fmt"
+ "math/big"
+ "strconv"
+
+ "github.com/aws/smithy-go/encoding"
+)
+
+// Value represents an XML Value type
+// XML Value types: Object, Array, Map, String, Number, Boolean.
+type Value struct {
+ w writer
+ scratch *[]byte
+
+ // xml start element is the associated start element for the Value
+ startElement StartElement
+
+ // indicates if the Value represents a flattened shape
+ isFlattened bool
+}
+
+// newFlattenedValue returns a Value encoder. newFlattenedValue does NOT write the start element tag
+func newFlattenedValue(w writer, scratch *[]byte, startElement StartElement) Value {
+ return Value{
+ w: w,
+ scratch: scratch,
+ startElement: startElement,
+ }
+}
+
+// newValue writes the start element xml tag and returns a Value
+func newValue(w writer, scratch *[]byte, startElement StartElement) Value {
+ writeStartElement(w, startElement)
+ return Value{w: w, scratch: scratch, startElement: startElement}
+}
+
+// writeStartElement takes in a start element and writes it.
+// It handles namespace, attributes in start element.
+func writeStartElement(w writer, el StartElement) error {
+ if el.isZero() {
+ return fmt.Errorf("xml start element cannot be nil")
+ }
+
+ w.WriteRune(leftAngleBracket)
+
+ if len(el.Name.Space) != 0 {
+ escapeString(w, el.Name.Space)
+ w.WriteRune(colon)
+ }
+ escapeString(w, el.Name.Local)
+ for _, attr := range el.Attr {
+ w.WriteRune(' ')
+ writeAttribute(w, &attr)
+ }
+
+ w.WriteRune(rightAngleBracket)
+ return nil
+}
+
+// writeAttribute writes an attribute from a provided Attribute
+// For a namespace attribute, the attr.Name.Space must be defined as "xmlns".
+// https://www.w3.org/TR/REC-xml-names/#NT-DefaultAttName
+func writeAttribute(w writer, attr *Attr) {
+ // if local, space both are not empty
+ if len(attr.Name.Space) != 0 && len(attr.Name.Local) != 0 {
+ escapeString(w, attr.Name.Space)
+ w.WriteRune(colon)
+ }
+
+ // if prefix is empty, the default `xmlns` space should be used as prefix.
+ if len(attr.Name.Local) == 0 {
+ attr.Name.Local = attr.Name.Space
+ }
+
+ escapeString(w, attr.Name.Local)
+ w.WriteRune(equals)
+ w.WriteRune(quote)
+ escapeString(w, attr.Value)
+ w.WriteRune(quote)
+}
+
+// writeEndElement takes in a end element and writes it.
+func writeEndElement(w writer, el EndElement) error {
+ if el.isZero() {
+ return fmt.Errorf("xml end element cannot be nil")
+ }
+
+ w.WriteRune(leftAngleBracket)
+ w.WriteRune(forwardSlash)
+
+ if len(el.Name.Space) != 0 {
+ escapeString(w, el.Name.Space)
+ w.WriteRune(colon)
+ }
+ escapeString(w, el.Name.Local)
+ w.WriteRune(rightAngleBracket)
+
+ return nil
+}
+
+// String encodes v as a XML string.
+// It will auto close the parent xml element tag.
+func (xv Value) String(v string) {
+ escapeString(xv.w, v)
+ xv.Close()
+}
+
+// Byte encodes v as a XML number.
+// It will auto close the parent xml element tag.
+func (xv Value) Byte(v int8) {
+ xv.Long(int64(v))
+}
+
+// Short encodes v as a XML number.
+// It will auto close the parent xml element tag.
+func (xv Value) Short(v int16) {
+ xv.Long(int64(v))
+}
+
+// Integer encodes v as a XML number.
+// It will auto close the parent xml element tag.
+func (xv Value) Integer(v int32) {
+ xv.Long(int64(v))
+}
+
+// Long encodes v as a XML number.
+// It will auto close the parent xml element tag.
+func (xv Value) Long(v int64) {
+ *xv.scratch = strconv.AppendInt((*xv.scratch)[:0], v, 10)
+ xv.w.Write(*xv.scratch)
+
+ xv.Close()
+}
+
+// Float encodes v as a XML number.
+// It will auto close the parent xml element tag.
+func (xv Value) Float(v float32) {
+ xv.float(float64(v), 32)
+ xv.Close()
+}
+
+// Double encodes v as a XML number.
+// It will auto close the parent xml element tag.
+func (xv Value) Double(v float64) {
+ xv.float(v, 64)
+ xv.Close()
+}
+
+func (xv Value) float(v float64, bits int) {
+ *xv.scratch = encoding.EncodeFloat((*xv.scratch)[:0], v, bits)
+ xv.w.Write(*xv.scratch)
+}
+
+// Boolean encodes v as a XML boolean.
+// It will auto close the parent xml element tag.
+func (xv Value) Boolean(v bool) {
+ *xv.scratch = strconv.AppendBool((*xv.scratch)[:0], v)
+ xv.w.Write(*xv.scratch)
+
+ xv.Close()
+}
+
+// Base64EncodeBytes writes v as a base64 value in XML string.
+// It will auto close the parent xml element tag.
+func (xv Value) Base64EncodeBytes(v []byte) {
+ encodeByteSlice(xv.w, (*xv.scratch)[:0], v)
+ xv.Close()
+}
+
+// BigInteger encodes v big.Int as XML value.
+// It will auto close the parent xml element tag.
+func (xv Value) BigInteger(v *big.Int) {
+ xv.w.Write([]byte(v.Text(10)))
+ xv.Close()
+}
+
+// BigDecimal encodes v big.Float as XML value.
+// It will auto close the parent xml element tag.
+func (xv Value) BigDecimal(v *big.Float) {
+ if i, accuracy := v.Int64(); accuracy == big.Exact {
+ xv.Long(i)
+ return
+ }
+
+ xv.w.Write([]byte(v.Text('e', -1)))
+ xv.Close()
+}
+
+// Write writes v directly to the xml document
+// if escapeXMLText is set to true, write will escape text.
+// It will auto close the parent xml element tag.
+func (xv Value) Write(v []byte, escapeXMLText bool) {
+ // escape and write xml text
+ if escapeXMLText {
+ escapeText(xv.w, v)
+ } else {
+ // write xml directly
+ xv.w.Write(v)
+ }
+
+ xv.Close()
+}
+
+// MemberElement does member element encoding. It returns a Value.
+// Member Element method should be used for all shapes except flattened shapes.
+//
+// A call to MemberElement will write nested element tags directly using the
+// provided start element. The value returned by MemberElement should be closed.
+func (xv Value) MemberElement(element StartElement) Value {
+ return newValue(xv.w, xv.scratch, element)
+}
+
+// FlattenedElement returns flattened element encoding. It returns a Value.
+// This method should be used for flattened shapes.
+//
+// Unlike MemberElement, flattened element will NOT write element tags
+// directly for the associated start element.
+//
+// The value returned by the FlattenedElement does not need to be closed.
+func (xv Value) FlattenedElement(element StartElement) Value {
+ v := newFlattenedValue(xv.w, xv.scratch, element)
+ v.isFlattened = true
+ return v
+}
+
+// Array returns an array encoder. By default, the members of array are
+// wrapped with `` element tag.
+// If value is marked as flattened, the start element is used to wrap the members instead of
+// the `` element.
+func (xv Value) Array() *Array {
+ return newArray(xv.w, xv.scratch, arrayMemberWrapper, xv.startElement, xv.isFlattened)
+}
+
+/*
+ArrayWithCustomName returns an array encoder.
+
+It takes named start element as an argument, the named start element will used to wrap xml array entries.
+for eg, `entry1`
+Here `customName` named start element will be wrapped on each array member.
+*/
+func (xv Value) ArrayWithCustomName(element StartElement) *Array {
+ return newArray(xv.w, xv.scratch, element, xv.startElement, xv.isFlattened)
+}
+
+/*
+Map returns a map encoder. By default, the map entries are
+wrapped with `` element tag.
+
+If value is marked as flattened, the start element is used to wrap the entry instead of
+the `` element.
+*/
+func (xv Value) Map() *Map {
+ // flattened map
+ if xv.isFlattened {
+ return newFlattenedMap(xv.w, xv.scratch, xv.startElement)
+ }
+
+ // un-flattened map
+ return newMap(xv.w, xv.scratch)
+}
+
+// encodeByteSlice is modified copy of json encoder's encodeByteSlice.
+// It is used to base64 encode a byte slice.
+func encodeByteSlice(w writer, scratch []byte, v []byte) {
+ if v == nil {
+ return
+ }
+
+ encodedLen := base64.StdEncoding.EncodedLen(len(v))
+ if encodedLen <= len(scratch) {
+ // If the encoded bytes fit in e.scratch, avoid an extra
+ // allocation and use the cheaper Encoding.Encode.
+ dst := scratch[:encodedLen]
+ base64.StdEncoding.Encode(dst, v)
+ w.Write(dst)
+ } else if encodedLen <= 1024 {
+ // The encoded bytes are short enough to allocate for, and
+ // Encoding.Encode is still cheaper.
+ dst := make([]byte, encodedLen)
+ base64.StdEncoding.Encode(dst, v)
+ w.Write(dst)
+ } else {
+ // The encoded bytes are too long to cheaply allocate, and
+ // Encoding.Encode is no longer noticeably cheaper.
+ enc := base64.NewEncoder(base64.StdEncoding, w)
+ enc.Write(v)
+ enc.Close()
+ }
+}
+
+// IsFlattened returns true if value is for flattened shape.
+func (xv Value) IsFlattened() bool {
+ return xv.isFlattened
+}
+
+// Close closes the value.
+func (xv Value) Close() {
+ writeEndElement(xv.w, xv.startElement.End())
+}
diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/xml_decoder.go b/vendor/github.com/aws/smithy-go/encoding/xml/xml_decoder.go
new file mode 100644
index 000000000..dc4eebdff
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/encoding/xml/xml_decoder.go
@@ -0,0 +1,154 @@
+package xml
+
+import (
+ "encoding/xml"
+ "fmt"
+ "strings"
+)
+
+// NodeDecoder is a XML decoder wrapper that is responsible to decoding
+// a single XML Node element and it's nested member elements. This wrapper decoder
+// takes in the start element of the top level node being decoded.
+type NodeDecoder struct {
+ Decoder *xml.Decoder
+ StartEl xml.StartElement
+}
+
+// WrapNodeDecoder returns an initialized XMLNodeDecoder
+func WrapNodeDecoder(decoder *xml.Decoder, startEl xml.StartElement) NodeDecoder {
+ return NodeDecoder{
+ Decoder: decoder,
+ StartEl: startEl,
+ }
+}
+
+// Token on a Node Decoder returns a xml StartElement. It returns a boolean that indicates the
+// a token is the node decoder's end node token; and an error which indicates any error
+// that occurred while retrieving the start element
+func (d NodeDecoder) Token() (t xml.StartElement, done bool, err error) {
+ for {
+ token, e := d.Decoder.Token()
+ if e != nil {
+ return t, done, e
+ }
+
+ // check if we reach end of the node being decoded
+ if el, ok := token.(xml.EndElement); ok {
+ return t, el == d.StartEl.End(), err
+ }
+
+ if t, ok := token.(xml.StartElement); ok {
+ return restoreAttrNamespaces(t), false, err
+ }
+
+ // skip token if it is a comment or preamble or empty space value due to indentation
+ // or if it's a value and is not expected
+ }
+}
+
+// restoreAttrNamespaces update XML attributes to restore the short namespaces found within
+// the raw XML document.
+func restoreAttrNamespaces(node xml.StartElement) xml.StartElement {
+ if len(node.Attr) == 0 {
+ return node
+ }
+
+ // Generate a mapping of XML namespace values to their short names.
+ ns := map[string]string{}
+ for _, a := range node.Attr {
+ if a.Name.Space == "xmlns" {
+ ns[a.Value] = a.Name.Local
+ break
+ }
+ }
+
+ for i, a := range node.Attr {
+ if a.Name.Space == "xmlns" {
+ continue
+ }
+ // By default, xml.Decoder will fully resolve these namespaces. So if you had
+ // then by default the second attribute would have the `Name.Space` resolved to `baz`. But we need it to
+ // continue to resolve as `bar` so we can easily identify it later on.
+ if v, ok := ns[node.Attr[i].Name.Space]; ok {
+ node.Attr[i].Name.Space = v
+ }
+ }
+ return node
+}
+
+// GetElement looks for the given tag name at the current level, and returns the element if found, and
+// skipping over non-matching elements. Returns an error if the node is not found, or if an error occurs while walking
+// the document.
+func (d NodeDecoder) GetElement(name string) (t xml.StartElement, err error) {
+ for {
+ token, done, err := d.Token()
+ if err != nil {
+ return t, err
+ }
+ if done {
+ return t, fmt.Errorf("%s node not found", name)
+ }
+ switch {
+ case strings.EqualFold(name, token.Name.Local):
+ return token, nil
+ default:
+ err = d.Decoder.Skip()
+ if err != nil {
+ return t, err
+ }
+ }
+ }
+}
+
+// Value provides an abstraction to retrieve char data value within an xml element.
+// The method will return an error if it encounters a nested xml element instead of char data.
+// This method should only be used to retrieve simple type or blob shape values as []byte.
+func (d NodeDecoder) Value() (c []byte, err error) {
+ t, e := d.Decoder.Token()
+ if e != nil {
+ return c, e
+ }
+
+ endElement := d.StartEl.End()
+
+ switch ev := t.(type) {
+ case xml.CharData:
+ c = ev.Copy()
+ case xml.EndElement: // end tag or self-closing
+ if ev == endElement {
+ return []byte{}, err
+ }
+ return c, fmt.Errorf("expected value for %v element, got %T type %v instead", d.StartEl.Name.Local, t, t)
+ default:
+ return c, fmt.Errorf("expected value for %v element, got %T type %v instead", d.StartEl.Name.Local, t, t)
+ }
+
+ t, e = d.Decoder.Token()
+ if e != nil {
+ return c, e
+ }
+
+ if ev, ok := t.(xml.EndElement); ok {
+ if ev == endElement {
+ return c, err
+ }
+ }
+
+ return c, fmt.Errorf("expected end element %v, got %T type %v instead", endElement, t, t)
+}
+
+// FetchRootElement takes in a decoder and returns the first start element within the xml body.
+// This function is useful in fetching the start element of an XML response and ignore the
+// comments and preamble
+func FetchRootElement(decoder *xml.Decoder) (startElement xml.StartElement, err error) {
+ for {
+ t, e := decoder.Token()
+ if e != nil {
+ return startElement, e
+ }
+
+ if startElement, ok := t.(xml.StartElement); ok {
+ return startElement, err
+ }
+ }
+}
diff --git a/vendor/github.com/aws/smithy-go/errors.go b/vendor/github.com/aws/smithy-go/errors.go
new file mode 100644
index 000000000..d6948d020
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/errors.go
@@ -0,0 +1,137 @@
+package smithy
+
+import "fmt"
+
+// APIError provides the generic API and protocol agnostic error type all SDK
+// generated exception types will implement.
+type APIError interface {
+ error
+
+ // ErrorCode returns the error code for the API exception.
+ ErrorCode() string
+ // ErrorMessage returns the error message for the API exception.
+ ErrorMessage() string
+ // ErrorFault returns the fault for the API exception.
+ ErrorFault() ErrorFault
+}
+
+// GenericAPIError provides a generic concrete API error type that SDKs can use
+// to deserialize error responses into. Should be used for unmodeled or untyped
+// errors.
+type GenericAPIError struct {
+ Code string
+ Message string
+ Fault ErrorFault
+}
+
+// ErrorCode returns the error code for the API exception.
+func (e *GenericAPIError) ErrorCode() string { return e.Code }
+
+// ErrorMessage returns the error message for the API exception.
+func (e *GenericAPIError) ErrorMessage() string { return e.Message }
+
+// ErrorFault returns the fault for the API exception.
+func (e *GenericAPIError) ErrorFault() ErrorFault { return e.Fault }
+
+func (e *GenericAPIError) Error() string {
+ return fmt.Sprintf("api error %s: %s", e.Code, e.Message)
+}
+
+var _ APIError = (*GenericAPIError)(nil)
+
+// OperationError decorates an underlying error which occurred while invoking
+// an operation with names of the operation and API.
+type OperationError struct {
+ ServiceID string
+ OperationName string
+ Err error
+}
+
+// Service returns the name of the API service the error occurred with.
+func (e *OperationError) Service() string { return e.ServiceID }
+
+// Operation returns the name of the API operation the error occurred with.
+func (e *OperationError) Operation() string { return e.OperationName }
+
+// Unwrap returns the nested error if any, or nil.
+func (e *OperationError) Unwrap() error { return e.Err }
+
+func (e *OperationError) Error() string {
+ return fmt.Sprintf("operation error %s: %s, %v", e.ServiceID, e.OperationName, e.Err)
+}
+
+// DeserializationError provides a wrapper for an error that occurs during
+// deserialization.
+type DeserializationError struct {
+ Err error // original error
+ Snapshot []byte
+}
+
+// Error returns a formatted error for DeserializationError
+func (e *DeserializationError) Error() string {
+ const msg = "deserialization failed"
+ if e.Err == nil {
+ return msg
+ }
+ return fmt.Sprintf("%s, %v", msg, e.Err)
+}
+
+// Unwrap returns the underlying Error in DeserializationError
+func (e *DeserializationError) Unwrap() error { return e.Err }
+
+// ErrorFault provides the type for a Smithy API error fault.
+type ErrorFault int
+
+// ErrorFault enumeration values
+const (
+ FaultUnknown ErrorFault = iota
+ FaultServer
+ FaultClient
+)
+
+func (f ErrorFault) String() string {
+ switch f {
+ case FaultServer:
+ return "server"
+ case FaultClient:
+ return "client"
+ default:
+ return "unknown"
+ }
+}
+
+// SerializationError represents an error that occurred while attempting to serialize a request
+type SerializationError struct {
+ Err error // original error
+}
+
+// Error returns a formatted error for SerializationError
+func (e *SerializationError) Error() string {
+ const msg = "serialization failed"
+ if e.Err == nil {
+ return msg
+ }
+ return fmt.Sprintf("%s: %v", msg, e.Err)
+}
+
+// Unwrap returns the underlying Error in SerializationError
+func (e *SerializationError) Unwrap() error { return e.Err }
+
+// CanceledError is the error that will be returned by an API request that was
+// canceled. API operations given a Context may return this error when
+// canceled.
+type CanceledError struct {
+ Err error
+}
+
+// CanceledError returns true to satisfy interfaces checking for canceled errors.
+func (*CanceledError) CanceledError() bool { return true }
+
+// Unwrap returns the underlying error, if there was one.
+func (e *CanceledError) Unwrap() error {
+ return e.Err
+}
+
+func (e *CanceledError) Error() string {
+ return fmt.Sprintf("canceled, %v", e.Err)
+}
diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go
new file mode 100644
index 000000000..08db245f8
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package smithy
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.13.3"
diff --git a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/LICENSE b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/LICENSE
new file mode 100644
index 000000000..fe6a62006
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/LICENSE
@@ -0,0 +1,28 @@
+Copyright (c) 2009 The Go Authors. 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 COPYIGHT 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/aws/smithy-go/internal/sync/singleflight/docs.go b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/docs.go
new file mode 100644
index 000000000..9c9d02b94
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/docs.go
@@ -0,0 +1,8 @@
+// Package singleflight provides a duplicate function call suppression
+// mechanism. This package is a fork of the Go golang.org/x/sync/singleflight
+// package. The package is forked, because the package a part of the unstable
+// and unversioned golang.org/x/sync module.
+//
+// https://github.com/golang/sync/tree/67f06af15bc961c363a7260195bcd53487529a21/singleflight
+
+package singleflight
diff --git a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/singleflight.go b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/singleflight.go
new file mode 100644
index 000000000..e8a1b17d5
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/singleflight.go
@@ -0,0 +1,210 @@
+// Copyright 2013 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 singleflight
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "runtime"
+ "runtime/debug"
+ "sync"
+)
+
+// errGoexit indicates the runtime.Goexit was called in
+// the user given function.
+var errGoexit = errors.New("runtime.Goexit was called")
+
+// A panicError is an arbitrary value recovered from a panic
+// with the stack trace during the execution of given function.
+type panicError struct {
+ value interface{}
+ stack []byte
+}
+
+// Error implements error interface.
+func (p *panicError) Error() string {
+ return fmt.Sprintf("%v\n\n%s", p.value, p.stack)
+}
+
+func newPanicError(v interface{}) error {
+ stack := debug.Stack()
+
+ // The first line of the stack trace is of the form "goroutine N [status]:"
+ // but by the time the panic reaches Do the goroutine may no longer exist
+ // and its status will have changed. Trim out the misleading line.
+ if line := bytes.IndexByte(stack[:], '\n'); line >= 0 {
+ stack = stack[line+1:]
+ }
+ return &panicError{value: v, stack: stack}
+}
+
+// call is an in-flight or completed singleflight.Do call
+type call struct {
+ wg sync.WaitGroup
+
+ // These fields are written once before the WaitGroup is done
+ // and are only read after the WaitGroup is done.
+ val interface{}
+ err error
+
+ // forgotten indicates whether Forget was called with this call's key
+ // while the call was still in flight.
+ forgotten bool
+
+ // These fields are read and written with the singleflight
+ // mutex held before the WaitGroup is done, and are read but
+ // not written after the WaitGroup is done.
+ dups int
+ chans []chan<- Result
+}
+
+// Group represents a class of work and forms a namespace in
+// which units of work can be executed with duplicate suppression.
+type Group struct {
+ mu sync.Mutex // protects m
+ m map[string]*call // lazily initialized
+}
+
+// Result holds the results of Do, so they can be passed
+// on a channel.
+type Result struct {
+ Val interface{}
+ Err error
+ Shared bool
+}
+
+// Do executes and returns the results of the given function, making
+// sure that only one execution is in-flight for a given key at a
+// time. If a duplicate comes in, the duplicate caller waits for the
+// original to complete and receives the same results.
+// The return value shared indicates whether v was given to multiple callers.
+func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, err error, shared bool) {
+ g.mu.Lock()
+ if g.m == nil {
+ g.m = make(map[string]*call)
+ }
+ if c, ok := g.m[key]; ok {
+ c.dups++
+ g.mu.Unlock()
+ c.wg.Wait()
+
+ if e, ok := c.err.(*panicError); ok {
+ panic(e)
+ } else if c.err == errGoexit {
+ runtime.Goexit()
+ }
+ return c.val, c.err, true
+ }
+ c := new(call)
+ c.wg.Add(1)
+ g.m[key] = c
+ g.mu.Unlock()
+
+ g.doCall(c, key, fn)
+ return c.val, c.err, c.dups > 0
+}
+
+// DoChan is like Do but returns a channel that will receive the
+// results when they are ready.
+//
+// The returned channel will not be closed.
+func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result {
+ ch := make(chan Result, 1)
+ g.mu.Lock()
+ if g.m == nil {
+ g.m = make(map[string]*call)
+ }
+ if c, ok := g.m[key]; ok {
+ c.dups++
+ c.chans = append(c.chans, ch)
+ g.mu.Unlock()
+ return ch
+ }
+ c := &call{chans: []chan<- Result{ch}}
+ c.wg.Add(1)
+ g.m[key] = c
+ g.mu.Unlock()
+
+ go g.doCall(c, key, fn)
+
+ return ch
+}
+
+// doCall handles the single call for a key.
+func (g *Group) doCall(c *call, key string, fn func() (interface{}, error)) {
+ normalReturn := false
+ recovered := false
+
+ // use double-defer to distinguish panic from runtime.Goexit,
+ // more details see https://golang.org/cl/134395
+ defer func() {
+ // the given function invoked runtime.Goexit
+ if !normalReturn && !recovered {
+ c.err = errGoexit
+ }
+
+ c.wg.Done()
+ g.mu.Lock()
+ defer g.mu.Unlock()
+ if !c.forgotten {
+ delete(g.m, key)
+ }
+
+ if e, ok := c.err.(*panicError); ok {
+ // In order to prevent the waiting channels from being blocked forever,
+ // needs to ensure that this panic cannot be recovered.
+ if len(c.chans) > 0 {
+ go panic(e)
+ select {} // Keep this goroutine around so that it will appear in the crash dump.
+ } else {
+ panic(e)
+ }
+ } else if c.err == errGoexit {
+ // Already in the process of goexit, no need to call again
+ } else {
+ // Normal return
+ for _, ch := range c.chans {
+ ch <- Result{c.val, c.err, c.dups > 0}
+ }
+ }
+ }()
+
+ func() {
+ defer func() {
+ if !normalReturn {
+ // Ideally, we would wait to take a stack trace until we've determined
+ // whether this is a panic or a runtime.Goexit.
+ //
+ // Unfortunately, the only way we can distinguish the two is to see
+ // whether the recover stopped the goroutine from terminating, and by
+ // the time we know that, the part of the stack trace relevant to the
+ // panic has been discarded.
+ if r := recover(); r != nil {
+ c.err = newPanicError(r)
+ }
+ }
+ }()
+
+ c.val, c.err = fn()
+ normalReturn = true
+ }()
+
+ if !normalReturn {
+ recovered = true
+ }
+}
+
+// Forget tells the singleflight to forget about a key. Future calls
+// to Do for this key will call the function rather than waiting for
+// an earlier call to complete.
+func (g *Group) Forget(key string) {
+ g.mu.Lock()
+ if c, ok := g.m[key]; ok {
+ c.forgotten = true
+ }
+ delete(g.m, key)
+ g.mu.Unlock()
+}
diff --git a/vendor/github.com/aws/smithy-go/io/byte.go b/vendor/github.com/aws/smithy-go/io/byte.go
new file mode 100644
index 000000000..f8417c15b
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/io/byte.go
@@ -0,0 +1,12 @@
+package io
+
+const (
+ // Byte is 8 bits
+ Byte int64 = 1
+ // KibiByte (KiB) is 1024 Bytes
+ KibiByte = Byte * 1024
+ // MebiByte (MiB) is 1024 KiB
+ MebiByte = KibiByte * 1024
+ // GibiByte (GiB) is 1024 MiB
+ GibiByte = MebiByte * 1024
+)
diff --git a/vendor/github.com/aws/smithy-go/io/doc.go b/vendor/github.com/aws/smithy-go/io/doc.go
new file mode 100644
index 000000000..a6a33eaf5
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/io/doc.go
@@ -0,0 +1,2 @@
+// Package io provides utilities for Smithy generated API clients.
+package io
diff --git a/vendor/github.com/aws/smithy-go/io/reader.go b/vendor/github.com/aws/smithy-go/io/reader.go
new file mode 100644
index 000000000..07063f296
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/io/reader.go
@@ -0,0 +1,16 @@
+package io
+
+import (
+ "io"
+)
+
+// ReadSeekNopCloser wraps an io.ReadSeeker with an additional Close method
+// that does nothing.
+type ReadSeekNopCloser struct {
+ io.ReadSeeker
+}
+
+// Close does nothing.
+func (ReadSeekNopCloser) Close() error {
+ return nil
+}
diff --git a/vendor/github.com/aws/smithy-go/io/ringbuffer.go b/vendor/github.com/aws/smithy-go/io/ringbuffer.go
new file mode 100644
index 000000000..06b476add
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/io/ringbuffer.go
@@ -0,0 +1,94 @@
+package io
+
+import (
+ "bytes"
+ "io"
+)
+
+// RingBuffer struct satisfies io.ReadWrite interface.
+//
+// ReadBuffer is a revolving buffer data structure, which can be used to store snapshots of data in a
+// revolving window.
+type RingBuffer struct {
+ slice []byte
+ start int
+ end int
+ size int
+}
+
+// NewRingBuffer method takes in a byte slice as an input and returns a RingBuffer.
+func NewRingBuffer(slice []byte) *RingBuffer {
+ ringBuf := RingBuffer{
+ slice: slice,
+ }
+ return &ringBuf
+}
+
+// Write method inserts the elements in a byte slice, and returns the number of bytes written along with any error.
+func (r *RingBuffer) Write(p []byte) (int, error) {
+ for _, b := range p {
+ // check if end points to invalid index, we need to circle back
+ if r.end == len(r.slice) {
+ r.end = 0
+ }
+ // check if start points to invalid index, we need to circle back
+ if r.start == len(r.slice) {
+ r.start = 0
+ }
+ // if ring buffer is filled, increment the start index
+ if r.size == len(r.slice) {
+ r.size--
+ r.start++
+ }
+
+ r.slice[r.end] = b
+ r.end++
+ r.size++
+ }
+ return len(p), nil
+}
+
+// Read copies the data on the ring buffer into the byte slice provided to the method.
+// Returns the read count along with any error encountered while reading.
+func (r *RingBuffer) Read(p []byte) (int, error) {
+ // readCount keeps track of the number of bytes read
+ var readCount int
+ for j := 0; j < len(p); j++ {
+ // if ring buffer is empty or completely read
+ // return EOF error.
+ if r.size == 0 {
+ return readCount, io.EOF
+ }
+
+ if r.start == len(r.slice) {
+ r.start = 0
+ }
+
+ p[j] = r.slice[r.start]
+ readCount++
+ // increment the start pointer for ring buffer
+ r.start++
+ // decrement the size of ring buffer
+ r.size--
+ }
+ return readCount, nil
+}
+
+// Len returns the number of unread bytes in the buffer.
+func (r *RingBuffer) Len() int {
+ return r.size
+}
+
+// Bytes returns a copy of the RingBuffer's bytes.
+func (r RingBuffer) Bytes() []byte {
+ var b bytes.Buffer
+ io.Copy(&b, &r)
+ return b.Bytes()
+}
+
+// Reset resets the ring buffer.
+func (r *RingBuffer) Reset() {
+ *r = RingBuffer{
+ slice: r.slice,
+ }
+}
diff --git a/vendor/github.com/aws/smithy-go/local-mod-replace.sh b/vendor/github.com/aws/smithy-go/local-mod-replace.sh
new file mode 100644
index 000000000..800bf3769
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/local-mod-replace.sh
@@ -0,0 +1,39 @@
+#1/usr/bin/env bash
+
+PROJECT_DIR=""
+SMITHY_SOURCE_DIR=$(cd `dirname $0` && pwd)
+
+usage() {
+ echo "Usage: $0 [-s SMITHY_SOURCE_DIR] [-d PROJECT_DIR]" 1>&2
+ exit 1
+}
+
+while getopts "hs:d:" options; do
+ case "${options}" in
+ s)
+ SMITHY_SOURCE_DIR=${OPTARG}
+ if [ "$SMITHY_SOURCE_DIR" == "" ]; then
+ echo "path to smithy-go source directory is required" || exit
+ usage
+ fi
+ ;;
+ d)
+ PROJECT_DIR=${OPTARG}
+ ;;
+ h)
+ usage
+ ;;
+ *)
+ usage
+ ;;
+ esac
+done
+
+if [ "$PROJECT_DIR" != "" ]; then
+ cd $PROJECT_DIR || exit
+fi
+
+go mod graph | awk '{print $1}' | cut -d '@' -f 1 | sort | uniq | grep "github.com/aws/smithy-go" | while read x; do
+ repPath=${x/github.com\/aws\/smithy-go/${SMITHY_SOURCE_DIR}}
+ echo -replace $x=$repPath
+done | xargs go mod edit
diff --git a/vendor/github.com/aws/smithy-go/logging/logger.go b/vendor/github.com/aws/smithy-go/logging/logger.go
new file mode 100644
index 000000000..2071924bd
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/logging/logger.go
@@ -0,0 +1,82 @@
+package logging
+
+import (
+ "context"
+ "io"
+ "log"
+)
+
+// Classification is the type of the log entry's classification name.
+type Classification string
+
+// Set of standard classifications that can be used by clients and middleware
+const (
+ Warn Classification = "WARN"
+ Debug Classification = "DEBUG"
+)
+
+// Logger is an interface for logging entries at certain classifications.
+type Logger interface {
+ // Logf is expected to support the standard fmt package "verbs".
+ Logf(classification Classification, format string, v ...interface{})
+}
+
+// LoggerFunc is a wrapper around a function to satisfy the Logger interface.
+type LoggerFunc func(classification Classification, format string, v ...interface{})
+
+// Logf delegates the logging request to the wrapped function.
+func (f LoggerFunc) Logf(classification Classification, format string, v ...interface{}) {
+ f(classification, format, v...)
+}
+
+// ContextLogger is an optional interface a Logger implementation may expose that provides
+// the ability to create context aware log entries.
+type ContextLogger interface {
+ WithContext(context.Context) Logger
+}
+
+// WithContext will pass the provided context to logger if it implements the ContextLogger interface and return the resulting
+// logger. Otherwise the logger will be returned as is. As a special case if a nil logger is provided, a Nop logger will
+// be returned to the caller.
+func WithContext(ctx context.Context, logger Logger) Logger {
+ if logger == nil {
+ return Nop{}
+ }
+
+ cl, ok := logger.(ContextLogger)
+ if !ok {
+ return logger
+ }
+
+ return cl.WithContext(ctx)
+}
+
+// Nop is a Logger implementation that simply does not perform any logging.
+type Nop struct{}
+
+// Logf simply returns without performing any action
+func (n Nop) Logf(Classification, string, ...interface{}) {
+ return
+}
+
+// StandardLogger is a Logger implementation that wraps the standard library logger, and delegates logging to it's
+// Printf method.
+type StandardLogger struct {
+ Logger *log.Logger
+}
+
+// Logf logs the given classification and message to the underlying logger.
+func (s StandardLogger) Logf(classification Classification, format string, v ...interface{}) {
+ if len(classification) != 0 {
+ format = string(classification) + " " + format
+ }
+
+ s.Logger.Printf(format, v...)
+}
+
+// NewStandardLogger returns a new StandardLogger
+func NewStandardLogger(writer io.Writer) *StandardLogger {
+ return &StandardLogger{
+ Logger: log.New(writer, "SDK ", log.LstdFlags),
+ }
+}
diff --git a/vendor/github.com/aws/smithy-go/middleware/doc.go b/vendor/github.com/aws/smithy-go/middleware/doc.go
new file mode 100644
index 000000000..9858928a7
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/middleware/doc.go
@@ -0,0 +1,67 @@
+// Package middleware provides transport agnostic middleware for decorating SDK
+// handlers.
+//
+// The Smithy middleware stack provides ordered behavior to be invoked on an
+// underlying handler. The stack is separated into steps that are invoked in a
+// static order. A step is a collection of middleware that are injected into a
+// ordered list defined by the user. The user may add, insert, swap, and remove a
+// step's middleware. When the stack is invoked the step middleware become static,
+// and their order cannot be modified.
+//
+// A stack and its step middleware are **not** safe to modify concurrently.
+//
+// A stack will use the ordered list of middleware to decorate a underlying
+// handler. A handler could be something like an HTTP Client that round trips an
+// API operation over HTTP.
+//
+// Smithy Middleware Stack
+//
+// A Stack is a collection of middleware that wrap a handler. The stack can be
+// broken down into discreet steps. Each step may contain zero or more middleware
+// specific to that stack's step.
+//
+// A Stack Step is a predefined set of middleware that are invoked in a static
+// order by the Stack. These steps represent fixed points in the middleware stack
+// for organizing specific behavior, such as serialize and build. A Stack Step is
+// composed of zero or more middleware that are specific to that step. A step may
+// define its own set of input/output parameters the generic input/output
+// parameters are cast from. A step calls its middleware recursively, before
+// calling the next step in the stack returning the result or error of the step
+// middleware decorating the underlying handler.
+//
+// * Initialize: Prepares the input, and sets any default parameters as needed,
+// (e.g. idempotency token, and presigned URLs).
+//
+// * Serialize: Serializes the prepared input into a data structure that can be
+// consumed by the target transport's message, (e.g. REST-JSON serialization).
+//
+// * Build: Adds additional metadata to the serialized transport message, (e.g.
+// HTTP's Content-Length header, or body checksum). Decorations and
+// modifications to the message should be copied to all message attempts.
+//
+// * Finalize: Performs final preparations needed before sending the message. The
+// message should already be complete by this stage, and is only alternated to
+// meet the expectations of the recipient, (e.g. Retry and AWS SigV4 request
+// signing).
+//
+// * Deserialize: Reacts to the handler's response returned by the recipient of
+// the request message. Deserializes the response into a structured type or
+// error above stacks can react to.
+//
+// Adding Middleware to a Stack Step
+//
+// Middleware can be added to a step front or back, or relative, by name, to an
+// existing middleware in that stack. If a middleware does not have a name, a
+// unique name will be generated at the middleware and be added to the step.
+//
+// // Create middleware stack
+// stack := middleware.NewStack()
+//
+// // Add middleware to stack steps
+// stack.Initialize.Add(paramValidationMiddleware, middleware.After)
+// stack.Serialize.Add(marshalOperationFoo, middleware.After)
+// stack.Deserialize.Add(unmarshalOperationFoo, middleware.After)
+//
+// // Invoke middleware on handler.
+// resp, err := stack.HandleMiddleware(ctx, req.Input, clientHandler)
+package middleware
diff --git a/vendor/github.com/aws/smithy-go/middleware/logging.go b/vendor/github.com/aws/smithy-go/middleware/logging.go
new file mode 100644
index 000000000..c2f0dbb6b
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/middleware/logging.go
@@ -0,0 +1,46 @@
+package middleware
+
+import (
+ "context"
+
+ "github.com/aws/smithy-go/logging"
+)
+
+// loggerKey is the context value key for which the logger is associated with.
+type loggerKey struct{}
+
+// GetLogger takes a context to retrieve a Logger from. If no logger is present on the context a logging.Nop logger
+// is returned. If the logger retrieved from context supports the ContextLogger interface, the context will be passed
+// to the WithContext method and the resulting logger will be returned. Otherwise the stored logger is returned as is.
+func GetLogger(ctx context.Context) logging.Logger {
+ logger, ok := ctx.Value(loggerKey{}).(logging.Logger)
+ if !ok || logger == nil {
+ return logging.Nop{}
+ }
+
+ return logging.WithContext(ctx, logger)
+}
+
+// SetLogger sets the provided logger value on the provided ctx.
+func SetLogger(ctx context.Context, logger logging.Logger) context.Context {
+ return context.WithValue(ctx, loggerKey{}, logger)
+}
+
+type setLogger struct {
+ Logger logging.Logger
+}
+
+// AddSetLoggerMiddleware adds a middleware that will add the provided logger to the middleware context.
+func AddSetLoggerMiddleware(stack *Stack, logger logging.Logger) error {
+ return stack.Initialize.Add(&setLogger{Logger: logger}, After)
+}
+
+func (a *setLogger) ID() string {
+ return "SetLogger"
+}
+
+func (a *setLogger) HandleInitialize(ctx context.Context, in InitializeInput, next InitializeHandler) (
+ out InitializeOutput, metadata Metadata, err error,
+) {
+ return next.HandleInitialize(SetLogger(ctx, a.Logger), in)
+}
diff --git a/vendor/github.com/aws/smithy-go/middleware/metadata.go b/vendor/github.com/aws/smithy-go/middleware/metadata.go
new file mode 100644
index 000000000..7bb7dbcf5
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/middleware/metadata.go
@@ -0,0 +1,65 @@
+package middleware
+
+// MetadataReader provides an interface for reading metadata from the
+// underlying metadata container.
+type MetadataReader interface {
+ Get(key interface{}) interface{}
+}
+
+// Metadata provides storing and reading metadata values. Keys may be any
+// comparable value type. Get and set will panic if key is not a comparable
+// value type.
+//
+// Metadata uses lazy initialization, and Set method must be called as an
+// addressable value, or pointer. Not doing so may cause key/value pair to not
+// be set.
+type Metadata struct {
+ values map[interface{}]interface{}
+}
+
+// Get attempts to retrieve the value the key points to. Returns nil if the
+// key was not found.
+//
+// Panics if key type is not comparable.
+func (m Metadata) Get(key interface{}) interface{} {
+ return m.values[key]
+}
+
+// Clone creates a shallow copy of Metadata entries, returning a new Metadata
+// value with the original entries copied into it.
+func (m Metadata) Clone() Metadata {
+ vs := make(map[interface{}]interface{}, len(m.values))
+ for k, v := range m.values {
+ vs[k] = v
+ }
+
+ return Metadata{
+ values: vs,
+ }
+}
+
+// Set stores the value pointed to by the key. If a value already exists at
+// that key it will be replaced with the new value.
+//
+// Set method must be called as an addressable value, or pointer. If Set is not
+// called as an addressable value or pointer, the key value pair being set may
+// be lost.
+//
+// Panics if the key type is not comparable.
+func (m *Metadata) Set(key, value interface{}) {
+ if m.values == nil {
+ m.values = map[interface{}]interface{}{}
+ }
+ m.values[key] = value
+}
+
+// Has returns whether the key exists in the metadata.
+//
+// Panics if the key type is not comparable.
+func (m Metadata) Has(key interface{}) bool {
+ if m.values == nil {
+ return false
+ }
+ _, ok := m.values[key]
+ return ok
+}
diff --git a/vendor/github.com/aws/smithy-go/middleware/middleware.go b/vendor/github.com/aws/smithy-go/middleware/middleware.go
new file mode 100644
index 000000000..803b7c751
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/middleware/middleware.go
@@ -0,0 +1,71 @@
+package middleware
+
+import (
+ "context"
+)
+
+// Handler provides the interface for performing the logic to obtain an output,
+// or error for the given input.
+type Handler interface {
+ // Handle performs logic to obtain an output for the given input. Handler
+ // should be decorated with middleware to perform input specific behavior.
+ Handle(ctx context.Context, input interface{}) (
+ output interface{}, metadata Metadata, err error,
+ )
+}
+
+// HandlerFunc provides a wrapper around a function pointer to be used as a
+// middleware handler.
+type HandlerFunc func(ctx context.Context, input interface{}) (
+ output interface{}, metadata Metadata, err error,
+)
+
+// Handle invokes the underlying function, returning the result.
+func (fn HandlerFunc) Handle(ctx context.Context, input interface{}) (
+ output interface{}, metadata Metadata, err error,
+) {
+ return fn(ctx, input)
+}
+
+// Middleware provides the interface to call handlers in a chain.
+type Middleware interface {
+ // ID provides a unique identifier for the middleware.
+ ID() string
+
+ // Performs the middleware's handling of the input, returning the output,
+ // or error. The middleware can invoke the next Handler if handling should
+ // continue.
+ HandleMiddleware(ctx context.Context, input interface{}, next Handler) (
+ output interface{}, metadata Metadata, err error,
+ )
+}
+
+// decoratedHandler wraps a middleware in order to to call the next handler in
+// the chain.
+type decoratedHandler struct {
+ // The next handler to be called.
+ Next Handler
+
+ // The current middleware decorating the handler.
+ With Middleware
+}
+
+// Handle implements the Handler interface to handle a operation invocation.
+func (m decoratedHandler) Handle(ctx context.Context, input interface{}) (
+ output interface{}, metadata Metadata, err error,
+) {
+ return m.With.HandleMiddleware(ctx, input, m.Next)
+}
+
+// DecorateHandler decorates a handler with a middleware. Wrapping the handler
+// with the middleware.
+func DecorateHandler(h Handler, with ...Middleware) Handler {
+ for i := len(with) - 1; i >= 0; i-- {
+ h = decoratedHandler{
+ Next: h,
+ With: with[i],
+ }
+ }
+
+ return h
+}
diff --git a/vendor/github.com/aws/smithy-go/middleware/ordered_group.go b/vendor/github.com/aws/smithy-go/middleware/ordered_group.go
new file mode 100644
index 000000000..4b195308c
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/middleware/ordered_group.go
@@ -0,0 +1,268 @@
+package middleware
+
+import "fmt"
+
+// RelativePosition provides specifying the relative position of a middleware
+// in an ordered group.
+type RelativePosition int
+
+// Relative position for middleware in steps.
+const (
+ After RelativePosition = iota
+ Before
+)
+
+type ider interface {
+ ID() string
+}
+
+// orderedIDs provides an ordered collection of items with relative ordering
+// by name.
+type orderedIDs struct {
+ order *relativeOrder
+ items map[string]ider
+}
+
+const baseOrderedItems = 5
+
+func newOrderedIDs() *orderedIDs {
+ return &orderedIDs{
+ order: newRelativeOrder(),
+ items: make(map[string]ider, baseOrderedItems),
+ }
+}
+
+// Add injects the item to the relative position of the item group. Returns an
+// error if the item already exists.
+func (g *orderedIDs) Add(m ider, pos RelativePosition) error {
+ id := m.ID()
+ if len(id) == 0 {
+ return fmt.Errorf("empty ID, ID must not be empty")
+ }
+
+ if err := g.order.Add(pos, id); err != nil {
+ return err
+ }
+
+ g.items[id] = m
+ return nil
+}
+
+// Insert injects the item relative to an existing item id. Returns an error if
+// the original item does not exist, or the item being added already exists.
+func (g *orderedIDs) Insert(m ider, relativeTo string, pos RelativePosition) error {
+ if len(m.ID()) == 0 {
+ return fmt.Errorf("insert ID must not be empty")
+ }
+ if len(relativeTo) == 0 {
+ return fmt.Errorf("relative to ID must not be empty")
+ }
+
+ if err := g.order.Insert(relativeTo, pos, m.ID()); err != nil {
+ return err
+ }
+
+ g.items[m.ID()] = m
+ return nil
+}
+
+// Get returns the ider identified by id. If ider is not present, returns false.
+func (g *orderedIDs) Get(id string) (ider, bool) {
+ v, ok := g.items[id]
+ return v, ok
+}
+
+// Swap removes the item by id, replacing it with the new item. Returns an error
+// if the original item doesn't exist.
+func (g *orderedIDs) Swap(id string, m ider) (ider, error) {
+ if len(id) == 0 {
+ return nil, fmt.Errorf("swap from ID must not be empty")
+ }
+
+ iderID := m.ID()
+ if len(iderID) == 0 {
+ return nil, fmt.Errorf("swap to ID must not be empty")
+ }
+
+ if err := g.order.Swap(id, iderID); err != nil {
+ return nil, err
+ }
+
+ removed := g.items[id]
+
+ delete(g.items, id)
+ g.items[iderID] = m
+
+ return removed, nil
+}
+
+// Remove removes the item by id. Returns an error if the item
+// doesn't exist.
+func (g *orderedIDs) Remove(id string) (ider, error) {
+ if len(id) == 0 {
+ return nil, fmt.Errorf("remove ID must not be empty")
+ }
+
+ if err := g.order.Remove(id); err != nil {
+ return nil, err
+ }
+
+ removed := g.items[id]
+ delete(g.items, id)
+ return removed, nil
+}
+
+func (g *orderedIDs) List() []string {
+ items := g.order.List()
+ order := make([]string, len(items))
+ copy(order, items)
+ return order
+}
+
+// Clear removes all entries and slots.
+func (g *orderedIDs) Clear() {
+ g.order.Clear()
+ g.items = map[string]ider{}
+}
+
+// GetOrder returns the item in the order it should be invoked in.
+func (g *orderedIDs) GetOrder() []interface{} {
+ order := g.order.List()
+ ordered := make([]interface{}, len(order))
+ for i := 0; i < len(order); i++ {
+ ordered[i] = g.items[order[i]]
+ }
+
+ return ordered
+}
+
+// relativeOrder provides ordering of item
+type relativeOrder struct {
+ order []string
+}
+
+func newRelativeOrder() *relativeOrder {
+ return &relativeOrder{
+ order: make([]string, 0, baseOrderedItems),
+ }
+}
+
+// Add inserts an item into the order relative to the position provided.
+func (s *relativeOrder) Add(pos RelativePosition, ids ...string) error {
+ if len(ids) == 0 {
+ return nil
+ }
+
+ for _, id := range ids {
+ if _, ok := s.has(id); ok {
+ return fmt.Errorf("already exists, %v", id)
+ }
+ }
+
+ switch pos {
+ case Before:
+ return s.insert(0, Before, ids...)
+
+ case After:
+ s.order = append(s.order, ids...)
+
+ default:
+ return fmt.Errorf("invalid position, %v", int(pos))
+ }
+
+ return nil
+}
+
+// Insert injects an item before or after the relative item. Returns
+// an error if the relative item does not exist.
+func (s *relativeOrder) Insert(relativeTo string, pos RelativePosition, ids ...string) error {
+ if len(ids) == 0 {
+ return nil
+ }
+
+ for _, id := range ids {
+ if _, ok := s.has(id); ok {
+ return fmt.Errorf("already exists, %v", id)
+ }
+ }
+
+ i, ok := s.has(relativeTo)
+ if !ok {
+ return fmt.Errorf("not found, %v", relativeTo)
+ }
+
+ return s.insert(i, pos, ids...)
+}
+
+// Swap will replace the item id with the to item. Returns an
+// error if the original item id does not exist. Allows swapping out an
+// item for another item with the same id.
+func (s *relativeOrder) Swap(id, to string) error {
+ i, ok := s.has(id)
+ if !ok {
+ return fmt.Errorf("not found, %v", id)
+ }
+
+ if _, ok = s.has(to); ok && id != to {
+ return fmt.Errorf("already exists, %v", to)
+ }
+
+ s.order[i] = to
+ return nil
+}
+
+func (s *relativeOrder) Remove(id string) error {
+ i, ok := s.has(id)
+ if !ok {
+ return fmt.Errorf("not found, %v", id)
+ }
+
+ s.order = append(s.order[:i], s.order[i+1:]...)
+ return nil
+}
+
+func (s *relativeOrder) List() []string {
+ return s.order
+}
+
+func (s *relativeOrder) Clear() {
+ s.order = s.order[0:0]
+}
+
+func (s *relativeOrder) insert(i int, pos RelativePosition, ids ...string) error {
+ switch pos {
+ case Before:
+ n := len(ids)
+ var src []string
+ if n <= cap(s.order)-len(s.order) {
+ s.order = s.order[:len(s.order)+n]
+ src = s.order
+ } else {
+ src = s.order
+ s.order = make([]string, len(s.order)+n)
+ copy(s.order[:i], src[:i]) // only when allocating a new slice do we need to copy the front half
+ }
+ copy(s.order[i+n:], src[i:])
+ copy(s.order[i:], ids)
+ case After:
+ if i == len(s.order)-1 || len(s.order) == 0 {
+ s.order = append(s.order, ids...)
+ } else {
+ s.order = append(s.order[:i+1], append(ids, s.order[i+1:]...)...)
+ }
+
+ default:
+ return fmt.Errorf("invalid position, %v", int(pos))
+ }
+
+ return nil
+}
+
+func (s *relativeOrder) has(id string) (i int, found bool) {
+ for i := 0; i < len(s.order); i++ {
+ if s.order[i] == id {
+ return i, true
+ }
+ }
+ return 0, false
+}
diff --git a/vendor/github.com/aws/smithy-go/middleware/stack.go b/vendor/github.com/aws/smithy-go/middleware/stack.go
new file mode 100644
index 000000000..45ccb5b93
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/middleware/stack.go
@@ -0,0 +1,209 @@
+package middleware
+
+import (
+ "context"
+ "io"
+ "strings"
+)
+
+// Stack provides protocol and transport agnostic set of middleware split into
+// distinct steps. Steps have specific transitions between them, that are
+// managed by the individual step.
+//
+// Steps are composed as middleware around the underlying handler in the
+// following order:
+//
+// Initialize -> Serialize -> Build -> Finalize -> Deserialize -> Handler
+//
+// Any middleware within the chain may choose to stop and return an error or
+// response. Since the middleware decorate the handler like a call stack, each
+// middleware will receive the result of the next middleware in the chain.
+// Middleware that does not need to react to an input, or result must forward
+// along the input down the chain, or return the result back up the chain.
+//
+// Initialize <- Serialize -> Build -> Finalize <- Deserialize <- Handler
+type Stack struct {
+ // Initialize prepares the input, and sets any default parameters as
+ // needed, (e.g. idempotency token, and presigned URLs).
+ //
+ // Takes Input Parameters, and returns result or error.
+ //
+ // Receives result or error from Serialize step.
+ Initialize *InitializeStep
+
+ // Serialize serializes the prepared input into a data structure that can be consumed
+ // by the target transport's message, (e.g. REST-JSON serialization)
+ //
+ // Converts Input Parameters into a Request, and returns the result or error.
+ //
+ // Receives result or error from Build step.
+ Serialize *SerializeStep
+
+ // Build adds additional metadata to the serialized transport message
+ // (e.g. HTTP's Content-Length header, or body checksum). Decorations and
+ // modifications to the message should be copied to all message attempts.
+ //
+ // Takes Request, and returns result or error.
+ //
+ // Receives result or error from Finalize step.
+ Build *BuildStep
+
+ // Finalize performs final preparations needed before sending the message. The
+ // message should already be complete by this stage, and is only alternated
+ // to meet the expectations of the recipient (e.g. Retry and AWS SigV4
+ // request signing)
+ //
+ // Takes Request, and returns result or error.
+ //
+ // Receives result or error from Deserialize step.
+ Finalize *FinalizeStep
+
+ // Deserialize reacts to the handler's response returned by the recipient of the request
+ // message. Deserializes the response into a structured type or error above
+ // stacks can react to.
+ //
+ // Should only forward Request to underlying handler.
+ //
+ // Takes Request, and returns result or error.
+ //
+ // Receives raw response, or error from underlying handler.
+ Deserialize *DeserializeStep
+
+ id string
+}
+
+// NewStack returns an initialize empty stack.
+func NewStack(id string, newRequestFn func() interface{}) *Stack {
+ return &Stack{
+ id: id,
+ Initialize: NewInitializeStep(),
+ Serialize: NewSerializeStep(newRequestFn),
+ Build: NewBuildStep(),
+ Finalize: NewFinalizeStep(),
+ Deserialize: NewDeserializeStep(),
+ }
+}
+
+// ID returns the unique ID for the stack as a middleware.
+func (s *Stack) ID() string { return s.id }
+
+// HandleMiddleware invokes the middleware stack decorating the next handler.
+// Each step of stack will be invoked in order before calling the next step.
+// With the next handler call last.
+//
+// The input value must be the input parameters of the operation being
+// performed.
+//
+// Will return the result of the operation, or error.
+func (s *Stack) HandleMiddleware(ctx context.Context, input interface{}, next Handler) (
+ output interface{}, metadata Metadata, err error,
+) {
+ h := DecorateHandler(next,
+ s.Initialize,
+ s.Serialize,
+ s.Build,
+ s.Finalize,
+ s.Deserialize,
+ )
+
+ return h.Handle(ctx, input)
+}
+
+// List returns a list of all middleware in the stack by step.
+func (s *Stack) List() []string {
+ var l []string
+ l = append(l, s.id)
+
+ l = append(l, s.Initialize.ID())
+ l = append(l, s.Initialize.List()...)
+
+ l = append(l, s.Serialize.ID())
+ l = append(l, s.Serialize.List()...)
+
+ l = append(l, s.Build.ID())
+ l = append(l, s.Build.List()...)
+
+ l = append(l, s.Finalize.ID())
+ l = append(l, s.Finalize.List()...)
+
+ l = append(l, s.Deserialize.ID())
+ l = append(l, s.Deserialize.List()...)
+
+ return l
+}
+
+func (s *Stack) String() string {
+ var b strings.Builder
+
+ w := &indentWriter{w: &b}
+
+ w.WriteLine(s.id)
+ w.Push()
+
+ writeStepItems(w, s.Initialize)
+ writeStepItems(w, s.Serialize)
+ writeStepItems(w, s.Build)
+ writeStepItems(w, s.Finalize)
+ writeStepItems(w, s.Deserialize)
+
+ return b.String()
+}
+
+type stackStepper interface {
+ ID() string
+ List() []string
+}
+
+func writeStepItems(w *indentWriter, s stackStepper) {
+ type lister interface {
+ List() []string
+ }
+
+ w.WriteLine(s.ID())
+ w.Push()
+
+ defer w.Pop()
+
+ // ignore stack to prevent circular iterations
+ if _, ok := s.(*Stack); ok {
+ return
+ }
+
+ for _, id := range s.List() {
+ w.WriteLine(id)
+ }
+}
+
+type stringWriter interface {
+ io.Writer
+ WriteString(string) (int, error)
+ WriteRune(rune) (int, error)
+}
+
+type indentWriter struct {
+ w stringWriter
+ depth int
+}
+
+const indentDepth = "\t\t\t\t\t\t\t\t\t\t"
+
+func (w *indentWriter) Push() {
+ w.depth++
+}
+
+func (w *indentWriter) Pop() {
+ w.depth--
+ if w.depth < 0 {
+ w.depth = 0
+ }
+}
+
+func (w *indentWriter) WriteLine(v string) {
+ w.w.WriteString(indentDepth[:w.depth])
+
+ v = strings.ReplaceAll(v, "\n", "\\n")
+ v = strings.ReplaceAll(v, "\r", "\\r")
+
+ w.w.WriteString(v)
+ w.w.WriteRune('\n')
+}
diff --git a/vendor/github.com/aws/smithy-go/middleware/stack_values.go b/vendor/github.com/aws/smithy-go/middleware/stack_values.go
new file mode 100644
index 000000000..ef96009ba
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/middleware/stack_values.go
@@ -0,0 +1,100 @@
+package middleware
+
+import (
+ "context"
+ "reflect"
+ "strings"
+)
+
+// WithStackValue adds a key value pair to the context that is intended to be
+// scoped to a stack. Use ClearStackValues to get a new context with all stack
+// values cleared.
+func WithStackValue(ctx context.Context, key, value interface{}) context.Context {
+ md, _ := ctx.Value(stackValuesKey{}).(*stackValues)
+
+ md = withStackValue(md, key, value)
+ return context.WithValue(ctx, stackValuesKey{}, md)
+}
+
+// ClearStackValues returns a context without any stack values.
+func ClearStackValues(ctx context.Context) context.Context {
+ return context.WithValue(ctx, stackValuesKey{}, nil)
+}
+
+// GetStackValues returns the value pointed to by the key within the stack
+// values, if it is present.
+func GetStackValue(ctx context.Context, key interface{}) interface{} {
+ md, _ := ctx.Value(stackValuesKey{}).(*stackValues)
+ if md == nil {
+ return nil
+ }
+
+ return md.Value(key)
+}
+
+type stackValuesKey struct{}
+
+type stackValues struct {
+ key interface{}
+ value interface{}
+ parent *stackValues
+}
+
+func withStackValue(parent *stackValues, key, value interface{}) *stackValues {
+ if key == nil {
+ panic("nil key")
+ }
+ if !reflect.TypeOf(key).Comparable() {
+ panic("key is not comparable")
+ }
+ return &stackValues{key: key, value: value, parent: parent}
+}
+
+func (m *stackValues) Value(key interface{}) interface{} {
+ if key == m.key {
+ return m.value
+ }
+
+ if m.parent == nil {
+ return nil
+ }
+
+ return m.parent.Value(key)
+}
+
+func (c *stackValues) String() string {
+ var str strings.Builder
+
+ cc := c
+ for cc == nil {
+ str.WriteString("(" +
+ reflect.TypeOf(c.key).String() +
+ ": " +
+ stringify(cc.value) +
+ ")")
+ if cc.parent != nil {
+ str.WriteString(" -> ")
+ }
+ cc = cc.parent
+ }
+ str.WriteRune('}')
+
+ return str.String()
+}
+
+type stringer interface {
+ String() string
+}
+
+// stringify tries a bit to stringify v, without using fmt, since we don't
+// want context depending on the unicode tables. This is only used by
+// *valueCtx.String().
+func stringify(v interface{}) string {
+ switch s := v.(type) {
+ case stringer:
+ return s.String()
+ case string:
+ return s
+ }
+ return ""
+}
diff --git a/vendor/github.com/aws/smithy-go/middleware/step_build.go b/vendor/github.com/aws/smithy-go/middleware/step_build.go
new file mode 100644
index 000000000..7e1d94cae
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/middleware/step_build.go
@@ -0,0 +1,211 @@
+package middleware
+
+import (
+ "context"
+)
+
+// BuildInput provides the input parameters for the BuildMiddleware to consume.
+// BuildMiddleware may modify the Request value before forwarding the input
+// along to the next BuildHandler.
+type BuildInput struct {
+ Request interface{}
+}
+
+// BuildOutput provides the result returned by the next BuildHandler.
+type BuildOutput struct {
+ Result interface{}
+}
+
+// BuildHandler provides the interface for the next handler the
+// BuildMiddleware will call in the middleware chain.
+type BuildHandler interface {
+ HandleBuild(ctx context.Context, in BuildInput) (
+ out BuildOutput, metadata Metadata, err error,
+ )
+}
+
+// BuildMiddleware provides the interface for middleware specific to the
+// serialize step. Delegates to the next BuildHandler for further
+// processing.
+type BuildMiddleware interface {
+ // Unique ID for the middleware in theBuildStep. The step does not allow
+ // duplicate IDs.
+ ID() string
+
+ // Invokes the middleware behavior which must delegate to the next handler
+ // for the middleware chain to continue. The method must return a result or
+ // error to its caller.
+ HandleBuild(ctx context.Context, in BuildInput, next BuildHandler) (
+ out BuildOutput, metadata Metadata, err error,
+ )
+}
+
+// BuildMiddlewareFunc returns a BuildMiddleware with the unique ID provided,
+// and the func to be invoked.
+func BuildMiddlewareFunc(id string, fn func(context.Context, BuildInput, BuildHandler) (BuildOutput, Metadata, error)) BuildMiddleware {
+ return buildMiddlewareFunc{
+ id: id,
+ fn: fn,
+ }
+}
+
+type buildMiddlewareFunc struct {
+ // Unique ID for the middleware.
+ id string
+
+ // Middleware function to be called.
+ fn func(context.Context, BuildInput, BuildHandler) (BuildOutput, Metadata, error)
+}
+
+// ID returns the unique ID for the middleware.
+func (s buildMiddlewareFunc) ID() string { return s.id }
+
+// HandleBuild invokes the middleware Fn.
+func (s buildMiddlewareFunc) HandleBuild(ctx context.Context, in BuildInput, next BuildHandler) (
+ out BuildOutput, metadata Metadata, err error,
+) {
+ return s.fn(ctx, in, next)
+}
+
+var _ BuildMiddleware = (buildMiddlewareFunc{})
+
+// BuildStep provides the ordered grouping of BuildMiddleware to be invoked on
+// a handler.
+type BuildStep struct {
+ ids *orderedIDs
+}
+
+// NewBuildStep returns a BuildStep ready to have middleware for
+// initialization added to it.
+func NewBuildStep() *BuildStep {
+ return &BuildStep{
+ ids: newOrderedIDs(),
+ }
+}
+
+var _ Middleware = (*BuildStep)(nil)
+
+// ID returns the unique name of the step as a middleware.
+func (s *BuildStep) ID() string {
+ return "Build stack step"
+}
+
+// HandleMiddleware invokes the middleware by decorating the next handler
+// provided. Returns the result of the middleware and handler being invoked.
+//
+// Implements Middleware interface.
+func (s *BuildStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) (
+ out interface{}, metadata Metadata, err error,
+) {
+ order := s.ids.GetOrder()
+
+ var h BuildHandler = buildWrapHandler{Next: next}
+ for i := len(order) - 1; i >= 0; i-- {
+ h = decoratedBuildHandler{
+ Next: h,
+ With: order[i].(BuildMiddleware),
+ }
+ }
+
+ sIn := BuildInput{
+ Request: in,
+ }
+
+ res, metadata, err := h.HandleBuild(ctx, sIn)
+ return res.Result, metadata, err
+}
+
+// Get retrieves the middleware identified by id. If the middleware is not present, returns false.
+func (s *BuildStep) Get(id string) (BuildMiddleware, bool) {
+ get, ok := s.ids.Get(id)
+ if !ok {
+ return nil, false
+ }
+ return get.(BuildMiddleware), ok
+}
+
+// Add injects the middleware to the relative position of the middleware group.
+// Returns an error if the middleware already exists.
+func (s *BuildStep) Add(m BuildMiddleware, pos RelativePosition) error {
+ return s.ids.Add(m, pos)
+}
+
+// Insert injects the middleware relative to an existing middleware id.
+// Returns an error if the original middleware does not exist, or the middleware
+// being added already exists.
+func (s *BuildStep) Insert(m BuildMiddleware, relativeTo string, pos RelativePosition) error {
+ return s.ids.Insert(m, relativeTo, pos)
+}
+
+// Swap removes the middleware by id, replacing it with the new middleware.
+// Returns the middleware removed, or an error if the middleware to be removed
+// doesn't exist.
+func (s *BuildStep) Swap(id string, m BuildMiddleware) (BuildMiddleware, error) {
+ removed, err := s.ids.Swap(id, m)
+ if err != nil {
+ return nil, err
+ }
+
+ return removed.(BuildMiddleware), nil
+}
+
+// Remove removes the middleware by id. Returns error if the middleware
+// doesn't exist.
+func (s *BuildStep) Remove(id string) (BuildMiddleware, error) {
+ removed, err := s.ids.Remove(id)
+ if err != nil {
+ return nil, err
+ }
+
+ return removed.(BuildMiddleware), nil
+}
+
+// List returns a list of the middleware in the step.
+func (s *BuildStep) List() []string {
+ return s.ids.List()
+}
+
+// Clear removes all middleware in the step.
+func (s *BuildStep) Clear() {
+ s.ids.Clear()
+}
+
+type buildWrapHandler struct {
+ Next Handler
+}
+
+var _ BuildHandler = (*buildWrapHandler)(nil)
+
+// Implements BuildHandler, converts types and delegates to underlying
+// generic handler.
+func (w buildWrapHandler) HandleBuild(ctx context.Context, in BuildInput) (
+ out BuildOutput, metadata Metadata, err error,
+) {
+ res, metadata, err := w.Next.Handle(ctx, in.Request)
+ return BuildOutput{
+ Result: res,
+ }, metadata, err
+}
+
+type decoratedBuildHandler struct {
+ Next BuildHandler
+ With BuildMiddleware
+}
+
+var _ BuildHandler = (*decoratedBuildHandler)(nil)
+
+func (h decoratedBuildHandler) HandleBuild(ctx context.Context, in BuildInput) (
+ out BuildOutput, metadata Metadata, err error,
+) {
+ return h.With.HandleBuild(ctx, in, h.Next)
+}
+
+// BuildHandlerFunc provides a wrapper around a function to be used as a build middleware handler.
+type BuildHandlerFunc func(context.Context, BuildInput) (BuildOutput, Metadata, error)
+
+// HandleBuild invokes the wrapped function with the provided arguments.
+func (b BuildHandlerFunc) HandleBuild(ctx context.Context, in BuildInput) (BuildOutput, Metadata, error) {
+ return b(ctx, in)
+}
+
+var _ BuildHandler = BuildHandlerFunc(nil)
diff --git a/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go b/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go
new file mode 100644
index 000000000..448607215
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go
@@ -0,0 +1,217 @@
+package middleware
+
+import (
+ "context"
+)
+
+// DeserializeInput provides the input parameters for the DeserializeInput to
+// consume. DeserializeMiddleware should not modify the Request, and instead
+// forward it along to the next DeserializeHandler.
+type DeserializeInput struct {
+ Request interface{}
+}
+
+// DeserializeOutput provides the result returned by the next
+// DeserializeHandler. The DeserializeMiddleware should deserialize the
+// RawResponse into a Result that can be consumed by middleware higher up in
+// the stack.
+type DeserializeOutput struct {
+ RawResponse interface{}
+ Result interface{}
+}
+
+// DeserializeHandler provides the interface for the next handler the
+// DeserializeMiddleware will call in the middleware chain.
+type DeserializeHandler interface {
+ HandleDeserialize(ctx context.Context, in DeserializeInput) (
+ out DeserializeOutput, metadata Metadata, err error,
+ )
+}
+
+// DeserializeMiddleware provides the interface for middleware specific to the
+// serialize step. Delegates to the next DeserializeHandler for further
+// processing.
+type DeserializeMiddleware interface {
+ // ID returns a unique ID for the middleware in the DeserializeStep. The step does not
+ // allow duplicate IDs.
+ ID() string
+
+ // HandleDeserialize invokes the middleware behavior which must delegate to the next handler
+ // for the middleware chain to continue. The method must return a result or
+ // error to its caller.
+ HandleDeserialize(ctx context.Context, in DeserializeInput, next DeserializeHandler) (
+ out DeserializeOutput, metadata Metadata, err error,
+ )
+}
+
+// DeserializeMiddlewareFunc returns a DeserializeMiddleware with the unique ID
+// provided, and the func to be invoked.
+func DeserializeMiddlewareFunc(id string, fn func(context.Context, DeserializeInput, DeserializeHandler) (DeserializeOutput, Metadata, error)) DeserializeMiddleware {
+ return deserializeMiddlewareFunc{
+ id: id,
+ fn: fn,
+ }
+}
+
+type deserializeMiddlewareFunc struct {
+ // Unique ID for the middleware.
+ id string
+
+ // Middleware function to be called.
+ fn func(context.Context, DeserializeInput, DeserializeHandler) (
+ DeserializeOutput, Metadata, error,
+ )
+}
+
+// ID returns the unique ID for the middleware.
+func (s deserializeMiddlewareFunc) ID() string { return s.id }
+
+// HandleDeserialize invokes the middleware Fn.
+func (s deserializeMiddlewareFunc) HandleDeserialize(ctx context.Context, in DeserializeInput, next DeserializeHandler) (
+ out DeserializeOutput, metadata Metadata, err error,
+) {
+ return s.fn(ctx, in, next)
+}
+
+var _ DeserializeMiddleware = (deserializeMiddlewareFunc{})
+
+// DeserializeStep provides the ordered grouping of DeserializeMiddleware to be
+// invoked on a handler.
+type DeserializeStep struct {
+ ids *orderedIDs
+}
+
+// NewDeserializeStep returns a DeserializeStep ready to have middleware for
+// initialization added to it.
+func NewDeserializeStep() *DeserializeStep {
+ return &DeserializeStep{
+ ids: newOrderedIDs(),
+ }
+}
+
+var _ Middleware = (*DeserializeStep)(nil)
+
+// ID returns the unique ID of the step as a middleware.
+func (s *DeserializeStep) ID() string {
+ return "Deserialize stack step"
+}
+
+// HandleMiddleware invokes the middleware by decorating the next handler
+// provided. Returns the result of the middleware and handler being invoked.
+//
+// Implements Middleware interface.
+func (s *DeserializeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) (
+ out interface{}, metadata Metadata, err error,
+) {
+ order := s.ids.GetOrder()
+
+ var h DeserializeHandler = deserializeWrapHandler{Next: next}
+ for i := len(order) - 1; i >= 0; i-- {
+ h = decoratedDeserializeHandler{
+ Next: h,
+ With: order[i].(DeserializeMiddleware),
+ }
+ }
+
+ sIn := DeserializeInput{
+ Request: in,
+ }
+
+ res, metadata, err := h.HandleDeserialize(ctx, sIn)
+ return res.Result, metadata, err
+}
+
+// Get retrieves the middleware identified by id. If the middleware is not present, returns false.
+func (s *DeserializeStep) Get(id string) (DeserializeMiddleware, bool) {
+ get, ok := s.ids.Get(id)
+ if !ok {
+ return nil, false
+ }
+ return get.(DeserializeMiddleware), ok
+}
+
+// Add injects the middleware to the relative position of the middleware group.
+// Returns an error if the middleware already exists.
+func (s *DeserializeStep) Add(m DeserializeMiddleware, pos RelativePosition) error {
+ return s.ids.Add(m, pos)
+}
+
+// Insert injects the middleware relative to an existing middleware ID.
+// Returns error if the original middleware does not exist, or the middleware
+// being added already exists.
+func (s *DeserializeStep) Insert(m DeserializeMiddleware, relativeTo string, pos RelativePosition) error {
+ return s.ids.Insert(m, relativeTo, pos)
+}
+
+// Swap removes the middleware by id, replacing it with the new middleware.
+// Returns the middleware removed, or error if the middleware to be removed
+// doesn't exist.
+func (s *DeserializeStep) Swap(id string, m DeserializeMiddleware) (DeserializeMiddleware, error) {
+ removed, err := s.ids.Swap(id, m)
+ if err != nil {
+ return nil, err
+ }
+
+ return removed.(DeserializeMiddleware), nil
+}
+
+// Remove removes the middleware by id. Returns error if the middleware
+// doesn't exist.
+func (s *DeserializeStep) Remove(id string) (DeserializeMiddleware, error) {
+ removed, err := s.ids.Remove(id)
+ if err != nil {
+ return nil, err
+ }
+
+ return removed.(DeserializeMiddleware), nil
+}
+
+// List returns a list of the middleware in the step.
+func (s *DeserializeStep) List() []string {
+ return s.ids.List()
+}
+
+// Clear removes all middleware in the step.
+func (s *DeserializeStep) Clear() {
+ s.ids.Clear()
+}
+
+type deserializeWrapHandler struct {
+ Next Handler
+}
+
+var _ DeserializeHandler = (*deserializeWrapHandler)(nil)
+
+// HandleDeserialize implements DeserializeHandler, converts types and delegates to underlying
+// generic handler.
+func (w deserializeWrapHandler) HandleDeserialize(ctx context.Context, in DeserializeInput) (
+ out DeserializeOutput, metadata Metadata, err error,
+) {
+ resp, metadata, err := w.Next.Handle(ctx, in.Request)
+ return DeserializeOutput{
+ RawResponse: resp,
+ }, metadata, err
+}
+
+type decoratedDeserializeHandler struct {
+ Next DeserializeHandler
+ With DeserializeMiddleware
+}
+
+var _ DeserializeHandler = (*decoratedDeserializeHandler)(nil)
+
+func (h decoratedDeserializeHandler) HandleDeserialize(ctx context.Context, in DeserializeInput) (
+ out DeserializeOutput, metadata Metadata, err error,
+) {
+ return h.With.HandleDeserialize(ctx, in, h.Next)
+}
+
+// DeserializeHandlerFunc provides a wrapper around a function to be used as a deserialize middleware handler.
+type DeserializeHandlerFunc func(context.Context, DeserializeInput) (DeserializeOutput, Metadata, error)
+
+// HandleDeserialize invokes the wrapped function with the given arguments.
+func (d DeserializeHandlerFunc) HandleDeserialize(ctx context.Context, in DeserializeInput) (DeserializeOutput, Metadata, error) {
+ return d(ctx, in)
+}
+
+var _ DeserializeHandler = DeserializeHandlerFunc(nil)
diff --git a/vendor/github.com/aws/smithy-go/middleware/step_finalize.go b/vendor/github.com/aws/smithy-go/middleware/step_finalize.go
new file mode 100644
index 000000000..065e3885d
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/middleware/step_finalize.go
@@ -0,0 +1,211 @@
+package middleware
+
+import "context"
+
+// FinalizeInput provides the input parameters for the FinalizeMiddleware to
+// consume. FinalizeMiddleware may modify the Request value before forwarding
+// the FinalizeInput along to the next next FinalizeHandler.
+type FinalizeInput struct {
+ Request interface{}
+}
+
+// FinalizeOutput provides the result returned by the next FinalizeHandler.
+type FinalizeOutput struct {
+ Result interface{}
+}
+
+// FinalizeHandler provides the interface for the next handler the
+// FinalizeMiddleware will call in the middleware chain.
+type FinalizeHandler interface {
+ HandleFinalize(ctx context.Context, in FinalizeInput) (
+ out FinalizeOutput, metadata Metadata, err error,
+ )
+}
+
+// FinalizeMiddleware provides the interface for middleware specific to the
+// serialize step. Delegates to the next FinalizeHandler for further
+// processing.
+type FinalizeMiddleware interface {
+ // ID returns a unique ID for the middleware in the FinalizeStep. The step does not
+ // allow duplicate IDs.
+ ID() string
+
+ // HandleFinalize invokes the middleware behavior which must delegate to the next handler
+ // for the middleware chain to continue. The method must return a result or
+ // error to its caller.
+ HandleFinalize(ctx context.Context, in FinalizeInput, next FinalizeHandler) (
+ out FinalizeOutput, metadata Metadata, err error,
+ )
+}
+
+// FinalizeMiddlewareFunc returns a FinalizeMiddleware with the unique ID
+// provided, and the func to be invoked.
+func FinalizeMiddlewareFunc(id string, fn func(context.Context, FinalizeInput, FinalizeHandler) (FinalizeOutput, Metadata, error)) FinalizeMiddleware {
+ return finalizeMiddlewareFunc{
+ id: id,
+ fn: fn,
+ }
+}
+
+type finalizeMiddlewareFunc struct {
+ // Unique ID for the middleware.
+ id string
+
+ // Middleware function to be called.
+ fn func(context.Context, FinalizeInput, FinalizeHandler) (
+ FinalizeOutput, Metadata, error,
+ )
+}
+
+// ID returns the unique ID for the middleware.
+func (s finalizeMiddlewareFunc) ID() string { return s.id }
+
+// HandleFinalize invokes the middleware Fn.
+func (s finalizeMiddlewareFunc) HandleFinalize(ctx context.Context, in FinalizeInput, next FinalizeHandler) (
+ out FinalizeOutput, metadata Metadata, err error,
+) {
+ return s.fn(ctx, in, next)
+}
+
+var _ FinalizeMiddleware = (finalizeMiddlewareFunc{})
+
+// FinalizeStep provides the ordered grouping of FinalizeMiddleware to be
+// invoked on a handler.
+type FinalizeStep struct {
+ ids *orderedIDs
+}
+
+// NewFinalizeStep returns a FinalizeStep ready to have middleware for
+// initialization added to it.
+func NewFinalizeStep() *FinalizeStep {
+ return &FinalizeStep{
+ ids: newOrderedIDs(),
+ }
+}
+
+var _ Middleware = (*FinalizeStep)(nil)
+
+// ID returns the unique id of the step as a middleware.
+func (s *FinalizeStep) ID() string {
+ return "Finalize stack step"
+}
+
+// HandleMiddleware invokes the middleware by decorating the next handler
+// provided. Returns the result of the middleware and handler being invoked.
+//
+// Implements Middleware interface.
+func (s *FinalizeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) (
+ out interface{}, metadata Metadata, err error,
+) {
+ order := s.ids.GetOrder()
+
+ var h FinalizeHandler = finalizeWrapHandler{Next: next}
+ for i := len(order) - 1; i >= 0; i-- {
+ h = decoratedFinalizeHandler{
+ Next: h,
+ With: order[i].(FinalizeMiddleware),
+ }
+ }
+
+ sIn := FinalizeInput{
+ Request: in,
+ }
+
+ res, metadata, err := h.HandleFinalize(ctx, sIn)
+ return res.Result, metadata, err
+}
+
+// Get retrieves the middleware identified by id. If the middleware is not present, returns false.
+func (s *FinalizeStep) Get(id string) (FinalizeMiddleware, bool) {
+ get, ok := s.ids.Get(id)
+ if !ok {
+ return nil, false
+ }
+ return get.(FinalizeMiddleware), ok
+}
+
+// Add injects the middleware to the relative position of the middleware group.
+// Returns an error if the middleware already exists.
+func (s *FinalizeStep) Add(m FinalizeMiddleware, pos RelativePosition) error {
+ return s.ids.Add(m, pos)
+}
+
+// Insert injects the middleware relative to an existing middleware ID.
+// Returns error if the original middleware does not exist, or the middleware
+// being added already exists.
+func (s *FinalizeStep) Insert(m FinalizeMiddleware, relativeTo string, pos RelativePosition) error {
+ return s.ids.Insert(m, relativeTo, pos)
+}
+
+// Swap removes the middleware by id, replacing it with the new middleware.
+// Returns the middleware removed, or error if the middleware to be removed
+// doesn't exist.
+func (s *FinalizeStep) Swap(id string, m FinalizeMiddleware) (FinalizeMiddleware, error) {
+ removed, err := s.ids.Swap(id, m)
+ if err != nil {
+ return nil, err
+ }
+
+ return removed.(FinalizeMiddleware), nil
+}
+
+// Remove removes the middleware by id. Returns error if the middleware
+// doesn't exist.
+func (s *FinalizeStep) Remove(id string) (FinalizeMiddleware, error) {
+ removed, err := s.ids.Remove(id)
+ if err != nil {
+ return nil, err
+ }
+
+ return removed.(FinalizeMiddleware), nil
+}
+
+// List returns a list of the middleware in the step.
+func (s *FinalizeStep) List() []string {
+ return s.ids.List()
+}
+
+// Clear removes all middleware in the step.
+func (s *FinalizeStep) Clear() {
+ s.ids.Clear()
+}
+
+type finalizeWrapHandler struct {
+ Next Handler
+}
+
+var _ FinalizeHandler = (*finalizeWrapHandler)(nil)
+
+// HandleFinalize implements FinalizeHandler, converts types and delegates to underlying
+// generic handler.
+func (w finalizeWrapHandler) HandleFinalize(ctx context.Context, in FinalizeInput) (
+ out FinalizeOutput, metadata Metadata, err error,
+) {
+ res, metadata, err := w.Next.Handle(ctx, in.Request)
+ return FinalizeOutput{
+ Result: res,
+ }, metadata, err
+}
+
+type decoratedFinalizeHandler struct {
+ Next FinalizeHandler
+ With FinalizeMiddleware
+}
+
+var _ FinalizeHandler = (*decoratedFinalizeHandler)(nil)
+
+func (h decoratedFinalizeHandler) HandleFinalize(ctx context.Context, in FinalizeInput) (
+ out FinalizeOutput, metadata Metadata, err error,
+) {
+ return h.With.HandleFinalize(ctx, in, h.Next)
+}
+
+// FinalizeHandlerFunc provides a wrapper around a function to be used as a finalize middleware handler.
+type FinalizeHandlerFunc func(context.Context, FinalizeInput) (FinalizeOutput, Metadata, error)
+
+// HandleFinalize invokes the wrapped function with the given arguments.
+func (f FinalizeHandlerFunc) HandleFinalize(ctx context.Context, in FinalizeInput) (FinalizeOutput, Metadata, error) {
+ return f(ctx, in)
+}
+
+var _ FinalizeHandler = FinalizeHandlerFunc(nil)
diff --git a/vendor/github.com/aws/smithy-go/middleware/step_initialize.go b/vendor/github.com/aws/smithy-go/middleware/step_initialize.go
new file mode 100644
index 000000000..fe359144d
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/middleware/step_initialize.go
@@ -0,0 +1,211 @@
+package middleware
+
+import "context"
+
+// InitializeInput wraps the input parameters for the InitializeMiddlewares to
+// consume. InitializeMiddleware may modify the parameter value before
+// forwarding it along to the next InitializeHandler.
+type InitializeInput struct {
+ Parameters interface{}
+}
+
+// InitializeOutput provides the result returned by the next InitializeHandler.
+type InitializeOutput struct {
+ Result interface{}
+}
+
+// InitializeHandler provides the interface for the next handler the
+// InitializeMiddleware will call in the middleware chain.
+type InitializeHandler interface {
+ HandleInitialize(ctx context.Context, in InitializeInput) (
+ out InitializeOutput, metadata Metadata, err error,
+ )
+}
+
+// InitializeMiddleware provides the interface for middleware specific to the
+// initialize step. Delegates to the next InitializeHandler for further
+// processing.
+type InitializeMiddleware interface {
+ // ID returns a unique ID for the middleware in the InitializeStep. The step does not
+ // allow duplicate IDs.
+ ID() string
+
+ // HandleInitialize invokes the middleware behavior which must delegate to the next handler
+ // for the middleware chain to continue. The method must return a result or
+ // error to its caller.
+ HandleInitialize(ctx context.Context, in InitializeInput, next InitializeHandler) (
+ out InitializeOutput, metadata Metadata, err error,
+ )
+}
+
+// InitializeMiddlewareFunc returns a InitializeMiddleware with the unique ID provided,
+// and the func to be invoked.
+func InitializeMiddlewareFunc(id string, fn func(context.Context, InitializeInput, InitializeHandler) (InitializeOutput, Metadata, error)) InitializeMiddleware {
+ return initializeMiddlewareFunc{
+ id: id,
+ fn: fn,
+ }
+}
+
+type initializeMiddlewareFunc struct {
+ // Unique ID for the middleware.
+ id string
+
+ // Middleware function to be called.
+ fn func(context.Context, InitializeInput, InitializeHandler) (
+ InitializeOutput, Metadata, error,
+ )
+}
+
+// ID returns the unique ID for the middleware.
+func (s initializeMiddlewareFunc) ID() string { return s.id }
+
+// HandleInitialize invokes the middleware Fn.
+func (s initializeMiddlewareFunc) HandleInitialize(ctx context.Context, in InitializeInput, next InitializeHandler) (
+ out InitializeOutput, metadata Metadata, err error,
+) {
+ return s.fn(ctx, in, next)
+}
+
+var _ InitializeMiddleware = (initializeMiddlewareFunc{})
+
+// InitializeStep provides the ordered grouping of InitializeMiddleware to be
+// invoked on a handler.
+type InitializeStep struct {
+ ids *orderedIDs
+}
+
+// NewInitializeStep returns an InitializeStep ready to have middleware for
+// initialization added to it.
+func NewInitializeStep() *InitializeStep {
+ return &InitializeStep{
+ ids: newOrderedIDs(),
+ }
+}
+
+var _ Middleware = (*InitializeStep)(nil)
+
+// ID returns the unique ID of the step as a middleware.
+func (s *InitializeStep) ID() string {
+ return "Initialize stack step"
+}
+
+// HandleMiddleware invokes the middleware by decorating the next handler
+// provided. Returns the result of the middleware and handler being invoked.
+//
+// Implements Middleware interface.
+func (s *InitializeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) (
+ out interface{}, metadata Metadata, err error,
+) {
+ order := s.ids.GetOrder()
+
+ var h InitializeHandler = initializeWrapHandler{Next: next}
+ for i := len(order) - 1; i >= 0; i-- {
+ h = decoratedInitializeHandler{
+ Next: h,
+ With: order[i].(InitializeMiddleware),
+ }
+ }
+
+ sIn := InitializeInput{
+ Parameters: in,
+ }
+
+ res, metadata, err := h.HandleInitialize(ctx, sIn)
+ return res.Result, metadata, err
+}
+
+// Get retrieves the middleware identified by id. If the middleware is not present, returns false.
+func (s *InitializeStep) Get(id string) (InitializeMiddleware, bool) {
+ get, ok := s.ids.Get(id)
+ if !ok {
+ return nil, false
+ }
+ return get.(InitializeMiddleware), ok
+}
+
+// Add injects the middleware to the relative position of the middleware group.
+// Returns an error if the middleware already exists.
+func (s *InitializeStep) Add(m InitializeMiddleware, pos RelativePosition) error {
+ return s.ids.Add(m, pos)
+}
+
+// Insert injects the middleware relative to an existing middleware ID.
+// Returns error if the original middleware does not exist, or the middleware
+// being added already exists.
+func (s *InitializeStep) Insert(m InitializeMiddleware, relativeTo string, pos RelativePosition) error {
+ return s.ids.Insert(m, relativeTo, pos)
+}
+
+// Swap removes the middleware by id, replacing it with the new middleware.
+// Returns the middleware removed, or error if the middleware to be removed
+// doesn't exist.
+func (s *InitializeStep) Swap(id string, m InitializeMiddleware) (InitializeMiddleware, error) {
+ removed, err := s.ids.Swap(id, m)
+ if err != nil {
+ return nil, err
+ }
+
+ return removed.(InitializeMiddleware), nil
+}
+
+// Remove removes the middleware by id. Returns error if the middleware
+// doesn't exist.
+func (s *InitializeStep) Remove(id string) (InitializeMiddleware, error) {
+ removed, err := s.ids.Remove(id)
+ if err != nil {
+ return nil, err
+ }
+
+ return removed.(InitializeMiddleware), nil
+}
+
+// List returns a list of the middleware in the step.
+func (s *InitializeStep) List() []string {
+ return s.ids.List()
+}
+
+// Clear removes all middleware in the step.
+func (s *InitializeStep) Clear() {
+ s.ids.Clear()
+}
+
+type initializeWrapHandler struct {
+ Next Handler
+}
+
+var _ InitializeHandler = (*initializeWrapHandler)(nil)
+
+// HandleInitialize implements InitializeHandler, converts types and delegates to underlying
+// generic handler.
+func (w initializeWrapHandler) HandleInitialize(ctx context.Context, in InitializeInput) (
+ out InitializeOutput, metadata Metadata, err error,
+) {
+ res, metadata, err := w.Next.Handle(ctx, in.Parameters)
+ return InitializeOutput{
+ Result: res,
+ }, metadata, err
+}
+
+type decoratedInitializeHandler struct {
+ Next InitializeHandler
+ With InitializeMiddleware
+}
+
+var _ InitializeHandler = (*decoratedInitializeHandler)(nil)
+
+func (h decoratedInitializeHandler) HandleInitialize(ctx context.Context, in InitializeInput) (
+ out InitializeOutput, metadata Metadata, err error,
+) {
+ return h.With.HandleInitialize(ctx, in, h.Next)
+}
+
+// InitializeHandlerFunc provides a wrapper around a function to be used as an initialize middleware handler.
+type InitializeHandlerFunc func(context.Context, InitializeInput) (InitializeOutput, Metadata, error)
+
+// HandleInitialize calls the wrapped function with the provided arguments.
+func (i InitializeHandlerFunc) HandleInitialize(ctx context.Context, in InitializeInput) (InitializeOutput, Metadata, error) {
+ return i(ctx, in)
+}
+
+var _ InitializeHandler = InitializeHandlerFunc(nil)
diff --git a/vendor/github.com/aws/smithy-go/middleware/step_serialize.go b/vendor/github.com/aws/smithy-go/middleware/step_serialize.go
new file mode 100644
index 000000000..114bafced
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/middleware/step_serialize.go
@@ -0,0 +1,219 @@
+package middleware
+
+import "context"
+
+// SerializeInput provides the input parameters for the SerializeMiddleware to
+// consume. SerializeMiddleware may modify the Request value before forwarding
+// SerializeInput along to the next SerializeHandler. The Parameters member
+// should not be modified by SerializeMiddleware, InitializeMiddleware should
+// be responsible for modifying the provided Parameter value.
+type SerializeInput struct {
+ Parameters interface{}
+ Request interface{}
+}
+
+// SerializeOutput provides the result returned by the next SerializeHandler.
+type SerializeOutput struct {
+ Result interface{}
+}
+
+// SerializeHandler provides the interface for the next handler the
+// SerializeMiddleware will call in the middleware chain.
+type SerializeHandler interface {
+ HandleSerialize(ctx context.Context, in SerializeInput) (
+ out SerializeOutput, metadata Metadata, err error,
+ )
+}
+
+// SerializeMiddleware provides the interface for middleware specific to the
+// serialize step. Delegates to the next SerializeHandler for further
+// processing.
+type SerializeMiddleware interface {
+ // ID returns a unique ID for the middleware in the SerializeStep. The step does not
+ // allow duplicate IDs.
+ ID() string
+
+ // HandleSerialize invokes the middleware behavior which must delegate to the next handler
+ // for the middleware chain to continue. The method must return a result or
+ // error to its caller.
+ HandleSerialize(ctx context.Context, in SerializeInput, next SerializeHandler) (
+ out SerializeOutput, metadata Metadata, err error,
+ )
+}
+
+// SerializeMiddlewareFunc returns a SerializeMiddleware with the unique ID
+// provided, and the func to be invoked.
+func SerializeMiddlewareFunc(id string, fn func(context.Context, SerializeInput, SerializeHandler) (SerializeOutput, Metadata, error)) SerializeMiddleware {
+ return serializeMiddlewareFunc{
+ id: id,
+ fn: fn,
+ }
+}
+
+type serializeMiddlewareFunc struct {
+ // Unique ID for the middleware.
+ id string
+
+ // Middleware function to be called.
+ fn func(context.Context, SerializeInput, SerializeHandler) (
+ SerializeOutput, Metadata, error,
+ )
+}
+
+// ID returns the unique ID for the middleware.
+func (s serializeMiddlewareFunc) ID() string { return s.id }
+
+// HandleSerialize invokes the middleware Fn.
+func (s serializeMiddlewareFunc) HandleSerialize(ctx context.Context, in SerializeInput, next SerializeHandler) (
+ out SerializeOutput, metadata Metadata, err error,
+) {
+ return s.fn(ctx, in, next)
+}
+
+var _ SerializeMiddleware = (serializeMiddlewareFunc{})
+
+// SerializeStep provides the ordered grouping of SerializeMiddleware to be
+// invoked on a handler.
+type SerializeStep struct {
+ newRequest func() interface{}
+ ids *orderedIDs
+}
+
+// NewSerializeStep returns a SerializeStep ready to have middleware for
+// initialization added to it. The newRequest func parameter is used to
+// initialize the transport specific request for the stack SerializeStep to
+// serialize the input parameters into.
+func NewSerializeStep(newRequest func() interface{}) *SerializeStep {
+ return &SerializeStep{
+ ids: newOrderedIDs(),
+ newRequest: newRequest,
+ }
+}
+
+var _ Middleware = (*SerializeStep)(nil)
+
+// ID returns the unique ID of the step as a middleware.
+func (s *SerializeStep) ID() string {
+ return "Serialize stack step"
+}
+
+// HandleMiddleware invokes the middleware by decorating the next handler
+// provided. Returns the result of the middleware and handler being invoked.
+//
+// Implements Middleware interface.
+func (s *SerializeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) (
+ out interface{}, metadata Metadata, err error,
+) {
+ order := s.ids.GetOrder()
+
+ var h SerializeHandler = serializeWrapHandler{Next: next}
+ for i := len(order) - 1; i >= 0; i-- {
+ h = decoratedSerializeHandler{
+ Next: h,
+ With: order[i].(SerializeMiddleware),
+ }
+ }
+
+ sIn := SerializeInput{
+ Parameters: in,
+ Request: s.newRequest(),
+ }
+
+ res, metadata, err := h.HandleSerialize(ctx, sIn)
+ return res.Result, metadata, err
+}
+
+// Get retrieves the middleware identified by id. If the middleware is not present, returns false.
+func (s *SerializeStep) Get(id string) (SerializeMiddleware, bool) {
+ get, ok := s.ids.Get(id)
+ if !ok {
+ return nil, false
+ }
+ return get.(SerializeMiddleware), ok
+}
+
+// Add injects the middleware to the relative position of the middleware group.
+// Returns an error if the middleware already exists.
+func (s *SerializeStep) Add(m SerializeMiddleware, pos RelativePosition) error {
+ return s.ids.Add(m, pos)
+}
+
+// Insert injects the middleware relative to an existing middleware ID.
+// Returns error if the original middleware does not exist, or the middleware
+// being added already exists.
+func (s *SerializeStep) Insert(m SerializeMiddleware, relativeTo string, pos RelativePosition) error {
+ return s.ids.Insert(m, relativeTo, pos)
+}
+
+// Swap removes the middleware by id, replacing it with the new middleware.
+// Returns the middleware removed, or error if the middleware to be removed
+// doesn't exist.
+func (s *SerializeStep) Swap(id string, m SerializeMiddleware) (SerializeMiddleware, error) {
+ removed, err := s.ids.Swap(id, m)
+ if err != nil {
+ return nil, err
+ }
+
+ return removed.(SerializeMiddleware), nil
+}
+
+// Remove removes the middleware by id. Returns error if the middleware
+// doesn't exist.
+func (s *SerializeStep) Remove(id string) (SerializeMiddleware, error) {
+ removed, err := s.ids.Remove(id)
+ if err != nil {
+ return nil, err
+ }
+
+ return removed.(SerializeMiddleware), nil
+}
+
+// List returns a list of the middleware in the step.
+func (s *SerializeStep) List() []string {
+ return s.ids.List()
+}
+
+// Clear removes all middleware in the step.
+func (s *SerializeStep) Clear() {
+ s.ids.Clear()
+}
+
+type serializeWrapHandler struct {
+ Next Handler
+}
+
+var _ SerializeHandler = (*serializeWrapHandler)(nil)
+
+// Implements SerializeHandler, converts types and delegates to underlying
+// generic handler.
+func (w serializeWrapHandler) HandleSerialize(ctx context.Context, in SerializeInput) (
+ out SerializeOutput, metadata Metadata, err error,
+) {
+ res, metadata, err := w.Next.Handle(ctx, in.Request)
+ return SerializeOutput{
+ Result: res,
+ }, metadata, err
+}
+
+type decoratedSerializeHandler struct {
+ Next SerializeHandler
+ With SerializeMiddleware
+}
+
+var _ SerializeHandler = (*decoratedSerializeHandler)(nil)
+
+func (h decoratedSerializeHandler) HandleSerialize(ctx context.Context, in SerializeInput) (
+ out SerializeOutput, metadata Metadata, err error,
+) {
+ return h.With.HandleSerialize(ctx, in, h.Next)
+}
+
+// SerializeHandlerFunc provides a wrapper around a function to be used as a serialize middleware handler.
+type SerializeHandlerFunc func(context.Context, SerializeInput) (SerializeOutput, Metadata, error)
+
+// HandleSerialize calls the wrapped function with the provided arguments.
+func (s SerializeHandlerFunc) HandleSerialize(ctx context.Context, in SerializeInput) (SerializeOutput, Metadata, error) {
+ return s(ctx, in)
+}
+
+var _ SerializeHandler = SerializeHandlerFunc(nil)
diff --git a/vendor/github.com/aws/smithy-go/modman.toml b/vendor/github.com/aws/smithy-go/modman.toml
new file mode 100644
index 000000000..20295cdd2
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/modman.toml
@@ -0,0 +1,11 @@
+[dependencies]
+ "github.com/google/go-cmp" = "v0.5.8"
+ "github.com/jmespath/go-jmespath" = "v0.4.0"
+
+[modules]
+
+ [modules.codegen]
+ no_tag = true
+
+ [modules."codegen/smithy-go-codegen/build/test-generated/go/internal/testmodule"]
+ no_tag = true
diff --git a/vendor/github.com/aws/smithy-go/ptr/doc.go b/vendor/github.com/aws/smithy-go/ptr/doc.go
new file mode 100644
index 000000000..bc1f69961
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/ptr/doc.go
@@ -0,0 +1,5 @@
+// Package ptr provides utilities for converting scalar literal type values to and from pointers inline.
+package ptr
+
+//go:generate go run -tags codegen generate.go
+//go:generate gofmt -w -s .
diff --git a/vendor/github.com/aws/smithy-go/ptr/from_ptr.go b/vendor/github.com/aws/smithy-go/ptr/from_ptr.go
new file mode 100644
index 000000000..a2845bb2c
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/ptr/from_ptr.go
@@ -0,0 +1,601 @@
+// Code generated by smithy-go/ptr/generate.go DO NOT EDIT.
+package ptr
+
+import (
+ "time"
+)
+
+// ToBool returns bool value dereferenced if the passed
+// in pointer was not nil. Returns a bool zero value if the
+// pointer was nil.
+func ToBool(p *bool) (v bool) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToBoolSlice returns a slice of bool values, that are
+// dereferenced if the passed in pointer was not nil. Returns a bool
+// zero value if the pointer was nil.
+func ToBoolSlice(vs []*bool) []bool {
+ ps := make([]bool, len(vs))
+ for i, v := range vs {
+ ps[i] = ToBool(v)
+ }
+
+ return ps
+}
+
+// ToBoolMap returns a map of bool values, that are
+// dereferenced if the passed in pointer was not nil. The bool
+// zero value is used if the pointer was nil.
+func ToBoolMap(vs map[string]*bool) map[string]bool {
+ ps := make(map[string]bool, len(vs))
+ for k, v := range vs {
+ ps[k] = ToBool(v)
+ }
+
+ return ps
+}
+
+// ToByte returns byte value dereferenced if the passed
+// in pointer was not nil. Returns a byte zero value if the
+// pointer was nil.
+func ToByte(p *byte) (v byte) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToByteSlice returns a slice of byte values, that are
+// dereferenced if the passed in pointer was not nil. Returns a byte
+// zero value if the pointer was nil.
+func ToByteSlice(vs []*byte) []byte {
+ ps := make([]byte, len(vs))
+ for i, v := range vs {
+ ps[i] = ToByte(v)
+ }
+
+ return ps
+}
+
+// ToByteMap returns a map of byte values, that are
+// dereferenced if the passed in pointer was not nil. The byte
+// zero value is used if the pointer was nil.
+func ToByteMap(vs map[string]*byte) map[string]byte {
+ ps := make(map[string]byte, len(vs))
+ for k, v := range vs {
+ ps[k] = ToByte(v)
+ }
+
+ return ps
+}
+
+// ToString returns string value dereferenced if the passed
+// in pointer was not nil. Returns a string zero value if the
+// pointer was nil.
+func ToString(p *string) (v string) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToStringSlice returns a slice of string values, that are
+// dereferenced if the passed in pointer was not nil. Returns a string
+// zero value if the pointer was nil.
+func ToStringSlice(vs []*string) []string {
+ ps := make([]string, len(vs))
+ for i, v := range vs {
+ ps[i] = ToString(v)
+ }
+
+ return ps
+}
+
+// ToStringMap returns a map of string values, that are
+// dereferenced if the passed in pointer was not nil. The string
+// zero value is used if the pointer was nil.
+func ToStringMap(vs map[string]*string) map[string]string {
+ ps := make(map[string]string, len(vs))
+ for k, v := range vs {
+ ps[k] = ToString(v)
+ }
+
+ return ps
+}
+
+// ToInt returns int value dereferenced if the passed
+// in pointer was not nil. Returns a int zero value if the
+// pointer was nil.
+func ToInt(p *int) (v int) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToIntSlice returns a slice of int values, that are
+// dereferenced if the passed in pointer was not nil. Returns a int
+// zero value if the pointer was nil.
+func ToIntSlice(vs []*int) []int {
+ ps := make([]int, len(vs))
+ for i, v := range vs {
+ ps[i] = ToInt(v)
+ }
+
+ return ps
+}
+
+// ToIntMap returns a map of int values, that are
+// dereferenced if the passed in pointer was not nil. The int
+// zero value is used if the pointer was nil.
+func ToIntMap(vs map[string]*int) map[string]int {
+ ps := make(map[string]int, len(vs))
+ for k, v := range vs {
+ ps[k] = ToInt(v)
+ }
+
+ return ps
+}
+
+// ToInt8 returns int8 value dereferenced if the passed
+// in pointer was not nil. Returns a int8 zero value if the
+// pointer was nil.
+func ToInt8(p *int8) (v int8) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToInt8Slice returns a slice of int8 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a int8
+// zero value if the pointer was nil.
+func ToInt8Slice(vs []*int8) []int8 {
+ ps := make([]int8, len(vs))
+ for i, v := range vs {
+ ps[i] = ToInt8(v)
+ }
+
+ return ps
+}
+
+// ToInt8Map returns a map of int8 values, that are
+// dereferenced if the passed in pointer was not nil. The int8
+// zero value is used if the pointer was nil.
+func ToInt8Map(vs map[string]*int8) map[string]int8 {
+ ps := make(map[string]int8, len(vs))
+ for k, v := range vs {
+ ps[k] = ToInt8(v)
+ }
+
+ return ps
+}
+
+// ToInt16 returns int16 value dereferenced if the passed
+// in pointer was not nil. Returns a int16 zero value if the
+// pointer was nil.
+func ToInt16(p *int16) (v int16) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToInt16Slice returns a slice of int16 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a int16
+// zero value if the pointer was nil.
+func ToInt16Slice(vs []*int16) []int16 {
+ ps := make([]int16, len(vs))
+ for i, v := range vs {
+ ps[i] = ToInt16(v)
+ }
+
+ return ps
+}
+
+// ToInt16Map returns a map of int16 values, that are
+// dereferenced if the passed in pointer was not nil. The int16
+// zero value is used if the pointer was nil.
+func ToInt16Map(vs map[string]*int16) map[string]int16 {
+ ps := make(map[string]int16, len(vs))
+ for k, v := range vs {
+ ps[k] = ToInt16(v)
+ }
+
+ return ps
+}
+
+// ToInt32 returns int32 value dereferenced if the passed
+// in pointer was not nil. Returns a int32 zero value if the
+// pointer was nil.
+func ToInt32(p *int32) (v int32) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToInt32Slice returns a slice of int32 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a int32
+// zero value if the pointer was nil.
+func ToInt32Slice(vs []*int32) []int32 {
+ ps := make([]int32, len(vs))
+ for i, v := range vs {
+ ps[i] = ToInt32(v)
+ }
+
+ return ps
+}
+
+// ToInt32Map returns a map of int32 values, that are
+// dereferenced if the passed in pointer was not nil. The int32
+// zero value is used if the pointer was nil.
+func ToInt32Map(vs map[string]*int32) map[string]int32 {
+ ps := make(map[string]int32, len(vs))
+ for k, v := range vs {
+ ps[k] = ToInt32(v)
+ }
+
+ return ps
+}
+
+// ToInt64 returns int64 value dereferenced if the passed
+// in pointer was not nil. Returns a int64 zero value if the
+// pointer was nil.
+func ToInt64(p *int64) (v int64) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToInt64Slice returns a slice of int64 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a int64
+// zero value if the pointer was nil.
+func ToInt64Slice(vs []*int64) []int64 {
+ ps := make([]int64, len(vs))
+ for i, v := range vs {
+ ps[i] = ToInt64(v)
+ }
+
+ return ps
+}
+
+// ToInt64Map returns a map of int64 values, that are
+// dereferenced if the passed in pointer was not nil. The int64
+// zero value is used if the pointer was nil.
+func ToInt64Map(vs map[string]*int64) map[string]int64 {
+ ps := make(map[string]int64, len(vs))
+ for k, v := range vs {
+ ps[k] = ToInt64(v)
+ }
+
+ return ps
+}
+
+// ToUint returns uint value dereferenced if the passed
+// in pointer was not nil. Returns a uint zero value if the
+// pointer was nil.
+func ToUint(p *uint) (v uint) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToUintSlice returns a slice of uint values, that are
+// dereferenced if the passed in pointer was not nil. Returns a uint
+// zero value if the pointer was nil.
+func ToUintSlice(vs []*uint) []uint {
+ ps := make([]uint, len(vs))
+ for i, v := range vs {
+ ps[i] = ToUint(v)
+ }
+
+ return ps
+}
+
+// ToUintMap returns a map of uint values, that are
+// dereferenced if the passed in pointer was not nil. The uint
+// zero value is used if the pointer was nil.
+func ToUintMap(vs map[string]*uint) map[string]uint {
+ ps := make(map[string]uint, len(vs))
+ for k, v := range vs {
+ ps[k] = ToUint(v)
+ }
+
+ return ps
+}
+
+// ToUint8 returns uint8 value dereferenced if the passed
+// in pointer was not nil. Returns a uint8 zero value if the
+// pointer was nil.
+func ToUint8(p *uint8) (v uint8) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToUint8Slice returns a slice of uint8 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a uint8
+// zero value if the pointer was nil.
+func ToUint8Slice(vs []*uint8) []uint8 {
+ ps := make([]uint8, len(vs))
+ for i, v := range vs {
+ ps[i] = ToUint8(v)
+ }
+
+ return ps
+}
+
+// ToUint8Map returns a map of uint8 values, that are
+// dereferenced if the passed in pointer was not nil. The uint8
+// zero value is used if the pointer was nil.
+func ToUint8Map(vs map[string]*uint8) map[string]uint8 {
+ ps := make(map[string]uint8, len(vs))
+ for k, v := range vs {
+ ps[k] = ToUint8(v)
+ }
+
+ return ps
+}
+
+// ToUint16 returns uint16 value dereferenced if the passed
+// in pointer was not nil. Returns a uint16 zero value if the
+// pointer was nil.
+func ToUint16(p *uint16) (v uint16) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToUint16Slice returns a slice of uint16 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a uint16
+// zero value if the pointer was nil.
+func ToUint16Slice(vs []*uint16) []uint16 {
+ ps := make([]uint16, len(vs))
+ for i, v := range vs {
+ ps[i] = ToUint16(v)
+ }
+
+ return ps
+}
+
+// ToUint16Map returns a map of uint16 values, that are
+// dereferenced if the passed in pointer was not nil. The uint16
+// zero value is used if the pointer was nil.
+func ToUint16Map(vs map[string]*uint16) map[string]uint16 {
+ ps := make(map[string]uint16, len(vs))
+ for k, v := range vs {
+ ps[k] = ToUint16(v)
+ }
+
+ return ps
+}
+
+// ToUint32 returns uint32 value dereferenced if the passed
+// in pointer was not nil. Returns a uint32 zero value if the
+// pointer was nil.
+func ToUint32(p *uint32) (v uint32) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToUint32Slice returns a slice of uint32 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a uint32
+// zero value if the pointer was nil.
+func ToUint32Slice(vs []*uint32) []uint32 {
+ ps := make([]uint32, len(vs))
+ for i, v := range vs {
+ ps[i] = ToUint32(v)
+ }
+
+ return ps
+}
+
+// ToUint32Map returns a map of uint32 values, that are
+// dereferenced if the passed in pointer was not nil. The uint32
+// zero value is used if the pointer was nil.
+func ToUint32Map(vs map[string]*uint32) map[string]uint32 {
+ ps := make(map[string]uint32, len(vs))
+ for k, v := range vs {
+ ps[k] = ToUint32(v)
+ }
+
+ return ps
+}
+
+// ToUint64 returns uint64 value dereferenced if the passed
+// in pointer was not nil. Returns a uint64 zero value if the
+// pointer was nil.
+func ToUint64(p *uint64) (v uint64) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToUint64Slice returns a slice of uint64 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a uint64
+// zero value if the pointer was nil.
+func ToUint64Slice(vs []*uint64) []uint64 {
+ ps := make([]uint64, len(vs))
+ for i, v := range vs {
+ ps[i] = ToUint64(v)
+ }
+
+ return ps
+}
+
+// ToUint64Map returns a map of uint64 values, that are
+// dereferenced if the passed in pointer was not nil. The uint64
+// zero value is used if the pointer was nil.
+func ToUint64Map(vs map[string]*uint64) map[string]uint64 {
+ ps := make(map[string]uint64, len(vs))
+ for k, v := range vs {
+ ps[k] = ToUint64(v)
+ }
+
+ return ps
+}
+
+// ToFloat32 returns float32 value dereferenced if the passed
+// in pointer was not nil. Returns a float32 zero value if the
+// pointer was nil.
+func ToFloat32(p *float32) (v float32) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToFloat32Slice returns a slice of float32 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a float32
+// zero value if the pointer was nil.
+func ToFloat32Slice(vs []*float32) []float32 {
+ ps := make([]float32, len(vs))
+ for i, v := range vs {
+ ps[i] = ToFloat32(v)
+ }
+
+ return ps
+}
+
+// ToFloat32Map returns a map of float32 values, that are
+// dereferenced if the passed in pointer was not nil. The float32
+// zero value is used if the pointer was nil.
+func ToFloat32Map(vs map[string]*float32) map[string]float32 {
+ ps := make(map[string]float32, len(vs))
+ for k, v := range vs {
+ ps[k] = ToFloat32(v)
+ }
+
+ return ps
+}
+
+// ToFloat64 returns float64 value dereferenced if the passed
+// in pointer was not nil. Returns a float64 zero value if the
+// pointer was nil.
+func ToFloat64(p *float64) (v float64) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToFloat64Slice returns a slice of float64 values, that are
+// dereferenced if the passed in pointer was not nil. Returns a float64
+// zero value if the pointer was nil.
+func ToFloat64Slice(vs []*float64) []float64 {
+ ps := make([]float64, len(vs))
+ for i, v := range vs {
+ ps[i] = ToFloat64(v)
+ }
+
+ return ps
+}
+
+// ToFloat64Map returns a map of float64 values, that are
+// dereferenced if the passed in pointer was not nil. The float64
+// zero value is used if the pointer was nil.
+func ToFloat64Map(vs map[string]*float64) map[string]float64 {
+ ps := make(map[string]float64, len(vs))
+ for k, v := range vs {
+ ps[k] = ToFloat64(v)
+ }
+
+ return ps
+}
+
+// ToTime returns time.Time value dereferenced if the passed
+// in pointer was not nil. Returns a time.Time zero value if the
+// pointer was nil.
+func ToTime(p *time.Time) (v time.Time) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToTimeSlice returns a slice of time.Time values, that are
+// dereferenced if the passed in pointer was not nil. Returns a time.Time
+// zero value if the pointer was nil.
+func ToTimeSlice(vs []*time.Time) []time.Time {
+ ps := make([]time.Time, len(vs))
+ for i, v := range vs {
+ ps[i] = ToTime(v)
+ }
+
+ return ps
+}
+
+// ToTimeMap returns a map of time.Time values, that are
+// dereferenced if the passed in pointer was not nil. The time.Time
+// zero value is used if the pointer was nil.
+func ToTimeMap(vs map[string]*time.Time) map[string]time.Time {
+ ps := make(map[string]time.Time, len(vs))
+ for k, v := range vs {
+ ps[k] = ToTime(v)
+ }
+
+ return ps
+}
+
+// ToDuration returns time.Duration value dereferenced if the passed
+// in pointer was not nil. Returns a time.Duration zero value if the
+// pointer was nil.
+func ToDuration(p *time.Duration) (v time.Duration) {
+ if p == nil {
+ return v
+ }
+
+ return *p
+}
+
+// ToDurationSlice returns a slice of time.Duration values, that are
+// dereferenced if the passed in pointer was not nil. Returns a time.Duration
+// zero value if the pointer was nil.
+func ToDurationSlice(vs []*time.Duration) []time.Duration {
+ ps := make([]time.Duration, len(vs))
+ for i, v := range vs {
+ ps[i] = ToDuration(v)
+ }
+
+ return ps
+}
+
+// ToDurationMap returns a map of time.Duration values, that are
+// dereferenced if the passed in pointer was not nil. The time.Duration
+// zero value is used if the pointer was nil.
+func ToDurationMap(vs map[string]*time.Duration) map[string]time.Duration {
+ ps := make(map[string]time.Duration, len(vs))
+ for k, v := range vs {
+ ps[k] = ToDuration(v)
+ }
+
+ return ps
+}
diff --git a/vendor/github.com/aws/smithy-go/ptr/gen_scalars.go b/vendor/github.com/aws/smithy-go/ptr/gen_scalars.go
new file mode 100644
index 000000000..97f01011e
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/ptr/gen_scalars.go
@@ -0,0 +1,83 @@
+//go:build codegen
+// +build codegen
+
+package ptr
+
+import "strings"
+
+func GetScalars() Scalars {
+ return Scalars{
+ {Type: "bool"},
+ {Type: "byte"},
+ {Type: "string"},
+ {Type: "int"},
+ {Type: "int8"},
+ {Type: "int16"},
+ {Type: "int32"},
+ {Type: "int64"},
+ {Type: "uint"},
+ {Type: "uint8"},
+ {Type: "uint16"},
+ {Type: "uint32"},
+ {Type: "uint64"},
+ {Type: "float32"},
+ {Type: "float64"},
+ {Type: "Time", Import: &Import{Path: "time"}},
+ {Type: "Duration", Import: &Import{Path: "time"}},
+ }
+}
+
+// Import provides the import path and optional alias
+type Import struct {
+ Path string
+ Alias string
+}
+
+// Package returns the Go package name for the import. Returns alias if set.
+func (i Import) Package() string {
+ if v := i.Alias; len(v) != 0 {
+ return v
+ }
+
+ if v := i.Path; len(v) != 0 {
+ parts := strings.Split(v, "/")
+ pkg := parts[len(parts)-1]
+ return pkg
+ }
+
+ return ""
+}
+
+// Scalar provides the definition of a type to generate pointer utilities for.
+type Scalar struct {
+ Type string
+ Import *Import
+}
+
+// Name returns the exported function name for the type.
+func (t Scalar) Name() string {
+ return strings.Title(t.Type)
+}
+
+// Symbol returns the scalar's Go symbol with path if needed.
+func (t Scalar) Symbol() string {
+ if t.Import != nil {
+ return t.Import.Package() + "." + t.Type
+ }
+ return t.Type
+}
+
+// Scalars is a list of scalars.
+type Scalars []Scalar
+
+// Imports returns all imports for the scalars.
+func (ts Scalars) Imports() []*Import {
+ imports := []*Import{}
+ for _, t := range ts {
+ if v := t.Import; v != nil {
+ imports = append(imports, v)
+ }
+ }
+
+ return imports
+}
diff --git a/vendor/github.com/aws/smithy-go/ptr/to_ptr.go b/vendor/github.com/aws/smithy-go/ptr/to_ptr.go
new file mode 100644
index 000000000..0bfbbecbd
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/ptr/to_ptr.go
@@ -0,0 +1,499 @@
+// Code generated by smithy-go/ptr/generate.go DO NOT EDIT.
+package ptr
+
+import (
+ "time"
+)
+
+// Bool returns a pointer value for the bool value passed in.
+func Bool(v bool) *bool {
+ return &v
+}
+
+// BoolSlice returns a slice of bool pointers from the values
+// passed in.
+func BoolSlice(vs []bool) []*bool {
+ ps := make([]*bool, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// BoolMap returns a map of bool pointers from the values
+// passed in.
+func BoolMap(vs map[string]bool) map[string]*bool {
+ ps := make(map[string]*bool, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// Byte returns a pointer value for the byte value passed in.
+func Byte(v byte) *byte {
+ return &v
+}
+
+// ByteSlice returns a slice of byte pointers from the values
+// passed in.
+func ByteSlice(vs []byte) []*byte {
+ ps := make([]*byte, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// ByteMap returns a map of byte pointers from the values
+// passed in.
+func ByteMap(vs map[string]byte) map[string]*byte {
+ ps := make(map[string]*byte, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// String returns a pointer value for the string value passed in.
+func String(v string) *string {
+ return &v
+}
+
+// StringSlice returns a slice of string pointers from the values
+// passed in.
+func StringSlice(vs []string) []*string {
+ ps := make([]*string, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// StringMap returns a map of string pointers from the values
+// passed in.
+func StringMap(vs map[string]string) map[string]*string {
+ ps := make(map[string]*string, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// Int returns a pointer value for the int value passed in.
+func Int(v int) *int {
+ return &v
+}
+
+// IntSlice returns a slice of int pointers from the values
+// passed in.
+func IntSlice(vs []int) []*int {
+ ps := make([]*int, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// IntMap returns a map of int pointers from the values
+// passed in.
+func IntMap(vs map[string]int) map[string]*int {
+ ps := make(map[string]*int, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// Int8 returns a pointer value for the int8 value passed in.
+func Int8(v int8) *int8 {
+ return &v
+}
+
+// Int8Slice returns a slice of int8 pointers from the values
+// passed in.
+func Int8Slice(vs []int8) []*int8 {
+ ps := make([]*int8, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// Int8Map returns a map of int8 pointers from the values
+// passed in.
+func Int8Map(vs map[string]int8) map[string]*int8 {
+ ps := make(map[string]*int8, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// Int16 returns a pointer value for the int16 value passed in.
+func Int16(v int16) *int16 {
+ return &v
+}
+
+// Int16Slice returns a slice of int16 pointers from the values
+// passed in.
+func Int16Slice(vs []int16) []*int16 {
+ ps := make([]*int16, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// Int16Map returns a map of int16 pointers from the values
+// passed in.
+func Int16Map(vs map[string]int16) map[string]*int16 {
+ ps := make(map[string]*int16, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// Int32 returns a pointer value for the int32 value passed in.
+func Int32(v int32) *int32 {
+ return &v
+}
+
+// Int32Slice returns a slice of int32 pointers from the values
+// passed in.
+func Int32Slice(vs []int32) []*int32 {
+ ps := make([]*int32, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// Int32Map returns a map of int32 pointers from the values
+// passed in.
+func Int32Map(vs map[string]int32) map[string]*int32 {
+ ps := make(map[string]*int32, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// Int64 returns a pointer value for the int64 value passed in.
+func Int64(v int64) *int64 {
+ return &v
+}
+
+// Int64Slice returns a slice of int64 pointers from the values
+// passed in.
+func Int64Slice(vs []int64) []*int64 {
+ ps := make([]*int64, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// Int64Map returns a map of int64 pointers from the values
+// passed in.
+func Int64Map(vs map[string]int64) map[string]*int64 {
+ ps := make(map[string]*int64, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// Uint returns a pointer value for the uint value passed in.
+func Uint(v uint) *uint {
+ return &v
+}
+
+// UintSlice returns a slice of uint pointers from the values
+// passed in.
+func UintSlice(vs []uint) []*uint {
+ ps := make([]*uint, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// UintMap returns a map of uint pointers from the values
+// passed in.
+func UintMap(vs map[string]uint) map[string]*uint {
+ ps := make(map[string]*uint, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// Uint8 returns a pointer value for the uint8 value passed in.
+func Uint8(v uint8) *uint8 {
+ return &v
+}
+
+// Uint8Slice returns a slice of uint8 pointers from the values
+// passed in.
+func Uint8Slice(vs []uint8) []*uint8 {
+ ps := make([]*uint8, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// Uint8Map returns a map of uint8 pointers from the values
+// passed in.
+func Uint8Map(vs map[string]uint8) map[string]*uint8 {
+ ps := make(map[string]*uint8, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// Uint16 returns a pointer value for the uint16 value passed in.
+func Uint16(v uint16) *uint16 {
+ return &v
+}
+
+// Uint16Slice returns a slice of uint16 pointers from the values
+// passed in.
+func Uint16Slice(vs []uint16) []*uint16 {
+ ps := make([]*uint16, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// Uint16Map returns a map of uint16 pointers from the values
+// passed in.
+func Uint16Map(vs map[string]uint16) map[string]*uint16 {
+ ps := make(map[string]*uint16, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// Uint32 returns a pointer value for the uint32 value passed in.
+func Uint32(v uint32) *uint32 {
+ return &v
+}
+
+// Uint32Slice returns a slice of uint32 pointers from the values
+// passed in.
+func Uint32Slice(vs []uint32) []*uint32 {
+ ps := make([]*uint32, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// Uint32Map returns a map of uint32 pointers from the values
+// passed in.
+func Uint32Map(vs map[string]uint32) map[string]*uint32 {
+ ps := make(map[string]*uint32, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// Uint64 returns a pointer value for the uint64 value passed in.
+func Uint64(v uint64) *uint64 {
+ return &v
+}
+
+// Uint64Slice returns a slice of uint64 pointers from the values
+// passed in.
+func Uint64Slice(vs []uint64) []*uint64 {
+ ps := make([]*uint64, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// Uint64Map returns a map of uint64 pointers from the values
+// passed in.
+func Uint64Map(vs map[string]uint64) map[string]*uint64 {
+ ps := make(map[string]*uint64, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// Float32 returns a pointer value for the float32 value passed in.
+func Float32(v float32) *float32 {
+ return &v
+}
+
+// Float32Slice returns a slice of float32 pointers from the values
+// passed in.
+func Float32Slice(vs []float32) []*float32 {
+ ps := make([]*float32, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// Float32Map returns a map of float32 pointers from the values
+// passed in.
+func Float32Map(vs map[string]float32) map[string]*float32 {
+ ps := make(map[string]*float32, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// Float64 returns a pointer value for the float64 value passed in.
+func Float64(v float64) *float64 {
+ return &v
+}
+
+// Float64Slice returns a slice of float64 pointers from the values
+// passed in.
+func Float64Slice(vs []float64) []*float64 {
+ ps := make([]*float64, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// Float64Map returns a map of float64 pointers from the values
+// passed in.
+func Float64Map(vs map[string]float64) map[string]*float64 {
+ ps := make(map[string]*float64, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// Time returns a pointer value for the time.Time value passed in.
+func Time(v time.Time) *time.Time {
+ return &v
+}
+
+// TimeSlice returns a slice of time.Time pointers from the values
+// passed in.
+func TimeSlice(vs []time.Time) []*time.Time {
+ ps := make([]*time.Time, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// TimeMap returns a map of time.Time pointers from the values
+// passed in.
+func TimeMap(vs map[string]time.Time) map[string]*time.Time {
+ ps := make(map[string]*time.Time, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
+
+// Duration returns a pointer value for the time.Duration value passed in.
+func Duration(v time.Duration) *time.Duration {
+ return &v
+}
+
+// DurationSlice returns a slice of time.Duration pointers from the values
+// passed in.
+func DurationSlice(vs []time.Duration) []*time.Duration {
+ ps := make([]*time.Duration, len(vs))
+ for i, v := range vs {
+ vv := v
+ ps[i] = &vv
+ }
+
+ return ps
+}
+
+// DurationMap returns a map of time.Duration pointers from the values
+// passed in.
+func DurationMap(vs map[string]time.Duration) map[string]*time.Duration {
+ ps := make(map[string]*time.Duration, len(vs))
+ for k, v := range vs {
+ vv := v
+ ps[k] = &vv
+ }
+
+ return ps
+}
diff --git a/vendor/github.com/aws/smithy-go/rand/doc.go b/vendor/github.com/aws/smithy-go/rand/doc.go
new file mode 100644
index 000000000..f8b25d562
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/rand/doc.go
@@ -0,0 +1,3 @@
+// Package rand provides utilities for creating and working with random value
+// generators.
+package rand
diff --git a/vendor/github.com/aws/smithy-go/rand/rand.go b/vendor/github.com/aws/smithy-go/rand/rand.go
new file mode 100644
index 000000000..9c479f62b
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/rand/rand.go
@@ -0,0 +1,31 @@
+package rand
+
+import (
+ "crypto/rand"
+ "fmt"
+ "io"
+ "math/big"
+)
+
+func init() {
+ Reader = rand.Reader
+}
+
+// Reader provides a random reader that can reset during testing.
+var Reader io.Reader
+
+// Int63n returns a int64 between zero and value of max, read from an io.Reader source.
+func Int63n(reader io.Reader, max int64) (int64, error) {
+ bi, err := rand.Int(reader, big.NewInt(max))
+ if err != nil {
+ return 0, fmt.Errorf("failed to read random value, %w", err)
+ }
+
+ return bi.Int64(), nil
+}
+
+// CryptoRandInt63n returns a random int64 between zero and value of max
+// obtained from the crypto rand source.
+func CryptoRandInt63n(max int64) (int64, error) {
+ return Int63n(Reader, max)
+}
diff --git a/vendor/github.com/aws/smithy-go/rand/uuid.go b/vendor/github.com/aws/smithy-go/rand/uuid.go
new file mode 100644
index 000000000..dc81cbc68
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/rand/uuid.go
@@ -0,0 +1,87 @@
+package rand
+
+import (
+ "encoding/hex"
+ "io"
+)
+
+const dash byte = '-'
+
+// UUIDIdempotencyToken provides a utility to get idempotency tokens in the
+// UUID format.
+type UUIDIdempotencyToken struct {
+ uuid *UUID
+}
+
+// NewUUIDIdempotencyToken returns a idempotency token provider returning
+// tokens in the UUID random format using the reader provided.
+func NewUUIDIdempotencyToken(r io.Reader) *UUIDIdempotencyToken {
+ return &UUIDIdempotencyToken{uuid: NewUUID(r)}
+}
+
+// GetIdempotencyToken returns a random UUID value for Idempotency token.
+func (u UUIDIdempotencyToken) GetIdempotencyToken() (string, error) {
+ return u.uuid.GetUUID()
+}
+
+// UUID provides computing random UUID version 4 values from a random source
+// reader.
+type UUID struct {
+ randSrc io.Reader
+}
+
+// NewUUID returns an initialized UUID value that can be used to retrieve
+// random UUID version 4 values.
+func NewUUID(r io.Reader) *UUID {
+ return &UUID{randSrc: r}
+}
+
+// GetUUID returns a random UUID version 4 string representation sourced from the random reader the
+// UUID was created with. Returns an error if unable to compute the UUID.
+func (r *UUID) GetUUID() (string, error) {
+ var b [16]byte
+ if _, err := io.ReadFull(r.randSrc, b[:]); err != nil {
+ return "", err
+ }
+ r.makeUUIDv4(b[:])
+ return format(b), nil
+}
+
+// GetBytes returns a byte slice containing a random UUID version 4 sourced from the random reader the
+// UUID was created with. Returns an error if unable to compute the UUID.
+func (r *UUID) GetBytes() (u []byte, err error) {
+ u = make([]byte, 16)
+ if _, err = io.ReadFull(r.randSrc, u); err != nil {
+ return u, err
+ }
+ r.makeUUIDv4(u)
+ return u, nil
+}
+
+func (r *UUID) makeUUIDv4(u []byte) {
+ // 13th character is "4"
+ u[6] = (u[6] & 0x0f) | 0x40 // Version 4
+ // 17th character is "8", "9", "a", or "b"
+ u[8] = (u[8] & 0x3f) | 0x80 // Variant most significant bits are 10x where x can be either 1 or 0
+}
+
+// Format returns the canonical text representation of a UUID.
+// This implementation is optimized to not use fmt.
+// Example: 82e42f16-b6cc-4d5b-95f5-d403c4befd3d
+func format(u [16]byte) string {
+ // https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_.28random.29
+
+ var scratch [36]byte
+
+ hex.Encode(scratch[:8], u[0:4])
+ scratch[8] = dash
+ hex.Encode(scratch[9:13], u[4:6])
+ scratch[13] = dash
+ hex.Encode(scratch[14:18], u[6:8])
+ scratch[18] = dash
+ hex.Encode(scratch[19:23], u[8:10])
+ scratch[23] = dash
+ hex.Encode(scratch[24:], u[10:])
+
+ return string(scratch[:])
+}
diff --git a/vendor/github.com/aws/smithy-go/sync/error.go b/vendor/github.com/aws/smithy-go/sync/error.go
new file mode 100644
index 000000000..629207672
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/sync/error.go
@@ -0,0 +1,53 @@
+package sync
+
+import "sync"
+
+// OnceErr 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 OnceErr struct {
+ mu sync.RWMutex
+ err error
+ ch chan struct{}
+}
+
+// NewOnceErr return a new OnceErr
+func NewOnceErr() *OnceErr {
+ return &OnceErr{
+ ch: make(chan struct{}, 1),
+ }
+}
+
+// Err acquires a read-lock and returns an
+// error if one has been set.
+func (e *OnceErr) 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 *OnceErr) 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 OnceErr.
+func (e *OnceErr) ErrorSet() <-chan struct{} {
+ return e.ch
+}
diff --git a/vendor/github.com/aws/smithy-go/time/time.go b/vendor/github.com/aws/smithy-go/time/time.go
new file mode 100644
index 000000000..b552a09f8
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/time/time.go
@@ -0,0 +1,134 @@
+package time
+
+import (
+ "context"
+ "fmt"
+ "math/big"
+ "strings"
+ "time"
+)
+
+const (
+ // dateTimeFormat is a IMF-fixdate formatted RFC3339 section 5.6
+ dateTimeFormatInput = "2006-01-02T15:04:05.999999999Z"
+ dateTimeFormatInputNoZ = "2006-01-02T15:04:05.999999999"
+ dateTimeFormatOutput = "2006-01-02T15:04:05.999Z"
+
+ // httpDateFormat is a date time defined by RFC 7231#section-7.1.1.1
+ // IMF-fixdate with no UTC offset.
+ httpDateFormat = "Mon, 02 Jan 2006 15:04:05 GMT"
+ // Additional formats needed for compatibility.
+ httpDateFormatSingleDigitDay = "Mon, _2 Jan 2006 15:04:05 GMT"
+ httpDateFormatSingleDigitDayTwoDigitYear = "Mon, _2 Jan 06 15:04:05 GMT"
+)
+
+var millisecondFloat = big.NewFloat(1e3)
+
+// FormatDateTime formats value as a date-time, (RFC3339 section 5.6)
+//
+// Example: 1985-04-12T23:20:50.52Z
+func FormatDateTime(value time.Time) string {
+ return value.UTC().Format(dateTimeFormatOutput)
+}
+
+// ParseDateTime parses a string as a date-time, (RFC3339 section 5.6)
+//
+// Example: 1985-04-12T23:20:50.52Z
+func ParseDateTime(value string) (time.Time, error) {
+ return tryParse(value,
+ dateTimeFormatInput,
+ dateTimeFormatInputNoZ,
+ time.RFC3339Nano,
+ time.RFC3339,
+ )
+}
+
+// FormatHTTPDate formats value as a http-date, (RFC 7231#section-7.1.1.1 IMF-fixdate)
+//
+// Example: Tue, 29 Apr 2014 18:30:38 GMT
+func FormatHTTPDate(value time.Time) string {
+ return value.UTC().Format(httpDateFormat)
+}
+
+// ParseHTTPDate parses a string as a http-date, (RFC 7231#section-7.1.1.1 IMF-fixdate)
+//
+// Example: Tue, 29 Apr 2014 18:30:38 GMT
+func ParseHTTPDate(value string) (time.Time, error) {
+ return tryParse(value,
+ httpDateFormat,
+ httpDateFormatSingleDigitDay,
+ httpDateFormatSingleDigitDayTwoDigitYear,
+ time.RFC850,
+ time.ANSIC,
+ )
+}
+
+// FormatEpochSeconds returns value as a Unix time in seconds with with decimal precision
+//
+// Example: 1515531081.123
+func FormatEpochSeconds(value time.Time) float64 {
+ ms := value.UnixNano() / int64(time.Millisecond)
+ return float64(ms) / 1e3
+}
+
+// ParseEpochSeconds returns value as a Unix time in seconds with with decimal precision
+//
+// Example: 1515531081.123
+func ParseEpochSeconds(value float64) time.Time {
+ f := big.NewFloat(value)
+ f = f.Mul(f, millisecondFloat)
+ i, _ := f.Int64()
+ // Offset to `UTC` because time.Unix returns the time value based on system
+ // local setting.
+ return time.Unix(0, i*1e6).UTC()
+}
+
+func tryParse(v string, formats ...string) (time.Time, error) {
+ var errs parseErrors
+ for _, f := range formats {
+ t, err := time.Parse(f, v)
+ if err != nil {
+ errs = append(errs, parseError{
+ Format: f,
+ Err: err,
+ })
+ continue
+ }
+ return t, nil
+ }
+
+ return time.Time{}, fmt.Errorf("unable to parse time string, %w", errs)
+}
+
+type parseErrors []parseError
+
+func (es parseErrors) Error() string {
+ var s strings.Builder
+ for _, e := range es {
+ fmt.Fprintf(&s, "\n * %q: %v", e.Format, e.Err)
+ }
+
+ return "parse errors:" + s.String()
+}
+
+type parseError struct {
+ Format string
+ Err error
+}
+
+// SleepWithContext will wait for the timer duration to expire, or until the context
+// is canceled. Whichever happens first. If the context is canceled the
+// Context's error will be returned.
+func SleepWithContext(ctx context.Context, dur time.Duration) error {
+ t := time.NewTimer(dur)
+ defer t.Stop()
+
+ select {
+ case <-t.C:
+ break
+ case <-ctx.Done():
+ return ctx.Err()
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/checksum_middleware.go b/vendor/github.com/aws/smithy-go/transport/http/checksum_middleware.go
new file mode 100644
index 000000000..bc4ad6e79
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/checksum_middleware.go
@@ -0,0 +1,70 @@
+package http
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/smithy-go/middleware"
+)
+
+const contentMD5Header = "Content-Md5"
+
+// contentMD5Checksum provides a middleware to compute and set
+// content-md5 checksum for a http request
+type contentMD5Checksum struct {
+}
+
+// AddContentChecksumMiddleware adds checksum middleware to middleware's
+// build step.
+func AddContentChecksumMiddleware(stack *middleware.Stack) error {
+ // This middleware must be executed before request body is set.
+ return stack.Build.Add(&contentMD5Checksum{}, middleware.Before)
+}
+
+// ID returns the identifier for the checksum middleware
+func (m *contentMD5Checksum) ID() string { return "ContentChecksum" }
+
+// HandleBuild adds behavior to compute md5 checksum and add content-md5 header
+// on http request
+func (m *contentMD5Checksum) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown request type %T", req)
+ }
+
+ // if Content-MD5 header is already present, return
+ if v := req.Header.Get(contentMD5Header); len(v) != 0 {
+ return next.HandleBuild(ctx, in)
+ }
+
+ // fetch the request stream.
+ stream := req.GetStream()
+ // compute checksum if payload is explicit
+ if stream != nil {
+ if !req.IsStreamSeekable() {
+ return out, metadata, fmt.Errorf(
+ "unseekable stream is not supported for computing md5 checksum")
+ }
+
+ v, err := computeMD5Checksum(stream)
+ if err != nil {
+ return out, metadata, fmt.Errorf("error computing md5 checksum, %w", err)
+ }
+
+ // reset the request stream
+ if err := req.RewindStream(); err != nil {
+ return out, metadata, fmt.Errorf(
+ "error rewinding request stream after computing md5 checksum, %w", err)
+ }
+
+ // set the 'Content-MD5' header
+ req.Header.Set(contentMD5Header, string(v))
+ }
+
+ // set md5 header value
+ return next.HandleBuild(ctx, in)
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/client.go b/vendor/github.com/aws/smithy-go/transport/http/client.go
new file mode 100644
index 000000000..e691c69bf
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/client.go
@@ -0,0 +1,120 @@
+package http
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// ClientDo provides the interface for custom HTTP client implementations.
+type ClientDo interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// ClientDoFunc provides a helper to wrap a function as an HTTP client for
+// round tripping requests.
+type ClientDoFunc func(*http.Request) (*http.Response, error)
+
+// Do will invoke the underlying func, returning the result.
+func (fn ClientDoFunc) Do(r *http.Request) (*http.Response, error) {
+ return fn(r)
+}
+
+// ClientHandler wraps a client that implements the HTTP Do method. Standard
+// implementation is http.Client.
+type ClientHandler struct {
+ client ClientDo
+}
+
+// NewClientHandler returns an initialized middleware handler for the client.
+func NewClientHandler(client ClientDo) ClientHandler {
+ return ClientHandler{
+ client: client,
+ }
+}
+
+// Handle implements the middleware Handler interface, that will invoke the
+// underlying HTTP client. Requires the input to be a Smithy *Request. Returns
+// a smithy *Response, or error if the request failed.
+func (c ClientHandler) Handle(ctx context.Context, input interface{}) (
+ out interface{}, metadata middleware.Metadata, err error,
+) {
+ req, ok := input.(*Request)
+ if !ok {
+ return nil, metadata, fmt.Errorf("expect Smithy http.Request value as input, got unsupported type %T", input)
+ }
+
+ builtRequest := req.Build(ctx)
+ if err := ValidateEndpointHost(builtRequest.Host); err != nil {
+ return nil, metadata, err
+ }
+
+ resp, err := c.client.Do(builtRequest)
+ if resp == nil {
+ // Ensure a http response value is always present to prevent unexpected
+ // panics.
+ resp = &http.Response{
+ Header: http.Header{},
+ Body: http.NoBody,
+ }
+ }
+ if err != nil {
+ err = &RequestSendError{Err: err}
+
+ // Override the error with a context canceled error, if that was canceled.
+ select {
+ case <-ctx.Done():
+ err = &smithy.CanceledError{Err: ctx.Err()}
+ default:
+ }
+ }
+
+ // HTTP RoundTripper *should* close the request body. But this may not happen in a timely manner.
+ // So instead Smithy *Request Build wraps the body to be sent in a safe closer that will clear the
+ // stream reference so that it can be safely reused.
+ if builtRequest.Body != nil {
+ _ = builtRequest.Body.Close()
+ }
+
+ return &Response{Response: resp}, metadata, err
+}
+
+// RequestSendError provides a generic request transport error. This error
+// should wrap errors making HTTP client requests.
+//
+// The ClientHandler will wrap the HTTP client's error if the client request
+// fails, and did not fail because of context canceled.
+type RequestSendError struct {
+ Err error
+}
+
+// ConnectionError returns that the error is related to not being able to send
+// the request, or receive a response from the service.
+func (e *RequestSendError) ConnectionError() bool {
+ return true
+}
+
+// Unwrap returns the underlying error, if there was one.
+func (e *RequestSendError) Unwrap() error {
+ return e.Err
+}
+
+func (e *RequestSendError) Error() string {
+ return fmt.Sprintf("request send failed, %v", e.Err)
+}
+
+// NopClient provides a client that ignores the request, and returns an empty
+// successful HTTP response value.
+type NopClient struct{}
+
+// Do ignores the request and returns a 200 status empty response.
+func (NopClient) Do(r *http.Request) (*http.Response, error) {
+ return &http.Response{
+ StatusCode: 200,
+ Header: http.Header{},
+ Body: http.NoBody,
+ }, nil
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/doc.go b/vendor/github.com/aws/smithy-go/transport/http/doc.go
new file mode 100644
index 000000000..07366ac85
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/doc.go
@@ -0,0 +1,5 @@
+/*
+Package http provides the HTTP transport client and request/response types
+needed to round trip API operation calls with an service.
+*/
+package http
diff --git a/vendor/github.com/aws/smithy-go/transport/http/headerlist.go b/vendor/github.com/aws/smithy-go/transport/http/headerlist.go
new file mode 100644
index 000000000..cbc9deb4d
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/headerlist.go
@@ -0,0 +1,163 @@
+package http
+
+import (
+ "fmt"
+ "strconv"
+ "strings"
+ "unicode"
+)
+
+func splitHeaderListValues(vs []string, splitFn func(string) ([]string, error)) ([]string, error) {
+ values := make([]string, 0, len(vs))
+
+ for i := 0; i < len(vs); i++ {
+ parts, err := splitFn(vs[i])
+ if err != nil {
+ return nil, err
+ }
+ values = append(values, parts...)
+ }
+
+ return values, nil
+}
+
+// SplitHeaderListValues attempts to split the elements of the slice by commas,
+// and return a list of all values separated. Returns error if unable to
+// separate the values.
+func SplitHeaderListValues(vs []string) ([]string, error) {
+ return splitHeaderListValues(vs, quotedCommaSplit)
+}
+
+func quotedCommaSplit(v string) (parts []string, err error) {
+ v = strings.TrimSpace(v)
+
+ expectMore := true
+ for i := 0; i < len(v); i++ {
+ if unicode.IsSpace(rune(v[i])) {
+ continue
+ }
+ expectMore = false
+
+ // leading space in part is ignored.
+ // Start of value must be non-space, or quote.
+ //
+ // - If quote, enter quoted mode, find next non-escaped quote to
+ // terminate the value.
+ // - Otherwise, find next comma to terminate value.
+
+ remaining := v[i:]
+
+ var value string
+ var valueLen int
+ if remaining[0] == '"' {
+ //------------------------------
+ // Quoted value
+ //------------------------------
+ var j int
+ var skipQuote bool
+ for j += 1; j < len(remaining); j++ {
+ if remaining[j] == '\\' || (remaining[j] != '\\' && skipQuote) {
+ skipQuote = !skipQuote
+ continue
+ }
+ if remaining[j] == '"' {
+ break
+ }
+ }
+ if j == len(remaining) || j == 1 {
+ return nil, fmt.Errorf("value %v missing closing double quote",
+ remaining)
+ }
+ valueLen = j + 1
+
+ tail := remaining[valueLen:]
+ var k int
+ for ; k < len(tail); k++ {
+ if !unicode.IsSpace(rune(tail[k])) && tail[k] != ',' {
+ return nil, fmt.Errorf("value %v has non-space trailing characters",
+ remaining)
+ }
+ if tail[k] == ',' {
+ expectMore = true
+ break
+ }
+ }
+ value = remaining[:valueLen]
+ value, err = strconv.Unquote(value)
+ if err != nil {
+ return nil, fmt.Errorf("failed to unquote value %v, %w", value, err)
+ }
+
+ // Pad valueLen to include trailing space(s) so `i` is updated correctly.
+ valueLen += k
+
+ } else {
+ //------------------------------
+ // Unquoted value
+ //------------------------------
+
+ // Index of the next comma is the length of the value, or end of string.
+ valueLen = strings.Index(remaining, ",")
+ if valueLen != -1 {
+ expectMore = true
+ } else {
+ valueLen = len(remaining)
+ }
+ value = strings.TrimSpace(remaining[:valueLen])
+ }
+
+ i += valueLen
+ parts = append(parts, value)
+
+ }
+
+ if expectMore {
+ parts = append(parts, "")
+ }
+
+ return parts, nil
+}
+
+// SplitHTTPDateTimestampHeaderListValues attempts to split the HTTP-Date
+// timestamp values in the slice by commas, and return a list of all values
+// separated. The split is aware of the HTTP-Date timestamp format, and will skip
+// comma within the timestamp value. Returns an error if unable to split the
+// timestamp values.
+func SplitHTTPDateTimestampHeaderListValues(vs []string) ([]string, error) {
+ return splitHeaderListValues(vs, splitHTTPDateHeaderValue)
+}
+
+func splitHTTPDateHeaderValue(v string) ([]string, error) {
+ if n := strings.Count(v, ","); n <= 1 {
+ // Nothing to do if only contains a no, or single HTTPDate value
+ return []string{v}, nil
+ } else if n%2 == 0 {
+ return nil, fmt.Errorf("invalid timestamp HTTPDate header comma separations, %q", v)
+ }
+
+ var parts []string
+ var i, j int
+
+ var doSplit bool
+ for ; i < len(v); i++ {
+ if v[i] == ',' {
+ if doSplit {
+ doSplit = false
+ parts = append(parts, strings.TrimSpace(v[j:i]))
+ j = i + 1
+ } else {
+ // Skip the first comma in the timestamp value since that
+ // separates the day from the rest of the timestamp.
+ //
+ // Tue, 17 Dec 2019 23:48:18 GMT
+ doSplit = true
+ }
+ }
+ }
+ // Add final part
+ if j < len(v) {
+ parts = append(parts, strings.TrimSpace(v[j:]))
+ }
+
+ return parts, nil
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/host.go b/vendor/github.com/aws/smithy-go/transport/http/host.go
new file mode 100644
index 000000000..6b290fec0
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/host.go
@@ -0,0 +1,89 @@
+package http
+
+import (
+ "fmt"
+ "net"
+ "strconv"
+ "strings"
+)
+
+// ValidateEndpointHost validates that the host string passed in is a valid RFC
+// 3986 host. Returns error if the host is not valid.
+func ValidateEndpointHost(host string) error {
+ var errors strings.Builder
+ var hostname string
+ var port string
+ var err error
+
+ if strings.Contains(host, ":") {
+ hostname, port, err = net.SplitHostPort(host)
+ if err != nil {
+ errors.WriteString(fmt.Sprintf("\n endpoint %v, failed to parse, got ", host))
+ errors.WriteString(err.Error())
+ }
+
+ if !ValidPortNumber(port) {
+ errors.WriteString(fmt.Sprintf("port number should be in range [0-65535], got %v", port))
+ }
+ } else {
+ hostname = host
+ }
+
+ labels := strings.Split(hostname, ".")
+ for i, label := range labels {
+ if i == len(labels)-1 && len(label) == 0 {
+ // Allow trailing dot for FQDN hosts.
+ continue
+ }
+
+ if !ValidHostLabel(label) {
+ errors.WriteString("\nendpoint host domain labels must match \"[a-zA-Z0-9-]{1,63}\", but found: ")
+ errors.WriteString(label)
+ }
+ }
+
+ if len(hostname) == 0 && len(port) != 0 {
+ errors.WriteString("\nendpoint host with port must not be empty")
+ }
+
+ if len(hostname) > 255 {
+ errors.WriteString(fmt.Sprintf("\nendpoint host must be less than 255 characters, but was %d", len(hostname)))
+ }
+
+ if len(errors.String()) > 0 {
+ return fmt.Errorf("invalid endpoint host%s", errors.String())
+ }
+ return nil
+}
+
+// ValidPortNumber returns whether the port is valid RFC 3986 port.
+func ValidPortNumber(port string) bool {
+ i, err := strconv.Atoi(port)
+ if err != nil {
+ return false
+ }
+
+ if i < 0 || i > 65535 {
+ return false
+ }
+ return true
+}
+
+// ValidHostLabel returns whether the label is a valid RFC 3986 host abel.
+func ValidHostLabel(label string) bool {
+ if l := len(label); l == 0 || l > 63 {
+ return false
+ }
+ for _, r := range label {
+ switch {
+ case r >= '0' && r <= '9':
+ case r >= 'A' && r <= 'Z':
+ case r >= 'a' && r <= 'z':
+ case r == '-':
+ default:
+ return false
+ }
+ }
+
+ return true
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/internal/io/safe.go b/vendor/github.com/aws/smithy-go/transport/http/internal/io/safe.go
new file mode 100644
index 000000000..941a8d6b5
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/internal/io/safe.go
@@ -0,0 +1,75 @@
+package io
+
+import (
+ "io"
+ "sync"
+)
+
+// NewSafeReadCloser returns a new safeReadCloser that wraps readCloser.
+func NewSafeReadCloser(readCloser io.ReadCloser) io.ReadCloser {
+ sr := &safeReadCloser{
+ readCloser: readCloser,
+ }
+
+ if _, ok := readCloser.(io.WriterTo); ok {
+ return &safeWriteToReadCloser{safeReadCloser: sr}
+ }
+
+ return sr
+}
+
+// safeWriteToReadCloser wraps a safeReadCloser but exposes a WriteTo interface implementation. This will panic
+// if the underlying io.ReadClose does not support WriteTo. Use NewSafeReadCloser to ensure the proper handling of this
+// type.
+type safeWriteToReadCloser struct {
+ *safeReadCloser
+}
+
+// WriteTo implements the io.WriteTo interface.
+func (r *safeWriteToReadCloser) WriteTo(w io.Writer) (int64, error) {
+ r.safeReadCloser.mtx.Lock()
+ defer r.safeReadCloser.mtx.Unlock()
+
+ if r.safeReadCloser.closed {
+ return 0, io.EOF
+ }
+
+ return r.safeReadCloser.readCloser.(io.WriterTo).WriteTo(w)
+}
+
+// safeReadCloser wraps a io.ReadCloser and presents an io.ReadCloser interface. When Close is called on safeReadCloser
+// the underlying Close method will be executed, and then the reference to the reader will be dropped. This type
+// is meant to be used with the net/http library which will retain a reference to the request body for the lifetime
+// of a goroutine connection. Wrapping in this manner will ensure that no data race conditions are falsely reported.
+// This type is thread-safe.
+type safeReadCloser struct {
+ readCloser io.ReadCloser
+ closed bool
+ mtx sync.Mutex
+}
+
+// Read reads up to len(p) bytes into p from the underlying read. If the reader is closed io.EOF will be returned.
+func (r *safeReadCloser) Read(p []byte) (n int, err error) {
+ r.mtx.Lock()
+ defer r.mtx.Unlock()
+ if r.closed {
+ return 0, io.EOF
+ }
+
+ return r.readCloser.Read(p)
+}
+
+// Close calls the underlying io.ReadCloser's Close method, removes the reference to the reader, and returns any error
+// reported from Close. Subsequent calls to Close will always return a nil error.
+func (r *safeReadCloser) Close() error {
+ r.mtx.Lock()
+ defer r.mtx.Unlock()
+ if r.closed {
+ return nil
+ }
+
+ r.closed = true
+ rc := r.readCloser
+ r.readCloser = nil
+ return rc.Close()
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/md5_checksum.go b/vendor/github.com/aws/smithy-go/transport/http/md5_checksum.go
new file mode 100644
index 000000000..5d6a4b23a
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/md5_checksum.go
@@ -0,0 +1,25 @@
+package http
+
+import (
+ "crypto/md5"
+ "encoding/base64"
+ "fmt"
+ "io"
+)
+
+// computeMD5Checksum computes base64 md5 checksum of an io.Reader's contents.
+// Returns the byte slice of md5 checksum and an error.
+func computeMD5Checksum(r io.Reader) ([]byte, error) {
+ h := md5.New()
+ // copy errors may be assumed to be from the body.
+ _, err := io.Copy(h, r)
+ if err != nil {
+ return nil, fmt.Errorf("failed to read body: %w", err)
+ }
+
+ // encode the md5 checksum in base64.
+ sum := h.Sum(nil)
+ sum64 := make([]byte, base64.StdEncoding.EncodedLen(len(sum)))
+ base64.StdEncoding.Encode(sum64, sum)
+ return sum64, nil
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go
new file mode 100644
index 000000000..1d3b218a1
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go
@@ -0,0 +1,79 @@
+package http
+
+import (
+ "context"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+ "io"
+ "io/ioutil"
+)
+
+// AddErrorCloseResponseBodyMiddleware adds the middleware to automatically
+// close the response body of an operation request if the request response
+// failed.
+func AddErrorCloseResponseBodyMiddleware(stack *middleware.Stack) error {
+ return stack.Deserialize.Insert(&errorCloseResponseBodyMiddleware{}, "OperationDeserializer", middleware.Before)
+}
+
+type errorCloseResponseBodyMiddleware struct{}
+
+func (*errorCloseResponseBodyMiddleware) ID() string {
+ return "ErrorCloseResponseBody"
+}
+
+func (m *errorCloseResponseBodyMiddleware) HandleDeserialize(
+ ctx context.Context, input middleware.DeserializeInput, next middleware.DeserializeHandler,
+) (
+ output middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err := next.HandleDeserialize(ctx, input)
+ if err != nil {
+ if resp, ok := out.RawResponse.(*Response); ok && resp != nil && resp.Body != nil {
+ // Consume the full body to prevent TCP connection resets on some platforms
+ _, _ = io.Copy(ioutil.Discard, resp.Body)
+ // Do not validate that the response closes successfully.
+ resp.Body.Close()
+ }
+ }
+
+ return out, metadata, err
+}
+
+// AddCloseResponseBodyMiddleware adds the middleware to automatically close
+// the response body of an operation request, after the response had been
+// deserialized.
+func AddCloseResponseBodyMiddleware(stack *middleware.Stack) error {
+ return stack.Deserialize.Insert(&closeResponseBody{}, "OperationDeserializer", middleware.Before)
+}
+
+type closeResponseBody struct{}
+
+func (*closeResponseBody) ID() string {
+ return "CloseResponseBody"
+}
+
+func (m *closeResponseBody) HandleDeserialize(
+ ctx context.Context, input middleware.DeserializeInput, next middleware.DeserializeHandler,
+) (
+ output middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err := next.HandleDeserialize(ctx, input)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ if resp, ok := out.RawResponse.(*Response); ok {
+ // Consume the full body to prevent TCP connection resets on some platforms
+ _, copyErr := io.Copy(ioutil.Discard, resp.Body)
+ if copyErr != nil {
+ middleware.GetLogger(ctx).Logf(logging.Warn, "failed to discard remaining HTTP response body, this may affect connection reuse")
+ }
+
+ closeErr := resp.Body.Close()
+ if closeErr != nil {
+ middleware.GetLogger(ctx).Logf(logging.Warn, "failed to close HTTP response body, this may affect connection reuse")
+ }
+ }
+
+ return out, metadata, err
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_content_length.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_content_length.go
new file mode 100644
index 000000000..9969389bb
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/middleware_content_length.go
@@ -0,0 +1,84 @@
+package http
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/smithy-go/middleware"
+)
+
+// ComputeContentLength provides a middleware to set the content-length
+// header for the length of a serialize request body.
+type ComputeContentLength struct {
+}
+
+// AddComputeContentLengthMiddleware adds ComputeContentLength to the middleware
+// stack's Build step.
+func AddComputeContentLengthMiddleware(stack *middleware.Stack) error {
+ return stack.Build.Add(&ComputeContentLength{}, middleware.After)
+}
+
+// ID returns the identifier for the ComputeContentLength.
+func (m *ComputeContentLength) ID() string { return "ComputeContentLength" }
+
+// HandleBuild adds the length of the serialized request to the HTTP header
+// if the length can be determined.
+func (m *ComputeContentLength) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown request type %T", req)
+ }
+
+ // do nothing if request content-length was set to 0 or above.
+ if req.ContentLength >= 0 {
+ return next.HandleBuild(ctx, in)
+ }
+
+ // attempt to compute stream length
+ if n, ok, err := req.StreamLength(); err != nil {
+ return out, metadata, fmt.Errorf(
+ "failed getting length of request stream, %w", err)
+ } else if ok {
+ req.ContentLength = n
+ }
+
+ return next.HandleBuild(ctx, in)
+}
+
+// validateContentLength provides a middleware to validate the content-length
+// is valid (greater than zero), for the serialized request payload.
+type validateContentLength struct{}
+
+// ValidateContentLengthHeader adds middleware that validates request content-length
+// is set to value greater than zero.
+func ValidateContentLengthHeader(stack *middleware.Stack) error {
+ return stack.Build.Add(&validateContentLength{}, middleware.After)
+}
+
+// ID returns the identifier for the ComputeContentLength.
+func (m *validateContentLength) ID() string { return "ValidateContentLength" }
+
+// HandleBuild adds the length of the serialized request to the HTTP header
+// if the length can be determined.
+func (m *validateContentLength) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown request type %T", req)
+ }
+
+ // if request content-length was set to less than 0, return an error
+ if req.ContentLength < 0 {
+ return out, metadata, fmt.Errorf(
+ "content length for payload is required and must be at least 0")
+ }
+
+ return next.HandleBuild(ctx, in)
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_headers.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_headers.go
new file mode 100644
index 000000000..eac32b4ba
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/middleware_headers.go
@@ -0,0 +1,167 @@
+package http
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/smithy-go/middleware"
+)
+
+type isContentTypeAutoSet struct{}
+
+// SetIsContentTypeDefaultValue returns a Context specifying if the request's
+// content-type header was set to a default value.
+func SetIsContentTypeDefaultValue(ctx context.Context, isDefault bool) context.Context {
+ return context.WithValue(ctx, isContentTypeAutoSet{}, isDefault)
+}
+
+// GetIsContentTypeDefaultValue returns if the content-type HTTP header on the
+// request is a default value that was auto assigned by an operation
+// serializer. Allows middleware post serialization to know if the content-type
+// was auto set to a default value or not.
+//
+// Also returns false if the Context value was never updated to include if
+// content-type was set to a default value.
+func GetIsContentTypeDefaultValue(ctx context.Context) bool {
+ v, _ := ctx.Value(isContentTypeAutoSet{}).(bool)
+ return v
+}
+
+// AddNoPayloadDefaultContentTypeRemover Adds the DefaultContentTypeRemover
+// middleware to the stack after the operation serializer. This middleware will
+// remove the content-type header from the request if it was set as a default
+// value, and no request payload is present.
+//
+// Returns error if unable to add the middleware.
+func AddNoPayloadDefaultContentTypeRemover(stack *middleware.Stack) (err error) {
+ err = stack.Serialize.Insert(removeDefaultContentType{},
+ "OperationSerializer", middleware.After)
+ if err != nil {
+ return fmt.Errorf("failed to add %s serialize middleware, %w",
+ removeDefaultContentType{}.ID(), err)
+ }
+
+ return nil
+}
+
+// RemoveNoPayloadDefaultContentTypeRemover removes the
+// DefaultContentTypeRemover middleware from the stack. Returns an error if
+// unable to remove the middleware.
+func RemoveNoPayloadDefaultContentTypeRemover(stack *middleware.Stack) (err error) {
+ _, err = stack.Serialize.Remove(removeDefaultContentType{}.ID())
+ if err != nil {
+ return fmt.Errorf("failed to remove %s serialize middleware, %w",
+ removeDefaultContentType{}.ID(), err)
+
+ }
+ return nil
+}
+
+// removeDefaultContentType provides after serialization middleware that will
+// remove the content-type header from an HTTP request if the header was set as
+// a default value by the operation serializer, and there is no request payload.
+type removeDefaultContentType struct{}
+
+// ID returns the middleware ID
+func (removeDefaultContentType) ID() string { return "RemoveDefaultContentType" }
+
+// HandleSerialize implements the serialization middleware.
+func (removeDefaultContentType) HandleSerialize(
+ ctx context.Context, input middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ out middleware.SerializeOutput, meta middleware.Metadata, err error,
+) {
+ req, ok := input.Request.(*Request)
+ if !ok {
+ return out, meta, fmt.Errorf(
+ "unexpected request type %T for removeDefaultContentType middleware",
+ input.Request)
+ }
+
+ if GetIsContentTypeDefaultValue(ctx) && req.GetStream() == nil {
+ req.Header.Del("Content-Type")
+ input.Request = req
+ }
+
+ return next.HandleSerialize(ctx, input)
+}
+
+type headerValue struct {
+ header string
+ value string
+ append bool
+}
+
+type headerValueHelper struct {
+ headerValues []headerValue
+}
+
+func (h *headerValueHelper) addHeaderValue(value headerValue) {
+ h.headerValues = append(h.headerValues, value)
+}
+
+func (h *headerValueHelper) ID() string {
+ return "HTTPHeaderHelper"
+}
+
+func (h *headerValueHelper) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (out middleware.BuildOutput, metadata middleware.Metadata, err error) {
+ req, ok := in.Request.(*Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ for _, value := range h.headerValues {
+ if value.append {
+ req.Header.Add(value.header, value.value)
+ } else {
+ req.Header.Set(value.header, value.value)
+ }
+ }
+
+ return next.HandleBuild(ctx, in)
+}
+
+func getOrAddHeaderValueHelper(stack *middleware.Stack) (*headerValueHelper, error) {
+ id := (*headerValueHelper)(nil).ID()
+ m, ok := stack.Build.Get(id)
+ if !ok {
+ m = &headerValueHelper{}
+ err := stack.Build.Add(m, middleware.After)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ requestUserAgent, ok := m.(*headerValueHelper)
+ if !ok {
+ return nil, fmt.Errorf("%T for %s middleware did not match expected type", m, id)
+ }
+
+ return requestUserAgent, nil
+}
+
+// AddHeaderValue returns a stack mutator that adds the header value pair to header.
+// Appends to any existing values if present.
+func AddHeaderValue(header string, value string) func(stack *middleware.Stack) error {
+ return func(stack *middleware.Stack) error {
+ helper, err := getOrAddHeaderValueHelper(stack)
+ if err != nil {
+ return err
+ }
+ helper.addHeaderValue(headerValue{header: header, value: value, append: true})
+ return nil
+ }
+}
+
+// SetHeaderValue returns a stack mutator that adds the header value pair to header.
+// Replaces any existing values if present.
+func SetHeaderValue(header string, value string) func(stack *middleware.Stack) error {
+ return func(stack *middleware.Stack) error {
+ helper, err := getOrAddHeaderValueHelper(stack)
+ if err != nil {
+ return err
+ }
+ helper.addHeaderValue(headerValue{header: header, value: value, append: false})
+ return nil
+ }
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_http_logging.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_http_logging.go
new file mode 100644
index 000000000..d5909b0a2
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/middleware_http_logging.go
@@ -0,0 +1,75 @@
+package http
+
+import (
+ "context"
+ "fmt"
+ "net/http/httputil"
+
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// RequestResponseLogger is a deserialize middleware that will log the request and response HTTP messages and optionally
+// their respective bodies. Will not perform any logging if none of the options are set.
+type RequestResponseLogger struct {
+ LogRequest bool
+ LogRequestWithBody bool
+
+ LogResponse bool
+ LogResponseWithBody bool
+}
+
+// ID is the middleware identifier.
+func (r *RequestResponseLogger) ID() string {
+ return "RequestResponseLogger"
+}
+
+// HandleDeserialize will log the request and response HTTP messages if configured accordingly.
+func (r *RequestResponseLogger) HandleDeserialize(
+ ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler,
+) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ logger := middleware.GetLogger(ctx)
+
+ if r.LogRequest || r.LogRequestWithBody {
+ smithyRequest, ok := in.Request.(*Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in)
+ }
+
+ rc := smithyRequest.Build(ctx)
+ reqBytes, err := httputil.DumpRequestOut(rc, r.LogRequestWithBody)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ logger.Logf(logging.Debug, "Request\n%v", string(reqBytes))
+
+ if r.LogRequestWithBody {
+ smithyRequest, err = smithyRequest.SetStream(rc.Body)
+ if err != nil {
+ return out, metadata, err
+ }
+ in.Request = smithyRequest
+ }
+ }
+
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+
+ if (err == nil) && (r.LogResponse || r.LogResponseWithBody) {
+ smithyResponse, ok := out.RawResponse.(*Response)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", out.RawResponse)
+ }
+
+ respBytes, err := httputil.DumpResponse(smithyResponse.Response, r.LogResponseWithBody)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to dump response %w", err)
+ }
+
+ logger.Logf(logging.Debug, "Response\n%v", string(respBytes))
+ }
+
+ return out, metadata, err
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_metadata.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_metadata.go
new file mode 100644
index 000000000..d6079b259
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/middleware_metadata.go
@@ -0,0 +1,51 @@
+package http
+
+import (
+ "context"
+
+ "github.com/aws/smithy-go/middleware"
+)
+
+type (
+ hostnameImmutableKey struct{}
+ hostPrefixDisableKey struct{}
+)
+
+// GetHostnameImmutable retrieves whether the endpoint hostname should be considered
+// immutable or not.
+//
+// Scoped to stack values. Use middleware#ClearStackValues to clear all stack
+// values.
+func GetHostnameImmutable(ctx context.Context) (v bool) {
+ v, _ = middleware.GetStackValue(ctx, hostnameImmutableKey{}).(bool)
+ return v
+}
+
+// SetHostnameImmutable sets or modifies whether the request's endpoint hostname
+// should be considered immutable or not.
+//
+// Scoped to stack values. Use middleware#ClearStackValues to clear all stack
+// values.
+func SetHostnameImmutable(ctx context.Context, value bool) context.Context {
+ return middleware.WithStackValue(ctx, hostnameImmutableKey{}, value)
+}
+
+// IsEndpointHostPrefixDisabled retrieves whether the hostname prefixing is
+// disabled.
+//
+// Scoped to stack values. Use middleware#ClearStackValues to clear all stack
+// values.
+func IsEndpointHostPrefixDisabled(ctx context.Context) (v bool) {
+ v, _ = middleware.GetStackValue(ctx, hostPrefixDisableKey{}).(bool)
+ return v
+}
+
+// DisableEndpointHostPrefix sets or modifies whether the request's endpoint host
+// prefixing should be disabled. If value is true, endpoint host prefixing
+// will be disabled.
+//
+// Scoped to stack values. Use middleware#ClearStackValues to clear all stack
+// values.
+func DisableEndpointHostPrefix(ctx context.Context, value bool) context.Context {
+ return middleware.WithStackValue(ctx, hostPrefixDisableKey{}, value)
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_min_proto.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_min_proto.go
new file mode 100644
index 000000000..326cb8a6c
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/middleware_min_proto.go
@@ -0,0 +1,79 @@
+package http
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/smithy-go/middleware"
+ "strings"
+)
+
+// MinimumProtocolError is an error type indicating that the established connection did not meet the expected minimum
+// HTTP protocol version.
+type MinimumProtocolError struct {
+ proto string
+ expectedProtoMajor int
+ expectedProtoMinor int
+}
+
+// Error returns the error message.
+func (m *MinimumProtocolError) Error() string {
+ return fmt.Sprintf("operation requires minimum HTTP protocol of HTTP/%d.%d, but was %s",
+ m.expectedProtoMajor, m.expectedProtoMinor, m.proto)
+}
+
+// RequireMinimumProtocol is a deserialization middleware that asserts that the established HTTP connection
+// meets the minimum major ad minor version.
+type RequireMinimumProtocol struct {
+ ProtoMajor int
+ ProtoMinor int
+}
+
+// AddRequireMinimumProtocol adds the RequireMinimumProtocol middleware to the stack using the provided minimum
+// protocol major and minor version.
+func AddRequireMinimumProtocol(stack *middleware.Stack, major, minor int) error {
+ return stack.Deserialize.Insert(&RequireMinimumProtocol{
+ ProtoMajor: major,
+ ProtoMinor: minor,
+ }, "OperationDeserializer", middleware.Before)
+}
+
+// ID returns the middleware identifier string.
+func (r *RequireMinimumProtocol) ID() string {
+ return "RequireMinimumProtocol"
+}
+
+// HandleDeserialize asserts that the established connection is a HTTP connection with the minimum major and minor
+// protocol version.
+func (r *RequireMinimumProtocol) HandleDeserialize(
+ ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler,
+) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ response, ok := out.RawResponse.(*Response)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type: %T", out.RawResponse)
+ }
+
+ if !strings.HasPrefix(response.Proto, "HTTP") {
+ return out, metadata, &MinimumProtocolError{
+ proto: response.Proto,
+ expectedProtoMajor: r.ProtoMajor,
+ expectedProtoMinor: r.ProtoMinor,
+ }
+ }
+
+ if response.ProtoMajor < r.ProtoMajor || response.ProtoMinor < r.ProtoMinor {
+ return out, metadata, &MinimumProtocolError{
+ proto: response.Proto,
+ expectedProtoMajor: r.ProtoMajor,
+ expectedProtoMinor: r.ProtoMinor,
+ }
+ }
+
+ return out, metadata, err
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/request.go b/vendor/github.com/aws/smithy-go/transport/http/request.go
new file mode 100644
index 000000000..7177d6f95
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/request.go
@@ -0,0 +1,189 @@
+package http
+
+import (
+ "context"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+
+ iointernal "github.com/aws/smithy-go/transport/http/internal/io"
+)
+
+// Request provides the HTTP specific request structure for HTTP specific
+// middleware steps to use to serialize input, and send an operation's request.
+type Request struct {
+ *http.Request
+ stream io.Reader
+ isStreamSeekable bool
+ streamStartPos int64
+}
+
+// NewStackRequest returns an initialized request ready to be populated with the
+// HTTP request details. Returns empty interface so the function can be used as
+// a parameter to the Smithy middleware Stack constructor.
+func NewStackRequest() interface{} {
+ return &Request{
+ Request: &http.Request{
+ URL: &url.URL{},
+ Header: http.Header{},
+ ContentLength: -1, // default to unknown length
+ },
+ }
+}
+
+// IsHTTPS returns if the request is HTTPS. Returns false if no endpoint URL is set.
+func (r *Request) IsHTTPS() bool {
+ if r.URL == nil {
+ return false
+ }
+ return strings.EqualFold(r.URL.Scheme, "https")
+}
+
+// Clone returns a deep copy of the Request for the new context. A reference to
+// the Stream is copied, but the underlying stream is not copied.
+func (r *Request) Clone() *Request {
+ rc := *r
+ rc.Request = rc.Request.Clone(context.TODO())
+ return &rc
+}
+
+// StreamLength returns the number of bytes of the serialized stream attached
+// to the request and ok set. If the length cannot be determined, an error will
+// be returned.
+func (r *Request) StreamLength() (size int64, ok bool, err error) {
+ return streamLength(r.stream, r.isStreamSeekable, r.streamStartPos)
+}
+
+func streamLength(stream io.Reader, seekable bool, startPos int64) (size int64, ok bool, err error) {
+ if stream == nil {
+ return 0, true, nil
+ }
+
+ if l, ok := stream.(interface{ Len() int }); ok {
+ return int64(l.Len()), true, nil
+ }
+
+ if !seekable {
+ return 0, false, nil
+ }
+
+ s := stream.(io.Seeker)
+ endOffset, err := s.Seek(0, io.SeekEnd)
+ if err != nil {
+ return 0, false, err
+ }
+
+ // The reason to seek to streamStartPos instead of 0 is to ensure that the
+ // SDK only sends the stream from the starting position the user's
+ // application provided it to the SDK at. For example application opens a
+ // file, and wants to skip the first N bytes uploading the rest. The
+ // application would move the file's offset N bytes, then hand it off to
+ // the SDK to send the remaining. The SDK should respect that initial offset.
+ _, err = s.Seek(startPos, io.SeekStart)
+ if err != nil {
+ return 0, false, err
+ }
+
+ return endOffset - startPos, true, nil
+}
+
+// RewindStream will rewind the io.Reader to the relative start position if it
+// is an io.Seeker.
+func (r *Request) RewindStream() error {
+ // If there is no stream there is nothing to rewind.
+ if r.stream == nil {
+ return nil
+ }
+
+ if !r.isStreamSeekable {
+ return fmt.Errorf("request stream is not seekable")
+ }
+ _, err := r.stream.(io.Seeker).Seek(r.streamStartPos, io.SeekStart)
+ return err
+}
+
+// GetStream returns the request stream io.Reader if a stream is set. If no
+// stream is present nil will be returned.
+func (r *Request) GetStream() io.Reader {
+ return r.stream
+}
+
+// IsStreamSeekable returns whether the stream is seekable.
+func (r *Request) IsStreamSeekable() bool {
+ return r.isStreamSeekable
+}
+
+// SetStream returns a clone of the request with the stream set to the provided
+// reader. May return an error if the provided reader is seekable but returns
+// an error.
+func (r *Request) SetStream(reader io.Reader) (rc *Request, err error) {
+ rc = r.Clone()
+
+ if reader == http.NoBody {
+ reader = nil
+ }
+
+ var isStreamSeekable bool
+ var streamStartPos int64
+ switch v := reader.(type) {
+ case io.Seeker:
+ n, err := v.Seek(0, io.SeekCurrent)
+ if err != nil {
+ return r, err
+ }
+ isStreamSeekable = true
+ streamStartPos = n
+ default:
+ // If the stream length can be determined, and is determined to be empty,
+ // use a nil stream to prevent confusion between empty vs not-empty
+ // streams.
+ length, ok, err := streamLength(reader, false, 0)
+ if err != nil {
+ return nil, err
+ } else if ok && length == 0 {
+ reader = nil
+ }
+ }
+
+ rc.stream = reader
+ rc.isStreamSeekable = isStreamSeekable
+ rc.streamStartPos = streamStartPos
+
+ return rc, err
+}
+
+// Build returns a build standard HTTP request value from the Smithy request.
+// The request's stream is wrapped in a safe container that allows it to be
+// reused for subsequent attempts.
+func (r *Request) Build(ctx context.Context) *http.Request {
+ req := r.Request.Clone(ctx)
+
+ if r.stream == nil && req.ContentLength == -1 {
+ req.ContentLength = 0
+ }
+
+ switch stream := r.stream.(type) {
+ case *io.PipeReader:
+ req.Body = ioutil.NopCloser(stream)
+ req.ContentLength = -1
+ default:
+ // HTTP Client Request must only have a non-nil body if the
+ // ContentLength is explicitly unknown (-1) or non-zero. The HTTP
+ // Client will interpret a non-nil body and ContentLength 0 as
+ // "unknown". This is unwanted behavior.
+ if req.ContentLength != 0 && r.stream != nil {
+ req.Body = iointernal.NewSafeReadCloser(ioutil.NopCloser(stream))
+ }
+ }
+
+ return req
+}
+
+// RequestCloner is a function that can take an input request type and clone the request
+// for use in a subsequent retry attempt.
+func RequestCloner(v interface{}) interface{} {
+ return v.(*Request).Clone()
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/response.go b/vendor/github.com/aws/smithy-go/transport/http/response.go
new file mode 100644
index 000000000..0c13bfcc8
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/response.go
@@ -0,0 +1,34 @@
+package http
+
+import (
+ "fmt"
+ "net/http"
+)
+
+// Response provides the HTTP specific response structure for HTTP specific
+// middleware steps to use to deserialize the response from an operation call.
+type Response struct {
+ *http.Response
+}
+
+// ResponseError provides the HTTP centric error type wrapping the underlying
+// error with the HTTP response value.
+type ResponseError struct {
+ Response *Response
+ Err error
+}
+
+// HTTPStatusCode returns the HTTP response status code received from the service.
+func (e *ResponseError) HTTPStatusCode() int { return e.Response.StatusCode }
+
+// HTTPResponse returns the HTTP response received from the service.
+func (e *ResponseError) HTTPResponse() *Response { return e.Response }
+
+// Unwrap returns the nested error if any, or nil.
+func (e *ResponseError) Unwrap() error { return e.Err }
+
+func (e *ResponseError) Error() string {
+ return fmt.Sprintf(
+ "http response error StatusCode: %d, %v",
+ e.Response.StatusCode, e.Err)
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/time.go b/vendor/github.com/aws/smithy-go/transport/http/time.go
new file mode 100644
index 000000000..607b196a8
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/time.go
@@ -0,0 +1,13 @@
+package http
+
+import (
+ "time"
+
+ smithytime "github.com/aws/smithy-go/time"
+)
+
+// ParseTime parses a time string like the HTTP Date header. This uses a more
+// relaxed rule set for date parsing compared to the standard library.
+func ParseTime(text string) (t time.Time, err error) {
+ return smithytime.ParseHTTPDate(text)
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/url.go b/vendor/github.com/aws/smithy-go/transport/http/url.go
new file mode 100644
index 000000000..60a5fc100
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/url.go
@@ -0,0 +1,44 @@
+package http
+
+import "strings"
+
+// JoinPath returns an absolute URL path composed of the two paths provided.
+// Enforces that the returned path begins with '/'. If added path is empty the
+// returned path suffix will match the first parameter suffix.
+func JoinPath(a, b string) string {
+ if len(a) == 0 {
+ a = "/"
+ } else if a[0] != '/' {
+ a = "/" + a
+ }
+
+ if len(b) != 0 && b[0] == '/' {
+ b = b[1:]
+ }
+
+ if len(b) != 0 && len(a) > 1 && a[len(a)-1] != '/' {
+ a = a + "/"
+ }
+
+ return a + b
+}
+
+// JoinRawQuery returns an absolute raw query expression. Any duplicate '&'
+// will be collapsed to single separator between values.
+func JoinRawQuery(a, b string) string {
+ a = strings.TrimFunc(a, isAmpersand)
+ b = strings.TrimFunc(b, isAmpersand)
+
+ if len(a) == 0 {
+ return b
+ }
+ if len(b) == 0 {
+ return a
+ }
+
+ return a + "&" + b
+}
+
+func isAmpersand(v rune) bool {
+ return v == '&'
+}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/user_agent.go b/vendor/github.com/aws/smithy-go/transport/http/user_agent.go
new file mode 100644
index 000000000..71a7e0d8a
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/transport/http/user_agent.go
@@ -0,0 +1,37 @@
+package http
+
+import (
+ "strings"
+)
+
+// UserAgentBuilder is a builder for a HTTP User-Agent string.
+type UserAgentBuilder struct {
+ sb strings.Builder
+}
+
+// NewUserAgentBuilder returns a new UserAgentBuilder.
+func NewUserAgentBuilder() *UserAgentBuilder {
+ return &UserAgentBuilder{sb: strings.Builder{}}
+}
+
+// AddKey adds the named component/product to the agent string
+func (u *UserAgentBuilder) AddKey(key string) {
+ u.appendTo(key)
+}
+
+// AddKeyValue adds the named key to the agent string with the given value.
+func (u *UserAgentBuilder) AddKeyValue(key, value string) {
+ u.appendTo(key + "/" + value)
+}
+
+// Build returns the constructed User-Agent string. May be called multiple times.
+func (u *UserAgentBuilder) Build() string {
+ return u.sb.String()
+}
+
+func (u *UserAgentBuilder) appendTo(value string) {
+ if u.sb.Len() > 0 {
+ u.sb.WriteRune(' ')
+ }
+ u.sb.WriteString(value)
+}
diff --git a/vendor/github.com/aws/smithy-go/validation.go b/vendor/github.com/aws/smithy-go/validation.go
new file mode 100644
index 000000000..b5eedc1f9
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/validation.go
@@ -0,0 +1,140 @@
+package smithy
+
+import (
+ "bytes"
+ "fmt"
+ "strings"
+)
+
+// An InvalidParamsError provides wrapping of invalid parameter errors found when
+// validating API operation input parameters.
+type InvalidParamsError struct {
+ // Context is the base context of the invalid parameter group.
+ Context string
+ errs []InvalidParamError
+}
+
+// Add adds a new invalid parameter error to the collection of invalid
+// parameters. The context of the invalid parameter will be updated to reflect
+// this collection.
+func (e *InvalidParamsError) Add(err InvalidParamError) {
+ err.SetContext(e.Context)
+ e.errs = append(e.errs, err)
+}
+
+// AddNested adds the invalid parameter errors from another InvalidParamsError
+// value into this collection. The nested errors will have their nested context
+// updated and base context to reflect the merging.
+//
+// Use for nested validations errors.
+func (e *InvalidParamsError) AddNested(nestedCtx string, nested InvalidParamsError) {
+ for _, err := range nested.errs {
+ err.SetContext(e.Context)
+ err.AddNestedContext(nestedCtx)
+ e.errs = append(e.errs, err)
+ }
+}
+
+// Len returns the number of invalid parameter errors
+func (e *InvalidParamsError) Len() int {
+ return len(e.errs)
+}
+
+// Error returns the string formatted form of the invalid parameters.
+func (e InvalidParamsError) Error() string {
+ w := &bytes.Buffer{}
+ fmt.Fprintf(w, "%d validation error(s) found.\n", len(e.errs))
+
+ for _, err := range e.errs {
+ fmt.Fprintf(w, "- %s\n", err.Error())
+ }
+
+ return w.String()
+}
+
+// Errs returns a slice of the invalid parameters
+func (e InvalidParamsError) Errs() []error {
+ errs := make([]error, len(e.errs))
+ for i := 0; i < len(errs); i++ {
+ errs[i] = e.errs[i]
+ }
+
+ return errs
+}
+
+// An InvalidParamError represents an invalid parameter error type.
+type InvalidParamError interface {
+ error
+
+ // Field name the error occurred on.
+ Field() string
+
+ // SetContext updates the context of the error.
+ SetContext(string)
+
+ // AddNestedContext updates the error's context to include a nested level.
+ AddNestedContext(string)
+}
+
+type invalidParamError struct {
+ context string
+ nestedContext string
+ field string
+ reason string
+}
+
+// Error returns the string version of the invalid parameter error.
+func (e invalidParamError) Error() string {
+ return fmt.Sprintf("%s, %s.", e.reason, e.Field())
+}
+
+// Field Returns the field and context the error occurred.
+func (e invalidParamError) Field() string {
+ sb := &strings.Builder{}
+ sb.WriteString(e.context)
+ if sb.Len() > 0 {
+ if len(e.nestedContext) == 0 || (len(e.nestedContext) > 0 && e.nestedContext[:1] != "[") {
+ sb.WriteRune('.')
+ }
+ }
+ if len(e.nestedContext) > 0 {
+ sb.WriteString(e.nestedContext)
+ sb.WriteRune('.')
+ }
+ sb.WriteString(e.field)
+ return sb.String()
+}
+
+// SetContext updates the base context of the error.
+func (e *invalidParamError) SetContext(ctx string) {
+ e.context = ctx
+}
+
+// AddNestedContext prepends a context to the field's path.
+func (e *invalidParamError) AddNestedContext(ctx string) {
+ if len(e.nestedContext) == 0 {
+ e.nestedContext = ctx
+ return
+ }
+ // Check if our nested context is an index into a slice or map
+ if e.nestedContext[:1] != "[" {
+ e.nestedContext = fmt.Sprintf("%s.%s", ctx, e.nestedContext)
+ return
+ }
+ e.nestedContext = ctx + e.nestedContext
+}
+
+// An ParamRequiredError represents an required parameter error.
+type ParamRequiredError struct {
+ invalidParamError
+}
+
+// NewErrParamRequired creates a new required parameter error.
+func NewErrParamRequired(field string) *ParamRequiredError {
+ return &ParamRequiredError{
+ invalidParamError{
+ field: field,
+ reason: fmt.Sprintf("missing required field"),
+ },
+ }
+}
diff --git a/vendor/github.com/aws/smithy-go/waiter/logger.go b/vendor/github.com/aws/smithy-go/waiter/logger.go
new file mode 100644
index 000000000..8d70a03ff
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/waiter/logger.go
@@ -0,0 +1,36 @@
+package waiter
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/middleware"
+)
+
+// Logger is the Logger middleware used by the waiter to log an attempt
+type Logger struct {
+ // Attempt is the current attempt to be logged
+ Attempt int64
+}
+
+// ID representing the Logger middleware
+func (*Logger) ID() string {
+ return "WaiterLogger"
+}
+
+// HandleInitialize performs handling of request in initialize stack step
+func (m *Logger) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ logger := middleware.GetLogger(ctx)
+
+ logger.Logf(logging.Debug, fmt.Sprintf("attempting waiter request, attempt count: %d", m.Attempt))
+
+ return next.HandleInitialize(ctx, in)
+}
+
+// AddLogger is a helper util to add waiter logger after `SetLogger` middleware in
+func (m Logger) AddLogger(stack *middleware.Stack) error {
+ return stack.Initialize.Insert(&m, "SetLogger", middleware.After)
+}
diff --git a/vendor/github.com/aws/smithy-go/waiter/waiter.go b/vendor/github.com/aws/smithy-go/waiter/waiter.go
new file mode 100644
index 000000000..03e46e2ee
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/waiter/waiter.go
@@ -0,0 +1,66 @@
+package waiter
+
+import (
+ "fmt"
+ "math"
+ "time"
+
+ "github.com/aws/smithy-go/rand"
+)
+
+// ComputeDelay computes delay between waiter attempts. The function takes in a current attempt count,
+// minimum delay, maximum delay, and remaining wait time for waiter as input. The inputs minDelay and maxDelay
+// must always be greater than 0, along with minDelay lesser than or equal to maxDelay.
+//
+// Returns the computed delay and if next attempt count is possible within the given input time constraints.
+// Note that the zeroth attempt results in no delay.
+func ComputeDelay(attempt int64, minDelay, maxDelay, remainingTime time.Duration) (delay time.Duration, err error) {
+ // zeroth attempt, no delay
+ if attempt <= 0 {
+ return 0, nil
+ }
+
+ // remainingTime is zero or less, no delay
+ if remainingTime <= 0 {
+ return 0, nil
+ }
+
+ // validate min delay is greater than 0
+ if minDelay == 0 {
+ return 0, fmt.Errorf("minDelay must be greater than zero when computing Delay")
+ }
+
+ // validate max delay is greater than 0
+ if maxDelay == 0 {
+ return 0, fmt.Errorf("maxDelay must be greater than zero when computing Delay")
+ }
+
+ // Get attempt ceiling to prevent integer overflow.
+ attemptCeiling := (math.Log(float64(maxDelay/minDelay)) / math.Log(2)) + 1
+
+ if attempt > int64(attemptCeiling) {
+ delay = maxDelay
+ } else {
+ // Compute exponential delay based on attempt.
+ ri := 1 << uint64(attempt-1)
+ // compute delay
+ delay = minDelay * time.Duration(ri)
+ }
+
+ if delay != minDelay {
+ // randomize to get jitter between min delay and delay value
+ d, err := rand.CryptoRandInt63n(int64(delay - minDelay))
+ if err != nil {
+ return 0, fmt.Errorf("error computing retry jitter, %w", err)
+ }
+
+ delay = time.Duration(d) + minDelay
+ }
+
+ // check if this is the last attempt possible and compute delay accordingly
+ if remainingTime-delay <= minDelay {
+ delay = remainingTime - minDelay
+ }
+
+ return delay, nil
+}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 3a23ace48..6ef2aa626 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -34,59 +34,117 @@ github.com/VictoriaMetrics/metricsql/binaryop
# github.com/VividCortex/ewma v1.2.0
## explicit; go 1.12
github.com/VividCortex/ewma
-# github.com/aws/aws-sdk-go v1.44.105
-## explicit; go 1.11
-github.com/aws/aws-sdk-go/aws
-github.com/aws/aws-sdk-go/aws/arn
-github.com/aws/aws-sdk-go/aws/awserr
-github.com/aws/aws-sdk-go/aws/awsutil
-github.com/aws/aws-sdk-go/aws/client
-github.com/aws/aws-sdk-go/aws/client/metadata
-github.com/aws/aws-sdk-go/aws/corehandlers
-github.com/aws/aws-sdk-go/aws/credentials
-github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds
-github.com/aws/aws-sdk-go/aws/credentials/endpointcreds
-github.com/aws/aws-sdk-go/aws/credentials/processcreds
-github.com/aws/aws-sdk-go/aws/credentials/ssocreds
-github.com/aws/aws-sdk-go/aws/credentials/stscreds
-github.com/aws/aws-sdk-go/aws/csm
-github.com/aws/aws-sdk-go/aws/defaults
-github.com/aws/aws-sdk-go/aws/ec2metadata
-github.com/aws/aws-sdk-go/aws/endpoints
-github.com/aws/aws-sdk-go/aws/request
-github.com/aws/aws-sdk-go/aws/session
-github.com/aws/aws-sdk-go/aws/signer/v4
-github.com/aws/aws-sdk-go/internal/context
-github.com/aws/aws-sdk-go/internal/ini
-github.com/aws/aws-sdk-go/internal/s3shared
-github.com/aws/aws-sdk-go/internal/s3shared/arn
-github.com/aws/aws-sdk-go/internal/s3shared/s3err
-github.com/aws/aws-sdk-go/internal/sdkio
-github.com/aws/aws-sdk-go/internal/sdkmath
-github.com/aws/aws-sdk-go/internal/sdkrand
-github.com/aws/aws-sdk-go/internal/sdkuri
-github.com/aws/aws-sdk-go/internal/shareddefaults
-github.com/aws/aws-sdk-go/internal/strings
-github.com/aws/aws-sdk-go/internal/sync/singleflight
-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/json/jsonutil
-github.com/aws/aws-sdk-go/private/protocol/jsonrpc
-github.com/aws/aws-sdk-go/private/protocol/query
-github.com/aws/aws-sdk-go/private/protocol/query/queryutil
-github.com/aws/aws-sdk-go/private/protocol/rest
-github.com/aws/aws-sdk-go/private/protocol/restjson
-github.com/aws/aws-sdk-go/private/protocol/restxml
-github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil
-github.com/aws/aws-sdk-go/service/s3
-github.com/aws/aws-sdk-go/service/s3/s3iface
-github.com/aws/aws-sdk-go/service/s3/s3manager
-github.com/aws/aws-sdk-go/service/sso
-github.com/aws/aws-sdk-go/service/sso/ssoiface
-github.com/aws/aws-sdk-go/service/sts
-github.com/aws/aws-sdk-go/service/sts/stsiface
+# github.com/aws/aws-sdk-go-v2 v1.16.16
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2
+github.com/aws/aws-sdk-go-v2/aws
+github.com/aws/aws-sdk-go-v2/aws/arn
+github.com/aws/aws-sdk-go-v2/aws/defaults
+github.com/aws/aws-sdk-go-v2/aws/middleware
+github.com/aws/aws-sdk-go-v2/aws/protocol/query
+github.com/aws/aws-sdk-go-v2/aws/protocol/restjson
+github.com/aws/aws-sdk-go-v2/aws/protocol/xml
+github.com/aws/aws-sdk-go-v2/aws/ratelimit
+github.com/aws/aws-sdk-go-v2/aws/retry
+github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4
+github.com/aws/aws-sdk-go-v2/aws/signer/v4
+github.com/aws/aws-sdk-go-v2/aws/transport/http
+github.com/aws/aws-sdk-go-v2/internal/awsutil
+github.com/aws/aws-sdk-go-v2/internal/rand
+github.com/aws/aws-sdk-go-v2/internal/sdk
+github.com/aws/aws-sdk-go-v2/internal/sdkio
+github.com/aws/aws-sdk-go-v2/internal/strings
+github.com/aws/aws-sdk-go-v2/internal/sync/singleflight
+github.com/aws/aws-sdk-go-v2/internal/timeconv
+# github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.0.0
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream
+github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi
+# github.com/aws/aws-sdk-go-v2/config v1.17.7
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/config
+# github.com/aws/aws-sdk-go-v2/credentials v1.12.20
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/credentials
+github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds
+github.com/aws/aws-sdk-go-v2/credentials/endpointcreds
+github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client
+github.com/aws/aws-sdk-go-v2/credentials/processcreds
+github.com/aws/aws-sdk-go-v2/credentials/ssocreds
+github.com/aws/aws-sdk-go-v2/credentials/stscreds
+# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.17
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config
+# github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.7.1
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/feature/s3/manager
+# github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.23
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/internal/configsources
+# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.17
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2
+# github.com/aws/aws-sdk-go-v2/internal/ini v1.3.24
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/internal/ini
+# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.5.0
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding
+# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.17
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url
+# github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.9.0
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/service/internal/s3shared
+github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn
+github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config
+# github.com/aws/aws-sdk-go-v2/service/s3 v1.19.0
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/service/s3
+github.com/aws/aws-sdk-go-v2/service/s3/internal/arn
+github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations
+github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints
+github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a
+github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/crypto
+github.com/aws/aws-sdk-go-v2/service/s3/internal/v4a/internal/v4
+github.com/aws/aws-sdk-go-v2/service/s3/types
+# github.com/aws/aws-sdk-go-v2/service/sso v1.11.23
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/service/sso
+github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints
+github.com/aws/aws-sdk-go-v2/service/sso/types
+# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.5
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/service/ssooidc
+github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints
+github.com/aws/aws-sdk-go-v2/service/ssooidc/types
+# github.com/aws/aws-sdk-go-v2/service/sts v1.16.19
+## explicit; go 1.15
+github.com/aws/aws-sdk-go-v2/service/sts
+github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints
+github.com/aws/aws-sdk-go-v2/service/sts/types
+# github.com/aws/smithy-go v1.13.3
+## explicit; go 1.15
+github.com/aws/smithy-go
+github.com/aws/smithy-go/auth/bearer
+github.com/aws/smithy-go/context
+github.com/aws/smithy-go/document
+github.com/aws/smithy-go/encoding
+github.com/aws/smithy-go/encoding/httpbinding
+github.com/aws/smithy-go/encoding/json
+github.com/aws/smithy-go/encoding/xml
+github.com/aws/smithy-go/internal/sync/singleflight
+github.com/aws/smithy-go/io
+github.com/aws/smithy-go/logging
+github.com/aws/smithy-go/middleware
+github.com/aws/smithy-go/ptr
+github.com/aws/smithy-go/rand
+github.com/aws/smithy-go/sync
+github.com/aws/smithy-go/time
+github.com/aws/smithy-go/transport/http
+github.com/aws/smithy-go/transport/http/internal/io
+github.com/aws/smithy-go/waiter
# github.com/beorn7/perks v1.0.1
## explicit; go 1.11
github.com/beorn7/perks/quantile